From b86fbdd29f0d5e4dc86f4a89ff101808b15cba7c Mon Sep 17 00:00:00 2001 From: Muiris Woulfe Date: Mon, 17 Jul 2023 17:41:39 +0100 Subject: [PATCH] =?UTF-8?q?XS=E2=9A=A0=EF=B8=8F=20=E2=97=BE=20[Autogenerat?= =?UTF-8?q?ed]=20Release=20v1.5.5=20(#409)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Autogenerated release for PR Metrics v1.5.5. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/azure-devops/template.yml | 15 + .github/workflows/build.yml | 5 + .github/workflows/release-phase-1.yml | 4 +- .github/workflows/support/release-trigger.txt | 2 +- README.md | 4 +- dist/index.js | 194532 ++++++++------- dist/resources.resjson | 2 +- package-lock.json | 2334 +- package.json | 27 +- src/LICENSE.txt | 490 +- .../resources.resjson/en-US/resources.resjson | 2 +- src/task/src/repos/gitHubReposInvoker.ts | 8 +- src/task/task.json | 4 +- src/task/task.loc.json | 2 +- .../tests/repos/gitHubReposInvoker.spec.ts | 6 +- src/vss-extension.json | 2 +- 16 files changed, 107973 insertions(+), 89466 deletions(-) diff --git a/.github/azure-devops/template.yml b/.github/azure-devops/template.yml index 6396e6b8..815a1e6a 100644 --- a/.github/azure-devops/template.yml +++ b/.github/azure-devops/template.yml @@ -36,6 +36,11 @@ stages: env: # Azure DevOps Personal Access Token (PAT) with the Agent Pools (Read & Manage) permission. PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT) + with: + file-matching-patterns: | + **/* + !dist/* + !package-lock.json - job: PRMetrics_Ubuntu displayName: PR Metrics – Ubuntu @@ -57,6 +62,11 @@ stages: env: # Azure DevOps Personal Access Token (PAT) with the Agent Pools (Read & Manage) permission. PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT) + with: + file-matching-patterns: | + **/* + !dist/* + !package-lock.json - job: PRMetrics_Windows displayName: PR Metrics – Windows @@ -78,6 +88,11 @@ stages: env: # Azure DevOps Personal Access Token (PAT) with the Agent Pools (Read & Manage) permission. PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT) + with: + file-matching-patterns: | + **/* + !dist/* + !package-lock.json - job: Compliance displayName: Compliance diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8e5fdcb..097d7c9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -160,6 +160,11 @@ jobs: uses: ./ env: PR_METRICS_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file-matching-patterns: | + **/* + !dist/* + !package-lock.json validate: name: Validate diff --git a/.github/workflows/release-phase-1.yml b/.github/workflows/release-phase-1.yml index 7c1684bb..08479642 100644 --- a/.github/workflows/release-phase-1.yml +++ b/.github/workflows/release-phase-1.yml @@ -22,7 +22,7 @@ on: required: true type: string patch: - default: '4' + default: '6' description: The patch element of the version number required: true type: string @@ -38,6 +38,6 @@ jobs: with: major: ${{ inputs.major || 1 }} minor: ${{ inputs.minor || 5 }} - patch: ${{ inputs.patch || 4 }} + patch: ${{ inputs.patch || 6 }} ... diff --git a/.github/workflows/support/release-trigger.txt b/.github/workflows/support/release-trigger.txt index 94fe62c2..9075be49 100644 --- a/.github/workflows/support/release-trigger.txt +++ b/.github/workflows/support/release-trigger.txt @@ -1 +1 @@ -1.5.4 +1.5.5 diff --git a/README.md b/README.md index 14c5a582..34f35a59 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ The default input values are expected to be appropriate for most builds. Therefore, the following YAML definition is recommended: ```YAML -uses: microsoft/PR-Metrics@v1.5.4 +uses: microsoft/PR-Metrics@v1.5.5 name: PR Metrics env: PR_METRICS_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -123,7 +123,7 @@ continue-on-error: true If you wish to modify the inputs, YAML akin the to the following can be used: ```YAML -uses: microsoft/PR-Metrics@v1.5.4 +uses: microsoft/PR-Metrics@v1.5.5 name: PR Metrics env: PR_METRICS_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/dist/index.js b/dist/index.js index 1a4a23f6..5055a457 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 7351: +/***/ 87351: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(2037)); +const os = __importStar(__nccwpck_require__(22037)); const utils_1 = __nccwpck_require__(5278); /** * Commands @@ -100,7 +100,7 @@ function escapeProperty(s) { /***/ }), -/***/ 2186: +/***/ 42186: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -135,12 +135,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(7351); +const command_1 = __nccwpck_require__(87351); const file_command_1 = __nccwpck_require__(717); const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(2037)); -const path = __importStar(__nccwpck_require__(1017)); -const oidc_utils_1 = __nccwpck_require__(8041); +const os = __importStar(__nccwpck_require__(22037)); +const path = __importStar(__nccwpck_require__(71017)); +const oidc_utils_1 = __nccwpck_require__(98041); /** * The code to exit an action */ @@ -425,12 +425,12 @@ exports.getIDToken = getIDToken; /** * Summary exports */ -var summary_1 = __nccwpck_require__(1327); +var summary_1 = __nccwpck_require__(81327); Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); /** * @deprecated use core.summary */ -var summary_2 = __nccwpck_require__(1327); +var summary_2 = __nccwpck_require__(81327); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); /** * Path exports @@ -472,9 +472,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(7147)); -const os = __importStar(__nccwpck_require__(2037)); -const uuid_1 = __nccwpck_require__(5840); +const fs = __importStar(__nccwpck_require__(57147)); +const os = __importStar(__nccwpck_require__(22037)); +const uuid_1 = __nccwpck_require__(75840); const utils_1 = __nccwpck_require__(5278); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -508,7 +508,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), -/***/ 8041: +/***/ 98041: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -524,9 +524,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(6255); -const auth_1 = __nccwpck_require__(5526); -const core_1 = __nccwpck_require__(2186); +const http_client_1 = __nccwpck_require__(96255); +const auth_1 = __nccwpck_require__(35526); +const core_1 = __nccwpck_require__(42186); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -618,7 +618,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(1017)); +const path = __importStar(__nccwpck_require__(71017)); /** * toPosixPath converts the given path to the posix form. On Windows, \\ will be * replaced with /. @@ -657,7 +657,7 @@ exports.toPlatformPath = toPlatformPath; /***/ }), -/***/ 1327: +/***/ 81327: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -673,8 +673,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(2037); -const fs_1 = __nccwpck_require__(7147); +const os_1 = __nccwpck_require__(22037); +const fs_1 = __nccwpck_require__(57147); const { access, appendFile, writeFile } = fs_1.promises; exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; @@ -994,7 +994,7 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 1514: +/***/ 71514: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1029,8 +1029,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getExecOutput = exports.exec = void 0; -const string_decoder_1 = __nccwpck_require__(1576); -const tr = __importStar(__nccwpck_require__(8159)); +const string_decoder_1 = __nccwpck_require__(71576); +const tr = __importStar(__nccwpck_require__(88159)); /** * Exec a command. * Output will be streamed to the live console. @@ -1104,7 +1104,7 @@ exports.getExecOutput = getExecOutput; /***/ }), -/***/ 8159: +/***/ 88159: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1139,13 +1139,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.argStringToArray = exports.ToolRunner = void 0; -const os = __importStar(__nccwpck_require__(2037)); -const events = __importStar(__nccwpck_require__(2361)); -const child = __importStar(__nccwpck_require__(2081)); -const path = __importStar(__nccwpck_require__(1017)); -const io = __importStar(__nccwpck_require__(7436)); -const ioUtil = __importStar(__nccwpck_require__(1962)); -const timers_1 = __nccwpck_require__(9512); +const os = __importStar(__nccwpck_require__(22037)); +const events = __importStar(__nccwpck_require__(82361)); +const child = __importStar(__nccwpck_require__(32081)); +const path = __importStar(__nccwpck_require__(71017)); +const io = __importStar(__nccwpck_require__(47351)); +const ioUtil = __importStar(__nccwpck_require__(81962)); +const timers_1 = __nccwpck_require__(39512); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -1729,7 +1729,7 @@ class ExecState extends events.EventEmitter { /***/ }), -/***/ 5526: +/***/ 35526: /***/ (function(__unused_webpack_module, exports) { "use strict"; @@ -1817,7 +1817,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 6255: +/***/ 96255: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1853,10 +1853,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(3685)); -const https = __importStar(__nccwpck_require__(5687)); -const pm = __importStar(__nccwpck_require__(9835)); -const tunnel = __importStar(__nccwpck_require__(4294)); +const http = __importStar(__nccwpck_require__(13685)); +const https = __importStar(__nccwpck_require__(95687)); +const pm = __importStar(__nccwpck_require__(19835)); +const tunnel = __importStar(__nccwpck_require__(74294)); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -2429,7 +2429,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa /***/ }), -/***/ 9835: +/***/ 19835: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -2512,7 +2512,7 @@ function isLoopbackAddress(host) { /***/ }), -/***/ 1962: +/***/ 81962: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2548,8 +2548,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(7147)); -const path = __importStar(__nccwpck_require__(1017)); +const fs = __importStar(__nccwpck_require__(57147)); +const path = __importStar(__nccwpck_require__(71017)); _a = fs.promises // export const {open} = 'fs' , exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; @@ -2702,7 +2702,7 @@ exports.getCmdPath = getCmdPath; /***/ }), -/***/ 7436: +/***/ 47351: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2737,9 +2737,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(9491); -const path = __importStar(__nccwpck_require__(1017)); -const ioUtil = __importStar(__nccwpck_require__(1962)); +const assert_1 = __nccwpck_require__(39491); +const path = __importStar(__nccwpck_require__(71017)); +const ioUtil = __importStar(__nccwpck_require__(81962)); /** * Copies a file or folder. * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js @@ -3008,7 +3008,7 @@ function copyFile(srcFile, destFile, force) { /***/ }), -/***/ 4389: +/***/ 24389: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -3038,19 +3038,19 @@ __export(dist_src_exports, { createNodeMiddleware: () => createNodeMiddleware }); module.exports = __toCommonJS(dist_src_exports); -var import_core5 = __nccwpck_require__(6762); -var import_auth_app3 = __nccwpck_require__(7541); -var import_oauth_app2 = __nccwpck_require__(3493); -var import_webhooks3 = __nccwpck_require__(8513); +var import_core5 = __nccwpck_require__(76762); +var import_auth_app3 = __nccwpck_require__(47541); +var import_oauth_app2 = __nccwpck_require__(73493); +var import_webhooks3 = __nccwpck_require__(18513); // pkg/dist-src/version.js -var VERSION = "13.1.8"; +var VERSION = "14.0.0"; // pkg/dist-src/webhooks.js -var import_core = __nccwpck_require__(6762); -var import_auth_app = __nccwpck_require__(7541); -var import_auth_unauthenticated = __nccwpck_require__(9567); -var import_webhooks = __nccwpck_require__(8513); +var import_core = __nccwpck_require__(76762); +var import_auth_app = __nccwpck_require__(47541); +var import_auth_unauthenticated = __nccwpck_require__(79567); +var import_webhooks = __nccwpck_require__(18513); function webhooks(appOctokit, options) { return new import_webhooks.Webhooks({ secret: options.secret, @@ -3096,12 +3096,12 @@ function webhooks(appOctokit, options) { } // pkg/dist-src/each-installation.js -var import_plugin_paginate_rest = __nccwpck_require__(4193); -var import_core3 = __nccwpck_require__(6762); +var import_plugin_paginate_rest = __nccwpck_require__(64193); +var import_core3 = __nccwpck_require__(76762); // pkg/dist-src/get-installation-octokit.js -var import_auth_app2 = __nccwpck_require__(7541); -var import_core2 = __nccwpck_require__(6762); +var import_auth_app2 = __nccwpck_require__(47541); +var import_core2 = __nccwpck_require__(76762); async function getInstallationOctokit(app, installationId) { return app.octokit.auth({ type: "installation", @@ -3152,8 +3152,8 @@ function eachInstallationIterator(app) { } // pkg/dist-src/each-repository.js -var import_plugin_paginate_rest2 = __nccwpck_require__(4193); -var import_core4 = __nccwpck_require__(6762); +var import_plugin_paginate_rest2 = __nccwpck_require__(64193); +var import_core4 = __nccwpck_require__(76762); function eachRepositoryFactory(app) { return Object.assign(eachRepository.bind(null, app), { iterator: eachRepositoryIterator.bind(null, app) @@ -3203,22 +3203,8 @@ function eachRepositoryIterator(app, query) { } // pkg/dist-src/middleware/node/index.js -var import_oauth_app = __nccwpck_require__(3493); -var import_webhooks2 = __nccwpck_require__(8513); - -// pkg/dist-src/middleware/node/on-unhandled-request-default.js -function onUnhandledRequestDefault(request, response) { - response.writeHead(404, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Unknown route: ${request.method} ${request.url}` - }) - ); -} - -// pkg/dist-src/middleware/node/index.js +var import_oauth_app = __nccwpck_require__(73493); +var import_webhooks2 = __nccwpck_require__(18513); function noop() { } function createNodeMiddleware(app, options = {}) { @@ -3232,42 +3218,43 @@ function createNodeMiddleware(app, options = {}) { options.log ); const optionsWithDefaults = { - onUnhandledRequest: onUnhandledRequestDefault, pathPrefix: "/api/github", ...options, log }; const webhooksMiddleware = (0, import_webhooks2.createNodeMiddleware)(app.webhooks, { path: optionsWithDefaults.pathPrefix + "/webhooks", - log, - onUnhandledRequest: optionsWithDefaults.onUnhandledRequest + log }); const oauthMiddleware = (0, import_oauth_app.createNodeMiddleware)(app.oauth, { - pathPrefix: optionsWithDefaults.pathPrefix + "/oauth", - onUnhandledRequest: optionsWithDefaults.onUnhandledRequest + pathPrefix: optionsWithDefaults.pathPrefix + "/oauth" }); - return middleware.bind(null, optionsWithDefaults, { + return middleware.bind( + null, + optionsWithDefaults.pathPrefix, webhooksMiddleware, oauthMiddleware - }); + ); } -async function middleware(options, { webhooksMiddleware, oauthMiddleware }, request, response, next) { +async function middleware(pathPrefix, webhooksMiddleware, oauthMiddleware, request, response, next) { const { pathname } = new URL(request.url, "http://localhost"); - if (pathname === `${options.pathPrefix}/webhooks`) { - return webhooksMiddleware(request, response, next); - } - if (pathname.startsWith(`${options.pathPrefix}/oauth/`)) { - return oauthMiddleware(request, response, next); - } - const isExpressMiddleware = typeof next === "function"; - if (isExpressMiddleware) { - return next(); + if (pathname.startsWith(`${pathPrefix}/`)) { + if (pathname === `${pathPrefix}/webhooks`) { + webhooksMiddleware(request, response); + } else if (pathname.startsWith(`${pathPrefix}/oauth/`)) { + oauthMiddleware(request, response); + } else { + (0, import_oauth_app.sendNodeResponse)((0, import_oauth_app.unknownRouteResponse)(request), response); + } + return true; + } else { + next == null ? void 0 : next(); + return false; } - return options.onUnhandledRequest(request, response); } // pkg/dist-src/index.js -var App = class { +var _App = class _App { static defaults(defaults) { const AppWithDefaults = class extends this { constructor(...args) { @@ -3343,21 +3330,24 @@ var App = class { ); } }; -App.VERSION = VERSION; +_App.VERSION = VERSION; +var App = _App; // Annotate the CommonJS export names for ESM import in node: 0 && (0); /***/ }), -/***/ 7541: +/***/ 47541: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) @@ -3371,6 +3361,14 @@ var __copyProps = (to, from, except, desc) => { } return to; }; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // pkg/dist-src/index.js @@ -3380,15 +3378,16 @@ __export(dist_src_exports, { createOAuthUserAuth: () => import_auth_oauth_user2.createOAuthUserAuth }); module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(5030); -var import_request = __nccwpck_require__(6234); -var import_auth_oauth_app = __nccwpck_require__(8459); +var import_universal_user_agent = __nccwpck_require__(45030); +var import_request = __nccwpck_require__(36234); +var import_auth_oauth_app = __nccwpck_require__(58459); // pkg/dist-src/auth.js -var import_deprecation = __nccwpck_require__(8932); +var import_deprecation = __nccwpck_require__(58932); +var OAuthAppAuth = __toESM(__nccwpck_require__(58459)); // pkg/dist-src/get-app-authentication.js -var import_universal_github_app_jwt = __nccwpck_require__(4419); +var import_universal_github_app_jwt = __nccwpck_require__(84419); async function getAppAuthentication({ appId, privateKey, @@ -3418,7 +3417,7 @@ async function getAppAuthentication({ } // pkg/dist-src/cache.js -var import_lru_cache = __nccwpck_require__(6307); +var import_lru_cache = __nccwpck_require__(86307); function getCache() { return new import_lru_cache.LRUCache({ // cache max. 15000 tokens, that will use less than 10mb memory @@ -3648,7 +3647,8 @@ async function auth(state, authOptions) { } // pkg/dist-src/hook.js -var import_auth_oauth_user = __nccwpck_require__(1591); +var import_auth_oauth_user = __nccwpck_require__(11591); +var import_request_error = __nccwpck_require__(10537); // pkg/dist-src/requires-app-auth.js var PATHS = [ @@ -3773,10 +3773,10 @@ async function sendRequestWithRetries(state, request, options, createdAt, retrie } // pkg/dist-src/version.js -var VERSION = "4.0.13"; +var VERSION = "6.0.0"; // pkg/dist-src/index.js -var import_auth_oauth_user2 = __nccwpck_require__(1591); +var import_auth_oauth_user2 = __nccwpck_require__(11591); function createAppAuth(options) { if (!options.appId) { throw new Error("[@octokit/auth-app] appId option is required"); @@ -3832,7 +3832,7 @@ function createAppAuth(options) { /***/ }), -/***/ 8459: +/***/ 58459: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -3872,12 +3872,12 @@ __export(dist_src_exports, { createOAuthUserAuth: () => import_auth_oauth_user3.createOAuthUserAuth }); module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(5030); -var import_request = __nccwpck_require__(6234); +var import_universal_user_agent = __nccwpck_require__(45030); +var import_request = __nccwpck_require__(36234); // pkg/dist-src/auth.js -var import_btoa_lite = __toESM(__nccwpck_require__(2358)); -var import_auth_oauth_user = __nccwpck_require__(1591); +var import_btoa_lite = __toESM(__nccwpck_require__(72358)); +var import_auth_oauth_user = __nccwpck_require__(11591); async function auth(state, authOptions) { if (authOptions.type === "oauth-app") { return { @@ -3916,8 +3916,8 @@ async function auth(state, authOptions) { } // pkg/dist-src/hook.js -var import_btoa_lite2 = __toESM(__nccwpck_require__(2358)); -var import_auth_oauth_user2 = __nccwpck_require__(1591); +var import_btoa_lite2 = __toESM(__nccwpck_require__(72358)); +var import_auth_oauth_user2 = __nccwpck_require__(11591); async function hook(state, request2, route, parameters) { let endpoint = request2.endpoint.merge( route, @@ -3944,10 +3944,10 @@ async function hook(state, request2, route, parameters) { } // pkg/dist-src/version.js -var VERSION = "5.0.6"; +var VERSION = "7.0.0"; // pkg/dist-src/index.js -var import_auth_oauth_user3 = __nccwpck_require__(1591); +var import_auth_oauth_user3 = __nccwpck_require__(11591); function createOAuthAppAuth(options) { const state = Object.assign( { @@ -3970,7 +3970,7 @@ function createOAuthAppAuth(options) { /***/ }), -/***/ 4344: +/***/ 44344: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -3999,11 +3999,11 @@ __export(dist_src_exports, { createOAuthDeviceAuth: () => createOAuthDeviceAuth }); module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(5030); -var import_request = __nccwpck_require__(6234); +var import_universal_user_agent = __nccwpck_require__(45030); +var import_request = __nccwpck_require__(36234); // pkg/dist-src/get-oauth-access-token.js -var import_oauth_methods = __nccwpck_require__(8445); +var import_oauth_methods = __nccwpck_require__(88445); async function getOAuthAccessToken(state, options) { const cachedAuthentication = getCachedAuthentication(state, options.auth); if (cachedAuthentication) @@ -4103,7 +4103,7 @@ async function hook(state, request, route, parameters) { } // pkg/dist-src/version.js -var VERSION = "4.0.5"; +var VERSION = "6.0.0"; // pkg/dist-src/index.js function createOAuthDeviceAuth(options) { @@ -4143,7 +4143,7 @@ function createOAuthDeviceAuth(options) { /***/ }), -/***/ 1591: +/***/ 11591: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -4183,15 +4183,15 @@ __export(dist_src_exports, { requiresBasicAuth: () => requiresBasicAuth }); module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(5030); -var import_request = __nccwpck_require__(6234); +var import_universal_user_agent = __nccwpck_require__(45030); +var import_request = __nccwpck_require__(36234); // pkg/dist-src/version.js -var VERSION = "2.1.2"; +var VERSION = "4.0.0"; // pkg/dist-src/get-authentication.js -var import_auth_oauth_device = __nccwpck_require__(4344); -var import_oauth_methods = __nccwpck_require__(8445); +var import_auth_oauth_device = __nccwpck_require__(44344); +var import_oauth_methods = __nccwpck_require__(88445); async function getAuthentication(state) { if ("code" in state.strategyOptions) { const { authentication } = await (0, import_oauth_methods.exchangeWebFlowCode)({ @@ -4239,7 +4239,7 @@ async function getAuthentication(state) { } // pkg/dist-src/auth.js -var import_oauth_methods2 = __nccwpck_require__(8445); +var import_oauth_methods2 = __nccwpck_require__(88445); async function auth(state, options = {}) { var _a, _b; if (!state.authentication) { @@ -4331,7 +4331,7 @@ async function auth(state, options = {}) { } // pkg/dist-src/hook.js -var import_btoa_lite = __toESM(__nccwpck_require__(2358)); +var import_btoa_lite = __toESM(__nccwpck_require__(72358)); // pkg/dist-src/requires-basic-auth.js var ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; @@ -4391,7 +4391,7 @@ createOAuthUserAuth.VERSION = VERSION; /***/ }), -/***/ 334: +/***/ 40334: /***/ ((module) => { "use strict"; @@ -4476,8 +4476,8 @@ var createTokenAuth = function createTokenAuth2(token) { /***/ }), -/***/ 9567: -/***/ ((module) => { +/***/ 79567: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -4515,6 +4515,7 @@ async function auth(reason) { } // pkg/dist-src/is-rate-limit-error.js +var import_request_error = __nccwpck_require__(10537); function isRateLimitError(error) { if (error.status !== 403) { return false; @@ -4526,6 +4527,7 @@ function isRateLimitError(error) { } // pkg/dist-src/is-abuse-limit-error.js +var import_request_error2 = __nccwpck_require__(10537); var REGEX_ABUSE_LIMIT_MESSAGE = /\babuse\b/i; function isAbuseLimitError(error) { if (error.status !== 403) { @@ -4584,7 +4586,7 @@ var createUnauthenticatedAuth = function createUnauthenticatedAuth2(options) { /***/ }), -/***/ 6762: +/***/ 76762: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -4613,17 +4615,20 @@ __export(dist_src_exports, { Octokit: () => Octokit }); module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(5030); -var import_before_after_hook = __nccwpck_require__(3682); -var import_request = __nccwpck_require__(6234); -var import_graphql = __nccwpck_require__(8467); -var import_auth_token = __nccwpck_require__(334); +var import_universal_user_agent = __nccwpck_require__(45030); +var import_before_after_hook = __nccwpck_require__(83682); +var import_request = __nccwpck_require__(36234); +var import_graphql = __nccwpck_require__(88467); +var import_auth_token = __nccwpck_require__(40334); // pkg/dist-src/version.js -var VERSION = "4.2.4"; +var VERSION = "5.0.0"; // pkg/dist-src/index.js var Octokit = class { + static { + this.VERSION = VERSION; + } static defaults(defaults) { const OctokitWithDefaults = class extends this { constructor(...args) { @@ -4646,6 +4651,9 @@ var Octokit = class { }; return OctokitWithDefaults; } + static { + this.plugins = []; + } /** * Attach a plugin (or many) to your Octokit instance. * @@ -4653,12 +4661,14 @@ var Octokit = class { * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) */ static plugin(...newPlugins) { - var _a; const currentPlugins = this.plugins; - const NewOctokit = (_a = class extends this { - }, _a.plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ), _a); + const NewOctokit = class extends this { + static { + this.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + } + }; return NewOctokit; } constructor(options = {}) { @@ -4739,15 +4749,13 @@ var Octokit = class { }); } }; -Octokit.VERSION = VERSION; -Octokit.plugins = []; // Annotate the CommonJS export names for ESM import in node: 0 && (0); /***/ }), -/***/ 9440: +/***/ 59440: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -4777,6 +4785,26 @@ __export(dist_src_exports, { }); module.exports = __toCommonJS(dist_src_exports); +// pkg/dist-src/defaults.js +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "9.0.0"; + +// pkg/dist-src/defaults.js +var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; + // pkg/dist-src/util/lowercase-keys.js function lowercaseKeys(object) { if (!object) { @@ -4789,7 +4817,7 @@ function lowercaseKeys(object) { } // pkg/dist-src/util/merge-deep.js -var import_is_plain_object = __nccwpck_require__(3287); +var import_is_plain_object = __nccwpck_require__(63287); function mergeDeep(defaults, options) { const result = Object.assign({}, defaults); Object.keys(options).forEach((key) => { @@ -4827,12 +4855,14 @@ function merge(defaults, route, options) { removeUndefinedProperties(options); removeUndefinedProperties(options.headers); const mergedOptions = mergeDeep(defaults || {}, options); - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter((preview) => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); } - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map( - (preview) => preview.replace(/-preview/, "") - ); return mergedOptions; } @@ -5024,18 +5054,20 @@ function parse(options) { if (!isBinaryRequest) { if (options.mediaType.format) { headers.accept = headers.accept.split(/,/).map( - (preview) => preview.replace( + (format) => format.replace( /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}` ) ).join(","); } - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } } } if (["GET", "HEAD"].includes(method)) { @@ -5079,27 +5111,6 @@ function withDefaults(oldDefaults, newDefaults) { }); } -// pkg/dist-src/defaults.js -var import_universal_user_agent = __nccwpck_require__(5030); - -// pkg/dist-src/version.js -var VERSION = "7.0.6"; - -// pkg/dist-src/defaults.js -var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "", - previews: [] - } -}; - // pkg/dist-src/index.js var endpoint = withDefaults(null, DEFAULTS); // Annotate the CommonJS export names for ESM import in node: @@ -5108,7 +5119,7 @@ var endpoint = withDefaults(null, DEFAULTS); /***/ }), -/***/ 8467: +/***/ 88467: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -5139,11 +5150,17 @@ __export(dist_src_exports, { withCustomRequest: () => withCustomRequest }); module.exports = __toCommonJS(dist_src_exports); -var import_request = __nccwpck_require__(6234); -var import_universal_user_agent = __nccwpck_require__(5030); +var import_request3 = __nccwpck_require__(36234); +var import_universal_user_agent = __nccwpck_require__(45030); // pkg/dist-src/version.js -var VERSION = "5.0.6"; +var VERSION = "7.0.1"; + +// pkg/dist-src/with-defaults.js +var import_request2 = __nccwpck_require__(36234); + +// pkg/dist-src/graphql.js +var import_request = __nccwpck_require__(36234); // pkg/dist-src/error.js function _buildMessageForResponseErrors(data) { @@ -5188,7 +5205,9 @@ function graphql(request2, query, options) { if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; return Promise.reject( - new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`) + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) ); } } @@ -5239,7 +5258,7 @@ function withDefaults(request2, newDefaults) { } // pkg/dist-src/index.js -var graphql2 = withDefaults(import_request.request, { +var graphql2 = withDefaults(import_request3.request, { headers: { "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` }, @@ -5258,7 +5277,7 @@ function withCustomRequest(customRequest) { /***/ }), -/***/ 3493: +/***/ 73493: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -5296,16 +5315,17 @@ var dist_src_exports = {}; __export(dist_src_exports, { OAuthApp: () => OAuthApp, createAWSLambdaAPIGatewayV2Handler: () => createAWSLambdaAPIGatewayV2Handler, - createCloudflareHandler: () => createCloudflareHandler, createNodeMiddleware: () => createNodeMiddleware, createWebWorkerHandler: () => createWebWorkerHandler, - handleRequest: () => handleRequest + handleRequest: () => handleRequest, + sendNodeResponse: () => sendResponse, + unknownRouteResponse: () => unknownRouteResponse }); module.exports = __toCommonJS(dist_src_exports); -var import_auth_oauth_app = __nccwpck_require__(8459); +var import_auth_oauth_app = __nccwpck_require__(58459); // pkg/dist-src/version.js -var VERSION = "4.2.4"; +var VERSION = "6.0.0"; // pkg/dist-src/add-event-handler.js function addEventHandler(state, eventName, eventHandler) { @@ -5322,14 +5342,14 @@ function addEventHandler(state, eventName, eventHandler) { } // pkg/dist-src/oauth-app-octokit.js -var import_core = __nccwpck_require__(6762); -var import_universal_user_agent = __nccwpck_require__(5030); +var import_core = __nccwpck_require__(76762); +var import_universal_user_agent = __nccwpck_require__(45030); var OAuthAppOctokit = import_core.Octokit.defaults({ userAgent: `octokit-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` }); // pkg/dist-src/methods/get-user-octokit.js -var import_auth_oauth_user = __nccwpck_require__(1591); +var import_auth_oauth_user = __nccwpck_require__(11591); // pkg/dist-src/emit-event.js async function emitEvent(state, context) { @@ -5373,7 +5393,7 @@ async function getUserOctokitWithState(state, options) { } // pkg/dist-src/methods/get-web-flow-authorization-url.js -var OAuthMethods = __toESM(__nccwpck_require__(8445)); +var OAuthMethods = __toESM(__nccwpck_require__(88445)); function getWebFlowAuthorizationUrlWithState(state, options) { const optionsWithDefaults = { clientId: state.clientId, @@ -5390,7 +5410,7 @@ function getWebFlowAuthorizationUrlWithState(state, options) { } // pkg/dist-src/methods/create-token.js -var OAuthAppAuth = __toESM(__nccwpck_require__(8459)); +var OAuthAppAuth = __toESM(__nccwpck_require__(58459)); async function createTokenWithState(state, options) { const authentication = await state.octokit.auth({ type: "oauth-user", @@ -5420,7 +5440,7 @@ async function createTokenWithState(state, options) { } // pkg/dist-src/methods/check-token.js -var OAuthMethods2 = __toESM(__nccwpck_require__(8445)); +var OAuthMethods2 = __toESM(__nccwpck_require__(88445)); async function checkTokenWithState(state, options) { const result = await OAuthMethods2.checkToken({ // @ts-expect-error not worth the extra code to appease TS @@ -5435,8 +5455,8 @@ async function checkTokenWithState(state, options) { } // pkg/dist-src/methods/reset-token.js -var OAuthMethods3 = __toESM(__nccwpck_require__(8445)); -var import_auth_oauth_user2 = __nccwpck_require__(1591); +var OAuthMethods3 = __toESM(__nccwpck_require__(88445)); +var import_auth_oauth_user2 = __nccwpck_require__(11591); async function resetTokenWithState(state, options) { const optionsWithDefaults = { clientId: state.clientId, @@ -5499,8 +5519,8 @@ async function resetTokenWithState(state, options) { } // pkg/dist-src/methods/refresh-token.js -var OAuthMethods4 = __toESM(__nccwpck_require__(8445)); -var import_auth_oauth_user3 = __nccwpck_require__(1591); +var OAuthMethods4 = __toESM(__nccwpck_require__(88445)); +var import_auth_oauth_user3 = __nccwpck_require__(11591); async function refreshTokenWithState(state, options) { if (state.clientType === "oauth-app") { throw new Error( @@ -5537,8 +5557,8 @@ async function refreshTokenWithState(state, options) { } // pkg/dist-src/methods/scope-token.js -var OAuthMethods5 = __toESM(__nccwpck_require__(8445)); -var import_auth_oauth_user4 = __nccwpck_require__(1591); +var OAuthMethods5 = __toESM(__nccwpck_require__(88445)); +var import_auth_oauth_user4 = __nccwpck_require__(11591); async function scopeTokenWithState(state, options) { if (state.clientType === "oauth-app") { throw new Error( @@ -5575,8 +5595,8 @@ async function scopeTokenWithState(state, options) { } // pkg/dist-src/methods/delete-token.js -var OAuthMethods6 = __toESM(__nccwpck_require__(8445)); -var import_auth_unauthenticated = __nccwpck_require__(9567); +var OAuthMethods6 = __toESM(__nccwpck_require__(88445)); +var import_auth_unauthenticated = __nccwpck_require__(79567); async function deleteTokenWithState(state, options) { const optionsWithDefaults = { clientId: state.clientId, @@ -5609,8 +5629,8 @@ async function deleteTokenWithState(state, options) { } // pkg/dist-src/methods/delete-authorization.js -var OAuthMethods7 = __toESM(__nccwpck_require__(8445)); -var import_auth_unauthenticated2 = __nccwpck_require__(9567); +var OAuthMethods7 = __toESM(__nccwpck_require__(88445)); +var import_auth_unauthenticated2 = __nccwpck_require__(79567); async function deleteAuthorizationWithState(state, options) { const optionsWithDefaults = { clientId: state.clientId, @@ -5653,10 +5673,19 @@ async function deleteAuthorizationWithState(state, options) { return response; } +// pkg/dist-src/middleware/unknown-route-response.js +function unknownRouteResponse(request) { + return { + status: 404, + headers: { "content-type": "application/json" }, + text: JSON.stringify({ + error: `Unknown route: ${request.method} ${request.url}` + }) + }; +} + // pkg/dist-src/middleware/handle-request.js -var import_fromentries = __toESM(__nccwpck_require__(6522)); async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) { - var _a, _b, _c, _d, _e, _f; if (request.method === "OPTIONS") { return { status: 200, @@ -5667,21 +5696,25 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) } }; } - const { pathname } = new URL(request.url, "http://localhost"); + let { pathname } = new URL(request.url, "http://localhost"); + if (!pathname.startsWith(`${pathPrefix}/`)) { + return void 0; + } + pathname = pathname.slice(pathPrefix.length + 1); const route = [request.method, pathname].join(" "); const routes = { - getLogin: `GET ${pathPrefix}/login`, - getCallback: `GET ${pathPrefix}/callback`, - createToken: `POST ${pathPrefix}/token`, - getToken: `GET ${pathPrefix}/token`, - patchToken: `PATCH ${pathPrefix}/token`, - patchRefreshToken: `PATCH ${pathPrefix}/refresh-token`, - scopeToken: `POST ${pathPrefix}/token/scoped`, - deleteToken: `DELETE ${pathPrefix}/token`, - deleteGrant: `DELETE ${pathPrefix}/grant` + getLogin: `GET login`, + getCallback: `GET callback`, + createToken: `POST token`, + getToken: `GET token`, + patchToken: `PATCH token`, + patchRefreshToken: `PATCH refresh-token`, + scopeToken: `POST token/scoped`, + deleteToken: `DELETE token`, + deleteGrant: `DELETE grant` }; if (!Object.values(routes).includes(route)) { - return null; + return unknownRouteResponse(request); } let json; try { @@ -5700,7 +5733,7 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) }; } const { searchParams } = new URL(request.url, "http://localhost"); - const query = (0, import_fromentries.default)(searchParams); + const query = Object.fromEntries(searchParams); const headers = request.headers; try { if (route === routes.getLogin) { @@ -5756,7 +5789,7 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) }; } if (route === routes.getToken) { - const token2 = (_a = headers.authorization) == null ? void 0 : _a.substr("token ".length); + const token2 = headers.authorization?.substr("token ".length); if (!token2) { throw new Error( '[@octokit/oauth-app] "Authorization" header is required' @@ -5776,7 +5809,7 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) }; } if (route === routes.patchToken) { - const token2 = (_b = headers.authorization) == null ? void 0 : _b.substr("token ".length); + const token2 = headers.authorization?.substr("token ".length); if (!token2) { throw new Error( '[@octokit/oauth-app] "Authorization" header is required' @@ -5794,7 +5827,7 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) }; } if (route === routes.patchRefreshToken) { - const token2 = (_c = headers.authorization) == null ? void 0 : _c.substr("token ".length); + const token2 = headers.authorization?.substr("token ".length); if (!token2) { throw new Error( '[@octokit/oauth-app] "Authorization" header is required' @@ -5818,7 +5851,7 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) }; } if (route === routes.scopeToken) { - const token2 = (_d = headers.authorization) == null ? void 0 : _d.substr("token ".length); + const token2 = headers.authorization?.substr("token ".length); if (!token2) { throw new Error( '[@octokit/oauth-app] "Authorization" header is required' @@ -5839,7 +5872,7 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) }; } if (route === routes.deleteToken) { - const token2 = (_e = headers.authorization) == null ? void 0 : _e.substr("token ".length); + const token2 = headers.authorization?.substr("token ".length); if (!token2) { throw new Error( '[@octokit/oauth-app] "Authorization" header is required' @@ -5853,7 +5886,7 @@ async function handleRequest(app, { pathPrefix = "/api/github/oauth" }, request) headers: { "access-control-allow-origin": "*" } }; } - const token = (_f = headers.authorization) == null ? void 0 : _f.substr("token ".length); + const token = headers.authorization?.substr("token ".length); if (!token) { throw new Error( '[@octokit/oauth-app] "Authorization" header is required' @@ -5897,46 +5930,17 @@ function sendResponse(octokitResponse, response) { response.end(octokitResponse.text); } -// pkg/dist-src/middleware/on-unhandled-request-default.js -function onUnhandledRequestDefault(request) { - return { - status: 404, - headers: { "content-type": "application/json" }, - text: JSON.stringify({ - error: `Unknown route: ${request.method} ${request.url}` - }) - }; -} - // pkg/dist-src/middleware/node/index.js -function onUnhandledRequestDefaultNode(request, response) { - const octokitRequest = parseRequest(request); - const octokitResponse = onUnhandledRequestDefault(octokitRequest); - sendResponse(octokitResponse, response); -} -function createNodeMiddleware(app, { - pathPrefix, - onUnhandledRequest -} = {}) { - if (onUnhandledRequest) { - app.octokit.log.warn( - "[@octokit/oauth-app] `onUnhandledRequest` is deprecated and will be removed from the next major version." - ); - } - onUnhandledRequest ?? (onUnhandledRequest = onUnhandledRequestDefaultNode); +function createNodeMiddleware(app, options = {}) { return async function(request, response, next) { - const octokitRequest = parseRequest(request); - const octokitResponse = await handleRequest( - app, - { pathPrefix }, - octokitRequest - ); + const octokitRequest = await parseRequest(request); + const octokitResponse = await handleRequest(app, options, octokitRequest); if (octokitResponse) { sendResponse(octokitResponse, response); - } else if (typeof next === "function") { - next(); + return true; } else { - onUnhandledRequest(request, response); + next?.(); + return false; } }; } @@ -5961,37 +5965,13 @@ function sendResponse2(octokitResponse) { } // pkg/dist-src/middleware/web-worker/index.js -async function onUnhandledRequestDefaultWebWorker(request) { - const octokitRequest = parseRequest2(request); - const octokitResponse = onUnhandledRequestDefault(octokitRequest); - return sendResponse2(octokitResponse); -} -function createWebWorkerHandler(app, { - pathPrefix, - onUnhandledRequest -} = {}) { - if (onUnhandledRequest) { - app.octokit.log.warn( - "[@octokit/oauth-app] `onUnhandledRequest` is deprecated and will be removed from the next major version." - ); - } - onUnhandledRequest ?? (onUnhandledRequest = onUnhandledRequestDefaultWebWorker); +function createWebWorkerHandler(app, options = {}) { return async function(request) { - const octokitRequest = parseRequest2(request); - const octokitResponse = await handleRequest( - app, - { pathPrefix }, - octokitRequest - ); - return octokitResponse ? sendResponse2(octokitResponse) : await onUnhandledRequest(request); + const octokitRequest = await parseRequest2(request); + const octokitResponse = await handleRequest(app, options, octokitRequest); + return octokitResponse ? sendResponse2(octokitResponse) : void 0; }; } -function createCloudflareHandler(...args) { - args[0].octokit.log.warn( - "[@octokit/oauth-app] `createCloudflareHandler` is deprecated, use `createWebWorkerHandler` instead" - ); - return createWebWorkerHandler(...args); -} // pkg/dist-src/middleware/aws-lambda/api-gateway-v2-parse-request.js function parseRequest3(request) { @@ -6017,30 +5997,19 @@ function sendResponse3(octokitResponse) { } // pkg/dist-src/middleware/aws-lambda/api-gateway-v2.js -async function onUnhandledRequestDefaultAWSAPIGatewayV2(event) { - const request = parseRequest3(event); - const response = onUnhandledRequestDefault(request); - return sendResponse3(response); -} -function createAWSLambdaAPIGatewayV2Handler(app, { - pathPrefix, - onUnhandledRequest -} = {}) { - if (onUnhandledRequest) { - app.octokit.log.warn( - "[@octokit/oauth-app] `onUnhandledRequest` is deprecated and will be removed from the next major version." - ); - } - onUnhandledRequest ?? (onUnhandledRequest = onUnhandledRequestDefaultAWSAPIGatewayV2); +function createAWSLambdaAPIGatewayV2Handler(app, options = {}) { return async function(event) { const request = parseRequest3(event); - const response = await handleRequest(app, { pathPrefix }, request); - return response ? sendResponse3(response) : onUnhandledRequest(event); + const response = await handleRequest(app, options, request); + return response ? sendResponse3(response) : void 0; }; } // pkg/dist-src/index.js var OAuthApp = class { + static { + this.VERSION = VERSION; + } static defaults(defaults) { const OAuthAppWithDefaults = class extends this { constructor(...args) { @@ -6108,451 +6077,464 @@ var OAuthApp = class { this.deleteAuthorization = deleteAuthorizationWithState.bind(null, state); } }; -OAuthApp.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 2272: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function oauthAuthorizationUrl(options) { - const clientType = options.clientType || "oauth-app"; - const baseUrl = options.baseUrl || "https://github.com"; - const result = { - clientType, - allowSignup: options.allowSignup === false ? false : true, - clientId: options.clientId, - login: options.login || null, - redirectUrl: options.redirectUrl || null, - state: options.state || Math.random().toString(36).substr(2), - url: "" - }; - - if (clientType === "oauth-app") { - const scopes = "scopes" in options ? options.scopes : []; - result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes; - } - - result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); - return result; -} - -function urlBuilderAuthorize(base, options) { - const map = { - allowSignup: "allow_signup", - clientId: "client_id", - login: "login", - redirectUrl: "redirect_uri", - scopes: "scope", - state: "state" - }; - let url = base; - Object.keys(map) // Filter out keys that are null and remove the url key - .filter(k => options[k] !== null) // Filter out empty scopes array - .filter(k => { - if (k !== "scopes") return true; - if (options.clientType === "github-app") return false; - return !Array.isArray(options[k]) || options[k].length > 0; - }) // Map Array with the proper URL parameter names and change the value to a string using template strings - // @ts-ignore - .map(key => [map[key], `${options[key]}`]) // Finally, build the URL - .forEach(([key, value], index) => { - url += index === 0 ? `?` : "&"; - url += `${key}=${encodeURIComponent(value)}`; - }); - return url; -} - -exports.oauthAuthorizationUrl = oauthAuthorizationUrl; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 8445: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - VERSION: () => VERSION, - checkToken: () => checkToken, - createDeviceCode: () => createDeviceCode, - deleteAuthorization: () => deleteAuthorization, - deleteToken: () => deleteToken, - exchangeDeviceCode: () => exchangeDeviceCode, - exchangeWebFlowCode: () => exchangeWebFlowCode, - getWebFlowAuthorizationUrl: () => getWebFlowAuthorizationUrl, - refreshToken: () => refreshToken, - resetToken: () => resetToken, - scopeToken: () => scopeToken -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/version.js -var VERSION = "2.0.6"; - -// pkg/dist-src/get-web-flow-authorization-url.js -var import_oauth_authorization_url = __nccwpck_require__(2272); -var import_request = __nccwpck_require__(6234); - -// pkg/dist-src/utils.js -var import_request_error = __nccwpck_require__(537); -function requestToOAuthBaseUrl(request) { - const endpointDefaults = request.endpoint.DEFAULTS; - return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); -} -async function oauthRequest(request, route, parameters) { - const withOAuthParameters = { - baseUrl: requestToOAuthBaseUrl(request), - headers: { - accept: "application/json" - }, - ...parameters - }; - const response = await request(route, withOAuthParameters); - if ("error" in response.data) { - const error = new import_request_error.RequestError( - `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, - 400, - { - request: request.endpoint.merge( - route, - withOAuthParameters - ), - headers: response.headers - } - ); - error.response = response; - throw error; - } - return response; -} - -// pkg/dist-src/get-web-flow-authorization-url.js -function getWebFlowAuthorizationUrl({ - request = import_request.request, - ...options -}) { - const baseUrl = requestToOAuthBaseUrl(request); - return (0, import_oauth_authorization_url.oauthAuthorizationUrl)({ - ...options, - baseUrl - }); -} - -// pkg/dist-src/exchange-web-flow-code.js -var import_request2 = __nccwpck_require__(6234); -async function exchangeWebFlowCode(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request2.request; - const response = await oauthRequest( - request, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - client_secret: options.clientSecret, - code: options.code, - redirect_uri: options.redirectUrl - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.access_token, - scopes: response.data.scope.split(/\s+/).filter(Boolean) - }; - if (options.clientType === "github-app") { - if ("refresh_token" in response.data) { - const apiTimeInMs = new Date(response.headers.date).getTime(); - authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp( - apiTimeInMs, - response.data.expires_in - ), authentication.refreshTokenExpiresAt = toTimestamp( - apiTimeInMs, - response.data.refresh_token_expires_in - ); - } - delete authentication.scopes; - } - return { ...response, authentication }; -} -function toTimestamp(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} - -// pkg/dist-src/create-device-code.js -var import_request3 = __nccwpck_require__(6234); -async function createDeviceCode(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request3.request; - const parameters = { - client_id: options.clientId - }; - if ("scopes" in options && Array.isArray(options.scopes)) { - parameters.scope = options.scopes.join(" "); - } - return oauthRequest(request, "POST /login/device/code", parameters); -} - -// pkg/dist-src/exchange-device-code.js -var import_request4 = __nccwpck_require__(6234); -async function exchangeDeviceCode(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request4.request; - const response = await oauthRequest( - request, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - device_code: options.code, - grant_type: "urn:ietf:params:oauth:grant-type:device_code" - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - token: response.data.access_token, - scopes: response.data.scope.split(/\s+/).filter(Boolean) - }; - if ("clientSecret" in options) { - authentication.clientSecret = options.clientSecret; - } - if (options.clientType === "github-app") { - if ("refresh_token" in response.data) { - const apiTimeInMs = new Date(response.headers.date).getTime(); - authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp2( - apiTimeInMs, - response.data.expires_in - ), authentication.refreshTokenExpiresAt = toTimestamp2( - apiTimeInMs, - response.data.refresh_token_expires_in - ); - } - delete authentication.scopes; - } - return { ...response, authentication }; -} -function toTimestamp2(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} - -// pkg/dist-src/check-token.js -var import_request5 = __nccwpck_require__(6234); -var import_btoa_lite = __toESM(__nccwpck_require__(2358)); -async function checkToken(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request5.request; - const response = await request("POST /applications/{client_id}/token", { - headers: { - authorization: `basic ${(0, import_btoa_lite.default)( - `${options.clientId}:${options.clientSecret}` - )}` - }, - client_id: options.clientId, - access_token: options.token - }); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: options.token, - scopes: response.data.scopes - }; - if (response.data.expires_at) - authentication.expiresAt = response.data.expires_at; - if (options.clientType === "github-app") { - delete authentication.scopes; - } - return { ...response, authentication }; -} - -// pkg/dist-src/refresh-token.js -var import_request6 = __nccwpck_require__(6234); -async function refreshToken(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request6.request; - const response = await oauthRequest( - request, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - client_secret: options.clientSecret, - grant_type: "refresh_token", - refresh_token: options.refreshToken - } - ); - const apiTimeInMs = new Date(response.headers.date).getTime(); - const authentication = { - clientType: "github-app", - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.access_token, - refreshToken: response.data.refresh_token, - expiresAt: toTimestamp3(apiTimeInMs, response.data.expires_in), - refreshTokenExpiresAt: toTimestamp3( - apiTimeInMs, - response.data.refresh_token_expires_in - ) - }; - return { ...response, authentication }; -} -function toTimestamp3(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} - -// pkg/dist-src/scope-token.js -var import_request7 = __nccwpck_require__(6234); -var import_btoa_lite2 = __toESM(__nccwpck_require__(2358)); -async function scopeToken(options) { - const { - request: optionsRequest, - clientType, - clientId, - clientSecret, - token, - ...requestOptions - } = options; - const request = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */ - import_request7.request; - const response = await request( - "POST /applications/{client_id}/token/scoped", - { - headers: { - authorization: `basic ${(0, import_btoa_lite2.default)(`${clientId}:${clientSecret}`)}` - }, - client_id: clientId, - access_token: token, - ...requestOptions - } - ); - const authentication = Object.assign( - { - clientType, - clientId, - clientSecret, - token: response.data.token - }, - response.data.expires_at ? { expiresAt: response.data.expires_at } : {} - ); - return { ...response, authentication }; -} - -// pkg/dist-src/reset-token.js -var import_request8 = __nccwpck_require__(6234); -var import_btoa_lite3 = __toESM(__nccwpck_require__(2358)); -async function resetToken(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request8.request; - const auth = (0, import_btoa_lite3.default)(`${options.clientId}:${options.clientSecret}`); - const response = await request( - "PATCH /applications/{client_id}/token", - { - headers: { - authorization: `basic ${auth}` - }, - client_id: options.clientId, - access_token: options.token - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.token, - scopes: response.data.scopes - }; - if (response.data.expires_at) - authentication.expiresAt = response.data.expires_at; - if (options.clientType === "github-app") { - delete authentication.scopes; - } - return { ...response, authentication }; -} - -// pkg/dist-src/delete-token.js -var import_request9 = __nccwpck_require__(6234); -var import_btoa_lite4 = __toESM(__nccwpck_require__(2358)); -async function deleteToken(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request9.request; - const auth = (0, import_btoa_lite4.default)(`${options.clientId}:${options.clientSecret}`); - return request( - "DELETE /applications/{client_id}/token", - { - headers: { - authorization: `basic ${auth}` - }, - client_id: options.clientId, - access_token: options.token - } - ); -} - -// pkg/dist-src/delete-authorization.js -var import_request10 = __nccwpck_require__(6234); -var import_btoa_lite5 = __toESM(__nccwpck_require__(2358)); -async function deleteAuthorization(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request10.request; - const auth = (0, import_btoa_lite5.default)(`${options.clientId}:${options.clientSecret}`); - return request( - "DELETE /applications/{client_id}/grant", - { - headers: { - authorization: `basic ${auth}` - }, - client_id: options.clientId, - access_token: options.token - } - ); -} // Annotate the CommonJS export names for ESM import in node: 0 && (0); /***/ }), -/***/ 4193: +/***/ 51017: +/***/ ((module) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + oauthAuthorizationUrl: () => oauthAuthorizationUrl +}); +module.exports = __toCommonJS(dist_src_exports); +function oauthAuthorizationUrl(options) { + const clientType = options.clientType || "oauth-app"; + const baseUrl = options.baseUrl || "https://github.com"; + const result = { + clientType, + allowSignup: options.allowSignup === false ? false : true, + clientId: options.clientId, + login: options.login || null, + redirectUrl: options.redirectUrl || null, + state: options.state || Math.random().toString(36).substr(2), + url: "" + }; + if (clientType === "oauth-app") { + const scopes = "scopes" in options ? options.scopes : []; + result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes; + } + result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); + return result; +} +function urlBuilderAuthorize(base, options) { + const map = { + allowSignup: "allow_signup", + clientId: "client_id", + login: "login", + redirectUrl: "redirect_uri", + scopes: "scope", + state: "state" + }; + let url = base; + Object.keys(map).filter((k) => options[k] !== null).filter((k) => { + if (k !== "scopes") + return true; + if (options.clientType === "github-app") + return false; + return !Array.isArray(options[k]) || options[k].length > 0; + }).map((key) => [map[key], `${options[key]}`]).forEach(([key, value], index) => { + url += index === 0 ? `?` : "&"; + url += `${key}=${encodeURIComponent(value)}`; + }); + return url; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 88445: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + VERSION: () => VERSION, + checkToken: () => checkToken, + createDeviceCode: () => createDeviceCode, + deleteAuthorization: () => deleteAuthorization, + deleteToken: () => deleteToken, + exchangeDeviceCode: () => exchangeDeviceCode, + exchangeWebFlowCode: () => exchangeWebFlowCode, + getWebFlowAuthorizationUrl: () => getWebFlowAuthorizationUrl, + refreshToken: () => refreshToken, + resetToken: () => resetToken, + scopeToken: () => scopeToken +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/version.js +var VERSION = "4.0.0"; + +// pkg/dist-src/get-web-flow-authorization-url.js +var import_oauth_authorization_url = __nccwpck_require__(51017); +var import_request = __nccwpck_require__(36234); + +// pkg/dist-src/utils.js +var import_request_error = __nccwpck_require__(10537); +function requestToOAuthBaseUrl(request) { + const endpointDefaults = request.endpoint.DEFAULTS; + return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); +} +async function oauthRequest(request, route, parameters) { + const withOAuthParameters = { + baseUrl: requestToOAuthBaseUrl(request), + headers: { + accept: "application/json" + }, + ...parameters + }; + const response = await request(route, withOAuthParameters); + if ("error" in response.data) { + const error = new import_request_error.RequestError( + `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, + 400, + { + request: request.endpoint.merge( + route, + withOAuthParameters + ), + headers: response.headers + } + ); + error.response = response; + throw error; + } + return response; +} + +// pkg/dist-src/get-web-flow-authorization-url.js +function getWebFlowAuthorizationUrl({ + request = import_request.request, + ...options +}) { + const baseUrl = requestToOAuthBaseUrl(request); + return (0, import_oauth_authorization_url.oauthAuthorizationUrl)({ + ...options, + baseUrl + }); +} + +// pkg/dist-src/exchange-web-flow-code.js +var import_request2 = __nccwpck_require__(36234); +async function exchangeWebFlowCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + import_request2.request; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + client_secret: options.clientSecret, + code: options.code, + redirect_uri: options.redirectUrl + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp( + apiTimeInMs, + response.data.expires_in + ), authentication.refreshTokenExpiresAt = toTimestamp( + apiTimeInMs, + response.data.refresh_token_expires_in + ); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} + +// pkg/dist-src/create-device-code.js +var import_request3 = __nccwpck_require__(36234); +async function createDeviceCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + import_request3.request; + const parameters = { + client_id: options.clientId + }; + if ("scopes" in options && Array.isArray(options.scopes)) { + parameters.scope = options.scopes.join(" "); + } + return oauthRequest(request, "POST /login/device/code", parameters); +} + +// pkg/dist-src/exchange-device-code.js +var import_request4 = __nccwpck_require__(36234); +async function exchangeDeviceCode(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + import_request4.request; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + device_code: options.code, + grant_type: "urn:ietf:params:oauth:grant-type:device_code" + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + token: response.data.access_token, + scopes: response.data.scope.split(/\s+/).filter(Boolean) + }; + if ("clientSecret" in options) { + authentication.clientSecret = options.clientSecret; + } + if (options.clientType === "github-app") { + if ("refresh_token" in response.data) { + const apiTimeInMs = new Date(response.headers.date).getTime(); + authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp2( + apiTimeInMs, + response.data.expires_in + ), authentication.refreshTokenExpiresAt = toTimestamp2( + apiTimeInMs, + response.data.refresh_token_expires_in + ); + } + delete authentication.scopes; + } + return { ...response, authentication }; +} +function toTimestamp2(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} + +// pkg/dist-src/check-token.js +var import_request5 = __nccwpck_require__(36234); +var import_btoa_lite = __toESM(__nccwpck_require__(72358)); +async function checkToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + import_request5.request; + const response = await request("POST /applications/{client_id}/token", { + headers: { + authorization: `basic ${(0, import_btoa_lite.default)( + `${options.clientId}:${options.clientSecret}` + )}` + }, + client_id: options.clientId, + access_token: options.token + }); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: options.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} + +// pkg/dist-src/refresh-token.js +var import_request6 = __nccwpck_require__(36234); +async function refreshToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + import_request6.request; + const response = await oauthRequest( + request, + "POST /login/oauth/access_token", + { + client_id: options.clientId, + client_secret: options.clientSecret, + grant_type: "refresh_token", + refresh_token: options.refreshToken + } + ); + const apiTimeInMs = new Date(response.headers.date).getTime(); + const authentication = { + clientType: "github-app", + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.access_token, + refreshToken: response.data.refresh_token, + expiresAt: toTimestamp3(apiTimeInMs, response.data.expires_in), + refreshTokenExpiresAt: toTimestamp3( + apiTimeInMs, + response.data.refresh_token_expires_in + ) + }; + return { ...response, authentication }; +} +function toTimestamp3(apiTimeInMs, expirationInSeconds) { + return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); +} + +// pkg/dist-src/scope-token.js +var import_request7 = __nccwpck_require__(36234); +var import_btoa_lite2 = __toESM(__nccwpck_require__(72358)); +async function scopeToken(options) { + const { + request: optionsRequest, + clientType, + clientId, + clientSecret, + token, + ...requestOptions + } = options; + const request = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */ + import_request7.request; + const response = await request( + "POST /applications/{client_id}/token/scoped", + { + headers: { + authorization: `basic ${(0, import_btoa_lite2.default)(`${clientId}:${clientSecret}`)}` + }, + client_id: clientId, + access_token: token, + ...requestOptions + } + ); + const authentication = Object.assign( + { + clientType, + clientId, + clientSecret, + token: response.data.token + }, + response.data.expires_at ? { expiresAt: response.data.expires_at } : {} + ); + return { ...response, authentication }; +} + +// pkg/dist-src/reset-token.js +var import_request8 = __nccwpck_require__(36234); +var import_btoa_lite3 = __toESM(__nccwpck_require__(72358)); +async function resetToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + import_request8.request; + const auth = (0, import_btoa_lite3.default)(`${options.clientId}:${options.clientSecret}`); + const response = await request( + "PATCH /applications/{client_id}/token", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); + const authentication = { + clientType: options.clientType, + clientId: options.clientId, + clientSecret: options.clientSecret, + token: response.data.token, + scopes: response.data.scopes + }; + if (response.data.expires_at) + authentication.expiresAt = response.data.expires_at; + if (options.clientType === "github-app") { + delete authentication.scopes; + } + return { ...response, authentication }; +} + +// pkg/dist-src/delete-token.js +var import_request9 = __nccwpck_require__(36234); +var import_btoa_lite4 = __toESM(__nccwpck_require__(72358)); +async function deleteToken(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + import_request9.request; + const auth = (0, import_btoa_lite4.default)(`${options.clientId}:${options.clientSecret}`); + return request( + "DELETE /applications/{client_id}/token", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); +} + +// pkg/dist-src/delete-authorization.js +var import_request10 = __nccwpck_require__(36234); +var import_btoa_lite5 = __toESM(__nccwpck_require__(72358)); +async function deleteAuthorization(options) { + const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ + import_request10.request; + const auth = (0, import_btoa_lite5.default)(`${options.clientId}:${options.clientSecret}`); + return request( + "DELETE /applications/{client_id}/grant", + { + headers: { + authorization: `basic ${auth}` + }, + client_id: options.clientId, + access_token: options.token + } + ); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 64193: /***/ ((module) => { "use strict"; @@ -6586,7 +6568,7 @@ __export(dist_src_exports, { module.exports = __toCommonJS(dist_src_exports); // pkg/dist-src/version.js -var VERSION = "6.1.2"; +var VERSION = "8.0.0"; // pkg/dist-src/normalize-paginated-list-response.js function normalizePaginatedListResponse(response) { @@ -6753,6 +6735,7 @@ var paginatingEndpoints = [ "GET /orgs/{org}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", "GET /orgs/{org}/secret-scanning/alerts", "GET /orgs/{org}/teams", "GET /orgs/{org}/teams/{team_slug}/discussions", @@ -6842,6 +6825,8 @@ var paginatingEndpoints = [ "GET /repos/{owner}/{repo}/releases", "GET /repos/{owner}/{repo}/releases/{release_id}/assets", "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/rules/branches/{branch}", + "GET /repos/{owner}/{repo}/rulesets", "GET /repos/{owner}/{repo}/secret-scanning/alerts", "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "GET /repos/{owner}/{repo}/security-advisories", @@ -6941,659 +6926,8 @@ paginateRest.VERSION = VERSION; /***/ }), -/***/ 6298: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - VERSION: () => VERSION, - retry: () => retry -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/error-request.js -async function errorRequest(state, octokit, error, options) { - if (!error.request || !error.request.request) { - throw error; - } - if (error.status >= 400 && !state.doNotRetry.includes(error.status)) { - const retries = options.request.retries != null ? options.request.retries : state.retries; - const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); - throw octokit.retry.retryRequest(error, retries, retryAfter); - } - throw error; -} - -// pkg/dist-src/wrap-request.js -var import_light = __toESM(__nccwpck_require__(1174)); -var import_request_error = __nccwpck_require__(537); -async function wrapRequest(state, octokit, request, options) { - const limiter = new import_light.default(); - limiter.on("failed", function(error, info) { - const maxRetries = ~~error.request.request.retries; - const after = ~~error.request.request.retryAfter; - options.request.retryCount = info.retryCount + 1; - if (maxRetries > info.retryCount) { - return after * state.retryAfterBaseValue; - } - }); - return limiter.schedule( - requestWithGraphqlErrorHandling.bind(null, state, octokit, request), - options - ); -} -async function requestWithGraphqlErrorHandling(state, octokit, request, options) { - const response = await request(request, options); - if (response.data && response.data.errors && /Something went wrong while executing your query/.test( - response.data.errors[0].message - )) { - const error = new import_request_error.RequestError(response.data.errors[0].message, 500, { - request: options, - response - }); - return errorRequest(state, octokit, error, options); - } - return response; -} - -// pkg/dist-src/index.js -var VERSION = "4.1.6"; -function retry(octokit, octokitOptions) { - const state = Object.assign( - { - enabled: true, - retryAfterBaseValue: 1e3, - doNotRetry: [400, 401, 403, 404, 422], - retries: 3 - }, - octokitOptions.retry - ); - if (state.enabled) { - octokit.hook.error("request", errorRequest.bind(null, state, octokit)); - octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit)); - } - return { - retry: { - retryRequest: (error, retries, retryAfter) => { - error.request.request = Object.assign({}, error.request.request, { - retries, - retryAfter - }); - return error; - } - } - }; -} -retry.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 9968: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var BottleneckLight = _interopDefault(__nccwpck_require__(1174)); - -const VERSION = "5.2.3"; - -const noop = () => Promise.resolve(); -// @ts-expect-error -function wrapRequest(state, request, options) { - return state.retryLimiter.schedule(doRequest, state, request, options); -} -// @ts-expect-error -async function doRequest(state, request, options) { - const isWrite = options.method !== "GET" && options.method !== "HEAD"; - const { - pathname - } = new URL(options.url, "http://github.test"); - const isSearch = options.method === "GET" && pathname.startsWith("/search/"); - const isGraphQL = pathname.startsWith("/graphql"); - const retryCount = ~~request.retryCount; - const jobOptions = retryCount > 0 ? { - priority: 0, - weight: 0 - } : {}; - if (state.clustering) { - // Remove a job from Redis if it has not completed or failed within 60s - // Examples: Node process terminated, client disconnected, etc. - // @ts-expect-error - jobOptions.expiration = 1000 * 60; - } - // Guarantee at least 1000ms between writes - // GraphQL can also trigger writes - if (isWrite || isGraphQL) { - await state.write.key(state.id).schedule(jobOptions, noop); - } - // Guarantee at least 3000ms between requests that trigger notifications - if (isWrite && state.triggersNotification(pathname)) { - await state.notifications.key(state.id).schedule(jobOptions, noop); - } - // Guarantee at least 2000ms between search requests - if (isSearch) { - await state.search.key(state.id).schedule(jobOptions, noop); - } - const req = state.global.key(state.id).schedule(jobOptions, request, options); - if (isGraphQL) { - const res = await req; - if (res.data.errors != null && - // @ts-expect-error - res.data.errors.some(error => error.type === "RATE_LIMITED")) { - const error = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { - response: res, - data: res.data - }); - throw error; - } - } - return req; -} - -var triggersNotificationPaths = ["/orgs/{org}/invitations", "/orgs/{org}/invitations/{invitation_id}", "/orgs/{org}/teams/{team_slug}/discussions", "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "/repos/{owner}/{repo}/collaborators/{username}", "/repos/{owner}/{repo}/commits/{commit_sha}/comments", "/repos/{owner}/{repo}/issues", "/repos/{owner}/{repo}/issues/{issue_number}/comments", "/repos/{owner}/{repo}/pulls", "/repos/{owner}/{repo}/pulls/{pull_number}/comments", "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "/repos/{owner}/{repo}/pulls/{pull_number}/merge", "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "/repos/{owner}/{repo}/releases", "/teams/{team_id}/discussions", "/teams/{team_id}/discussions/{discussion_number}/comments"]; - -function routeMatcher(paths) { - // EXAMPLE. For the following paths: - /* [ - "/orgs/{org}/invitations", - "/repos/{owner}/{repo}/collaborators/{username}" - ] */ - const regexes = paths.map(path => path.split("/").map(c => c.startsWith("{") ? "(?:.+?)" : c).join("/")); - // 'regexes' would contain: - /* [ - '/orgs/(?:.+?)/invitations', - '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)' - ] */ - const regex = `^(?:${regexes.map(r => `(?:${r})`).join("|")})[^/]*$`; - // 'regex' would contain: - /* - ^(?:(?:\/orgs\/(?:.+?)\/invitations)|(?:\/repos\/(?:.+?)\/(?:.+?)\/collaborators\/(?:.+?)))[^\/]*$ - It may look scary, but paste it into https://www.debuggex.com/ - and it will make a lot more sense! - */ - return new RegExp(regex, "i"); -} - -// @ts-expect-error -// Workaround to allow tests to directly access the triggersNotification function. -const regex = routeMatcher(triggersNotificationPaths); -const triggersNotification = regex.test.bind(regex); -const groups = {}; -// @ts-expect-error -const createGroups = function (Bottleneck, common) { - groups.global = new Bottleneck.Group({ - id: "octokit-global", - maxConcurrent: 10, - ...common - }); - groups.search = new Bottleneck.Group({ - id: "octokit-search", - maxConcurrent: 1, - minTime: 2000, - ...common - }); - groups.write = new Bottleneck.Group({ - id: "octokit-write", - maxConcurrent: 1, - minTime: 1000, - ...common - }); - groups.notifications = new Bottleneck.Group({ - id: "octokit-notifications", - maxConcurrent: 1, - minTime: 3000, - ...common - }); -}; -function throttling(octokit, octokitOptions) { - const { - enabled = true, - Bottleneck = BottleneckLight, - id = "no-id", - timeout = 1000 * 60 * 2, - // Redis TTL: 2 minutes - connection - } = octokitOptions.throttle || {}; - if (!enabled) { - return {}; - } - const common = { - connection, - timeout - }; - if (groups.global == null) { - createGroups(Bottleneck, common); - } - if (octokitOptions.throttle && octokitOptions.throttle.minimalSecondaryRateRetryAfter) { - octokit.log.warn("[@octokit/plugin-throttling] `options.throttle.minimalSecondaryRateRetryAfter` is deprecated, please use `options.throttle.fallbackSecondaryRateRetryAfter` instead"); - octokitOptions.throttle.fallbackSecondaryRateRetryAfter = octokitOptions.throttle.minimalSecondaryRateRetryAfter; - delete octokitOptions.throttle.minimalSecondaryRateRetryAfter; - } - if (octokitOptions.throttle && octokitOptions.throttle.onAbuseLimit) { - octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead"); - // @ts-ignore types don't allow for both properties to be set - octokitOptions.throttle.onSecondaryRateLimit = octokitOptions.throttle.onAbuseLimit; - // @ts-ignore - delete octokitOptions.throttle.onAbuseLimit; - } - const state = Object.assign({ - clustering: connection != null, - triggersNotification, - fallbackSecondaryRateRetryAfter: 60, - retryAfterBaseValue: 1000, - retryLimiter: new Bottleneck(), - id, - ...groups - }, octokitOptions.throttle); - if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") { - throw new Error(`octokit/plugin-throttling error: - You must pass the onSecondaryRateLimit and onRateLimit error handlers. - See https://octokit.github.io/rest.js/#throttling - - const octokit = new Octokit({ - throttle: { - onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, - onRateLimit: (retryAfter, options) => {/* ... */} - } - }) - `); - } - const events = {}; - const emitter = new Bottleneck.Events(events); - // @ts-expect-error - events.on("secondary-limit", state.onSecondaryRateLimit); - // @ts-expect-error - events.on("rate-limit", state.onRateLimit); - // @ts-expect-error - events.on("error", e => octokit.log.warn("Error in throttling-plugin limit handler", e)); - // @ts-expect-error - state.retryLimiter.on("failed", async function (error, info) { - const [state, request, options] = info.args; - const { - pathname - } = new URL(options.url, "http://github.test"); - const shouldRetryGraphQL = pathname.startsWith("/graphql") && error.status !== 401; - if (!(shouldRetryGraphQL || error.status === 403)) { - return; - } - const retryCount = ~~request.retryCount; - request.retryCount = retryCount; - // backward compatibility - options.request.retryCount = retryCount; - const { - wantRetry, - retryAfter = 0 - } = await async function () { - if (/\bsecondary rate\b/i.test(error.message)) { - // The user has hit the secondary rate limit. (REST and GraphQL) - // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits - // The Retry-After header can sometimes be blank when hitting a secondary rate limit, - // but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default. - const retryAfter = Number(error.response.headers["retry-after"]) || state.fallbackSecondaryRateRetryAfter; - const wantRetry = await emitter.trigger("secondary-limit", retryAfter, options, octokit, retryCount); - return { - wantRetry, - retryAfter - }; - } - if (error.response.headers != null && error.response.headers["x-ratelimit-remaining"] === "0") { - // The user has used all their allowed calls for the current time period (REST and GraphQL) - // https://docs.github.com/en/rest/reference/rate-limit (REST) - // https://docs.github.com/en/graphql/overview/resource-limitations#rate-limit (GraphQL) - const rateLimitReset = new Date(~~error.response.headers["x-ratelimit-reset"] * 1000).getTime(); - const retryAfter = Math.max(Math.ceil((rateLimitReset - Date.now()) / 1000), 0); - const wantRetry = await emitter.trigger("rate-limit", retryAfter, options, octokit, retryCount); - return { - wantRetry, - retryAfter - }; - } - return {}; - }(); - if (wantRetry) { - request.retryCount++; - return retryAfter * state.retryAfterBaseValue; - } - }); - octokit.hook.wrap("request", wrapRequest.bind(null, state)); - return {}; -} -throttling.VERSION = VERSION; -throttling.triggersNotification = triggersNotification; - -exports.throttling = throttling; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 537: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var deprecation = __nccwpck_require__(8932); -var once = _interopDefault(__nccwpck_require__(1223)); - -const logOnceCode = once(deprecation => console.warn(deprecation)); -const logOnceHeaders = once(deprecation => console.warn(deprecation)); -/** - * Error with extra properties to help with debugging - */ -class RequestError extends Error { - constructor(message, statusCode, options) { - super(message); - // Maintains proper stack trace (only available on V8) - /* istanbul ignore next */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "HttpError"; - this.status = statusCode; - let headers; - if ("headers" in options && typeof options.headers !== "undefined") { - headers = options.headers; - } - if ("response" in options) { - this.response = options.response; - headers = options.response.headers; - } - // redact request credentials without mutating original request options - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") - }); - } - requestCopy.url = requestCopy.url - // client_id & client_secret can be passed as URL query parameters to increase rate limit - // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications - .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") - // OAuth tokens can be passed as URL query parameters, although it is not recommended - // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header - .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - // deprecations - Object.defineProperty(this, "code", { - get() { - logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); - return statusCode; - } - }); - Object.defineProperty(this, "headers", { - get() { - logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); - return headers || {}; - } - }); - } -} - -exports.RequestError = RequestError; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 6234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - request: () => request -}); -module.exports = __toCommonJS(dist_src_exports); -var import_endpoint = __nccwpck_require__(9440); -var import_universal_user_agent = __nccwpck_require__(5030); - -// pkg/dist-src/version.js -var VERSION = "6.2.8"; - -// pkg/dist-src/fetch-wrapper.js -var import_is_plain_object = __nccwpck_require__(3287); -var import_node_fetch = __toESM(__nccwpck_require__(467)); -var import_request_error = __nccwpck_require__(537); - -// pkg/dist-src/get-buffer-response.js -function getBufferResponse(response) { - return response.arrayBuffer(); -} - -// pkg/dist-src/fetch-wrapper.js -function fetchWrapper(requestOptions) { - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - if ((0, import_is_plain_object.isPlainObject)(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - const fetch = requestOptions.request && requestOptions.request.fetch || globalThis.fetch || /* istanbul ignore next */ - import_node_fetch.default; - return fetch( - requestOptions.url, - Object.assign( - { - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - redirect: requestOptions.redirect, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }, - // `requestOptions.request.agent` type is incompatible - // see https://github.com/octokit/types.ts/pull/264 - requestOptions.request - ) - ).then(async (response) => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - if ("deprecation" in headers) { - const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - throw new import_request_error.RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: void 0 - }, - request: requestOptions - }); - } - if (status === 304) { - throw new import_request_error.RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions - }); - } - if (status >= 400) { - const data = await getResponseData(response); - const error = new import_request_error.RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions - }); - throw error; - } - return getResponseData(response); - }).then((data) => { - return { - status, - url, - headers, - data - }; - }).catch((error) => { - if (error instanceof import_request_error.RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - throw new import_request_error.RequestError(error.message, 500, { - request: requestOptions - }); - }); -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json(); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBufferResponse(response); -} -function toErrorMessage(data) { - if (typeof data === "string") - return data; - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; - } - return data.message; - } - return `Unknown error: ${JSON.stringify(data)}`; -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldEndpoint, newDefaults) { - const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint2.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint2.parse(endpointOptions)); - } - const request2 = (route2, parameters2) => { - return fetchWrapper( - endpoint2.parse(endpoint2.merge(route2, parameters2)) - ); - }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); -} - -// pkg/dist-src/index.js -var request = withDefaults(import_endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 9768: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 83044: +/***/ ((module) => { "use strict"; @@ -7618,1714 +6952,13792 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // pkg/dist-src/index.js var dist_src_exports = {}; __export(dist_src_exports, { - sign: () => sign, - verify: () => verify, - verifyWithFallback: () => verifyWithFallback + legacyRestEndpointMethods: () => legacyRestEndpointMethods, + restEndpointMethods: () => restEndpointMethods }); module.exports = __toCommonJS(dist_src_exports); -// pkg/dist-src/node/sign.js -var import_crypto = __nccwpck_require__(6113); - -// pkg/dist-src/types.js -var Algorithm = /* @__PURE__ */ ((Algorithm2) => { - Algorithm2["SHA1"] = "sha1"; - Algorithm2["SHA256"] = "sha256"; - return Algorithm2; -})(Algorithm || {}); - // pkg/dist-src/version.js -var VERSION = "3.0.3"; - -// pkg/dist-src/node/sign.js -async function sign(options, payload) { - const { secret, algorithm } = typeof options === "object" ? { - secret: options.secret, - algorithm: options.algorithm || Algorithm.SHA256 - } : { secret: options, algorithm: Algorithm.SHA256 }; - if (!secret || !payload) { - throw new TypeError( - "[@octokit/webhooks-methods] secret & payload required for sign()" - ); - } - if (!Object.values(Algorithm).includes(algorithm)) { - throw new TypeError( - `[@octokit/webhooks] Algorithm ${algorithm} is not supported. Must be 'sha1' or 'sha256'` - ); - } - return `${algorithm}=${(0, import_crypto.createHmac)(algorithm, secret).update(payload).digest("hex")}`; -} -sign.VERSION = VERSION; - -// pkg/dist-src/node/verify.js -var import_crypto2 = __nccwpck_require__(6113); -var import_buffer = __nccwpck_require__(4300); - -// pkg/dist-src/utils.js -var getAlgorithm = (signature) => { - return signature.startsWith("sha256=") ? "sha256" : "sha1"; -}; - -// pkg/dist-src/node/verify.js -async function verify(secret, eventPayload, signature) { - if (!secret || !eventPayload || !signature) { - throw new TypeError( - "[@octokit/webhooks-methods] secret, eventPayload & signature required" - ); - } - const signatureBuffer = import_buffer.Buffer.from(signature); - const algorithm = getAlgorithm(signature); - const verificationBuffer = import_buffer.Buffer.from( - await sign({ secret, algorithm }, eventPayload) - ); - if (signatureBuffer.length !== verificationBuffer.length) { - return false; - } - return (0, import_crypto2.timingSafeEqual)(signatureBuffer, verificationBuffer); -} -verify.VERSION = VERSION; - -// pkg/dist-src/index.js -async function verifyWithFallback(secret, payload, signature, additionalSecrets) { - const firstPass = await verify(secret, payload, signature); - if (firstPass) { - return true; - } - if (additionalSecrets !== void 0) { - for (const s of additionalSecrets) { - const v = await verify(s, payload, signature); - if (v) { - return v; - } - } - } - return false; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); +var VERSION = "9.0.0"; - -/***/ }), - -/***/ 8513: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - Webhooks: () => Webhooks, - createEventHandler: () => createEventHandler, - createNodeMiddleware: () => createNodeMiddleware, - emitterEventNames: () => emitterEventNames -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/createLogger.js -var createLogger = (logger) => ({ - debug: () => { +// pkg/dist-src/generated/endpoints.js +var Endpoints = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels" + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + addSelectedRepoToRequiredWorkflow: [ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}" + ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" + ], + cancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" + ], + createEnvironmentVariable: [ + "POST /repositories/{repository_id}/environments/{environment_name}/variables" + ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + createOrgVariable: ["POST /orgs/{org}/actions/variables"], + createRegistrationTokenForOrg: [ + "POST /orgs/{org}/actions/runners/registration-token" + ], + createRegistrationTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/registration-token" + ], + createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], + createRemoveTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/remove-token" + ], + createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], + createRequiredWorkflow: ["POST /orgs/{org}/actions/required_workflows"], + createWorkflowDispatch: [ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" + ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" + ], + deleteArtifact: [ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" + ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + deleteEnvironmentVariable: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], + deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + deleteRepoVariable: [ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}" + ], + deleteRequiredWorkflow: [ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}" + ], + deleteSelfHostedRunnerFromOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}" + ], + deleteSelfHostedRunnerFromRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], + deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], + deleteWorkflowRunLogs: [ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + disableSelectedRepositoryGithubActionsOrganization: [ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + disableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" + ], + downloadArtifact: [ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" + ], + downloadJobLogsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" + ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + enableSelectedRepositoryGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + enableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" + ], + generateRunnerJitconfigForOrg: [ + "POST /orgs/{org}/actions/runners/generate-jitconfig" + ], + generateRunnerJitconfigForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" + ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository" + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/selected-actions" + ], + getAllowedActionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key" + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + getEnvironmentVariable: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow" + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow" + ], + getGithubActionsPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions" + ], + getGithubActionsPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions" + ], + getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], + getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] } + ], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], + getRepoRequiredWorkflow: [ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}" + ], + getRepoRequiredWorkflowUsage: [ + "GET /repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing" + ], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], + getRequiredWorkflow: [ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}" + ], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" + ], + getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], + getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access" + ], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" + ], + getWorkflowRunUsage: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" + ], + getWorkflowUsage: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" + ], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets" + ], + listEnvironmentVariables: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables" + ], + listJobsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" + ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels" + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listOrgVariables: ["GET /orgs/{org}/actions/variables"], + listRepoOrganizationSecrets: [ + "GET /repos/{owner}/{repo}/actions/organization-secrets" + ], + listRepoOrganizationVariables: [ + "GET /repos/{owner}/{repo}/actions/organization-variables" + ], + listRepoRequiredWorkflows: [ + "GET /repos/{org}/{repo}/actions/required_workflows" + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], + listRequiredWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs" + ], + listRequiredWorkflows: ["GET /orgs/{org}/actions/required_workflows"], + listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], + listRunnerApplicationsForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/downloads" + ], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + listSelectedReposForOrgVariable: [ + "GET /orgs/{org}/actions/variables/{name}/repositories" + ], + listSelectedRepositoriesEnabledGithubActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/repositories" + ], + listSelectedRepositoriesRequiredWorkflow: [ + "GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories" + ], + listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], + listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], + listWorkflowRunArtifacts: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" + ], + listWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" + ], + listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" + ], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgVariable: [ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + removeSelectedRepoFromRequiredWorkflow: [ + "DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}" + ], + reviewCustomGatesForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" + ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + setAllowedActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/selected-actions" + ], + setAllowedActionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels" + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow" + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow" + ], + setGithubActionsPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions" + ], + setGithubActionsPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories" + ], + setSelectedReposToRequiredWorkflow: [ + "PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories" + ], + setSelectedRepositoriesEnabledGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories" + ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access" + ], + updateEnvironmentVariable: [ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], + updateRepoVariable: [ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}" + ], + updateRequiredWorkflow: [ + "PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}" + ] }, - info: () => { + activity: { + checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], + deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], + deleteThreadSubscription: [ + "DELETE /notifications/threads/{thread_id}/subscription" + ], + getFeeds: ["GET /feeds"], + getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], + getThread: ["GET /notifications/threads/{thread_id}"], + getThreadSubscriptionForAuthenticatedUser: [ + "GET /notifications/threads/{thread_id}/subscription" + ], + listEventsForAuthenticatedUser: ["GET /users/{username}/events"], + listNotificationsForAuthenticatedUser: ["GET /notifications"], + listOrgEventsForAuthenticatedUser: [ + "GET /users/{username}/events/orgs/{org}" + ], + listPublicEvents: ["GET /events"], + listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], + listPublicEventsForUser: ["GET /users/{username}/events/public"], + listPublicOrgEvents: ["GET /orgs/{org}/events"], + listReceivedEventsForUser: ["GET /users/{username}/received_events"], + listReceivedPublicEventsForUser: [ + "GET /users/{username}/received_events/public" + ], + listRepoEvents: ["GET /repos/{owner}/{repo}/events"], + listRepoNotificationsForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/notifications" + ], + listReposStarredByAuthenticatedUser: ["GET /user/starred"], + listReposStarredByUser: ["GET /users/{username}/starred"], + listReposWatchedByUser: ["GET /users/{username}/subscriptions"], + listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], + listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], + listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], + markNotificationsAsRead: ["PUT /notifications"], + markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], + setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], + setThreadSubscription: [ + "PUT /notifications/threads/{thread_id}/subscription" + ], + starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], + unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] }, - warn: console.warn.bind(console), - error: console.error.bind(console), - ...logger -}); - -// pkg/dist-src/generated/webhook-names.js -var emitterEventNames = [ - "branch_protection_rule", - "branch_protection_rule.created", - "branch_protection_rule.deleted", - "branch_protection_rule.edited", - "check_run", - "check_run.completed", - "check_run.created", - "check_run.requested_action", - "check_run.rerequested", - "check_suite", - "check_suite.completed", - "check_suite.requested", - "check_suite.rerequested", - "code_scanning_alert", - "code_scanning_alert.appeared_in_branch", - "code_scanning_alert.closed_by_user", - "code_scanning_alert.created", - "code_scanning_alert.fixed", - "code_scanning_alert.reopened", - "code_scanning_alert.reopened_by_user", - "commit_comment", - "commit_comment.created", - "create", - "delete", - "dependabot_alert", - "dependabot_alert.created", - "dependabot_alert.dismissed", - "dependabot_alert.fixed", - "dependabot_alert.reintroduced", - "dependabot_alert.reopened", - "deploy_key", - "deploy_key.created", - "deploy_key.deleted", - "deployment", - "deployment.created", - "deployment_status", - "deployment_status.created", - "discussion", - "discussion.answered", - "discussion.category_changed", - "discussion.created", - "discussion.deleted", - "discussion.edited", - "discussion.labeled", - "discussion.locked", - "discussion.pinned", - "discussion.transferred", - "discussion.unanswered", - "discussion.unlabeled", - "discussion.unlocked", - "discussion.unpinned", - "discussion_comment", - "discussion_comment.created", - "discussion_comment.deleted", - "discussion_comment.edited", - "fork", - "github_app_authorization", - "github_app_authorization.revoked", - "gollum", - "installation", - "installation.created", - "installation.deleted", - "installation.new_permissions_accepted", - "installation.suspend", - "installation.unsuspend", - "installation_repositories", - "installation_repositories.added", - "installation_repositories.removed", - "installation_target", - "installation_target.renamed", - "issue_comment", - "issue_comment.created", - "issue_comment.deleted", - "issue_comment.edited", - "issues", - "issues.assigned", - "issues.closed", - "issues.deleted", - "issues.demilestoned", - "issues.edited", - "issues.labeled", - "issues.locked", - "issues.milestoned", - "issues.opened", - "issues.pinned", - "issues.reopened", - "issues.transferred", - "issues.unassigned", - "issues.unlabeled", - "issues.unlocked", - "issues.unpinned", - "label", - "label.created", - "label.deleted", - "label.edited", - "marketplace_purchase", - "marketplace_purchase.cancelled", - "marketplace_purchase.changed", - "marketplace_purchase.pending_change", - "marketplace_purchase.pending_change_cancelled", - "marketplace_purchase.purchased", - "member", - "member.added", - "member.edited", - "member.removed", - "membership", - "membership.added", - "membership.removed", - "merge_group", - "merge_group.checks_requested", - "meta", - "meta.deleted", - "milestone", - "milestone.closed", - "milestone.created", - "milestone.deleted", - "milestone.edited", - "milestone.opened", - "org_block", - "org_block.blocked", - "org_block.unblocked", - "organization", - "organization.deleted", - "organization.member_added", - "organization.member_invited", - "organization.member_removed", - "organization.renamed", - "package", - "package.published", - "package.updated", - "page_build", - "ping", - "project", - "project.closed", - "project.created", - "project.deleted", - "project.edited", - "project.reopened", - "project_card", - "project_card.converted", - "project_card.created", - "project_card.deleted", - "project_card.edited", - "project_card.moved", - "project_column", - "project_column.created", - "project_column.deleted", - "project_column.edited", - "project_column.moved", - "projects_v2_item", - "projects_v2_item.archived", - "projects_v2_item.converted", - "projects_v2_item.created", - "projects_v2_item.deleted", - "projects_v2_item.edited", - "projects_v2_item.reordered", - "projects_v2_item.restored", - "public", - "pull_request", - "pull_request.assigned", - "pull_request.auto_merge_disabled", - "pull_request.auto_merge_enabled", - "pull_request.closed", - "pull_request.converted_to_draft", - "pull_request.demilestoned", - "pull_request.dequeued", - "pull_request.edited", - "pull_request.labeled", - "pull_request.locked", - "pull_request.milestoned", - "pull_request.opened", - "pull_request.queued", - "pull_request.ready_for_review", - "pull_request.reopened", - "pull_request.review_request_removed", - "pull_request.review_requested", - "pull_request.synchronize", - "pull_request.unassigned", - "pull_request.unlabeled", - "pull_request.unlocked", - "pull_request_review", - "pull_request_review.dismissed", - "pull_request_review.edited", - "pull_request_review.submitted", - "pull_request_review_comment", - "pull_request_review_comment.created", - "pull_request_review_comment.deleted", - "pull_request_review_comment.edited", - "pull_request_review_thread", - "pull_request_review_thread.resolved", - "pull_request_review_thread.unresolved", - "push", - "registry_package", - "registry_package.published", - "registry_package.updated", - "release", - "release.created", - "release.deleted", - "release.edited", - "release.prereleased", - "release.published", - "release.released", - "release.unpublished", - "repository", - "repository.archived", - "repository.created", - "repository.deleted", - "repository.edited", - "repository.privatized", - "repository.publicized", - "repository.renamed", - "repository.transferred", - "repository.unarchived", - "repository_dispatch", - "repository_import", - "repository_vulnerability_alert", - "repository_vulnerability_alert.create", - "repository_vulnerability_alert.dismiss", - "repository_vulnerability_alert.reopen", - "repository_vulnerability_alert.resolve", - "secret_scanning_alert", - "secret_scanning_alert.created", - "secret_scanning_alert.reopened", - "secret_scanning_alert.resolved", - "security_advisory", - "security_advisory.performed", - "security_advisory.published", - "security_advisory.updated", - "security_advisory.withdrawn", - "sponsorship", - "sponsorship.cancelled", - "sponsorship.created", - "sponsorship.edited", - "sponsorship.pending_cancellation", - "sponsorship.pending_tier_change", - "sponsorship.tier_changed", - "star", - "star.created", - "star.deleted", - "status", - "team", - "team.added_to_repository", - "team.created", - "team.deleted", - "team.edited", - "team.removed_from_repository", - "team_add", - "watch", - "watch.started", - "workflow_dispatch", - "workflow_job", - "workflow_job.completed", - "workflow_job.in_progress", - "workflow_job.queued", - "workflow_run", - "workflow_run.completed", - "workflow_run.in_progress", - "workflow_run.requested" -]; - -// pkg/dist-src/event-handler/on.js -function handleEventHandlers(state, webhookName, handler) { - if (!state.hooks[webhookName]) { - state.hooks[webhookName] = []; - } - state.hooks[webhookName].push(handler); -} -function receiverOn(state, webhookNameOrNames, handler) { - if (Array.isArray(webhookNameOrNames)) { - webhookNameOrNames.forEach( - (webhookName) => receiverOn(state, webhookName, handler) - ); - return; - } - if (["*", "error"].includes(webhookNameOrNames)) { - const webhookName = webhookNameOrNames === "*" ? "any" : webhookNameOrNames; - const message = `Using the "${webhookNameOrNames}" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.on${webhookName.charAt(0).toUpperCase() + webhookName.slice(1)}() method instead`; - throw new Error(message); - } - if (!emitterEventNames.includes(webhookNameOrNames)) { - state.log.warn( - `"${webhookNameOrNames}" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)` - ); - } - handleEventHandlers(state, webhookNameOrNames, handler); -} -function receiverOnAny(state, handler) { - handleEventHandlers(state, "*", handler); -} -function receiverOnError(state, handler) { - handleEventHandlers(state, "error", handler); -} - -// pkg/dist-src/event-handler/receive.js -var import_aggregate_error = __toESM(__nccwpck_require__(1231)); - -// pkg/dist-src/event-handler/wrap-error-handler.js -function wrapErrorHandler(handler, error) { - let returnValue; - try { - returnValue = handler(error); - } catch (error2) { - console.log('FATAL: Error occurred in "error" event handler'); - console.log(error2); - } - if (returnValue && returnValue.catch) { - returnValue.catch((error2) => { - console.log('FATAL: Error occurred in "error" event handler'); - console.log(error2); - }); - } -} - -// pkg/dist-src/event-handler/receive.js -function getHooks(state, eventPayloadAction, eventName) { - const hooks = [state.hooks[eventName], state.hooks["*"]]; - if (eventPayloadAction) { - hooks.unshift(state.hooks[`${eventName}.${eventPayloadAction}`]); - } - return [].concat(...hooks.filter(Boolean)); -} -function receiverHandle(state, event) { - const errorHandlers = state.hooks.error || []; - if (event instanceof Error) { - const error = Object.assign(new import_aggregate_error.default([event]), { - event, - errors: [event] - }); - errorHandlers.forEach((handler) => wrapErrorHandler(handler, error)); - return Promise.reject(error); - } - if (!event || !event.name) { - throw new import_aggregate_error.default(["Event name not passed"]); - } - if (!event.payload) { - throw new import_aggregate_error.default(["Event payload not passed"]); - } - const hooks = getHooks( - state, - "action" in event.payload ? event.payload.action : null, - event.name - ); - if (hooks.length === 0) { - return Promise.resolve(); - } - const errors = []; - const promises = hooks.map((handler) => { - let promise = Promise.resolve(event); - if (state.transform) { - promise = promise.then(state.transform); - } - return promise.then((event2) => { - return handler(event2); - }).catch((error) => errors.push(Object.assign(error, { event }))); - }); - return Promise.all(promises).then(() => { - if (errors.length === 0) { - return; - } - const error = new import_aggregate_error.default(errors); - Object.assign(error, { - event, - errors - }); - errorHandlers.forEach((handler) => wrapErrorHandler(handler, error)); - throw error; - }); -} - -// pkg/dist-src/event-handler/remove-listener.js -function removeListener(state, webhookNameOrNames, handler) { - if (Array.isArray(webhookNameOrNames)) { - webhookNameOrNames.forEach( - (webhookName) => removeListener(state, webhookName, handler) - ); - return; - } - if (!state.hooks[webhookNameOrNames]) { - return; - } - for (let i = state.hooks[webhookNameOrNames].length - 1; i >= 0; i--) { - if (state.hooks[webhookNameOrNames][i] === handler) { - state.hooks[webhookNameOrNames].splice(i, 1); - return; - } - } -} - -// pkg/dist-src/event-handler/index.js -function createEventHandler(options) { - const state = { - hooks: {}, - log: createLogger(options && options.log) - }; - if (options && options.transform) { - state.transform = options.transform; - } - return { - on: receiverOn.bind(null, state), - onAny: receiverOnAny.bind(null, state), - onError: receiverOnError.bind(null, state), - removeListener: removeListener.bind(null, state), - receive: receiverHandle.bind(null, state) - }; -} - -// pkg/dist-src/sign.js -var import_webhooks_methods = __nccwpck_require__(9768); - -// pkg/dist-src/to-normalized-json-string.js -function toNormalizedJsonString(payload) { - const payloadString = JSON.stringify(payload); - return payloadString.replace(/[^\\]\\u[\da-f]{4}/g, (s) => { - return s.substr(0, 3) + s.substr(3).toUpperCase(); - }); -} - -// pkg/dist-src/sign.js -async function sign(secret, payload) { - return (0, import_webhooks_methods.sign)( - secret, - typeof payload === "string" ? payload : toNormalizedJsonString(payload) - ); -} - -// pkg/dist-src/verify.js -var import_webhooks_methods2 = __nccwpck_require__(9768); -async function verify(secret, payload, signature) { - return (0, import_webhooks_methods2.verify)( - secret, - typeof payload === "string" ? payload : toNormalizedJsonString(payload), - signature - ); -} - -// pkg/dist-src/verify-and-receive.js -var import_webhooks_methods3 = __nccwpck_require__(9768); -async function verifyAndReceive(state, event) { - const matchesSignature = await (0, import_webhooks_methods3.verify)( - state.secret, - typeof event.payload === "object" ? toNormalizedJsonString(event.payload) : event.payload, - event.signature - ); - if (!matchesSignature) { - const error = new Error( - "[@octokit/webhooks] signature does not match event payload and secret" - ); - return state.eventHandler.receive( - Object.assign(error, { event, status: 400 }) - ); - } - return state.eventHandler.receive({ - id: event.id, - name: event.name, - payload: typeof event.payload === "string" ? JSON.parse(event.payload) : event.payload - }); -} - -// pkg/dist-src/middleware/node/get-missing-headers.js -var WEBHOOK_HEADERS = [ - "x-github-event", - "x-hub-signature-256", - "x-github-delivery" -]; -function getMissingHeaders(request) { - return WEBHOOK_HEADERS.filter((header) => !(header in request.headers)); -} - -// pkg/dist-src/middleware/node/get-payload.js -var import_aggregate_error2 = __toESM(__nccwpck_require__(1231)); -function getPayload(request) { - if (request.body) { - if (typeof request.body !== "string") { - console.warn( - "[@octokit/webhooks] Passing the payload as a JSON object in `request.body` is deprecated and will be removed in a future release of `@octokit/webhooks`, please pass it as a a `string` instead." - ); - } - return Promise.resolve(request.body); - } - return new Promise((resolve, reject) => { - let data = ""; - request.setEncoding("utf8"); - request.on("error", (error) => reject(new import_aggregate_error2.default([error]))); - request.on("data", (chunk) => data += chunk); - request.on("end", () => { - try { - JSON.parse(data); - resolve(data); - } catch (error) { - error.message = "Invalid JSON"; - error.status = 400; - reject(new import_aggregate_error2.default([error])); - } - }); - }); -} - -// pkg/dist-src/middleware/node/middleware.js -async function middleware(webhooks, options, request, response, next) { - let pathname; - try { - pathname = new URL(request.url, "http://localhost").pathname; - } catch (error) { - response.writeHead(422, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Request URL could not be parsed: ${request.url}` - }) - ); - return; - } - const isUnknownRoute = request.method !== "POST" || pathname !== options.path; - const isExpressMiddleware = typeof next === "function"; - if (isUnknownRoute) { - if (isExpressMiddleware) { - return next(); - } else { - return options.onUnhandledRequest(request, response); - } - } - if (!request.headers["content-type"] || !request.headers["content-type"].startsWith("application/json")) { - response.writeHead(415, { - "content-type": "application/json", - accept: "application/json" - }); - response.end( - JSON.stringify({ - error: `Unsupported "Content-Type" header value. Must be "application/json"` - }) - ); - return; - } - const missingHeaders = getMissingHeaders(request).join(", "); - if (missingHeaders) { - response.writeHead(400, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Required headers missing: ${missingHeaders}` - }) - ); - return; - } - const eventName = request.headers["x-github-event"]; - const signatureSHA256 = request.headers["x-hub-signature-256"]; - const id = request.headers["x-github-delivery"]; - options.log.debug(`${eventName} event received (id: ${id})`); - let didTimeout = false; - const timeout = setTimeout(() => { - didTimeout = true; - response.statusCode = 202; - response.end("still processing\n"); - }, 9e3).unref(); - try { - const payload = await getPayload(request); - await webhooks.verifyAndReceive({ - id, - name: eventName, - payload, - signature: signatureSHA256 - }); - clearTimeout(timeout); - if (didTimeout) - return; - response.end("ok\n"); - } catch (error) { - clearTimeout(timeout); - if (didTimeout) - return; - const err = Array.from(error)[0]; - const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; - response.statusCode = typeof err.status !== "undefined" ? err.status : 500; - options.log.error(error); - response.end( - JSON.stringify({ - error: errorMessage - }) - ); - } -} - -// pkg/dist-src/middleware/node/on-unhandled-request-default.js -function onUnhandledRequestDefault(request, response) { - response.writeHead(404, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Unknown route: ${request.method} ${request.url}` - }) - ); -} - -// pkg/dist-src/middleware/node/index.js -function createNodeMiddleware(webhooks, { - path = "/api/github/webhooks", - onUnhandledRequest = onUnhandledRequestDefault, - log = createLogger() -} = {}) { - const deprecateOnUnhandledRequest = (request, response) => { - console.warn( - "[@octokit/webhooks] `onUnhandledRequest()` is deprecated and will be removed in a future release of `@octokit/webhooks`" - ); - return onUnhandledRequest(request, response); - }; - return middleware.bind(null, webhooks, { - path, - onUnhandledRequest: deprecateOnUnhandledRequest, - log - }); -} - -// pkg/dist-src/index.js -var Webhooks = class { - constructor(options) { - if (!options || !options.secret) { - throw new Error("[@octokit/webhooks] options.secret required"); - } - const state = { - eventHandler: createEventHandler(options), - secret: options.secret, - hooks: {}, - log: createLogger(options.log) - }; - this.sign = sign.bind(null, options.secret); - this.verify = (eventPayload, signature) => { - if (typeof eventPayload === "object") { - console.warn( - "[@octokit/webhooks] Passing a JSON payload object to `verify()` is deprecated and the functionality will be removed in a future release of `@octokit/webhooks`" - ); - } - return verify(options.secret, eventPayload, signature); - }; - this.on = state.eventHandler.on; - this.onAny = state.eventHandler.onAny; - this.onError = state.eventHandler.onError; - this.removeListener = state.eventHandler.removeListener; - this.receive = state.eventHandler.receive; - this.verifyAndReceive = (options2) => { - if (typeof options2.payload === "object") { - console.warn( - "[@octokit/webhooks] Passing a JSON payload object to `verifyAndReceive()` is deprecated and the functionality will be removed in a future release of `@octokit/webhooks`" - ); - } - return verifyAndReceive(state, options2); - }; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 1231: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const indentString = __nccwpck_require__(8043); -const cleanStack = __nccwpck_require__(7972); - -const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); - -class AggregateError extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - - errors = [...errors].map(error => { - if (error instanceof Error) { - return error; - } - - if (error !== null && typeof error === 'object') { - // Handle plain error objects with message property and/or possibly other metadata - return Object.assign(new Error(error.message), error); - } - - return new Error(error); - }); - - let message = errors - .map(error => { - // The `stack` property is not standardized, so we can't assume it exists - return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error); - }) - .join('\n'); - message = '\n' + indentString(message, 4); - super(message); - - this.name = 'AggregateError'; - - Object.defineProperty(this, '_errors', {value: errors}); - } - - * [Symbol.iterator]() { - for (const error of this._errors) { - yield error; - } - } -} - -module.exports = AggregateError; - - -/***/ }), - -/***/ 4812: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = -{ - parallel : __nccwpck_require__(8210), - serial : __nccwpck_require__(445), - serialOrdered : __nccwpck_require__(3578) -}; - - -/***/ }), - -/***/ 1700: -/***/ ((module) => { - -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} - - -/***/ }), - -/***/ 2794: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var defer = __nccwpck_require__(5295); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} - - -/***/ }), - -/***/ 5295: -/***/ ((module) => { - -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} - - -/***/ }), - -/***/ 9023: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var async = __nccwpck_require__(2794) - , abort = __nccwpck_require__(1700) - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} - - -/***/ }), - -/***/ 2474: -/***/ ((module) => { - -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} - - -/***/ }), - -/***/ 7942: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var abort = __nccwpck_require__(1700) - , async = __nccwpck_require__(2794) - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} - - -/***/ }), - -/***/ 8210: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var iterate = __nccwpck_require__(9023) - , initState = __nccwpck_require__(2474) - , terminator = __nccwpck_require__(7942) - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) + apps: { + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } + ], + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}" + ], + checkToken: ["POST /applications/{client_id}/token"], + createFromManifest: ["POST /app-manifests/{code}/conversions"], + createInstallationAccessToken: [ + "POST /app/installations/{installation_id}/access_tokens" + ], + deleteAuthorization: ["DELETE /applications/{client_id}/grant"], + deleteInstallation: ["DELETE /app/installations/{installation_id}"], + deleteToken: ["DELETE /applications/{client_id}/token"], + getAuthenticated: ["GET /app"], + getBySlug: ["GET /apps/{app_slug}"], + getInstallation: ["GET /app/installations/{installation_id}"], + getOrgInstallation: ["GET /orgs/{org}/installation"], + getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], + getSubscriptionPlanForAccount: [ + "GET /marketplace_listing/accounts/{account_id}" + ], + getSubscriptionPlanForAccountStubbed: [ + "GET /marketplace_listing/stubbed/accounts/{account_id}" + ], + getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], + listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], + listAccountsForPlanStubbed: [ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" + ], + listInstallationReposForAuthenticatedUser: [ + "GET /user/installations/{installation_id}/repositories" + ], + listInstallationRequestsForAuthenticatedApp: [ + "GET /app/installation-requests" + ], + listInstallations: ["GET /app/installations"], + listInstallationsForAuthenticatedUser: ["GET /user/installations"], + listPlans: ["GET /marketplace_listing/plans"], + listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], + listReposAccessibleToInstallation: ["GET /installation/repositories"], + listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], + listSubscriptionsForAuthenticatedUserStubbed: [ + "GET /user/marketplace_purchases/stubbed" + ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts" + ], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}" + ], + resetToken: ["PATCH /applications/{client_id}/token"], + revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended" + ], + updateWebhookConfigForApp: ["PATCH /app/hook/config"] + }, + billing: { + getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], + getGithubActionsBillingUser: [ + "GET /users/{username}/settings/billing/actions" + ], + getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], + getGithubPackagesBillingUser: [ + "GET /users/{username}/settings/billing/packages" + ], + getSharedStorageBillingOrg: [ + "GET /orgs/{org}/settings/billing/shared-storage" + ], + getSharedStorageBillingUser: [ + "GET /users/{username}/settings/billing/shared-storage" + ] + }, + checks: { + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: [ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" + ], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: [ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" + ], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" + ], + rerequestSuite: [ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" + ], + setSuitesPreferences: [ + "PATCH /repos/{owner}/{repo}/check-suites/preferences" + ], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] + }, + codeScanning: { + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" + ], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } } + ], + getAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" + ], + getCodeqlDatabase: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" + ], + getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] } + ], + listCodeqlDatabases: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" + ], + listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" + ], + updateDefaultSetup: [ + "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" + ], + uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] + }, + codesOfConduct: { + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"] + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines" + ], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}" + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces" + ], + deleteCodespacesBillingUsers: [ + "DELETE /orgs/{org}/codespaces/billing/selected_users" + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}" + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports" + ], + getCodespacesForUserInOrg: [ + "GET /orgs/{org}/members/{username}/codespaces" + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}" + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key" + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}" + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers" + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } } + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces" + ], + listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories" + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + preFlightWithRepoForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/new" + ], + publishForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/publish" + ], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines" + ], + setCodespacesBilling: ["PUT /orgs/{org}/codespaces/billing"], + setCodespacesBillingUsers: [ + "POST /orgs/{org}/codespaces/billing/selected_users" + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/dependabot/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" + ] + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots" + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" + ], + exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] + }, + emojis: { get: ["GET /emojis"] }, + gists: { + checkIsStarred: ["GET /gists/{gist_id}/star"], + create: ["POST /gists"], + createComment: ["POST /gists/{gist_id}/comments"], + delete: ["DELETE /gists/{gist_id}"], + deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], + fork: ["POST /gists/{gist_id}/forks"], + get: ["GET /gists/{gist_id}"], + getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], + getRevision: ["GET /gists/{gist_id}/{sha}"], + list: ["GET /gists"], + listComments: ["GET /gists/{gist_id}/comments"], + listCommits: ["GET /gists/{gist_id}/commits"], + listForUser: ["GET /users/{username}/gists"], + listForks: ["GET /gists/{gist_id}/forks"], + listPublic: ["GET /gists/public"], + listStarred: ["GET /gists/starred"], + star: ["PUT /gists/{gist_id}/star"], + unstar: ["DELETE /gists/{gist_id}/star"], + update: ["PATCH /gists/{gist_id}"], + updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] + }, + git: { + createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], + createCommit: ["POST /repos/{owner}/{repo}/git/commits"], + createRef: ["POST /repos/{owner}/{repo}/git/refs"], + createTag: ["POST /repos/{owner}/{repo}/git/tags"], + createTree: ["POST /repos/{owner}/{repo}/git/trees"], + deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], + getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], + getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], + getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], + getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], + getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], + listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], + updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] + }, + gitignore: { + getAllTemplates: ["GET /gitignore/templates"], + getTemplate: ["GET /gitignore/templates/{name}"] + }, + interactions: { + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } + ], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: [ + "DELETE /repos/{owner}/{repo}/interaction-limits" + ], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } + ], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } + ] + }, + issues: { + addAssignees: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + checkUserCanBeAssignedToIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" + ], + create: ["POST /repos/{owner}/{repo}/issues"], + createComment: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" + ], + createLabel: ["POST /repos/{owner}/{repo}/labels"], + createMilestone: ["POST /repos/{owner}/{repo}/milestones"], + deleteComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" + ], + deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], + deleteMilestone: [ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" + ], + get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], + getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], + getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], + getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], + getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], + list: ["GET /issues"], + listAssignees: ["GET /repos/{owner}/{repo}/assignees"], + listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], + listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], + listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], + listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], + listEventsForTimeline: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" + ], + listForAuthenticatedUser: ["GET /user/issues"], + listForOrg: ["GET /orgs/{org}/issues"], + listForRepo: ["GET /repos/{owner}/{repo}/issues"], + listLabelsForMilestone: [ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" + ], + listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], + listLabelsOnIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + listMilestones: ["GET /repos/{owner}/{repo}/milestones"], + lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], + removeAllLabels: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + removeAssignees: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" + ], + setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], + unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], + update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], + updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], + updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], + updateMilestone: [ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" + ] + }, + licenses: { + get: ["GET /licenses/{license}"], + getAllCommonlyUsed: ["GET /licenses"], + getForRepo: ["GET /repos/{owner}/{repo}/license"] + }, + markdown: { + render: ["POST /markdown"], + renderRaw: [ + "POST /markdown/raw", + { headers: { "content-type": "text/plain; charset=utf-8" } } + ] + }, + meta: { + get: ["GET /meta"], + getAllVersions: ["GET /versions"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"] + }, + migrations: { + cancelImport: ["DELETE /repos/{owner}/{repo}/import"], + deleteArchiveForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/archive" + ], + deleteArchiveForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/archive" + ], + downloadArchiveForOrg: [ + "GET /orgs/{org}/migrations/{migration_id}/archive" + ], + getArchiveForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/archive" + ], + getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], + getImportStatus: ["GET /repos/{owner}/{repo}/import"], + getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories" + ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] } + ], + mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], + setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + startImport: ["PUT /repos/{owner}/{repo}/import"], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" + ], + updateImport: ["PATCH /repos/{owner}/{repo}/import"] + }, + orgs: { + addSecurityManagerTeam: [ + "PUT /orgs/{org}/security-managers/teams/{team_slug}" + ], + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], + checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], + checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], + convertMemberToOutsideCollaborator: [ + "PUT /orgs/{org}/outside_collaborators/{username}" + ], + createInvitation: ["POST /orgs/{org}/invitations"], + createWebhook: ["POST /orgs/{org}/hooks"], + delete: ["DELETE /orgs/{org}"], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + enableOrDisableSecurityProductOnAllOrgRepos: [ + "POST /orgs/{org}/{security_product}/{enablement}" + ], + get: ["GET /orgs/{org}"], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + listMembers: ["GET /orgs/{org}/members"], + listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPatGrantRepositories: [ + "GET /organizations/{org}/personal-access-tokens/{pat_id}/repositories" + ], + listPatGrantRequestRepositories: [ + "GET /organizations/{org}/personal-access-token-requests/{pat_request_id}/repositories" + ], + listPatGrantRequests: [ + "GET /organizations/{org}/personal-access-token-requests" + ], + listPatGrants: ["GET /organizations/{org}/personal-access-tokens"], + listPendingInvitations: ["GET /orgs/{org}/invitations"], + listPublicMembers: ["GET /orgs/{org}/public_members"], + listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeMember: ["DELETE /orgs/{org}/members/{username}"], + removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], + removeOutsideCollaborator: [ + "DELETE /orgs/{org}/outside_collaborators/{username}" + ], + removePublicMembershipForAuthenticatedUser: [ + "DELETE /orgs/{org}/public_members/{username}" + ], + removeSecurityManagerTeam: [ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}" + ], + reviewPatGrantRequest: [ + "POST /organizations/{org}/personal-access-token-requests/{pat_request_id}" + ], + reviewPatGrantRequestsInBulk: [ + "POST /organizations/{org}/personal-access-token-requests" + ], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}" + ], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + updateMembershipForAuthenticatedUser: [ + "PATCH /user/memberships/orgs/{org}" + ], + updatePatAccess: [ + "POST /organizations/{org}/personal-access-tokens/{pat_id}" + ], + updatePatAccesses: ["POST /organizations/{org}/personal-access-tokens"], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] + }, + packages: { + deletePackageForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}" + ], + deletePackageForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}" + ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}" + ], + deletePackageVersionForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, { - callback(null, state.results); - return; + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" + ] } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} - - -/***/ }), - -/***/ 445: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var serialOrdered = __nccwpck_require__(3578); + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions" + ], + getPackageForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}" + ], + getPackageForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}" + ], + getPackageForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}" + ], + getPackageVersionForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + listDockerMigrationConflictingPackagesForAuthenticatedUser: [ + "GET /user/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForOrganization: [ + "GET /orgs/{org}/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForUser: [ + "GET /users/{username}/docker/conflicts" + ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageVersionForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ] + }, + projects: { + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: [ + "GET /projects/{project_id}/collaborators/{username}/permission" + ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: [ + "DELETE /projects/{project_id}/collaborators/{username}" + ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"] + }, + pulls: { + checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + create: ["POST /repos/{owner}/{repo}/pulls"], + createReplyForReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" + ], + createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + createReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + deletePendingReview: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + deleteReviewComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ], + dismissReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" + ], + get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], + getReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + list: ["GET /repos/{owner}/{repo}/pulls"], + listCommentsForReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" + ], + listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], + listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], + listRequestedReviewers: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + listReviewComments: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], + listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + removeRequestedReviewers: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + requestReviewers: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + submitReview: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" + ], + update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], + updateBranch: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" + ], + updateReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + updateReviewComment: [ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ] + }, + rateLimit: { get: ["GET /rate_limit"] }, + reactions: { + createForCommitComment: [ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + createForIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" + ], + createForIssueComment: [ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + createForPullRequestReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + createForTeamDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + createForTeamDiscussionInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ], + deleteForCommitComment: [ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" + ], + deleteForIssueComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForPullRequestComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" + ], + deleteForTeamDiscussion: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" + ], + deleteForTeamDiscussionComment: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" + ], + listForCommitComment: [ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: [ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + listForPullRequestReviewComment: [ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + listForTeamDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + listForTeamDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ] + }, + repos: { + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}" + ], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], + checkVulnerabilityAlerts: [ + "GET /repos/{owner}/{repo}/vulnerability-alerts" + ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}" + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: [ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + createCommitSignatureProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], + createDeployKey: ["POST /repos/{owner}/{repo}/keys"], + createDeployment: ["POST /repos/{owner}/{repo}/deployments"], + createDeploymentBranchPolicy: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + createDeploymentProtectionRule: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + createDeploymentStatus: [ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], + createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], + createForAuthenticatedUser: ["POST /user/repos"], + createFork: ["POST /repos/{owner}/{repo}/forks"], + createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}" + ], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createOrgRuleset: ["POST /orgs/{org}/rulesets"], + createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployment"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate" + ], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}" + ], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + deleteAdminBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}" + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" + ], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], + deleteDeployment: [ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" + ], + deleteDeploymentBranchPolicy: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], + deleteInvitation: [ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: [ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}" + ], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: [ + "DELETE /repos/{owner}/{repo}/automated-security-fixes" + ], + disableDeploymentProtectionRule: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"], + disableVulnerabilityAlerts: [ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts" + ], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] } + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: [ + "PUT /repos/{owner}/{repo}/automated-security-fixes" + ], + enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], + enableVulnerabilityAlerts: [ + "PUT /repos/{owner}/{repo}/vulnerability-alerts" + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes" + ], + get: ["GET /repos/{owner}/{repo}"], + getAccessRestrictions: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + getAdminBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + getAllDeploymentProtectionRules: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" + ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" + ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], + getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], + getBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection" + ], + getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], + getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], + getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], + getCollaboratorPermissionLevel: [ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission" + ], + getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], + getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], + getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], + getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], + getCommitSignatureProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], + getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], + getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getCustomDeploymentProtectionRule: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], + getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], + getDeploymentBranchPolicy: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + getDeploymentStatus: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" + ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}" + ], + getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], + getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], + getOrgRulesets: ["GET /orgs/{org}/rulesets"], + getPages: ["GET /repos/{owner}/{repo}/pages"], + getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], + getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], + getPullRequestReviewProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], + getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], + getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], + getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], + getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], + getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], + getStatusChecksProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + getTeamsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" + ], + getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], + getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], + getUsersWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" + ], + getViews: ["GET /repos/{owner}/{repo}/traffic/views"], + getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" + ], + listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], + listCommentsForCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], + listCommitStatusesForRef: [ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses" + ], + listCommits: ["GET /repos/{owner}/{repo}/commits"], + listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listCustomDeploymentRuleIntegrations: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" + ], + listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], + listDeploymentBranchPolicies: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + listDeploymentStatuses: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], + listDeployments: ["GET /repos/{owner}/{repo}/deployments"], + listForAuthenticatedUser: ["GET /user/repos"], + listForOrg: ["GET /orgs/{org}/repos"], + listForUser: ["GET /users/{username}/repos"], + listForks: ["GET /repos/{owner}/{repo}/forks"], + listInvitations: ["GET /repos/{owner}/{repo}/invitations"], + listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], + listLanguages: ["GET /repos/{owner}/{repo}/languages"], + listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], + listPublic: ["GET /repositories"], + listPullRequestsAssociatedWithCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" + ], + listReleaseAssets: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets" + ], + listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], + listTags: ["GET /repos/{owner}/{repo}/tags"], + listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" + ], + listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], + merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], + pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + removeCollaborator: [ + "DELETE /repos/{owner}/{repo}/collaborators/{username}" + ], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + removeStatusCheckProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], + requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], + setAdminBranchProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], + transfer: ["POST /repos/{owner}/{repo}/transfer"], + update: ["PATCH /repos/{owner}/{repo}"], + updateBranchProtection: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection" + ], + updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateDeploymentBranchPolicy: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], + updateInvitation: [ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], + updatePullRequestReviewProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], + updateReleaseAsset: [ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] } + ], + updateStatusCheckProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], + updateWebhookConfigForRepo: [ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + uploadReleaseAsset: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + { baseUrl: "https://uploads.github.com" } + ] + }, + search: { + code: ["GET /search/code"], + commits: ["GET /search/commits"], + issuesAndPullRequests: ["GET /search/issues"], + labels: ["GET /search/labels"], + repos: ["GET /search/repositories"], + topics: ["GET /search/topics"], + users: ["GET /search/users"] + }, + secretScanning: { + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ] + }, + securityAdvisories: { + createPrivateVulnerabilityReport: [ + "POST /repos/{owner}/{repo}/security-advisories/reports" + ], + createRepositoryAdvisory: [ + "POST /repos/{owner}/{repo}/security-advisories" + ], + getRepositoryAdvisory: [ + "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ], + listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], + updateRepositoryAdvisory: [ + "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ] + }, + teams: { + addOrUpdateMembershipForUserInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + addOrUpdateProjectPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + checkPermissionsForProjectInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + checkPermissionsForRepoInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + create: ["POST /orgs/{org}/teams"], + createDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], + createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], + deleteDiscussionCommentInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + deleteDiscussionInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], + getByName: ["GET /orgs/{org}/teams/{team_slug}"], + getDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + getDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + getMembershipForUserInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + list: ["GET /orgs/{org}/teams"], + listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], + listDiscussionCommentsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], + listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], + listForAuthenticatedUser: ["GET /user/teams"], + listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], + listPendingInvitationsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/invitations" + ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + removeProjectInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + removeRepoInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + updateDiscussionCommentInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + updateDiscussionInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] + }, + users: { + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] } + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], + checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], + checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] } + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], + deleteSshSigningKeyForAuthenticatedUser: [ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + follow: ["PUT /user/following/{username}"], + getAuthenticated: ["GET /user"], + getByUsername: ["GET /users/{username}"], + getContextForUser: ["GET /users/{username}/hovercard"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + getSshSigningKeyForAuthenticatedUser: [ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + list: ["GET /users"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] } + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] } + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] } + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], + listFollowersForAuthenticatedUser: ["GET /user/followers"], + listFollowersForUser: ["GET /users/{username}/followers"], + listFollowingForUser: ["GET /users/{username}/following"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], + listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], + listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], + listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility" + ], + unblock: ["DELETE /user/blocks/{username}"], + unfollow: ["DELETE /user/following/{username}"], + updateAuthenticated: ["PATCH /user"] + } +}; +var endpoints_default = Endpoints; -// Public API -module.exports = serial; +// pkg/dist-src/endpoints-to-methods.js +var endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(endpoints_default)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign( + { + method, + url + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); + } +} +var handler = { + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const { decorations, endpointDefaults } = endpointMethodsMap.get(scope).get(methodName); + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); + } + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); + } + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + function withDecorations(...args) { + let options = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options); + } + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); + } + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options2) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options2)) { + options2[alias] = options2[name]; + } + delete options2[name]; + } + } + return requestWithDefaults(options2); + } + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); +// pkg/dist-src/index.js +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + rest: api + }; +} +restEndpointMethods.VERSION = VERSION; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; } +legacyRestEndpointMethods.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 3578: +/***/ 86298: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var iterate = __nccwpck_require__(9023) - , initState = __nccwpck_require__(2474) - , terminator = __nccwpck_require__(7942) - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; +"use strict"; -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + VERSION: () => VERSION, + retry: () => retry +}); +module.exports = __toCommonJS(dist_src_exports); +var import_core = __nccwpck_require__(76762); - state.index++; +// pkg/dist-src/error-request.js +async function errorRequest(state, octokit, error, options) { + if (!error.request || !error.request.request) { + throw error; + } + if (error.status >= 400 && !state.doNotRetry.includes(error.status)) { + const retries = options.request.retries != null ? options.request.retries : state.retries; + const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); + throw octokit.retry.retryRequest(error, retries, retryAfter); + } + throw error; +} - // are we there yet? - if (state.index < (state['keyedList'] || list).length) +// pkg/dist-src/wrap-request.js +var import_light = __toESM(__nccwpck_require__(11174)); +var import_request_error = __nccwpck_require__(10537); +async function wrapRequest(state, octokit, request, options) { + const limiter = new import_light.default(); + limiter.on("failed", function(error, info) { + const maxRetries = ~~error.request.request.retries; + const after = ~~error.request.request.retryAfter; + options.request.retryCount = info.retryCount + 1; + if (maxRetries > info.retryCount) { + return after * state.retryAfterBaseValue; + } + }); + return limiter.schedule( + requestWithGraphqlErrorHandling.bind(null, state, octokit, request), + options + ); +} +async function requestWithGraphqlErrorHandling(state, octokit, request, options) { + const response = await request(request, options); + if (response.data && response.data.errors && /Something went wrong while executing your query/.test( + response.data.errors[0].message + )) { + const error = new import_request_error.RequestError(response.data.errors[0].message, 500, { + request: options, + response + }); + return errorRequest(state, octokit, error, options); + } + return response; +} + +// pkg/dist-src/index.js +var VERSION = "6.0.0"; +function retry(octokit, octokitOptions) { + const state = Object.assign( { - iterate(list, iterator, state, iteratorHandler); + enabled: true, + retryAfterBaseValue: 1e3, + doNotRetry: [400, 401, 403, 404, 422, 451], + retries: 3 + }, + octokitOptions.retry + ); + if (state.enabled) { + octokit.hook.error("request", errorRequest.bind(null, state, octokit)); + octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit)); + } + return { + retry: { + retryRequest: (error, retries, retryAfter) => { + error.request.request = Object.assign({}, error.request.request, { + retries, + retryAfter + }); + return error; + } + } + }; +} +retry.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 9968: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + throttling: () => throttling +}); +module.exports = __toCommonJS(dist_src_exports); +var import_light = __toESM(__nccwpck_require__(11174)); +var import_core = __nccwpck_require__(76762); + +// pkg/dist-src/version.js +var VERSION = "7.0.0"; + +// pkg/dist-src/wrap-request.js +var noop = () => Promise.resolve(); +function wrapRequest(state, request, options) { + return state.retryLimiter.schedule(doRequest, state, request, options); +} +async function doRequest(state, request, options) { + const isWrite = options.method !== "GET" && options.method !== "HEAD"; + const { pathname } = new URL(options.url, "http://github.test"); + const isSearch = options.method === "GET" && pathname.startsWith("/search/"); + const isGraphQL = pathname.startsWith("/graphql"); + const retryCount = ~~request.retryCount; + const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {}; + if (state.clustering) { + jobOptions.expiration = 1e3 * 60; + } + if (isWrite || isGraphQL) { + await state.write.key(state.id).schedule(jobOptions, noop); + } + if (isWrite && state.triggersNotification(pathname)) { + await state.notifications.key(state.id).schedule(jobOptions, noop); + } + if (isSearch) { + await state.search.key(state.id).schedule(jobOptions, noop); + } + const req = state.global.key(state.id).schedule(jobOptions, request, options); + if (isGraphQL) { + const res = await req; + if (res.data.errors != null && // @ts-expect-error + res.data.errors.some((error) => error.type === "RATE_LIMITED")) { + const error = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { + response: res, + data: res.data + }); + throw error; + } + } + return req; +} + +// pkg/dist-src/generated/triggers-notification-paths.js +var triggers_notification_paths_default = [ + "/orgs/{org}/invitations", + "/orgs/{org}/invitations/{invitation_id}", + "/orgs/{org}/teams/{team_slug}/discussions", + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "/repos/{owner}/{repo}/collaborators/{username}", + "/repos/{owner}/{repo}/commits/{commit_sha}/comments", + "/repos/{owner}/{repo}/issues", + "/repos/{owner}/{repo}/issues/{issue_number}/comments", + "/repos/{owner}/{repo}/pulls", + "/repos/{owner}/{repo}/pulls/{pull_number}/comments", + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", + "/repos/{owner}/{repo}/pulls/{pull_number}/merge", + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "/repos/{owner}/{repo}/releases", + "/teams/{team_id}/discussions", + "/teams/{team_id}/discussions/{discussion_number}/comments" +]; + +// pkg/dist-src/route-matcher.js +function routeMatcher(paths) { + const regexes = paths.map( + (path) => path.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") + ); + const regex2 = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`; + return new RegExp(regex2, "i"); +} + +// pkg/dist-src/index.js +var regex = routeMatcher(triggers_notification_paths_default); +var triggersNotification = regex.test.bind(regex); +var groups = {}; +var createGroups = function(Bottleneck, common) { + groups.global = new Bottleneck.Group({ + id: "octokit-global", + maxConcurrent: 10, + ...common + }); + groups.search = new Bottleneck.Group({ + id: "octokit-search", + maxConcurrent: 1, + minTime: 2e3, + ...common + }); + groups.write = new Bottleneck.Group({ + id: "octokit-write", + maxConcurrent: 1, + minTime: 1e3, + ...common + }); + groups.notifications = new Bottleneck.Group({ + id: "octokit-notifications", + maxConcurrent: 1, + minTime: 3e3, + ...common + }); +}; +function throttling(octokit, octokitOptions) { + const { + enabled = true, + Bottleneck = import_light.default, + id = "no-id", + timeout = 1e3 * 60 * 2, + // Redis TTL: 2 minutes + connection + } = octokitOptions.throttle || {}; + if (!enabled) { + return {}; + } + const common = { connection, timeout }; + if (groups.global == null) { + createGroups(Bottleneck, common); + } + const state = Object.assign( + { + clustering: connection != null, + triggersNotification, + fallbackSecondaryRateRetryAfter: 60, + retryAfterBaseValue: 1e3, + retryLimiter: new Bottleneck(), + id, + ...groups + }, + octokitOptions.throttle + ); + if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") { + throw new Error(`octokit/plugin-throttling error: + You must pass the onSecondaryRateLimit and onRateLimit error handlers. + See https://octokit.github.io/rest.js/#throttling + + const octokit = new Octokit({ + throttle: { + onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, + onRateLimit: (retryAfter, options) => {/* ... */} + } + }) + `); + } + const events = {}; + const emitter = new Bottleneck.Events(events); + events.on("secondary-limit", state.onSecondaryRateLimit); + events.on("rate-limit", state.onRateLimit); + events.on( + "error", + (e) => octokit.log.warn("Error in throttling-plugin limit handler", e) + ); + state.retryLimiter.on("failed", async function(error, info) { + const [state2, request, options] = info.args; + const { pathname } = new URL(options.url, "http://github.test"); + const shouldRetryGraphQL = pathname.startsWith("/graphql") && error.status !== 401; + if (!(shouldRetryGraphQL || error.status === 403)) { return; } + const retryCount = ~~request.retryCount; + request.retryCount = retryCount; + options.request.retryCount = retryCount; + const { wantRetry, retryAfter = 0 } = await async function() { + if (/\bsecondary rate\b/i.test(error.message)) { + const retryAfter2 = Number(error.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; + const wantRetry2 = await emitter.trigger( + "secondary-limit", + retryAfter2, + options, + octokit, + retryCount + ); + return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; + } + if (error.response.headers != null && error.response.headers["x-ratelimit-remaining"] === "0") { + const rateLimitReset = new Date( + ~~error.response.headers["x-ratelimit-reset"] * 1e3 + ).getTime(); + const retryAfter2 = Math.max( + Math.ceil((rateLimitReset - Date.now()) / 1e3), + 0 + ); + const wantRetry2 = await emitter.trigger( + "rate-limit", + retryAfter2, + options, + octokit, + retryCount + ); + return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; + } + return {}; + }(); + if (wantRetry) { + request.retryCount++; + return retryAfter * state2.retryAfterBaseValue; + } + }); + octokit.hook.wrap("request", wrapRequest.bind(null, state)); + return {}; +} +throttling.VERSION = VERSION; +throttling.triggersNotification = triggersNotification; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); - // done here - callback(null, state.results); + +/***/ }), + +/***/ 10537: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + RequestError: () => RequestError +}); +module.exports = __toCommonJS(dist_src_exports); +var import_deprecation = __nccwpck_require__(58932); +var import_once = __toESM(__nccwpck_require__(1223)); +var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var RequestError = class extends Error { + constructor(message, statusCode, options) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + Object.defineProperty(this, "code", { + get() { + logOnceCode( + new import_deprecation.Deprecation( + "[@octokit/request-error] `error.code` is deprecated, use `error.status`." + ) + ); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders( + new import_deprecation.Deprecation( + "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." + ) + ); + return headers || {}; + } + }); + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 36234: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + request: () => request +}); +module.exports = __toCommonJS(dist_src_exports); +var import_endpoint = __nccwpck_require__(59440); +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "8.1.0"; + +// pkg/dist-src/fetch-wrapper.js +var import_is_plain_object = __nccwpck_require__(63287); +var import_request_error = __nccwpck_require__(10537); + +// pkg/dist-src/get-buffer-response.js +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +// pkg/dist-src/fetch-wrapper.js +function fetchWrapper(requestOptions) { + var _a, _b, _c; + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if ((0, import_is_plain_object.isPlainObject)(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + let { fetch } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch = requestOptions.request.fetch; + } + if (!fetch) { + throw new Error( + 'Global "fetch" not found. Please provide `options.request.fetch` to octokit or upgrade to node@18 or newer.' + ); + } + return fetch(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + signal: (_c = requestOptions.request) == null ? void 0 : _c.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new import_request_error.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: void 0 + }, + request: requestOptions + }); + } + if (status === 304) { + throw new import_request_error.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new import_request_error.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { + return { + status, + url, + headers, + data + }; + }).catch((error) => { + if (error instanceof import_request_error.RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + throw new import_request_error.RequestError(error.message, 500, { + request: requestOptions + }); }); +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json(); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + return `Unknown error: ${JSON.stringify(data)}`; +} - return terminator.bind(state, callback); +// pkg/dist-src/with-defaults.js +function withDefaults(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); + } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); } -/* - * -- Sort methods - */ +// pkg/dist-src/index.js +var request = withDefaults(import_endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + } +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; + +/***/ }), + +/***/ 49768: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + sign: () => sign, + verify: () => verify, + verifyWithFallback: () => verifyWithFallback +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/node/sign.js +var import_crypto = __nccwpck_require__(6113); + +// pkg/dist-src/types.js +var Algorithm = /* @__PURE__ */ ((Algorithm2) => { + Algorithm2["SHA1"] = "sha1"; + Algorithm2["SHA256"] = "sha256"; + return Algorithm2; +})(Algorithm || {}); + +// pkg/dist-src/version.js +var VERSION = "4.0.0"; + +// pkg/dist-src/node/sign.js +async function sign(options, payload) { + const { secret, algorithm } = typeof options === "object" ? { + secret: options.secret, + algorithm: options.algorithm || Algorithm.SHA256 + } : { secret: options, algorithm: Algorithm.SHA256 }; + if (!secret || !payload) { + throw new TypeError( + "[@octokit/webhooks-methods] secret & payload required for sign()" + ); + } + if (!Object.values(Algorithm).includes(algorithm)) { + throw new TypeError( + `[@octokit/webhooks] Algorithm ${algorithm} is not supported. Must be 'sha1' or 'sha256'` + ); + } + return `${algorithm}=${(0, import_crypto.createHmac)(algorithm, secret).update(payload).digest("hex")}`; } +sign.VERSION = VERSION; -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); +// pkg/dist-src/node/verify.js +var import_crypto2 = __nccwpck_require__(6113); +var import_buffer = __nccwpck_require__(14300); + +// pkg/dist-src/utils.js +var getAlgorithm = (signature) => { + return signature.startsWith("sha256=") ? "sha256" : "sha1"; +}; + +// pkg/dist-src/node/verify.js +async function verify(secret, eventPayload, signature) { + if (!secret || !eventPayload || !signature) { + throw new TypeError( + "[@octokit/webhooks-methods] secret, eventPayload & signature required" + ); + } + const signatureBuffer = import_buffer.Buffer.from(signature); + const algorithm = getAlgorithm(signature); + const verificationBuffer = import_buffer.Buffer.from( + await sign({ secret, algorithm }, eventPayload) + ); + if (signatureBuffer.length !== verificationBuffer.length) { + return false; + } + return (0, import_crypto2.timingSafeEqual)(signatureBuffer, verificationBuffer); +} +verify.VERSION = VERSION; + +// pkg/dist-src/index.js +async function verifyWithFallback(secret, payload, signature, additionalSecrets) { + const firstPass = await verify(secret, payload, signature); + if (firstPass) { + return true; + } + if (additionalSecrets !== void 0) { + for (const s of additionalSecrets) { + const v = await verify(s, payload, signature); + if (v) { + return v; + } + } + } + return false; } +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 9893: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 18513: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const BuildInterfaces = __nccwpck_require__(2167); -class BuildApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Build-api', options); - } - /** - * Associates an artifact with a build. - * - * @param {BuildInterfaces.BuildArtifact} artifact - The artifact. - * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - */ - createArtifact(artifact, project, buildId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - buildId: buildId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, artifact, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets a specific artifact for a build. - * - * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} artifactName - The name of the artifact. - */ - getArtifact(project, buildId, artifactName) { - return __awaiter(this, void 0, void 0, function* () { - if (artifactName == null) { - throw new TypeError('artifactName can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - buildId: buildId - }; - let queryValues = { - artifactName: artifactName, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets a specific artifact for a build. - * - * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} artifactName - The name of the artifact. - */ - getArtifactContentZip(project, buildId, artifactName) { - return __awaiter(this, void 0, void 0, function* () { - if (artifactName == null) { - throw new TypeError('artifactName can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - buildId: buildId - }; - let queryValues = { - artifactName: artifactName, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets all artifacts for a build. - * - * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - */ - getArtifacts(project, buildId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - buildId: buildId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets a file from the build. - * - * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} artifactName - The name of the artifact. - * @param {string} fileId - The primary key for the file. - * @param {string} fileName - The name that the file will be set to. - */ - getFile(project, buildId, artifactName, fileId, fileName) { - return __awaiter(this, void 0, void 0, function* () { - if (artifactName == null) { - throw new TypeError('artifactName can not be null or undefined'); - } - if (fileId == null) { - throw new TypeError('fileId can not be null or undefined'); - } - if (fileName == null) { - throw new TypeError('fileName can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - buildId: buildId - }; - let queryValues = { - artifactName: artifactName, - fileId: fileId, - fileName: fileName, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets the list of attachments of a specific type that are associated with a build. - * - * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} type - The type of attachment. - */ - getAttachments(project, buildId, type) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - buildId: buildId, - type: type - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "f2192269-89fa-4f94-baf6-8fb128c55159", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets a specific attachment. - * - * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} timelineId - The ID of the timeline. - * @param {string} recordId - The ID of the timeline record. - * @param {string} type - The type of the attachment. - * @param {string} name - The name of the attachment. - */ - getAttachment(project, buildId, timelineId, recordId, type, name) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - buildId: buildId, - timelineId: timelineId, - recordId: recordId, - type: type, - name: name - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "af5122d3-3438-485e-a25a-2dbbfde84ee6", routeValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * @param {BuildInterfaces.DefinitionResourceReference[]} resources - * @param {string} project - Project ID or project name - */ - authorizeProjectResources(resources, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "398c85bc-81aa-4822-947c-a194a05f0fef", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, resources, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} id - */ - getProjectResources(project, type, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - type: type, - id: id, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "398c85bc-81aa-4822-947c-a194a05f0fef", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets a badge that indicates the status of the most recent build for a definition. Note that this API is deprecated. Prefer StatusBadgeController.GetStatusBadge. - * - * @param {string} project - The project ID or name. - * @param {number} definitionId - The ID of the definition. - * @param {string} branchName - The name of the branch. - */ - getBadge(project, definitionId, branchName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - definitionId: definitionId - }; - let queryValues = { - branchName: branchName, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "de6a4df8-22cd-44ee-af2d-39f6aa7a4261", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets a list of branches for the given source code repository. - * - * @param {string} project - Project ID or project name - * @param {string} providerName - The name of the source provider. - * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. - * @param {string} repository - The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. - * @param {string} branchName - If supplied, the name of the branch to check for specifically. - */ - listBranches(project, providerName, serviceEndpointId, repository, branchName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - providerName: providerName - }; - let queryValues = { - serviceEndpointId: serviceEndpointId, - repository: repository, - branchName: branchName, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "e05d4403-9b81-4244-8763-20fde28d1976", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets a badge that indicates the status of the most recent build for the specified branch. - * - * @param {string} project - Project ID or project name - * @param {string} repoType - The repository type. - * @param {string} repoId - The repository ID. - * @param {string} branchName - The branch name. - */ - getBuildBadge(project, repoType, repoId, branchName) { + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + Webhooks: () => Webhooks, + createEventHandler: () => createEventHandler, + createNodeMiddleware: () => createNodeMiddleware, + emitterEventNames: () => emitterEventNames +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/createLogger.js +var createLogger = (logger) => ({ + debug: () => { + }, + info: () => { + }, + warn: console.warn.bind(console), + error: console.error.bind(console), + ...logger +}); + +// pkg/dist-src/generated/webhook-names.js +var emitterEventNames = [ + "branch_protection_rule", + "branch_protection_rule.created", + "branch_protection_rule.deleted", + "branch_protection_rule.edited", + "check_run", + "check_run.completed", + "check_run.created", + "check_run.requested_action", + "check_run.rerequested", + "check_suite", + "check_suite.completed", + "check_suite.requested", + "check_suite.rerequested", + "code_scanning_alert", + "code_scanning_alert.appeared_in_branch", + "code_scanning_alert.closed_by_user", + "code_scanning_alert.created", + "code_scanning_alert.fixed", + "code_scanning_alert.reopened", + "code_scanning_alert.reopened_by_user", + "commit_comment", + "commit_comment.created", + "create", + "delete", + "dependabot_alert", + "dependabot_alert.created", + "dependabot_alert.dismissed", + "dependabot_alert.fixed", + "dependabot_alert.reintroduced", + "dependabot_alert.reopened", + "deploy_key", + "deploy_key.created", + "deploy_key.deleted", + "deployment", + "deployment.created", + "deployment_protection_rule", + "deployment_protection_rule.requested", + "deployment_status", + "deployment_status.created", + "discussion", + "discussion.answered", + "discussion.category_changed", + "discussion.created", + "discussion.deleted", + "discussion.edited", + "discussion.labeled", + "discussion.locked", + "discussion.pinned", + "discussion.transferred", + "discussion.unanswered", + "discussion.unlabeled", + "discussion.unlocked", + "discussion.unpinned", + "discussion_comment", + "discussion_comment.created", + "discussion_comment.deleted", + "discussion_comment.edited", + "fork", + "github_app_authorization", + "github_app_authorization.revoked", + "gollum", + "installation", + "installation.created", + "installation.deleted", + "installation.new_permissions_accepted", + "installation.suspend", + "installation.unsuspend", + "installation_repositories", + "installation_repositories.added", + "installation_repositories.removed", + "installation_target", + "installation_target.renamed", + "issue_comment", + "issue_comment.created", + "issue_comment.deleted", + "issue_comment.edited", + "issues", + "issues.assigned", + "issues.closed", + "issues.deleted", + "issues.demilestoned", + "issues.edited", + "issues.labeled", + "issues.locked", + "issues.milestoned", + "issues.opened", + "issues.pinned", + "issues.reopened", + "issues.transferred", + "issues.unassigned", + "issues.unlabeled", + "issues.unlocked", + "issues.unpinned", + "label", + "label.created", + "label.deleted", + "label.edited", + "marketplace_purchase", + "marketplace_purchase.cancelled", + "marketplace_purchase.changed", + "marketplace_purchase.pending_change", + "marketplace_purchase.pending_change_cancelled", + "marketplace_purchase.purchased", + "member", + "member.added", + "member.edited", + "member.removed", + "membership", + "membership.added", + "membership.removed", + "merge_group", + "merge_group.checks_requested", + "meta", + "meta.deleted", + "milestone", + "milestone.closed", + "milestone.created", + "milestone.deleted", + "milestone.edited", + "milestone.opened", + "org_block", + "org_block.blocked", + "org_block.unblocked", + "organization", + "organization.deleted", + "organization.member_added", + "organization.member_invited", + "organization.member_removed", + "organization.renamed", + "package", + "package.published", + "package.updated", + "page_build", + "ping", + "project", + "project.closed", + "project.created", + "project.deleted", + "project.edited", + "project.reopened", + "project_card", + "project_card.converted", + "project_card.created", + "project_card.deleted", + "project_card.edited", + "project_card.moved", + "project_column", + "project_column.created", + "project_column.deleted", + "project_column.edited", + "project_column.moved", + "projects_v2_item", + "projects_v2_item.archived", + "projects_v2_item.converted", + "projects_v2_item.created", + "projects_v2_item.deleted", + "projects_v2_item.edited", + "projects_v2_item.reordered", + "projects_v2_item.restored", + "public", + "pull_request", + "pull_request.assigned", + "pull_request.auto_merge_disabled", + "pull_request.auto_merge_enabled", + "pull_request.closed", + "pull_request.converted_to_draft", + "pull_request.demilestoned", + "pull_request.dequeued", + "pull_request.edited", + "pull_request.enqueued", + "pull_request.labeled", + "pull_request.locked", + "pull_request.milestoned", + "pull_request.opened", + "pull_request.ready_for_review", + "pull_request.reopened", + "pull_request.review_request_removed", + "pull_request.review_requested", + "pull_request.synchronize", + "pull_request.unassigned", + "pull_request.unlabeled", + "pull_request.unlocked", + "pull_request_review", + "pull_request_review.dismissed", + "pull_request_review.edited", + "pull_request_review.submitted", + "pull_request_review_comment", + "pull_request_review_comment.created", + "pull_request_review_comment.deleted", + "pull_request_review_comment.edited", + "pull_request_review_thread", + "pull_request_review_thread.resolved", + "pull_request_review_thread.unresolved", + "push", + "registry_package", + "registry_package.published", + "registry_package.updated", + "release", + "release.created", + "release.deleted", + "release.edited", + "release.prereleased", + "release.published", + "release.released", + "release.unpublished", + "repository", + "repository.archived", + "repository.created", + "repository.deleted", + "repository.edited", + "repository.privatized", + "repository.publicized", + "repository.renamed", + "repository.transferred", + "repository.unarchived", + "repository_dispatch", + "repository_import", + "repository_vulnerability_alert", + "repository_vulnerability_alert.create", + "repository_vulnerability_alert.dismiss", + "repository_vulnerability_alert.reopen", + "repository_vulnerability_alert.resolve", + "secret_scanning_alert", + "secret_scanning_alert.created", + "secret_scanning_alert.reopened", + "secret_scanning_alert.resolved", + "secret_scanning_alert.revoked", + "secret_scanning_alert_location", + "secret_scanning_alert_location.created", + "security_advisory", + "security_advisory.performed", + "security_advisory.published", + "security_advisory.updated", + "security_advisory.withdrawn", + "sponsorship", + "sponsorship.cancelled", + "sponsorship.created", + "sponsorship.edited", + "sponsorship.pending_cancellation", + "sponsorship.pending_tier_change", + "sponsorship.tier_changed", + "star", + "star.created", + "star.deleted", + "status", + "team", + "team.added_to_repository", + "team.created", + "team.deleted", + "team.edited", + "team.removed_from_repository", + "team_add", + "watch", + "watch.started", + "workflow_dispatch", + "workflow_job", + "workflow_job.completed", + "workflow_job.in_progress", + "workflow_job.queued", + "workflow_job.waiting", + "workflow_run", + "workflow_run.completed", + "workflow_run.in_progress", + "workflow_run.requested" +]; + +// pkg/dist-src/event-handler/on.js +function handleEventHandlers(state, webhookName, handler) { + if (!state.hooks[webhookName]) { + state.hooks[webhookName] = []; + } + state.hooks[webhookName].push(handler); +} +function receiverOn(state, webhookNameOrNames, handler) { + if (Array.isArray(webhookNameOrNames)) { + webhookNameOrNames.forEach( + (webhookName) => receiverOn(state, webhookName, handler) + ); + return; + } + if (["*", "error"].includes(webhookNameOrNames)) { + const webhookName = webhookNameOrNames === "*" ? "any" : webhookNameOrNames; + const message = `Using the "${webhookNameOrNames}" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.on${webhookName.charAt(0).toUpperCase() + webhookName.slice(1)}() method instead`; + throw new Error(message); + } + if (!emitterEventNames.includes(webhookNameOrNames)) { + state.log.warn( + `"${webhookNameOrNames}" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)` + ); + } + handleEventHandlers(state, webhookNameOrNames, handler); +} +function receiverOnAny(state, handler) { + handleEventHandlers(state, "*", handler); +} +function receiverOnError(state, handler) { + handleEventHandlers(state, "error", handler); +} + +// pkg/dist-src/event-handler/receive.js +var import_aggregate_error = __toESM(__nccwpck_require__(61231)); + +// pkg/dist-src/event-handler/wrap-error-handler.js +function wrapErrorHandler(handler, error) { + let returnValue; + try { + returnValue = handler(error); + } catch (error2) { + console.log('FATAL: Error occurred in "error" event handler'); + console.log(error2); + } + if (returnValue && returnValue.catch) { + returnValue.catch((error2) => { + console.log('FATAL: Error occurred in "error" event handler'); + console.log(error2); + }); + } +} + +// pkg/dist-src/event-handler/receive.js +function getHooks(state, eventPayloadAction, eventName) { + const hooks = [state.hooks[eventName], state.hooks["*"]]; + if (eventPayloadAction) { + hooks.unshift(state.hooks[`${eventName}.${eventPayloadAction}`]); + } + return [].concat(...hooks.filter(Boolean)); +} +function receiverHandle(state, event) { + const errorHandlers = state.hooks.error || []; + if (event instanceof Error) { + const error = Object.assign(new import_aggregate_error.default([event]), { + event, + errors: [event] + }); + errorHandlers.forEach((handler) => wrapErrorHandler(handler, error)); + return Promise.reject(error); + } + if (!event || !event.name) { + throw new import_aggregate_error.default(["Event name not passed"]); + } + if (!event.payload) { + throw new import_aggregate_error.default(["Event payload not passed"]); + } + const hooks = getHooks( + state, + "action" in event.payload ? event.payload.action : null, + event.name + ); + if (hooks.length === 0) { + return Promise.resolve(); + } + const errors = []; + const promises = hooks.map((handler) => { + let promise = Promise.resolve(event); + if (state.transform) { + promise = promise.then(state.transform); + } + return promise.then((event2) => { + return handler(event2); + }).catch((error) => errors.push(Object.assign(error, { event }))); + }); + return Promise.all(promises).then(() => { + if (errors.length === 0) { + return; + } + const error = new import_aggregate_error.default(errors); + Object.assign(error, { + event, + errors + }); + errorHandlers.forEach((handler) => wrapErrorHandler(handler, error)); + throw error; + }); +} + +// pkg/dist-src/event-handler/remove-listener.js +function removeListener(state, webhookNameOrNames, handler) { + if (Array.isArray(webhookNameOrNames)) { + webhookNameOrNames.forEach( + (webhookName) => removeListener(state, webhookName, handler) + ); + return; + } + if (!state.hooks[webhookNameOrNames]) { + return; + } + for (let i = state.hooks[webhookNameOrNames].length - 1; i >= 0; i--) { + if (state.hooks[webhookNameOrNames][i] === handler) { + state.hooks[webhookNameOrNames].splice(i, 1); + return; + } + } +} + +// pkg/dist-src/event-handler/index.js +function createEventHandler(options) { + const state = { + hooks: {}, + log: createLogger(options && options.log) + }; + if (options && options.transform) { + state.transform = options.transform; + } + return { + on: receiverOn.bind(null, state), + onAny: receiverOnAny.bind(null, state), + onError: receiverOnError.bind(null, state), + removeListener: removeListener.bind(null, state), + receive: receiverHandle.bind(null, state) + }; +} + +// pkg/dist-src/index.js +var import_webhooks_methods2 = __nccwpck_require__(49768); + +// pkg/dist-src/verify-and-receive.js +var import_webhooks_methods = __nccwpck_require__(49768); +async function verifyAndReceive(state, event) { + const matchesSignature = await (0, import_webhooks_methods.verify)( + state.secret, + event.payload, + event.signature + ); + if (!matchesSignature) { + const error = new Error( + "[@octokit/webhooks] signature does not match event payload and secret" + ); + return state.eventHandler.receive( + Object.assign(error, { event, status: 400 }) + ); + } + return state.eventHandler.receive({ + id: event.id, + name: event.name, + payload: JSON.parse(event.payload) + }); +} + +// pkg/dist-src/middleware/node/get-missing-headers.js +var WEBHOOK_HEADERS = [ + "x-github-event", + "x-hub-signature-256", + "x-github-delivery" +]; +function getMissingHeaders(request) { + return WEBHOOK_HEADERS.filter((header) => !(header in request.headers)); +} + +// pkg/dist-src/middleware/node/get-payload.js +var import_aggregate_error2 = __toESM(__nccwpck_require__(61231)); +function getPayload(request) { + if (request.body) + return Promise.resolve(request.body); + return new Promise((resolve, reject) => { + let data = ""; + request.setEncoding("utf8"); + request.on("error", (error) => reject(new import_aggregate_error2.default([error]))); + request.on("data", (chunk) => data += chunk); + request.on("end", () => { + try { + JSON.parse(data); + resolve(data); + } catch (error) { + error.message = "Invalid JSON"; + error.status = 400; + reject(new import_aggregate_error2.default([error])); + } + }); + }); +} + +// pkg/dist-src/middleware/node/on-unhandled-request-default.js +function onUnhandledRequestDefault(request, response) { + response.writeHead(404, { + "content-type": "application/json" + }); + response.end( + JSON.stringify({ + error: `Unknown route: ${request.method} ${request.url}` + }) + ); +} + +// pkg/dist-src/middleware/node/middleware.js +async function middleware(webhooks, options, request, response, next) { + let pathname; + try { + pathname = new URL(request.url, "http://localhost").pathname; + } catch (error) { + response.writeHead(422, { + "content-type": "application/json" + }); + response.end( + JSON.stringify({ + error: `Request URL could not be parsed: ${request.url}` + }) + ); + return true; + } + if (pathname !== options.path) { + next?.(); + return false; + } else if (request.method !== "POST") { + onUnhandledRequestDefault(request, response); + return true; + } + if (!request.headers["content-type"] || !request.headers["content-type"].startsWith("application/json")) { + response.writeHead(415, { + "content-type": "application/json", + accept: "application/json" + }); + response.end( + JSON.stringify({ + error: `Unsupported "Content-Type" header value. Must be "application/json"` + }) + ); + return true; + } + const missingHeaders = getMissingHeaders(request).join(", "); + if (missingHeaders) { + response.writeHead(400, { + "content-type": "application/json" + }); + response.end( + JSON.stringify({ + error: `Required headers missing: ${missingHeaders}` + }) + ); + return true; + } + const eventName = request.headers["x-github-event"]; + const signatureSHA256 = request.headers["x-hub-signature-256"]; + const id = request.headers["x-github-delivery"]; + options.log.debug(`${eventName} event received (id: ${id})`); + let didTimeout = false; + const timeout = setTimeout(() => { + didTimeout = true; + response.statusCode = 202; + response.end("still processing\n"); + }, 9e3).unref(); + try { + const payload = await getPayload(request); + await webhooks.verifyAndReceive({ + id, + name: eventName, + payload, + signature: signatureSHA256 + }); + clearTimeout(timeout); + if (didTimeout) + return true; + response.end("ok\n"); + return true; + } catch (error) { + clearTimeout(timeout); + if (didTimeout) + return true; + const err = Array.from(error)[0]; + const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; + response.statusCode = typeof err.status !== "undefined" ? err.status : 500; + options.log.error(error); + response.end( + JSON.stringify({ + error: errorMessage + }) + ); + return true; + } +} + +// pkg/dist-src/middleware/node/index.js +function createNodeMiddleware(webhooks, { + path = "/api/github/webhooks", + log = createLogger() +} = {}) { + return middleware.bind(null, webhooks, { + path, + log + }); +} + +// pkg/dist-src/index.js +var Webhooks = class { + constructor(options) { + if (!options || !options.secret) { + throw new Error("[@octokit/webhooks] options.secret required"); + } + const state = { + eventHandler: createEventHandler(options), + secret: options.secret, + hooks: {}, + log: createLogger(options.log) + }; + this.sign = import_webhooks_methods2.sign.bind(null, options.secret); + this.verify = import_webhooks_methods2.verify.bind(null, options.secret); + this.on = state.eventHandler.on; + this.onAny = state.eventHandler.onAny; + this.onError = state.eventHandler.onError; + this.removeListener = state.eventHandler.removeListener; + this.receive = state.eventHandler.receive; + this.verifyAndReceive = verifyAndReceive.bind(null, state); + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 61231: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const indentString = __nccwpck_require__(98043); +const cleanStack = __nccwpck_require__(27972); + +const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); + +class AggregateError extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); + } + + errors = [...errors].map(error => { + if (error instanceof Error) { + return error; + } + + if (error !== null && typeof error === 'object') { + // Handle plain error objects with message property and/or possibly other metadata + return Object.assign(new Error(error.message), error); + } + + return new Error(error); + }); + + let message = errors + .map(error => { + // The `stack` property is not standardized, so we can't assume it exists + return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error); + }) + .join('\n'); + message = '\n' + indentString(message, 4); + super(message); + + this.name = 'AggregateError'; + + Object.defineProperty(this, '_errors', {value: errors}); + } + + * [Symbol.iterator]() { + for (const error of this._errors) { + yield error; + } + } +} + +module.exports = AggregateError; + + +/***/ }), + +/***/ 14812: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = +{ + parallel : __nccwpck_require__(8210), + serial : __nccwpck_require__(50445), + serialOrdered : __nccwpck_require__(3578) +}; + + +/***/ }), + +/***/ 1700: +/***/ ((module) => { + +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} + + +/***/ }), + +/***/ 72794: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var defer = __nccwpck_require__(15295); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} + + +/***/ }), + +/***/ 15295: +/***/ ((module) => { + +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} + + +/***/ }), + +/***/ 9023: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var async = __nccwpck_require__(72794) + , abort = __nccwpck_require__(1700) + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} + + +/***/ }), + +/***/ 42474: +/***/ ((module) => { + +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} + + +/***/ }), + +/***/ 37942: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var abort = __nccwpck_require__(1700) + , async = __nccwpck_require__(72794) + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} + + +/***/ }), + +/***/ 8210: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var iterate = __nccwpck_require__(9023) + , initState = __nccwpck_require__(42474) + , terminator = __nccwpck_require__(37942) + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} + + +/***/ }), + +/***/ 50445: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var serialOrdered = __nccwpck_require__(3578); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} + + +/***/ }), + +/***/ 3578: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var iterate = __nccwpck_require__(9023) + , initState = __nccwpck_require__(42474) + , terminator = __nccwpck_require__(37942) + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} + + +/***/ }), + +/***/ 29893: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const BuildInterfaces = __nccwpck_require__(42167); +class BuildApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Build-api', options); + } + /** + * Associates an artifact with a build. + * + * @param {BuildInterfaces.BuildArtifact} artifact - The artifact. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + createArtifact(artifact, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, artifact, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a specific artifact for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + */ + getArtifact(project, buildId, artifactName) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactName == null) { + throw new TypeError('artifactName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + artifactName: artifactName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a specific artifact for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + */ + getArtifactContentZip(project, buildId, artifactName) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactName == null) { + throw new TypeError('artifactName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + artifactName: artifactName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all artifacts for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getArtifacts(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a file from the build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + * @param {string} fileId - The primary key for the file. + * @param {string} fileName - The name that the file will be set to. + */ + getFile(project, buildId, artifactName, fileId, fileName) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactName == null) { + throw new TypeError('artifactName can not be null or undefined'); + } + if (fileId == null) { + throw new TypeError('fileId can not be null or undefined'); + } + if (fileName == null) { + throw new TypeError('fileName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + artifactName: artifactName, + fileId: fileId, + fileName: fileName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the list of attachments of a specific type that are associated with a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type - The type of attachment. + */ + getAttachments(project, buildId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "f2192269-89fa-4f94-baf6-8fb128c55159", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a specific attachment. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} timelineId - The ID of the timeline. + * @param {string} recordId - The ID of the timeline record. + * @param {string} type - The type of the attachment. + * @param {string} name - The name of the attachment. + */ + getAttachment(project, buildId, timelineId, recordId, type, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "af5122d3-3438-485e-a25a-2dbbfde84ee6", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {BuildInterfaces.DefinitionResourceReference[]} resources + * @param {string} project - Project ID or project name + */ + authorizeProjectResources(resources, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "398c85bc-81aa-4822-947c-a194a05f0fef", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, resources, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} type + * @param {string} id + */ + getProjectResources(project, type, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + type: type, + id: id, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "398c85bc-81aa-4822-947c-a194a05f0fef", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that indicates the status of the most recent build for a definition. Note that this API is deprecated. Prefer StatusBadgeController.GetStatusBadge. + * + * @param {string} project - The project ID or name. + * @param {number} definitionId - The ID of the definition. + * @param {string} branchName - The name of the branch. + */ + getBadge(project, definitionId, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "de6a4df8-22cd-44ee-af2d-39f6aa7a4261", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of branches for the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} branchName - If supplied, the name of the branch to check for specifically. + */ + listBranches(project, providerName, serviceEndpointId, repository, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "e05d4403-9b81-4244-8763-20fde28d1976", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that indicates the status of the most recent build for the specified branch. + * + * @param {string} project - Project ID or project name + * @param {string} repoType - The repository type. + * @param {string} repoId - The repository ID. + * @param {string} branchName - The branch name. + */ + getBuildBadge(project, repoType, repoId, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repoType: repoType + }; + let queryValues = { + repoId: repoId, + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "21b3b9ce-fad5-4567-9ad0-80679794e003", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that indicates the status of the most recent build for the specified branch. + * + * @param {string} project - Project ID or project name + * @param {string} repoType - The repository type. + * @param {string} repoId - The repository ID. + * @param {string} branchName - The branch name. + */ + getBuildBadgeData(project, repoType, repoId, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repoType: repoType + }; + let queryValues = { + repoId: repoId, + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "21b3b9ce-fad5-4567-9ad0-80679794e003", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all retention leases that apply to a specific build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getRetentionLeasesForBuild(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "3da19a6a-f088-45c4-83ce-2ad3a87be6c4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + deleteBuild(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} propertyFilters + */ + getBuild(project, buildId, propertyFilters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + propertyFilters: propertyFilters, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of builds. + * + * @param {string} project - Project ID or project name + * @param {number[]} definitions - A comma-delimited list of definition IDs. If specified, filters to builds for these definitions. + * @param {number[]} queues - A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues. + * @param {string} buildNumber - If specified, filters to builds that match this build number. Append * to do a prefix search. + * @param {Date} minTime - If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified. + * @param {Date} maxTime - If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified. + * @param {string} requestedFor - If specified, filters to builds requested for the specified user. + * @param {BuildInterfaces.BuildReason} reasonFilter - If specified, filters to builds that match this reason. + * @param {BuildInterfaces.BuildStatus} statusFilter - If specified, filters to builds that match this status. + * @param {BuildInterfaces.BuildResult} resultFilter - If specified, filters to builds that match this result. + * @param {string[]} tagFilters - A comma-delimited list of tags. If specified, filters to builds that have the specified tags. + * @param {string[]} properties - A comma-delimited list of properties to retrieve. + * @param {number} top - The maximum number of builds to return. + * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of builds. + * @param {number} maxBuildsPerDefinition - The maximum number of builds to return per definition. + * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - Indicates whether to exclude, include, or only return deleted builds. + * @param {BuildInterfaces.BuildQueryOrder} queryOrder - The order in which builds should be returned. + * @param {string} branchName - If specified, filters to builds that built branches that built this branch. + * @param {number[]} buildIds - A comma-delimited list that specifies the IDs of builds to retrieve. + * @param {string} repositoryId - If specified, filters to builds that built from this repository. + * @param {string} repositoryType - If specified, filters to builds that built from repositories of this type. + */ + getBuilds(project, definitions, queues, buildNumber, minTime, maxTime, requestedFor, reasonFilter, statusFilter, resultFilter, tagFilters, properties, top, continuationToken, maxBuildsPerDefinition, deletedFilter, queryOrder, branchName, buildIds, repositoryId, repositoryType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + definitions: definitions && definitions.join(","), + queues: queues && queues.join(","), + buildNumber: buildNumber, + minTime: minTime, + maxTime: maxTime, + requestedFor: requestedFor, + reasonFilter: reasonFilter, + statusFilter: statusFilter, + resultFilter: resultFilter, + tagFilters: tagFilters && tagFilters.join(","), + properties: properties && properties.join(","), + '$top': top, + continuationToken: continuationToken, + maxBuildsPerDefinition: maxBuildsPerDefinition, + deletedFilter: deletedFilter, + queryOrder: queryOrder, + branchName: branchName, + buildIds: buildIds && buildIds.join(","), + repositoryId: repositoryId, + repositoryType: repositoryType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queues a build + * + * @param {BuildInterfaces.Build} build + * @param {string} project - Project ID or project name + * @param {boolean} ignoreWarnings + * @param {string} checkInTicket + * @param {number} sourceBuildId + * @param {number} definitionId - Optional definition id to queue a build without a body. Ignored if there's a valid body + */ + queueBuild(build, project, ignoreWarnings, checkInTicket, sourceBuildId, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ignoreWarnings: ignoreWarnings, + checkInTicket: checkInTicket, + sourceBuildId: sourceBuildId, + definitionId: definitionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, build, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a build. + * + * @param {BuildInterfaces.Build} build - The build. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {boolean} retry + */ + updateBuild(build, project, buildId, retry) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + retry: retry, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, build, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates multiple builds. + * + * @param {BuildInterfaces.Build[]} builds - The builds to update. + * @param {string} project - Project ID or project name + */ + updateBuilds(builds, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, builds, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the changes associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} continuationToken + * @param {number} top - The maximum number of changes to return + * @param {boolean} includeSourceChange + */ + getBuildChanges(project, buildId, continuationToken, top, includeSourceChange) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + continuationToken: continuationToken, + '$top': top, + includeSourceChange: includeSourceChange, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "54572c7b-bbd3-45d4-80dc-28be08941620", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Change, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the changes made to the repository between two given builds. + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId - The ID of the first build. + * @param {number} toBuildId - The ID of the last build. + * @param {number} top - The maximum number of changes to return. + */ + getChangesBetweenBuilds(project, fromBuildId, toBuildId, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + fromBuildId: fromBuildId, + toBuildId: toBuildId, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "f10f0ea5-18a1-43ec-a8fb-2042c7be9b43", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Change, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a controller + * + * @param {number} controllerId + */ + getBuildController(controllerId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + controllerId: controllerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "fcac1932-2ee1-437f-9b6f-7f696be858f6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildController, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets controller, optionally filtered by name + * + * @param {string} name + */ + getBuildControllers(name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + name: name, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "fcac1932-2ee1-437f-9b6f-7f696be858f6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildController, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new definition. + * + * @param {BuildInterfaces.BuildDefinition} definition - The definition. + * @param {string} project - Project ID or project name + * @param {number} definitionToCloneId + * @param {number} definitionToCloneRevision + */ + createDefinition(definition, project, definitionToCloneId, definitionToCloneRevision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + definitionToCloneId: definitionToCloneId, + definitionToCloneRevision: definitionToCloneRevision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, definition, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a definition and all associated builds. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + deleteDefinition(project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a definition, optionally at a specific revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results. + * @param {boolean} includeLatestBuilds + */ + getDefinition(project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, + minMetricsTime: minMetricsTime, + propertyFilters: propertyFilters && propertyFilters.join(","), + includeLatestBuilds: includeLatestBuilds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of definitions. + * + * @param {string} project - Project ID or project name + * @param {string} name - If specified, filters to definitions whose names match this pattern. + * @param {string} repositoryId - A repository ID. If specified, filters to definitions that use this repository. + * @param {string} repositoryType - If specified, filters to definitions that have a repository of this type. + * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - Indicates the order in which definitions should be returned. + * @param {number} top - The maximum number of definitions to return. + * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {number[]} definitionIds - A comma-delimited list that specifies the IDs of definitions to retrieve. + * @param {string} path - If specified, filters to definitions under this folder. + * @param {Date} builtAfter - If specified, filters to definitions that have builds after this date. + * @param {Date} notBuiltAfter - If specified, filters to definitions that do not have builds after this date. + * @param {boolean} includeAllProperties - Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned. + * @param {boolean} includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition. + * @param {string} taskIdFilter - If specified, filters to definitions that use the specified task. + * @param {number} processType - If specified, filters to definitions with the given process type. + * @param {string} yamlFilename - If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true + */ + getDefinitions(project, name, repositoryId, repositoryType, queryOrder, top, continuationToken, minMetricsTime, definitionIds, path, builtAfter, notBuiltAfter, includeAllProperties, includeLatestBuilds, taskIdFilter, processType, yamlFilename) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + name: name, + repositoryId: repositoryId, + repositoryType: repositoryType, + queryOrder: queryOrder, + '$top': top, + continuationToken: continuationToken, + minMetricsTime: minMetricsTime, + definitionIds: definitionIds && definitionIds.join(","), + path: path, + builtAfter: builtAfter, + notBuiltAfter: notBuiltAfter, + includeAllProperties: includeAllProperties, + includeLatestBuilds: includeLatestBuilds, + taskIdFilter: taskIdFilter, + processType: processType, + yamlFilename: yamlFilename, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionReference, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Restores a deleted definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The identifier of the definition to restore. + * @param {boolean} deleted - When false, restores a deleted definition. + */ + restoreDefinition(project, definitionId, deleted) { + return __awaiter(this, void 0, void 0, function* () { + if (deleted == null) { + throw new TypeError('deleted can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + deleted: deleted, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT. + * + * @param {BuildInterfaces.BuildDefinition} definition - The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} secretsSourceDefinitionId + * @param {number} secretsSourceDefinitionRevision + */ + updateDefinition(definition, project, definitionId, secretsSourceDefinitionId, secretsSourceDefinitionRevision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + secretsSourceDefinitionId: secretsSourceDefinitionId, + secretsSourceDefinitionRevision: secretsSourceDefinitionRevision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, definition, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the contents of a file in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved. + * @param {string} path - The path to the file to retrieve, relative to the root of the repository. + */ + getFileContents(project, providerName, serviceEndpointId, repository, commitOrBranch, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + commitOrBranch: commitOrBranch, + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "29d12225-b1d9-425f-b668-6c594a981313", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new folder. + * + * @param {BuildInterfaces.Folder} folder - The folder. + * @param {string} project - Project ID or project name + * @param {string} path - The full path of the folder. + */ + createFolder(folder, project, path) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, folder, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a definition folder. Definitions and their corresponding builds will also be deleted. + * + * @param {string} project - Project ID or project name + * @param {string} path - The full path to the folder. + */ + deleteFolder(project, path) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of build definition folders. + * + * @param {string} project - Project ID or project name + * @param {string} path - The path to start with. + * @param {BuildInterfaces.FolderQueryOrder} queryOrder - The order in which folders should be returned. + */ + getFolders(project, path, queryOrder) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + path: path + }; + let queryValues = { + queryOrder: queryOrder, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing folder at given existing path + * + * @param {BuildInterfaces.Folder} folder - The new version of the folder. + * @param {string} project - Project ID or project name + * @param {string} path - The full path to the folder. + */ + updateFolder(folder, project, path) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, folder, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets pipeline general settings. + * + * @param {string} project - Project ID or project name + */ + getBuildGeneralSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "c4aefd19-30ff-405b-80ad-aca021e7242a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates pipeline general settings. + * + * @param {BuildInterfaces.PipelineGeneralSettings} newSettings + * @param {string} project - Project ID or project name + */ + updateBuildGeneralSettings(newSettings, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "c4aefd19-30ff-405b-80ad-aca021e7242a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, newSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline. + * + * @param {number} daysToLookback + */ + getRetentionHistory(daysToLookback) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + daysToLookback: daysToLookback, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "1a9c48be-0ef5-4ec2-b94f-f053bdd2d3bf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildRetentionHistory, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the latest build for a definition, optionally scoped to a specific branch. + * + * @param {string} project - Project ID or project name + * @param {string} definition - definition name with optional leading folder path, or the definition id + * @param {string} branchName - optional parameter that indicates the specific branch to use. If not specified, the default branch is used. + */ + getLatestBuild(project, definition, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definition: definition + }; + let queryValues = { + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "54481611-01f4-47f3-998f-160da0f0c229", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds new leases for pipeline runs. + * + * @param {BuildInterfaces.NewRetentionLease[]} newLeases + * @param {string} project - Project ID or project name + */ + addRetentionLeases(newLeases, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, newLeases, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes specific retention leases. + * + * @param {string} project - Project ID or project name + * @param {number[]} ids + */ + deleteRetentionLeasesById(project, ids) { + return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ids: ids && ids.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the details of the retention lease given a lease id. + * + * @param {string} project - Project ID or project name + * @param {number} leaseId + */ + getRetentionLease(project, leaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + leaseId: leaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns any leases matching the specified MinimalRetentionLeases + * + * @param {string} project - Project ID or project name + * @param {BuildInterfaces.MinimalRetentionLease[]} leasesToFetch - List of JSON-serialized MinimalRetentionLeases separated by '|' + */ + getRetentionLeasesByMinimalRetentionLeases(project, leasesToFetch) { + return __awaiter(this, void 0, void 0, function* () { + if (leasesToFetch == null) { + throw new TypeError('leasesToFetch can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + leasesToFetch: leasesToFetch && leasesToFetch.join("|"), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run. + * + * @param {string} project - Project ID or project name + * @param {string} ownerId + * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition. + * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId. + */ + getRetentionLeasesByOwnerId(project, ownerId, definitionId, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ownerId: ownerId, + definitionId: definitionId, + runId: runId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run. + * + * @param {string} project - Project ID or project name + * @param {string} userOwnerId - The user id to search for. + * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition. + * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId. + */ + getRetentionLeasesByUserId(project, userOwnerId, definitionId, runId) { + return __awaiter(this, void 0, void 0, function* () { + if (userOwnerId == null) { + throw new TypeError('userOwnerId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + userOwnerId: userOwnerId, + definitionId: definitionId, + runId: runId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the duration or pipeline protection status of a retention lease. + * + * @param {BuildInterfaces.RetentionLeaseUpdate} leaseUpdate - The new data for the retention lease. + * @param {string} project - Project ID or project name + * @param {number} leaseId - The ID of the lease to update. + */ + updateRetentionLease(leaseUpdate, project, leaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + leaseId: leaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, leaseUpdate, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLog(project, buildId, logId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLogLines(project, buildId, logId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the logs for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildLogs(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the logs for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildLogsZip(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLogZip(project, buildId, logId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets build metrics for a project. + * + * @param {string} project - Project ID or project name + * @param {string} metricAggregationType - The aggregation type to use (hourly, daily). + * @param {Date} minMetricsTime - The date from which to calculate metrics. + */ + getProjectMetrics(project, metricAggregationType, minMetricsTime) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + metricAggregationType: metricAggregationType + }; + let queryValues = { + minMetricsTime: minMetricsTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7433fae7-a6bc-41dc-a6e2-eef9005ce41a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildMetric, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets build metrics for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {Date} minMetricsTime - The date from which to calculate metrics. + */ + getDefinitionMetrics(project, definitionId, minMetricsTime) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + minMetricsTime: minMetricsTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d973b939-0ce0-4fec-91d8-da3940fa1827", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildMetric, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all build definition options supported by the system. + * + * @param {string} project - Project ID or project name + */ + getBuildOptionDefinitions(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "591cb5a4-2d46-4f3a-a697-5cd42b6bd332", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildOptionDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the contents of a directory in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved. + * @param {string} path - The path contents to list, relative to the root of the repository. + */ + getPathContents(project, providerName, serviceEndpointId, repository, commitOrBranch, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + commitOrBranch: commitOrBranch, + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7944d6fb-df01-4709-920a-7a189aa34037", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets properties for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties. + */ + getBuildProperties(project, buildId, filter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + filter: filter && filter.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "0a6312e9-0627-49b7-8083-7d74a64849c9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates properties for a build. + * + * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + updateBuildProperties(customHeaders, document, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "0a6312e9-0627-49b7-8083-7d74a64849c9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets properties for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties. + */ + getDefinitionProperties(project, definitionId, filter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + filter: filter && filter.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d9826ad7-2a68-46a9-a6e9-677698777895", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates properties for a definition. + * + * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + updateDefinitionProperties(customHeaders, document, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d9826ad7-2a68-46a9-a6e9-677698777895", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a pull request object from source provider. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} pullRequestId - Vendor-specific id of the pull request. + * @param {string} repositoryId - Vendor-specific identifier or the name of the repository that contains the pull request. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + */ + getPullRequest(project, providerName, pullRequestId, repositoryId, serviceEndpointId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName, + pullRequestId: pullRequestId + }; + let queryValues = { + repositoryId: repositoryId, + serviceEndpointId: serviceEndpointId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d8763ec7-9ff0-4fb4-b2b2-9d757906ff14", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a build report. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type + */ + getBuildReport(project, buildId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + type: type, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "45bcaa88-67e1-4042-a035-56d3b4a7d44c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a build report. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type + */ + getBuildReportHtmlContent(project, buildId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + type: type, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "45bcaa88-67e1-4042-a035-56d3b4a7d44c", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/html", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of source code repositories. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of a single repository to get. + * @param {BuildInterfaces.ResultSet} resultSet - 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set. + * @param {boolean} pageResults - If set to true, this will limit the set of results and will return a continuation token to continue the query. + * @param {string} continuationToken - When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories. + */ + listRepositories(project, providerName, serviceEndpointId, repository, resultSet, pageResults, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + resultSet: resultSet, + pageResults: pageResults, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d44d1680-f978-4834-9b93-8c6e132329c9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {BuildInterfaces.DefinitionResourceReference[]} resources + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + authorizeDefinitionResources(resources, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "ea623316-1967-45eb-89ab-e9e6110cf2d6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, resources, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + getDefinitionResources(project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "ea623316-1967-45eb-89ab-e9e6110cf2d6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets information about build resources in the system. + * + */ + getResourceUsage() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "3813d06c-9e36-4ea1-aac3-61a485d60e3d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the project's retention settings. + * + * @param {string} project - Project ID or project name + */ + getRetentionSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "dadb46e7-5851-4c72-820e-ae8abb82f59f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the project's retention settings. + * + * @param {BuildInterfaces.UpdateProjectRetentionSettingModel} updateModel + * @param {string} project - Project ID or project name + */ + updateRetentionSettings(updateModel, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "dadb46e7-5851-4c72-820e-ae8abb82f59f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all revisions of a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + getDefinitionRevisions(project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "7c116775-52e5-453e-8c5d-914d9762d8c4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionRevision, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the build settings. + * + * @param {string} project - Project ID or project name + */ + getBuildSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the build settings. + * + * @param {BuildInterfaces.BuildSettings} settings - The new settings. + * @param {string} project - Project ID or project name + */ + updateBuildSettings(settings, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, settings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of source providers and their capabilities. + * + * @param {string} project - Project ID or project name + */ + listSourceProviders(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "3ce81729-954f-423d-a581-9fea01d25186", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.SourceProviderAttributes, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a build stage + * + * @param {BuildInterfaces.UpdateStageParameters} updateParameters + * @param {number} buildId + * @param {string} stageRefName + * @param {string} project - Project ID or project name + */ + updateStage(updateParameters, buildId, stageRefName, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + stageRefName: stageRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "b8aac6c9-744b-46e1-88fc-3550969f9313", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + *

Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.

If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.

+ * + * @param {string} project - Project ID or project name + * @param {string} definition - Either the definition name with optional leading folder path, or the definition id. + * @param {string} branchName - Only consider the most recent build for this branch. If not specified, the default branch is used. + * @param {string} stageName - Use this stage within the pipeline to render the status. + * @param {string} jobName - Use this job within a stage of the pipeline to render the status. + * @param {string} configuration - Use this job configuration to render the status + * @param {string} label - Replaces the default text on the left side of the badge. + */ + getStatusBadge(project, definition, branchName, stageName, jobName, configuration, label) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definition: definition + }; + let queryValues = { + branchName: branchName, + stageName: stageName, + jobName: jobName, + configuration: configuration, + label: label, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "07acfdce-4757-4439-b422-ddd13a2fcc10", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a tag to a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} tag - The tag to add. + */ + addBuildTag(project, buildId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds tags to a build. + * + * @param {string[]} tags - The tags to add. Request body is composed directly from listed tags. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + addBuildTags(tags, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, tags, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} tag - The tag to remove. + */ + deleteBuildTag(project, buildId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the tags for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildTags(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds/Removes tags from a build. + * + * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + updateBuildTags(updateParameters, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a tag to a definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string} tag - The tag to add. + */ + addDefinitionTag(project, definitionId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds multiple tags to a definition. + * + * @param {string[]} tags - The tags to add. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + addDefinitionTags(tags, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, tags, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string} tag - The tag to remove. + */ + deleteDefinitionTag(project, definitionId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the tags for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The definition revision number. If not specified, uses the latest revision of the definition. + */ + getDefinitionTags(project, definitionId, revision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds/Removes tags from a definition. + * + * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + updateDefinitionTags(updateParameters, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a tag from builds, definitions, and from the tag store + * + * @param {string} project - Project ID or project name + * @param {string} tag - The tag to remove. + */ + deleteTag(project, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "d84ac5c6-edc7-43d5-adc9-1b34be5dea09", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of all build tags in the project. + * + * @param {string} project - Project ID or project name + */ + getTags(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "d84ac5c6-edc7-43d5-adc9-1b34be5dea09", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a build definition template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the template. + */ + deleteTemplate(project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a specific build definition template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the requested template. + */ + getTemplate(project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all definition templates. + * + * @param {string} project - Project ID or project name + */ + getTemplates(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing build definition template. + * + * @param {BuildInterfaces.BuildDefinitionTemplate} template - The new version of the template. + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the template. + */ + saveTemplate(template, project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, template, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets details for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} timelineId + * @param {number} changeId + * @param {string} planId + */ + getBuildTimeline(project, buildId, timelineId, changeId, planId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + timelineId: timelineId + }; + let queryValues = { + changeId: changeId, + planId: planId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "8baac422-4c6e-4de5-8532-db96d92acffa", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Timeline, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Recreates the webhooks for the specified triggers in the given source code repository. + * + * @param {BuildInterfaces.DefinitionTriggerType[]} triggerTypes - The types of triggers to restore webhooks for. + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + */ + restoreWebhooks(triggerTypes, project, providerName, serviceEndpointId, repository) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "793bceb8-9736-4030-bd2f-fb3ce6d6b478", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, triggerTypes, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of webhooks installed in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + */ + listWebhooks(project, providerName, serviceEndpointId, repository) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "8f20ff82-9498-4812-9f6e-9c01bdc50e99", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RepositoryWebhook, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the work items associated with a build. Only work items in the same project are returned. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} top - The maximum number of work items to return. + */ + getBuildWorkItemsRefs(project, buildId, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "5a21f5d2-5642-47e4-a0bd-1356e6731bee", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the work items associated with a build, filtered to specific commits. + * + * @param {string[]} commitIds - A comma-delimited list of commit IDs. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} top - The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified. + */ + getBuildWorkItemsRefsFromCommits(commitIds, project, buildId, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "5a21f5d2-5642-47e4-a0bd-1356e6731bee", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, commitIds, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all the work items between two builds. + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId - The ID of the first build. + * @param {number} toBuildId - The ID of the last build. + * @param {number} top - The maximum number of work items to return. + */ + getWorkItemsBetweenBuilds(project, fromBuildId, toBuildId, top) { + return __awaiter(this, void 0, void 0, function* () { + if (fromBuildId == null) { + throw new TypeError('fromBuildId can not be null or undefined'); + } + if (toBuildId == null) { + throw new TypeError('toBuildId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + fromBuildId: fromBuildId, + toBuildId: toBuildId, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "52ba8915-5518-42e3-a4bb-b0182d159e2d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Converts a definition to YAML, optionally at a specific revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results. + * @param {boolean} includeLatestBuilds + */ + getDefinitionYaml(project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, + minMetricsTime: minMetricsTime, + propertyFilters: propertyFilters && propertyFilters.join(","), + includeLatestBuilds: includeLatestBuilds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7c3df3a1-7e51-4150-8cf7-540347f8697f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +BuildApi.RESOURCE_AREA_ID = "965220d5-5bb9-42cf-8d67-9b146df2a5a4"; +exports.BuildApi = BuildApi; + + +/***/ }), + +/***/ 80273: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", ({ value: true })); +const vsom = __nccwpck_require__(29686); +const serm = __nccwpck_require__(15817); +const rm = __nccwpck_require__(87405); +const hm = __nccwpck_require__(15538); +class ClientApiBase { + constructor(baseUrl, handlers, userAgent, options) { + this.baseUrl = baseUrl; + this.http = new hm.HttpClient(userAgent, handlers, options); + this.rest = new rm.RestClient(userAgent, null, handlers, options); + this.vsoClient = new vsom.VsoClient(baseUrl, this.rest); + this.userAgent = userAgent; + } + createAcceptHeader(type, apiVersion) { + return type + (apiVersion ? (';api-version=' + apiVersion) : ''); + } + createRequestOptions(type, apiVersion) { + let options = {}; + options.acceptHeader = this.createAcceptHeader(type, apiVersion); + return options; + } + formatResponse(data, responseTypeMetadata, isCollection) { + let serializationData = { + responseTypeMetadata: responseTypeMetadata, + responseIsCollection: isCollection + }; + let deserializedResult = serm.ContractSerializer.deserialize(data, serializationData.responseTypeMetadata, false, serializationData.responseIsCollection); + return deserializedResult; + } +} +exports.ClientApiBase = ClientApiBase; + + +/***/ }), + +/***/ 54020: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const CoreInterfaces = __nccwpck_require__(73931); +const OperationsInterfaces = __nccwpck_require__(63052); +class CoreApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Core-api', options); + } + /** + * Removes the avatar for the project. + * + * @param {string} projectId - The ID or name of the project. + */ + removeProjectAvatar(projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "54b2a2a0-859b-4d05-827c-ec4c862f641a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Sets the avatar for the project. + * + * @param {CoreInterfaces.ProjectAvatar} avatarBlob - The avatar blob data object to upload. + * @param {string} projectId - The ID or name of the project. + */ + setProjectAvatar(avatarBlob, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "54b2a2a0-859b-4d05-827c-ec4c862f641a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, avatarBlob, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData + * @param {string} projectId + */ + createConnectedService(connectedServiceCreationData, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, connectedServiceCreationData, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedService, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} projectId + * @param {string} name + */ + getConnectedServiceDetails(projectId, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedServiceDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} projectId + * @param {CoreInterfaces.ConnectedServiceKind} kind + */ + getConnectedServices(projectId, kind) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + let queryValues = { + kind: kind, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedService, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + createIdentityMru(mruData, mruName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + mruName: mruName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, mruData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + deleteIdentityMru(mruData, mruName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + mruName: mruName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} mruName + */ + getIdentityMru(mruName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + mruName: mruName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + updateIdentityMru(mruData, mruName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + mruName: mruName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, mruData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of members for a specific team. + * + * @param {string} projectId - The name or ID (GUID) of the team project the team belongs to. + * @param {string} teamId - The name or ID (GUID) of the team . + * @param {number} top + * @param {number} skip + */ + getTeamMembersWithExtendedProperties(projectId, teamId, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + teamId: teamId + }; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "294c494c-2600-4d7e-b76c-3dd50c3c95be", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a process by ID. + * + * @param {string} processId - ID for a process. + */ + getProcessById(processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "93878975-88c5-4e6a-8abb-7ddd77a8a7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.Process, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of processes. + * + */ + getProcesses() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "93878975-88c5-4e6a-8abb-7ddd77a8a7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.Process, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get project collection with the specified id or name. + * + * @param {string} collectionId + */ + getProjectCollection(collectionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + collectionId: collectionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "8031090f-ef1d-4af6-85fc-698cd75d42bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProjectCollection, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get project collection references for this application. + * + * @param {number} top + * @param {number} skip + */ + getProjectCollections(top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "8031090f-ef1d-4af6-85fc-698cd75d42bf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the history of changes to the project. + * + * @param {number} minRevision - The minimum revision number to return in the history. + */ + getProjectHistoryEntries(minRevision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + minRevision: minRevision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "6488a877-4749-4954-82ea-7340d36be9f2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.ProjectInfo, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get project with the specified id or name, optionally including capabilities. + * + * @param {string} projectId + * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). + * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). + */ + getProject(projectId, includeCapabilities, includeHistory) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + let queryValues = { + includeCapabilities: includeCapabilities, + includeHistory: includeHistory, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProject, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all projects in the organization that the authenticated user has access to. + * + * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). + * @param {number} top + * @param {number} skip + * @param {string} continuationToken + * @param {boolean} getDefaultTeamImageUrl + */ + getProjects(stateFilter, top, skip, continuationToken, getDefaultTeamImageUrl) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + stateFilter: stateFilter, + '$top': top, + '$skip': skip, + continuationToken: continuationToken, + getDefaultTeamImageUrl: getDefaultTeamImageUrl, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProjectReference, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status. + * + * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. + */ + queueCreateProject(projectToCreate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, projectToCreate, options); + let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status. + * + * @param {string} projectId - The project id of the project to delete. + */ + queueDeleteProject(projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update an existing project's name, abbreviation, description, or restore a project. + * + * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. The state must be set to wellFormed to restore the project. + * @param {string} projectId - The project id of the project to update. + */ + updateProject(projectUpdate, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, projectUpdate, options); + let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a collection of team project properties for multiple projects. + * + * @param {string[]} projectIds - A comma-delimited string of team project IDs + * @param {string[]} properties + */ + getProjectsProperties(projectIds, properties) { + return __awaiter(this, void 0, void 0, function* () { + if (projectIds == null) { + throw new TypeError('projectIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + projectIds: projectIds && projectIds.join(","), + properties: properties && properties.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "0a3ffdfc-fe94-47a6-bb27-79bf3f762eac", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a collection of team project properties. + * + * @param {string} projectId - The team project ID. + * @param {string[]} keys - A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned. + */ + getProjectProperties(projectId, keys) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + let queryValues = { + keys: keys && keys.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "4976a71a-4487-49aa-8aab-a1eda469037a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create, update, and delete team project properties. + * + * @param {string} projectId - The team project ID. + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. + */ + setProjectProperties(customHeaders, projectId, patchDocument) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "4976a71a-4487-49aa-8aab-a1eda469037a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.Proxy} proxy + */ + createOrUpdateProxy(proxy) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, proxy, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} proxyUrl + * @param {string} site + */ + deleteProxy(proxyUrl, site) { + return __awaiter(this, void 0, void 0, function* () { + if (proxyUrl == null) { + throw new TypeError('proxyUrl can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + proxyUrl: proxyUrl, + site: site, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} proxyUrl + */ + getProxies(proxyUrl) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + proxyUrl: proxyUrl, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of all teams. + * + * @param {boolean} mine - If true, then return all teams requesting user is member. Otherwise return all teams user has read access. + * @param {number} top - Maximum number of teams to return. + * @param {number} skip - Number of teams to skip. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getAllTeams(mine, top, skip, expandIdentity) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$mine': mine, + '$top': top, + '$skip': skip, + '$expandIdentity': expandIdentity, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "7a4d9ee9-3433-4347-b47a-7a80f1cf307e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a team in a team project. + * + * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. + * @param {string} projectId - The name or ID (GUID) of the team project in which to create the team. + */ + createTeam(team, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, team, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a team. + * + * @param {string} projectId - The name or ID (GUID) of the team project containing the team to delete. + * @param {string} teamId - The name or ID of the team to delete. + */ + deleteTeam(projectId, teamId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + teamId: teamId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific team. + * + * @param {string} projectId - The name or ID (GUID) of the team project containing the team. + * @param {string} teamId - The name or ID (GUID) of the team. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getTeam(projectId, teamId, expandIdentity) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + teamId: teamId + }; + let queryValues = { + '$expandIdentity': expandIdentity, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of teams. + * + * @param {string} projectId + * @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access. + * @param {number} top - Maximum number of teams to return. + * @param {number} skip - Number of teams to skip. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getTeams(projectId, mine, top, skip, expandIdentity) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + let queryValues = { + '$mine': mine, + '$top': top, + '$skip': skip, + '$expandIdentity': expandIdentity, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a team's name and/or description. + * + * @param {CoreInterfaces.WebApiTeam} teamData + * @param {string} projectId - The name or ID (GUID) of the team project containing the team to update. + * @param {string} teamId - The name of ID of the team to update. + */ + updateTeam(teamData, projectId, teamId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + teamId: teamId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, teamData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +CoreApi.RESOURCE_AREA_ID = "79134c72-4a58-4b42-976c-04e7115f32bf"; +exports.CoreApi = CoreApi; + + +/***/ }), + +/***/ 17539: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const DashboardInterfaces = __nccwpck_require__(86890); +class DashboardApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Dashboard-api', options); + } + /** + * Create the supplied dashboard. + * + * @param {DashboardInterfaces.Dashboard} dashboard - The initial state of the dashboard + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + createDashboard(dashboard, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, dashboard, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard to delete. + */ + deleteDashboard(teamContext, dashboardId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a dashboard by its ID. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId + */ + getDashboard(teamContext, dashboardId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of dashboards under a project. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getDashboardsByProject(teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied. + * + * @param {DashboardInterfaces.Dashboard} dashboard - The Configuration of the dashboard to replace. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard to replace. + */ + replaceDashboard(dashboard, teamContext, dashboardId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, dashboard, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content. + * + * @param {DashboardInterfaces.DashboardGroup} group + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + replaceDashboards(group, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.DashboardGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a widget on the specified dashboard. + * + * @param {DashboardInterfaces.Widget} widget - State of the widget to add + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of dashboard the widget will be added to. + */ + createWidget(widget, teamContext, dashboardId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, widget, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete the specified widget. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + deleteWidget(teamContext, dashboardId, widgetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId, + widgetId: widgetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the current state of the specified widget. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to read. + */ + getWidget(teamContext, dashboardId, widgetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId, + widgetId: widgetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Override the state of the specified widget. + * + * @param {DashboardInterfaces.Widget} widget - State to be written for the widget. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + replaceWidget(widget, teamContext, dashboardId, widgetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId, + widgetId: widgetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, widget, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Perform a partial update of the specified widget. + * + * @param {DashboardInterfaces.Widget} widget - Description of the widget changes to apply. All non-null fields will be replaced. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + updateWidget(widget, teamContext, dashboardId, widgetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId, + widgetId: widgetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, widget, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the widget metadata satisfying the specified contribution ID. + * + * @param {string} contributionId - The ID of Contribution for the Widget + * @param {string} project - Project ID or project name + */ + getWidgetMetadata(contributionId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + contributionId: contributionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Dashboard", "6b3628d3-e96f-4fc7-b176-50240b03b515", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.WidgetMetadataResponse, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all available widget metadata in alphabetical order, including widgets marked with isVisibleFromCatalog == false. + * + * @param {DashboardInterfaces.WidgetScope} scope + * @param {string} project - Project ID or project name + */ + getWidgetTypes(scope, project) { + return __awaiter(this, void 0, void 0, function* () { + if (scope == null) { + throw new TypeError('scope can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + '$scope': scope, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Dashboard", "6b3628d3-e96f-4fc7-b176-50240b03b515", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.WidgetTypesResponse, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +DashboardApi.RESOURCE_AREA_ID = "31c84e0a-3ece-48fd-a29d-100849af99ba"; +exports.DashboardApi = DashboardApi; + + +/***/ }), + +/***/ 94605: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const ExtensionManagementInterfaces = __nccwpck_require__(67357); +const GalleryInterfaces = __nccwpck_require__(48905); +class ExtensionManagementApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-ExtensionManagement-api', options); + } + /** + * @param {string} itemId + * @param {boolean} testCommerce + * @param {boolean} isFreeOrTrialInstall + * @param {boolean} isAccountOwner + * @param {boolean} isLinked + * @param {boolean} isConnectedServer + * @param {boolean} isBuyOperationValid + */ + getAcquisitionOptions(itemId, testCommerce, isFreeOrTrialInstall, isAccountOwner, isLinked, isConnectedServer, isBuyOperationValid) { + return __awaiter(this, void 0, void 0, function* () { + if (itemId == null) { + throw new TypeError('itemId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + itemId: itemId, + testCommerce: testCommerce, + isFreeOrTrialInstall: isFreeOrTrialInstall, + isAccountOwner: isAccountOwner, + isLinked: isLinked, + isConnectedServer: isConnectedServer, + isBuyOperationValid: isBuyOperationValid, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "288dff58-d13b-468e-9671-0fb754e9398c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.AcquisitionOptions, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ExtensionManagementInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + */ + requestAcquisition(acquisitionRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "da616457-eed3-4672-92d7-18d21f5c1658", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, acquisitionRequest, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionAcquisitionRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + */ + getAuditLog(publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "23a312e0-562d-42fb-a505-5a046b5635db", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionAuditLog, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} registrationId + */ + registerAuthorization(publisherName, extensionName, registrationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + registrationId: registrationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f21cfc80-d2d2-4248-98bb-7820c74c4606", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + createDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, doc, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + * @param {string} documentId + */ + deleteDocumentByName(publisherName, extensionName, scopeType, scopeValue, collectionName, documentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName, + documentId: documentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + * @param {string} documentId + */ + getDocumentByName(publisherName, extensionName, scopeType, scopeValue, collectionName, documentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName, + documentId: documentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + getDocumentsByName(publisherName, extensionName, scopeType, scopeValue, collectionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + setDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, doc, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + updateDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, doc, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Query for one or more data collections for the specified extension. Note: the token used for authorization must have been issued on behalf of the specified extension. + * + * @param {ExtensionManagementInterfaces.ExtensionDataCollectionQuery} collectionQuery + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + */ + queryCollectionsByName(collectionQuery, publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "56c331f1-ce53-4318-adfd-4db5c52a7a2e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, collectionQuery, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List state and version information for all installed extensions. + * + * @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results. + * @param {boolean} includeErrors - If true, include installed extensions in an error state in the results. + * @param {boolean} includeInstallationIssues + * @param {boolean} forceRefresh + */ + getStates(includeDisabled, includeErrors, includeInstallationIssues, forceRefresh) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + includeDisabled: includeDisabled, + includeErrors: includeErrors, + includeInstallationIssues: includeInstallationIssues, + forceRefresh: forceRefresh, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "92755d3d-9a8a-42b3-8a4d-87359fe5aa93", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionState, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ExtensionManagementInterfaces.InstalledExtensionQuery} query + */ + queryExtensions(query) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "046c980f-1345-4ce2-bf85-b46d10ff4cfd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List the installed extensions in the account / project collection. + * + * @param {boolean} includeDisabledExtensions - If true (the default), include disabled extensions in the results. + * @param {boolean} includeErrors - If true, include installed extensions with errors. + * @param {string[]} assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. + * @param {boolean} includeInstallationIssues + */ + getInstalledExtensions(includeDisabledExtensions, includeErrors, assetTypes, includeInstallationIssues) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + includeDisabledExtensions: includeDisabledExtensions, + includeErrors: includeErrors, + assetTypes: assetTypes && assetTypes.join(":"), + includeInstallationIssues: includeInstallationIssues, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "275424d0-c844-4fe2-bda6-04933a1357d8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update an installed extension. Typically this API is used to enable or disable an extension. + * + * @param {ExtensionManagementInterfaces.InstalledExtension} extension + */ + updateInstalledExtension(extension) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "275424d0-c844-4fe2-bda6-04933a1357d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, extension, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an installed extension by its publisher and extension name. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string[]} assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. + */ + getInstalledExtensionByName(publisherName, extensionName, assetTypes) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + assetTypes: assetTypes && assetTypes.join(":"), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Install the specified extension into the account / project collection. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string} version + */ + installExtensionByName(publisherName, extensionName, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Uninstall the specified extension from the account / project collection. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string} reason + * @param {string} reasonCode + */ + uninstallExtensionByName(publisherName, extensionName, reason, reasonCode) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + reason: reason, + reasonCode: reasonCode, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} userId + */ + getPolicies(userId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userId: userId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "e5cc8c09-407b-4867-8319-2ae3338cbf6f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.UserExtensionPolicy, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} rejectMessage + * @param {string} publisherName + * @param {string} extensionName + * @param {string} requesterId + * @param {ExtensionManagementInterfaces.ExtensionRequestState} state + */ + resolveRequest(rejectMessage, publisherName, extensionName, requesterId, state) { + return __awaiter(this, void 0, void 0, function* () { + if (state == null) { + throw new TypeError('state can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + requesterId: requesterId + }; + let queryValues = { + state: state, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "aa93e1f3-511c-4364-8b9c-eb98818f2e0b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, rejectMessage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getRequests() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "216b978f-b164-424e-ada2-b77561e842b7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.RequestedExtension, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} rejectMessage + * @param {string} publisherName + * @param {string} extensionName + * @param {ExtensionManagementInterfaces.ExtensionRequestState} state + */ + resolveAllRequests(rejectMessage, publisherName, extensionName, state) { + return __awaiter(this, void 0, void 0, function* () { + if (state == null) { + throw new TypeError('state can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + state: state, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "ba93e1f3-511c-4364-8b9c-eb98818f2e0b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, rejectMessage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + */ + deleteRequest(publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f5afca1e-a728-4294-aa2d-4af0173431b5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} requestMessage + */ + requestExtension(publisherName, extensionName, requestMessage) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f5afca1e-a728-4294-aa2d-4af0173431b5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, requestMessage, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.RequestedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getToken() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "3a2e24ed-1d6f-4cb2-9f3b-45a96bbfaf50", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +ExtensionManagementApi.RESOURCE_AREA_ID = "6c2b0933-3600-42ae-bf8b-93d4f7e83594"; +exports.ExtensionManagementApi = ExtensionManagementApi; + + +/***/ }), + +/***/ 33193: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const FeatureManagementInterfaces = __nccwpck_require__(17278); +class FeatureManagementApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-FeatureManagement-api', options); + } + /** + * Get a specific feature by its id + * + * @param {string} featureId - The contribution id of the feature + */ + getFeature(featureId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "c4209f25-7a27-41dd-9f04-06080c7b6afd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of all defined features + * + * @param {string} targetContributionId - Optional target contribution. If null/empty, return all features. If specified include the features that target the specified contribution. + */ + getFeatures(targetContributionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + targetContributionId: targetContributionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "c4209f25-7a27-41dd-9f04-06080c7b6afd", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the state of the specified feature for the given user/all-users scope + * + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + */ + getFeatureState(featureId, userScope) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId, + userScope: userScope + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "98911314-3f9b-4eaf-80e8-83900d8e85d9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Set the state of a feature + * + * @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value. + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + * @param {string} reason - Reason for changing the state + * @param {string} reasonCode - Short reason code + */ + setFeatureState(feature, featureId, userScope, reason, reasonCode) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId, + userScope: userScope + }; + let queryValues = { + reason: reason, + reasonCode: reasonCode, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "98911314-3f9b-4eaf-80e8-83900d8e85d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, feature, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the state of the specified feature for the given named scope + * + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team") + * @param {string} scopeValue - Value of the scope (e.g. the project or team id) + */ + getFeatureStateForScope(featureId, userScope, scopeName, scopeValue) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId, + userScope: userScope, + scopeName: scopeName, + scopeValue: scopeValue + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "dd291e43-aa9f-4cee-8465-a93c78e414a4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Set the state of a feature at a specific scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value. + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + * @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team") + * @param {string} scopeValue - Value of the scope (e.g. the project or team id) + * @param {string} reason - Reason for changing the state + * @param {string} reasonCode - Short reason code + */ + setFeatureStateForScope(feature, featureId, userScope, scopeName, scopeValue, reason, reasonCode) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId, + userScope: userScope, + scopeName: scopeName, + scopeValue: scopeValue + }; + let queryValues = { + reason: reason, + reasonCode: reasonCode, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "dd291e43-aa9f-4cee-8465-a93c78e414a4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, feature, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the effective state for a list of feature ids + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Features to query along with current scope values + */ + queryFeatureStates(query) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "2b4486ad-122b-400c-ae65-17b6672c1f9d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the states of the specified features for the default scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query. + * @param {string} userScope + */ + queryFeatureStatesForDefaultScope(query, userScope) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userScope: userScope + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "3f810f28-03e2-4239-b0bc-788add3005e5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the states of the specified features for the specific named scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query. + * @param {string} userScope + * @param {string} scopeName + * @param {string} scopeValue + */ + queryFeatureStatesForNamedScope(query, userScope, scopeName, scopeValue) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userScope: userScope, + scopeName: scopeName, + scopeValue: scopeValue + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "f29e997b-c2da-4d15-8380-765788a1a74c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.FeatureManagementApi = FeatureManagementApi; + + +/***/ }), + +/***/ 87558: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +const stream = __nccwpck_require__(12781); +const zlib = __nccwpck_require__(59796); +const httpm = __nccwpck_require__(15538); +const FileContainerApiBase = __nccwpck_require__(5145); +const FileContainerInterfaces = __nccwpck_require__(6110); +class FileContainerApi extends FileContainerApiBase.FileContainerApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, options); + } + /** + * @param {number} containerId + * @param {string} scope + * @param {string} itemPath + * @param {string} downloadFileName + */ + getItem(containerId, scope, itemPath, downloadFileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + containerId: containerId + }; + let queryValues = { + scope: scope, + itemPath: itemPath, + '$format': "OctetStream", + downloadFileName: downloadFileName + }; + try { + let verData = yield this.vsoClient.getVersioningData("4.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/octet-stream', verData.apiVersion); + let res = yield this.http.get(url); + let rres = {}; + let statusCode = res.message.statusCode; + rres.statusCode = statusCode; + // not found leads to null obj returned + if (statusCode == httpm.HttpCodes.NotFound) { + resolve(rres); + } + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + let contents = yield res.readBody(); + let obj; + if (contents && contents.length > 0) { + obj = JSON.parse(contents); + if (options && options.responseProcessor) { + rres.result = options.responseProcessor(obj); + } + else { + rres.result = obj; + } + } + if (obj && obj.message) { + msg = obj.message; + } + else { + msg = "Failed request: (" + statusCode + ") " + res.message.url; + } + reject(new Error(msg)); + } + else { + // if the response is gzipped, unzip it + if (res.message.headers["content-encoding"] === "gzip") { + let unzipStream = zlib.createGunzip(); + res.message.pipe(unzipStream); + rres.result = unzipStream; + } + else { + rres.result = res.message; + } + resolve(rres); + } + } + catch (err) { + reject(err); + } + })); + }); + } + createItem(contentStream, uncompressedLength, containerId, itemPath, scope, options) { + return new Promise((resolve, reject) => { + let chunkStream = new ChunkStream(this, uncompressedLength, containerId, itemPath, scope, options); + chunkStream.on('finish', () => { + resolve(chunkStream.getItem()); + }); + contentStream.pipe(chunkStream); + }); + } + // used by ChunkStream + _createItem(customHeaders, contentStream, containerId, itemPath, scope, onResult) { + var routeValues = { + containerId: containerId + }; + var queryValues = { + itemPath: itemPath, + scope: scope, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = ""; + this.vsoClient.getVersioningData("4.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues) + .then((versioningData) => { + var url = versioningData.requestUrl; + var serializationData = { responseTypeMetadata: FileContainerInterfaces.TypeInfo.FileContainerItem, responseIsCollection: false }; + let options = this.createRequestOptions('application/octet-stream', versioningData.apiVersion); + options.additionalHeaders = customHeaders; + this.rest.uploadStream('PUT', url, contentStream, options) + .then((res) => { + let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, false); + onResult(null, res.statusCode, ret); + }) + .catch((err) => { + onResult(err, err.statusCode, null); + }); + }, (error) => { + onResult(error, error.statusCode, null); + }); + } +} +exports.FileContainerApi = FileContainerApi; +class ChunkStream extends stream.Writable { + constructor(api, uncompressedLength, containerId, itemPath, scope, options) { + super(); + this._buffer = new Buffer(ChunkStream.ChunkSize); + this._length = 0; + this._startRange = 0; + this._bytesToSend = 0; + this._totalReceived = 0; + this._api = api; + this._options = options || {}; + this._uncompressedLength = uncompressedLength; + this._containerId = containerId; + this._itemPath = itemPath; + this._scope = scope; + this._bytesToSend = this._options.isGzipped ? this._options.compressedLength : uncompressedLength; + } + _write(data, encoding, callback) { + let chunk = data; + if (!chunk) { + if (this._length == 0) { + callback(); + } + else { + // last chunk + this._sendChunk(callback); + } + return; + } + let newBuffer = null; + if (this._length + chunk.length > ChunkStream.ChunkSize) { + // overflow + let overflowPosition = chunk.length - (ChunkStream.ChunkSize - this._length); + chunk.copy(this._buffer, this._length, 0, overflowPosition); + this._length += overflowPosition; + newBuffer = chunk.slice(overflowPosition); + } + else { + chunk.copy(this._buffer, this._length, 0, chunk.length); + this._length += chunk.length; + } + this._totalReceived += chunk.length; + if (this._length >= ChunkStream.ChunkSize || this._totalReceived >= this._bytesToSend) { + this._sendChunk(callback, newBuffer); + } + else { + callback(); + } + } + _sendChunk(callback, newBuffer) { + let endRange = this._startRange + this._length; + let headers = { + "Content-Range": "bytes " + this._startRange + "-" + (endRange - 1) + "/" + this._bytesToSend, + "Content-Length": this._length + }; + if (this._options.isGzipped) { + headers["Accept-Encoding"] = "gzip"; + headers["Content-Encoding"] = "gzip"; + headers["x-tfs-filelength"] = this._uncompressedLength; + } + this._startRange = endRange; + this._api._createItem(headers, new BufferStream(this._buffer, this._length), this._containerId, this._itemPath, this._scope, (err, statusCode, item) => { + if (newBuffer) { + this._length = newBuffer.length; + newBuffer.copy(this._buffer); + } + else { + this._length = 0; + } + this._item = item; + callback(err); + }); + } + getItem() { + return this._item; + } +} +ChunkStream.ChunkSize = (16 * 1024 * 1024); +class BufferStream extends stream.Readable { + constructor(buffer, length) { + super(); + this._position = 0; + this._length = 0; + this._buffer = buffer; + this._length = length; + } + _read(size) { + if (this._position >= this._length) { + this.push(null); + return; + } + let end = Math.min(this._position + size, this._length); + this.push(this._buffer.slice(this._position, end)); + this._position = end; + } +} + + +/***/ }), + +/***/ 5145: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const FileContainerInterfaces = __nccwpck_require__(6110); +class FileContainerApiBase extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-FileContainer-api', options); + } + /** + * Creates the specified items in the referenced container. + * + * @param {VSSInterfaces.VssJsonCollectionWrapperV} items + * @param {number} containerId + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + */ + createItems(items, containerId, scope) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + containerId: containerId + }; + let queryValues = { + scope: scope, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, items, options); + let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the specified items in a container. + * + * @param {number} containerId - Container Id. + * @param {string} itemPath - Path to delete. + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + */ + deleteItem(containerId, itemPath, scope) { + return __awaiter(this, void 0, void 0, function* () { + if (itemPath == null) { + throw new TypeError('itemPath can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + containerId: containerId + }; + let queryValues = { + itemPath: itemPath, + scope: scope, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers + * + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param {string} artifactUris + */ + getContainers(scope, artifactUris) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + scope: scope, + artifactUris: artifactUris, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainer, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} containerId + * @param {string} scope + * @param {string} itemPath + * @param {boolean} metadata + * @param {string} format + * @param {string} downloadFileName + * @param {boolean} includeDownloadTickets + * @param {boolean} isShallow + * @param {boolean} ignoreRequestedMediaType + * @param {boolean} includeBlobMetadata + * @param {boolean} saveAbsolutePath + */ + getItems(containerId, scope, itemPath, metadata, format, downloadFileName, includeDownloadTickets, isShallow, ignoreRequestedMediaType, includeBlobMetadata, saveAbsolutePath) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + containerId: containerId + }; + let queryValues = { + scope: scope, + itemPath: itemPath, + metadata: metadata, + '$format': format, + downloadFileName: downloadFileName, + includeDownloadTickets: includeDownloadTickets, + isShallow: isShallow, + ignoreRequestedMediaType: ignoreRequestedMediaType, + includeBlobMetadata: includeBlobMetadata, + saveAbsolutePath: saveAbsolutePath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.FileContainerApiBase = FileContainerApiBase; + + +/***/ }), + +/***/ 81939: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const compatBase = __nccwpck_require__(30946); +const GalleryInterfaces = __nccwpck_require__(48905); +class GalleryApi extends compatBase.GalleryCompatHttpClientBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Gallery-api', options); + } + /** + * @param {string} extensionId + * @param {string} accountName + */ + shareExtensionById(extensionId, accountName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId, + accountName: accountName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1f19631b-a0b4-4a03-89c2-d79785d24360", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} accountName + */ + unshareExtensionById(extensionId, accountName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId, + accountName: accountName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1f19631b-a0b4-4a03-89c2-d79785d24360", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + */ + shareExtension(publisherName, extensionName, accountName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + accountName: accountName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a1e66d8f-f5de-4d16-8309-91a4e015ee46", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + */ + unshareExtension(publisherName, extensionName, accountName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + accountName: accountName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a1e66d8f-f5de-4d16-8309-91a4e015ee46", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} itemId + * @param {string} installationTarget + * @param {boolean} testCommerce + * @param {boolean} isFreeOrTrialInstall + */ + getAcquisitionOptions(itemId, installationTarget, testCommerce, isFreeOrTrialInstall) { + return __awaiter(this, void 0, void 0, function* () { + if (installationTarget == null) { + throw new TypeError('installationTarget can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + itemId: itemId + }; + let queryValues = { + installationTarget: installationTarget, + testCommerce: testCommerce, + isFreeOrTrialInstall: isFreeOrTrialInstall, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9d0a0105-075e-4760-aa15-8bcf54d1bd7d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.AcquisitionOptions, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + */ + requestAcquisition(acquisitionRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "3adb1f2d-e328-446e-be73-9f6d98071c45", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, acquisitionRequest, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionAcquisitionRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetByName(customHeaders, publisherName, extensionName, version, assetType, accountToken, acceptDefault, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version, + assetType: assetType + }; + let queryValues = { + accountToken: accountToken, + acceptDefault: acceptDefault, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7529171f-a002-4180-93ba-685f358a0482", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAsset(customHeaders, extensionId, version, assetType, accountToken, acceptDefault, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId, + version: version, + assetType: assetType + }; + let queryValues = { + accountToken: accountToken, + acceptDefault: acceptDefault, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "5d545f3d-ef47-488b-8be3-f5ee1517856c", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetAuthenticated(customHeaders, publisherName, extensionName, version, assetType, accountToken, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version, + assetType: assetType + }; + let queryValues = { + accountToken: accountToken, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "506aff36-2622-4f70-8063-77cce6366d20", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} azurePublisherId + */ + associateAzurePublisher(publisherName, azurePublisherId) { + return __awaiter(this, void 0, void 0, function* () { + if (azurePublisherId == null) { + throw new TypeError('azurePublisherId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + azurePublisherId: azurePublisherId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + queryAssociatedAzurePublisher(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} languages + */ + getCategories(languages) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + languages: languages, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e0a5a71e-3ac3-43a0-ae7d-0bb5c3046a2a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} categoryName + * @param {string} languages + * @param {string} product + */ + getCategoryDetails(categoryName, languages, product) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + categoryName: categoryName + }; + let queryValues = { + languages: languages, + product: product, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "75d3c04d-84d2-4973-acd2-22627587dabc", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} product + * @param {string} categoryId + * @param {number} lcid + * @param {string} source + * @param {string} productVersion + * @param {string} skus + * @param {string} subSkus + * @param {string} productArchitecture + */ + getCategoryTree(product, categoryId, lcid, source, productVersion, skus, subSkus, productArchitecture) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + product: product, + categoryId: categoryId + }; + let queryValues = { + lcid: lcid, + source: source, + productVersion: productVersion, + skus: skus, + subSkus: subSkus, + productArchitecture: productArchitecture, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1102bb42-82b0-4955-8d8a-435d6b4cedd3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} product + * @param {number} lcid + * @param {string} source + * @param {string} productVersion + * @param {string} skus + * @param {string} subSkus + */ + getRootCategories(product, lcid, source, productVersion, skus, subSkus) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + product: product + }; + let queryValues = { + lcid: lcid, + source: source, + productVersion: productVersion, + skus: skus, + subSkus: subSkus, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "31fba831-35b2-46f6-a641-d05de5a877d8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + */ + getCertificate(publisherName, extensionName, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e905ad6a-3f1f-4d08-9f6d-7d357ff8b7d0", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + */ + getContentVerificationLog(publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c0f1c7c4-3557-4ffb-b774-1e48c4865e99", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.CustomerSupportRequest} customerSupportRequest + */ + createSupportRequest(customerSupportRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "8eded385-026a-4c15-b810-b8eb402771f1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, customerSupportRequest, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + */ + createDraftForEditExtension(publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + */ + performEditExtensionDraftOperation(draftPatch, publisherName, extensionName, draftId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + draftId: draftId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, draftPatch, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePayloadInDraftForEditExtension(customHeaders, contentStream, publisherName, extensionName, draftId, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + draftId: draftId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + customHeaders["X-Market-UploadFileName"] = "fileName"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + * @param {string} assetType + */ + addAssetForEditExtensionDraft(customHeaders, contentStream, publisherName, extensionName, draftId, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + draftId: draftId, + assetType: assetType + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "f1db9c47-6619-4998-a7e5-d7f9f41a4617", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {String} product - Header to pass the product type of the payload file + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + createDraftForNewExtension(customHeaders, contentStream, publisherName, product, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + customHeaders["X-Market-UploadFileProduct"] = "product"; + customHeaders["X-Market-UploadFileName"] = "fileName"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch + * @param {string} publisherName + * @param {string} draftId + */ + performNewExtensionDraftOperation(draftPatch, publisherName, draftId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, draftPatch, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} draftId + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePayloadInDraftForNewExtension(customHeaders, contentStream, publisherName, draftId, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + customHeaders["X-Market-UploadFileName"] = "fileName"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + */ + addAssetForNewExtensionDraft(customHeaders, contentStream, publisherName, draftId, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId, + assetType: assetType + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + * @param {string} extensionName + */ + getAssetFromEditExtensionDraft(publisherName, draftId, assetType, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + if (extensionName == null) { + throw new TypeError('extensionName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId, + assetType: assetType + }; + let queryValues = { + extensionName: extensionName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + */ + getAssetFromNewExtensionDraft(publisherName, draftId, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId, + assetType: assetType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence. + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {number} count - Count of events to fetch, applies to each event type. + * @param {Date} afterDate - Fetch events that occurred on or after this date + * @param {string} include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events + * @param {string} includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events + */ + getExtensionEvents(publisherName, extensionName, count, afterDate, include, includeProperty) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + count: count, + afterDate: afterDate, + include: include, + includeProperty: includeProperty, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "3d13c499-2168-4d06-bef4-14aba185dcd5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionEvents, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension. + * + * @param {GalleryInterfaces.ExtensionEvents[]} extensionEvents + */ + publishExtensionEvents(extensionEvents) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "0bf2bd3a-70e0-4d5d-8bf7-bd4a9c2ab6e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, extensionEvents, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionQuery} extensionQuery + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + queryExtensions(customHeaders, extensionQuery, accountToken, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + accountToken: accountToken, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "eb9d5ee1-6d43-456b-b80e-8a96fbc014b6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.create(url, extensionQuery, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} extensionType + * @param {string} reCaptchaToken + */ + createExtension(customHeaders, contentStream, extensionType, reCaptchaToken) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + extensionType: extensionType, + reCaptchaToken: reCaptchaToken, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} version + */ + deleteExtensionById(extensionId, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId + }; + let queryValues = { + version: version, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + */ + getExtensionById(extensionId, version, flags) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId + }; + let queryValues = { + version: version, + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} reCaptchaToken + */ + updateExtensionById(extensionId, reCaptchaToken) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId + }; + let queryValues = { + reCaptchaToken: reCaptchaToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionType + * @param {string} reCaptchaToken + */ + createExtensionWithPublisher(customHeaders, contentStream, publisherName, extensionType, reCaptchaToken) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + extensionType: extensionType, + reCaptchaToken: reCaptchaToken, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + */ + deleteExtension(publisherName, extensionName, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + version: version, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + getExtension(customHeaders, publisherName, extensionName, version, flags, accountToken, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + version: version, + flags: flags, + accountToken: accountToken, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * REST endpoint to update an extension. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} extensionType + * @param {string} reCaptchaToken + * @param {boolean} bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not + */ + updateExtension(customHeaders, contentStream, publisherName, extensionName, extensionType, reCaptchaToken, bypassScopeCheck) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + extensionType: extensionType, + reCaptchaToken: reCaptchaToken, + bypassScopeCheck: bypassScopeCheck, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {GalleryInterfaces.PublishedExtensionFlags} flags + */ + updateExtensionProperties(publisherName, extensionName, flags) { + return __awaiter(this, void 0, void 0, function* () { + if (flags == null) { + throw new TypeError('flags can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} hostType + * @param {string} hostName + */ + shareExtensionWithHost(publisherName, extensionName, hostType, hostName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + hostType: hostType, + hostName: hostName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "328a3af8-d124-46e9-9483-01690cd415b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} hostType + * @param {string} hostName + */ + unshareExtensionWithHost(publisherName, extensionName, hostType, hostName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + hostType: hostType, + hostName: hostName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "328a3af8-d124-46e9-9483-01690cd415b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel + */ + extensionValidator(azureRestApiRequestModel) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "05e8a5e1-8c59-4c2c-8856-0ff087d1a844", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, azureRestApiRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Send Notification + * + * @param {GalleryInterfaces.NotificationsData} notificationData - Denoting the data needed to send notification + */ + sendNotifications(notificationData) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "eab39817-413c-4602-a49f-07ad00844980", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, notificationData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * This endpoint gets hit when you download a VSTS extension from the Web UI + * + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getPackage(customHeaders, publisherName, extensionName, version, accountToken, acceptDefault, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + let queryValues = { + accountToken: accountToken, + acceptDefault: acceptDefault, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7cb576f8-1cae-4c4b-b7b1-e4af5759e965", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} assetToken + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetWithToken(customHeaders, publisherName, extensionName, version, assetType, assetToken, accountToken, acceptDefault, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version, + assetType: assetType, + assetToken: assetToken + }; + let queryValues = { + accountToken: accountToken, + acceptDefault: acceptDefault, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "364415a1-0077-4a41-a7a0-06edd4497492", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete publisher asset like logo + * + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + */ + deletePublisherAsset(publisherName, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + assetType: assetType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get publisher asset like logo as a stream + * + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + */ + getPublisherAsset(publisherName, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + assetType: assetType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePublisherAsset(customHeaders, contentStream, publisherName, assetType, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + assetType: assetType, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + customHeaders["X-Market-UploadFileName"] = "fileName"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + fetchDomainToken(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "67a609ef-fa74-4b52-8664-78d76f7b3634", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + verifyDomainToken(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "67a609ef-fa74-4b52-8664-78d76f7b3634", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.PublisherQuery} publisherQuery + */ + queryPublishers(publisherQuery) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "2ad6ee0a-b53f-4034-9d1d-d009fda1212e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, publisherQuery, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublisherQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.Publisher} publisher + */ + createPublisher(publisher) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, publisher, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + deletePublisher(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {number} flags + */ + getPublisher(publisherName, flags) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.Publisher} publisher + * @param {string} publisherName + */ + updatePublisher(publisher, publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, publisher, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Endpoint to add/modify publisher membership. Currently Supports only addition/modification of 1 user at a time Works only for adding members of same tenant. + * + * @param {GalleryInterfaces.PublisherUserRoleAssignmentRef[]} roleAssignments - List of user identifiers(email address) and role to be added. Currently only one entry is supported. + * @param {string} publisherName - The name/id of publisher to which users have to be added + * @param {boolean} limitToCallerIdentityDomain - Should cross tenant addtions be allowed or not. + */ + updatePublisherMembers(roleAssignments, publisherName, limitToCallerIdentityDomain) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + limitToCallerIdentityDomain: limitToCallerIdentityDomain, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, roleAssignments, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublisherRoleAssignment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + getPublisherWithoutToken(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "215a2ed8-458a-4850-ad5a-45f1dabc3461", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of questions with their responses associated with an extension. + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} count - Number of questions to retrieve (defaults to 10). + * @param {number} page - Page number from which set of questions are to be retrieved. + * @param {Date} afterDate - If provided, results questions are returned which were posted after this date + */ + getQuestions(publisherName, extensionName, count, page, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + count: count, + page: page, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c010d03d-812c-4ade-ae07-c1862475eda5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.QuestionsResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Flags a concern with an existing question for an extension. + * + * @param {GalleryInterfaces.Concern} concern - User reported concern with a question for the extension. + * @param {string} pubName - Name of the publisher who published the extension. + * @param {string} extName - Name of the extension. + * @param {number} questionId - Identifier of the question to be updated for the extension. + */ + reportQuestion(concern, pubName, extName, questionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName, + questionId: questionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "784910cd-254a-494d-898b-0728549b2f10", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, concern, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Concern, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new question for an extension. + * + * @param {GalleryInterfaces.Question} question - Question to be created for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + */ + createQuestion(question, publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, question, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Question, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes an existing question and all its associated responses for an extension. (soft delete) + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question to be deleted for the extension. + */ + deleteQuestion(publisherName, extensionName, questionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing question for an extension. + * + * @param {GalleryInterfaces.Question} question - Updated question to be set for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question to be updated for the extension. + */ + updateQuestion(question, publisherName, extensionName, questionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, question, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Question, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new response for a given question for an extension. + * + * @param {GalleryInterfaces.Response} response - Response to be created for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question for which response is to be created for the extension. + */ + createResponse(response, publisherName, extensionName, questionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, response, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Response, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a response for an extension. (soft delete) + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifies the question whose response is to be deleted. + * @param {number} responseId - Identifies the response to be deleted. + */ + deleteResponse(publisherName, extensionName, questionId, responseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId, + responseId: responseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing response for a given question for an extension. + * + * @param {GalleryInterfaces.Response} response - Updated response to be set for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question for which response is to be updated for the extension. + * @param {number} responseId - Identifier of the response which has to be updated. + */ + updateResponse(response, publisherName, extensionName, questionId, responseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId, + responseId: responseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, response, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Response, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns extension reports + * + * @param {string} publisherName - Name of the publisher who published the extension + * @param {string} extensionName - Name of the extension + * @param {number} days - Last n days report. If afterDate and days are specified, days will take priority + * @param {number} count - Number of events to be returned + * @param {Date} afterDate - Use if you want to fetch events newer than the specified date + */ + getExtensionReports(publisherName, extensionName, days, count, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + days: days, + count: count, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "79e0c74f-157f-437e-845f-74fbb4121d4c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of reviews associated with an extension + * + * @param {string} publisherName - Name of the publisher who published the extension + * @param {string} extensionName - Name of the extension + * @param {number} count - Number of reviews to retrieve (defaults to 5) + * @param {GalleryInterfaces.ReviewFilterOptions} filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none + * @param {Date} beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null + * @param {Date} afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null + */ + getReviews(publisherName, extensionName, count, filterOptions, beforeDate, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + count: count, + filterOptions: filterOptions, + beforeDate: beforeDate, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "5b3f819f-f247-42ad-8c00-dd9ab9ab246d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ReviewsResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a summary of the reviews + * + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {Date} beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null + * @param {Date} afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null + */ + getReviewsSummary(pubName, extName, beforeDate, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName + }; + let queryValues = { + beforeDate: beforeDate, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b7b44e21-209e-48f0-ae78-04727fc37d77", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new review for an extension + * + * @param {GalleryInterfaces.Review} review - Review to be created for the extension + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + */ + createReview(review, pubName, extName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, review, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Review, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a review + * + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {number} reviewId - Id of the review which needs to be updated + */ + deleteReview(pubName, extName, reviewId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName, + reviewId: reviewId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates or Flags a review + * + * @param {GalleryInterfaces.ReviewPatch} reviewPatch - ReviewPatch object which contains the changes to be applied to the review + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {number} reviewId - Id of the review which needs to be updated + */ + updateReview(reviewPatch, pubName, extName, reviewId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName, + reviewId: reviewId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, reviewPatch, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ReviewPatch, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionCategory} category + */ + createCategory(category) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "476531a3-7024-4516-a76a-ed64d3008ad6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, category, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all setting entries for the given user/all-users scope + * + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {string} key - Optional key under which to filter all the entries + */ + getGalleryUserSettings(userScope, key) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userScope: userScope, + key: key + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9b75ece3-7960-401c-848b-148ac01ca350", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Set all setting entries for the given user/all-users scope + * + * @param {{ [key: string] : any; }} entries - A key-value pair of all settings that need to be set + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + */ + setGalleryUserSettings(entries, userScope) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userScope: userScope + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9b75ece3-7960-401c-848b-148ac01ca350", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, entries, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} keyType + * @param {number} expireCurrentSeconds + */ + generateKey(keyType, expireCurrentSeconds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + keyType: keyType + }; + let queryValues = { + expireCurrentSeconds: expireCurrentSeconds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "92ed5cf4-c38b-465a-9059-2f2fb7c624b5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} keyType + */ + getSigningKey(keyType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + keyType: keyType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "92ed5cf4-c38b-465a-9059-2f2fb7c624b5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionStatisticUpdate} extensionStatisticsUpdate + * @param {string} publisherName + * @param {string} extensionName + */ + updateExtensionStatistics(extensionStatisticsUpdate, publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a0ea3204-11e9-422d-a9ca-45851cc41400", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, extensionStatisticsUpdate, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {number} days + * @param {GalleryInterfaces.ExtensionStatsAggregateType} aggregate + * @param {Date} afterDate + */ + getExtensionDailyStats(publisherName, extensionName, days, aggregate, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + days: days, + aggregate: aggregate, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "ae06047e-51c5-4fb4-ab65-7be488544416", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDailyStats, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats. + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} version - Version of the extension + */ + getExtensionDailyStatsAnonymous(publisherName, extensionName, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4fa7adb6-ca65-4075-a232-5f28323288ea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDailyStats, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Increments a daily statistic associated with the extension + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} version - Version of the extension + * @param {string} statType - Type of stat to increment + * @param {string} targetPlatform + */ + incrementExtensionDailyStat(publisherName, extensionName, version, statType, targetPlatform) { + return __awaiter(this, void 0, void 0, function* () { + if (statType == null) { + throw new TypeError('statType can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + let queryValues = { + statType: statType, + targetPlatform: targetPlatform, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4fa7adb6-ca65-4075-a232-5f28323288ea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} targetPlatform + */ + getVerificationLog(publisherName, extensionName, version, targetPlatform) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + let queryValues = { + targetPlatform: targetPlatform, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c5523abe-b843-437f-875b-5833064efe4d", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} itemName + * @param {string} version + * @param {GalleryInterfaces.VSCodeWebExtensionStatisicsType} statType + */ + updateVSCodeWebExtensionStatistics(itemName, version, statType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + itemName: itemName, + version: version, + statType: statType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "205c91a8-7841-4fd3-ae4f-5a745d5a8df5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +GalleryApi.RESOURCE_AREA_ID = "69d21c00-f135-441b-b5ce-3626378e0819"; +exports.GalleryApi = GalleryApi; + + +/***/ }), + +/***/ 30946: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const GalleryInterfaces = __nccwpck_require__(48905); +class GalleryCompatHttpClientBase extends basem.ClientApiBase { + constructor(baseUrl, handlers, userAgent, options) { + super(baseUrl, handlers, userAgent, options); + } + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + */ + createExtensionJson(extensionPackage) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, extensionPackage, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + } + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} extensionId + */ + updateExtensionByIdJson(extensionPackage, extensionId) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, extensionPackage, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + } + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + */ + createExtensionWithPublisherJson(extensionPackage, publisherName) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, extensionPackage, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + } + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + * @param {string} extensionName + */ + updateExtensionJson(extensionPackage, publisherName, extensionName) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, extensionPackage, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + } +} +exports.GalleryCompatHttpClientBase = GalleryCompatHttpClientBase; + + +/***/ }), + +/***/ 64996: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const GitInterfaces = __nccwpck_require__(89803); +class GitApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Git-api', options); + } + /** + * Create an annotated tag. + * + * @param {GitInterfaces.GitAnnotatedTag} tagObject - Object containing details of tag to be created. + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID or name of the repository. + */ + createAnnotatedTag(tagObject, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5e8a8081-3851-4626-b677-9891cc04102e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, tagObject, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitAnnotatedTag, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an annotated tag. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID or name of the repository. + * @param {string} objectId - ObjectId (Sha1Id) of tag to get. + */ + getAnnotatedTag(project, repositoryId, objectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + objectId: objectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5e8a8081-3851-4626-b677-9891cc04102e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitAnnotatedTag, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlob(repositoryId, sha1, project, download, fileName, resolveLfs) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + download: download, + fileName: fileName, + resolveLfs: resolveLfs, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlobContent(repositoryId, sha1, project, download, fileName, resolveLfs) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + download: download, + fileName: fileName, + resolveLfs: resolveLfs, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets one or more blobs in a zip file download. + * + * @param {string[]} blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file. + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} filename + */ + getBlobsZip(blobIds, repositoryId, project, filename) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + filename: filename, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlobZip(repositoryId, sha1, project, download, fileName, resolveLfs) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + download: download, + fileName: fileName, + resolveLfs: resolveLfs, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve statistics about a single branch. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} name - Name of the branch. + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. + */ + getBranch(repositoryId, name, project, baseVersionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + if (name == null) { + throw new TypeError('name can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + name: name, + baseVersionDescriptor: baseVersionDescriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve statistics about all branches within a repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. + */ + getBranches(repositoryId, project, baseVersionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + baseVersionDescriptor: baseVersionDescriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + getBranchStatsBatch(searchCriteria, repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, searchCriteria, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve changes for a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of changes to return. + * @param {number} skip - The number of changes to skip. + */ + getChanges(commitId, repositoryId, project, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + commitId: commitId, + repositoryId: repositoryId + }; + let queryValues = { + top: top, + skip: skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5bf884f5-3e07-42e9-afb8-1b872267bf16", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitChanges, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve one conflict for a cherry pick by ID + * + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + getCherryPickConflict(repositoryId, cherryPickId, conflictId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + cherryPickId: cherryPickId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all conflicts for a cherry pick + * + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} top + * @param {boolean} excludeResolved + * @param {boolean} onlyResolved + * @param {boolean} includeObsolete + */ + getCherryPickConflicts(repositoryId, cherryPickId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + cherryPickId: cherryPickId + }; + let queryValues = { + continuationToken: continuationToken, + '$top': top, + excludeResolved: excludeResolved, + onlyResolved: onlyResolved, + includeObsolete: includeObsolete, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update merge conflict resolution + * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + updateCherryPickConflict(conflict, repositoryId, cherryPickId, conflictId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + cherryPickId: cherryPickId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflict, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update multiple merge conflict resolutions + * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {string} project - Project ID or project name + */ + updateCherryPickConflicts(conflictUpdates, repositoryId, cherryPickId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + cherryPickId: cherryPickId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflictUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Given a commitId, returns a list of commits that are in the same cherry-pick family. + * + * @param {string} repositoryNameOrId + * @param {string} commitId + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks + */ + getCherryPickRelationships(repositoryNameOrId, commitId, project, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + commitId: commitId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "8af142a4-27c2-4168-9e82-46b8629aaa0d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Cherry pick a specific commit or commits that are associated to a pull request into a new branch. + * + * @param {GitInterfaces.GitAsyncRefOperationParameters} cherryPickToCreate + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + */ + createCherryPick(cherryPickToCreate, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, cherryPickToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a cherry pick operation by cherry pick Id. + * + * @param {string} project - Project ID or project name + * @param {number} cherryPickId - ID of the cherry pick. + * @param {string} repositoryId - ID of the repository. + */ + getCherryPick(project, cherryPickId, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + cherryPickId: cherryPickId, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. + */ + getCherryPickForRefName(project, repositoryId, refName) { + return __awaiter(this, void 0, void 0, function* () { + if (refName == null) { + throw new TypeError('refName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + refName: refName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} diffCommonCommit - If true, diff between common and target commits. If false, diff between base and target commits. + * @param {number} top - Maximum number of changes to return. Defaults to 100. + * @param {number} skip - Number of changes to skip + * @param {GitInterfaces.GitBaseVersionDescriptor} baseVersionDescriptor - Descriptor for base commit. + * @param {GitInterfaces.GitTargetVersionDescriptor} targetVersionDescriptor - Descriptor for target commit. + */ + getCommitDiffs(repositoryId, project, diffCommonCommit, top, skip, baseVersionDescriptor, targetVersionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + diffCommonCommit: diffCommonCommit, + '$top': top, + '$skip': skip, + }; + if (baseVersionDescriptor) { + queryValues.baseVersionType = baseVersionDescriptor.versionType; + queryValues.baseVersion = baseVersionDescriptor.version; + queryValues.baseVersionOptions = baseVersionDescriptor.versionOptions; + } + if (targetVersionDescriptor) { + queryValues.targetVersionType = targetVersionDescriptor.versionType; + queryValues.targetVersion = targetVersionDescriptor.version; + queryValues.targetVersionOptions = targetVersionDescriptor.versionOptions; + } + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "615588d5-c0c7-4b88-88f8-e625306446e8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitDiffs, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} changeCount - The number of changes to include in the result. + */ + getCommit(commitId, repositoryId, project, changeCount) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + commitId: commitId, + repositoryId: repositoryId + }; + let queryValues = { + changeCount: changeCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommit, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve git commits for a project + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + */ + getCommits(repositoryId, searchCriteria, project, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + if (searchCriteria == null) { + throw new TypeError('searchCriteria can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + searchCriteria: searchCriteria, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a list of commits associated with a particular push. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {number} pushId - The id of the push. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of commits to return ("get the top x commits"). + * @param {number} skip - The number of commits to skip. + * @param {boolean} includeLinks - Set to false to avoid including REST Url links for resources. Defaults to true. + */ + getPushCommits(repositoryId, pushId, project, top, skip, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + if (pushId == null) { + throw new TypeError('pushId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + pushId: pushId, + top: top, + skip: skip, + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve git commits for a project matching the search criteria + * + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {number} skip - Number of commits to skip. + * @param {number} top - Maximum number of commits to return. + * @param {boolean} includeStatuses - True to include additional commit status information. + */ + getCommitsBatch(searchCriteria, repositoryId, project, skip, top, includeStatuses) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + '$skip': skip, + '$top': top, + includeStatuses: includeStatuses, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "6400dfb2-0bcb-462b-b992-5a57f8f1416c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, searchCriteria, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve deleted git repositories. + * + * @param {string} project - Project ID or project name + */ + getDeletedRepositories(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2b6869c4-cb25-42b5-b7a3-0d3e6be0a11a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitDeletedRepository, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the file diffs for each of the specified files + * + * @param {GitInterfaces.FileDiffsCriteria} fileDiffsCriteria - List of file parameters objects + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository + */ + getFileDiffs(fileDiffsCriteria, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c4c5a7e6-e9f3-4730-a92b-84baacff694b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, fileDiffsCriteria, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.FileDiff, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all forks of a repository in the collection. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} collectionId - Team project collection ID. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links. + */ + getForks(repositoryNameOrId, collectionId, project, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + collectionId: collectionId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "158c0340-bf6f-489c-9625-d572a1480d57", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepositoryRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the repositories endpoint + * + * @param {GitInterfaces.GitForkSyncRequestParameters} syncParams - Source repository and ref mapping. + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links + */ + createForkSyncRequest(syncParams, repositoryNameOrId, project, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, syncParams, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific fork sync operation's details. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {number} forkSyncOperationId - OperationId of the sync request. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links. + */ + getForkSyncRequest(repositoryNameOrId, forkSyncOperationId, project, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + forkSyncOperationId: forkSyncOperationId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all requested fork sync operations on this repository. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} includeAbandoned - True to include abandoned requests. + * @param {boolean} includeLinks - True to include links. + */ + getForkSyncRequests(repositoryNameOrId, project, includeAbandoned, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId + }; + let queryValues = { + includeAbandoned: includeAbandoned, + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create an import request. + * + * @param {GitInterfaces.GitImportRequest} importRequest - The import request to create. + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + */ + createImportRequest(importRequest, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, importRequest, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a particular import request. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} importRequestId - The unique identifier for the import request. + */ + getImportRequest(project, repositoryId, importRequestId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repoType: repoType + repositoryId: repositoryId, + importRequestId: importRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve import requests for a repository. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + * @param {boolean} includeAbandoned - True to include abandoned import requests in the results. + */ + queryImportRequests(project, repositoryId, includeAbandoned) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId }; let queryValues = { - repoId: repoId, - branchName: branchName, + includeAbandoned: includeAbandoned, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "21b3b9ce-fad5-4567-9ad0-80679794e003", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, true); resolve(ret); } catch (err) { @@ -9335,31 +20747,81 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a badge that indicates the status of the most recent build for the specified branch. + * Retry or abandon a failed import request. * + * @param {GitInterfaces.GitImportRequest} importRequestToUpdate - The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. * @param {string} project - Project ID or project name - * @param {string} repoType - The repository type. - * @param {string} repoId - The repository ID. - * @param {string} branchName - The branch name. + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} importRequestId - The unique identifier for the import request to update. */ - getBuildBadgeData(project, repoType, repoId, branchName) { + updateImportRequest(importRequestToUpdate, project, repositoryId, importRequestId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repoType: repoType + repositoryId: repositoryId, + importRequestId: importRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, importRequestToUpdate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItem(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId }; let queryValues = { - repoId: repoId, - branchName: branchName, + path: path, + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + resolveLfs: resolveLfs, + sanitize: sanitize, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "21b3b9ce-fad5-4567-9ad0-80679794e003", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, false); resolve(ret); } catch (err) { @@ -9369,25 +20831,94 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets all retention leases that apply to a specific build. + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. */ - getRetentionLeasesForBuild(project, buildId) { + getItemContent(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + repositoryId: repositoryId + }; + let queryValues = { + path: path, + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + resolveLfs: resolveLfs, + sanitize: sanitize, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "3da19a6a-f088-45c4-83ce-2ad3a87be6c4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {boolean} includeLinks - Set to true to include links to items. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks + */ + getItems(repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor, zipForUnix) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + includeLinks: includeLinks, + versionDescriptor: versionDescriptor, + zipForUnix: zipForUnix, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, true); resolve(ret); } catch (err) { @@ -9397,25 +20928,128 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Deletes a build. + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. */ - deleteBuild(project, buildId) { + getItemText(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + repositoryId: repositoryId + }; + let queryValues = { + path: path, + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + resolveLfs: resolveLfs, + sanitize: sanitize, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItemZip(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + path: path, + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + resolveLfs: resolveLfs, + sanitize: sanitize, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path + * + * @param {GitInterfaces.GitItemRequestData} requestData - Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references. + * @param {string} repositoryId - The name or ID of the repository + * @param {string} project - Project ID or project name + */ + getItemsBatch(requestData, repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "630fd2e4-fb88-4f85-ad21-13f3fd1fbca9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, requestData, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, true); resolve(ret); } catch (err) { @@ -9425,29 +21059,38 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a build + * Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId. * + * @param {string} repositoryNameOrId - ID or name of the local repository. + * @param {string} commitId - First commit, usually the tip of the target branch of the potential merge. + * @param {string} otherCommitId - Other commit, usually the tip of the source branch of the potential merge. * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} propertyFilters + * @param {string} otherCollectionId - The collection ID where otherCommitId lives. + * @param {string} otherRepositoryId - The repository ID where otherCommitId lives. */ - getBuild(project, buildId, propertyFilters) { + getMergeBases(repositoryNameOrId, commitId, otherCommitId, project, otherCollectionId, otherRepositoryId) { return __awaiter(this, void 0, void 0, function* () { + if (otherCommitId == null) { + throw new TypeError('otherCommitId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + repositoryNameOrId: repositoryNameOrId, + commitId: commitId }; let queryValues = { - propertyFilters: propertyFilters, + otherCommitId: otherCommitId, + otherCollectionId: otherCollectionId, + otherRepositoryId: otherRepositoryId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7cf2abb6-c964-4f7e-9872-f78c66e72e9c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); resolve(ret); } catch (err) { @@ -9457,65 +21100,192 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a list of builds. + * Request a git merge operation. Currently we support merging only 2 commits. * + * @param {GitInterfaces.GitMergeParameters} mergeParameters - Parents commitIds and merge commit messsage. * @param {string} project - Project ID or project name - * @param {number[]} definitions - A comma-delimited list of definition IDs. If specified, filters to builds for these definitions. - * @param {number[]} queues - A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues. - * @param {string} buildNumber - If specified, filters to builds that match this build number. Append * to do a prefix search. - * @param {Date} minTime - If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified. - * @param {Date} maxTime - If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified. - * @param {string} requestedFor - If specified, filters to builds requested for the specified user. - * @param {BuildInterfaces.BuildReason} reasonFilter - If specified, filters to builds that match this reason. - * @param {BuildInterfaces.BuildStatus} statusFilter - If specified, filters to builds that match this status. - * @param {BuildInterfaces.BuildResult} resultFilter - If specified, filters to builds that match this result. - * @param {string[]} tagFilters - A comma-delimited list of tags. If specified, filters to builds that have the specified tags. - * @param {string[]} properties - A comma-delimited list of properties to retrieve. - * @param {number} top - The maximum number of builds to return. - * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of builds. - * @param {number} maxBuildsPerDefinition - The maximum number of builds to return per definition. - * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - Indicates whether to exclude, include, or only return deleted builds. - * @param {BuildInterfaces.BuildQueryOrder} queryOrder - The order in which builds should be returned. - * @param {string} branchName - If specified, filters to builds that built branches that built this branch. - * @param {number[]} buildIds - A comma-delimited list that specifies the IDs of builds to retrieve. - * @param {string} repositoryId - If specified, filters to builds that built from this repository. - * @param {string} repositoryType - If specified, filters to builds that built from repositories of this type. + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {boolean} includeLinks - True to include links */ - getBuilds(project, definitions, queues, buildNumber, minTime, maxTime, requestedFor, reasonFilter, statusFilter, resultFilter, tagFilters, properties, top, continuationToken, maxBuildsPerDefinition, deletedFilter, queryOrder, branchName, buildIds, repositoryId, repositoryType) { + createMergeRequest(mergeParameters, project, repositoryNameOrId, includeLinks) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryNameOrId: repositoryNameOrId }; let queryValues = { - definitions: definitions && definitions.join(","), - queues: queues && queues.join(","), - buildNumber: buildNumber, - minTime: minTime, - maxTime: maxTime, - requestedFor: requestedFor, - reasonFilter: reasonFilter, - statusFilter: statusFilter, - resultFilter: resultFilter, - tagFilters: tagFilters && tagFilters.join(","), - properties: properties && properties.join(","), - '$top': top, - continuationToken: continuationToken, - maxBuildsPerDefinition: maxBuildsPerDefinition, - deletedFilter: deletedFilter, - queryOrder: queryOrder, - branchName: branchName, - buildIds: buildIds && buildIds.join(","), + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "985f7ae9-844f-4906-9897-7ef41516c0e2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, mergeParameters, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitMerge, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific merge operation's details. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {number} mergeOperationId - OperationId of the merge request. + * @param {boolean} includeLinks - True to include links + */ + getMergeRequest(project, repositoryNameOrId, mergeOperationId, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + mergeOperationId: mergeOperationId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "985f7ae9-844f-4906-9897-7ef41516c0e2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitMerge, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Attach a new file to a pull request. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} fileName - The name of the file. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createAttachment(customHeaders, contentStream, fileName, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fileName: fileName, repositoryId: repositoryId, - repositoryType: repositoryType, + pullRequestId: pullRequestId }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Attachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a pull request attachment. + * + * @param {string} fileName - The name of the attachment to delete. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + deleteAttachment(fileName, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fileName: fileName, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the file content of a pull request attachment. + * + * @param {string} fileName - The name of the attachment. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getAttachmentContent(fileName, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fileName: fileName, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of files attached to a given pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getAttachments(repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Attachment, true); resolve(ret); } catch (err) { @@ -9525,34 +21295,61 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Queues a build + * Get the file content of a pull request attachment. * - * @param {BuildInterfaces.Build} build + * @param {string} fileName - The name of the attachment. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {boolean} ignoreWarnings - * @param {string} checkInTicket - * @param {number} sourceBuildId - * @param {number} definitionId - Optional definition id to queue a build without a body. Ignored if there's a valid body */ - queueBuild(build, project, ignoreWarnings, checkInTicket, sourceBuildId, definitionId) { + getAttachmentZip(fileName, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + fileName: fileName, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; - let queryValues = { - ignoreWarnings: ignoreWarnings, - checkInTicket: checkInTicket, - sourceBuildId: sourceBuildId, - definitionId: definitionId, + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a like on a comment. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. + * @param {string} project - Project ID or project name + */ + createLike(repositoryId, pullRequestId, threadId, commentId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, build, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -9562,30 +21359,103 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates a build. + * Delete a like on a comment. * - * @param {BuildInterfaces.Build} build - The build. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {boolean} retry */ - updateBuild(build, project, buildId, retry) { + deleteLike(repositoryId, pullRequestId, threadId, commentId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get likes for a comment. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. + * @param {string} project - Project ID or project name + */ + getLikes(repositoryId, pullRequestId, threadId, commentId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the commits for the specified iteration of a pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the iteration from which to get the commits. + * @param {string} project - Project ID or project name + * @param {number} top - Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500. + * @param {number} skip - Number of commits to skip. + */ + getPullRequestIterationCommits(repositoryId, pullRequestId, iterationId, project, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId }; let queryValues = { - retry: retry, + top: top, + skip: skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "e7ea0883-095f-4926-b5fb-f24691c26fb9", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, build, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); resolve(ret); } catch (err) { @@ -9595,24 +21465,27 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates multiple builds. + * Get the commits for the specified pull request. * - * @param {BuildInterfaces.Build[]} builds - The builds to update. + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ - updateBuilds(builds, project) { + getPullRequestCommits(repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "52823034-34a8-4576-922c-8d8b77e9e4c4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, builds, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); resolve(ret); } catch (err) { @@ -9622,33 +21495,71 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the changes associated with a build + * Retrieve one conflict for a pull request by ID * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {number} conflictId * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} continuationToken - * @param {number} top - The maximum number of changes to return - * @param {boolean} includeSourceChange */ - getBuildChanges(project, buildId, continuationToken, top, includeSourceChange) { + getPullRequestConflict(repositoryId, pullRequestId, conflictId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + repositoryId: repositoryId, + pullRequestId: pullRequestId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all conflicts for a pull request + * + * @param {string} repositoryId - The repository of the Pull Request. + * @param {number} pullRequestId - The pull request ID. + * @param {string} project - Project ID or project name + * @param {number} skip - Conflicts to skip. + * @param {number} top - Conflicts to return after skip. + * @param {boolean} includeObsolete - Includes obsolete conflicts. + * @param {boolean} excludeResolved - Excludes conflicts already resolved. + * @param {boolean} onlyResolved - Returns only the conflicts that are resolved. + */ + getPullRequestConflicts(repositoryId, pullRequestId, project, skip, top, includeObsolete, excludeResolved, onlyResolved) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; let queryValues = { - continuationToken: continuationToken, + '$skip': skip, '$top': top, - includeSourceChange: includeSourceChange, + includeObsolete: includeObsolete, + excludeResolved: excludeResolved, + onlyResolved: onlyResolved, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "54572c7b-bbd3-45d4-80dc-28be08941620", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Change, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); resolve(ret); } catch (err) { @@ -9658,31 +21569,101 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the changes made to the repository between two given builds. + * Update merge conflict resolution * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {number} conflictId * @param {string} project - Project ID or project name - * @param {number} fromBuildId - The ID of the first build. - * @param {number} toBuildId - The ID of the last build. - * @param {number} top - The maximum number of changes to return. */ - getChangesBetweenBuilds(project, fromBuildId, toBuildId, top) { + updatePullRequestConflict(conflict, repositoryId, pullRequestId, conflictId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflict, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update multiple merge conflict resolutions + * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + */ + updatePullRequestConflicts(conflictUpdates, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflictUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve the changes made in a pull request between two iterations. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration.
Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request. + * @param {string} project - Project ID or project name + * @param {number} top - Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000. + * @param {number} skip - Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100. + * @param {number} compareTo - ID of the pull request iteration to compare against. The default value is zero which indicates the comparison is made against the common commit between the source and target branches + */ + getPullRequestIterationChanges(repositoryId, pullRequestId, iterationId, project, top, skip, compareTo) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId }; let queryValues = { - fromBuildId: fromBuildId, - toBuildId: toBuildId, '$top': top, + '$skip': skip, + '$compareTo': compareTo, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "f10f0ea5-18a1-43ec-a8fb-2042c7be9b43", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4216bdcf-b6b1-4d59-8b82-c34cc183fc8b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Change, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIterationChanges, false); resolve(ret); } catch (err) { @@ -9692,23 +21673,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a controller + * Get the specified iteration for a pull request. * - * @param {number} controllerId + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration to return. + * @param {string} project - Project ID or project name */ - getBuildController(controllerId) { + getPullRequestIteration(repositoryId, pullRequestId, iterationId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - controllerId: controllerId + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "fcac1932-2ee1-437f-9b6f-7f696be858f6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "d43911ee-6958-46b0-a42b-8445b8a0d004", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildController, false); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIteration, false); resolve(ret); } catch (err) { @@ -9718,24 +21705,31 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets controller, optionally filtered by name + * Get the list of iterations for the specified pull request. * - * @param {string} name + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {boolean} includeCommits - If true, include the commits associated with each iteration in the response. */ - getBuildControllers(name) { + getPullRequestIterations(repositoryId, pullRequestId, project, includeCommits) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; let queryValues = { - name: name, + includeCommits: includeCommits, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "fcac1932-2ee1-437f-9b6f-7f696be858f6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "d43911ee-6958-46b0-a42b-8445b8a0d004", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildController, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIteration, true); resolve(ret); } catch (err) { @@ -9745,30 +21739,30 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Creates a new definition. + * Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body. * - * @param {BuildInterfaces.BuildDefinition} definition - The definition. + * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. * @param {string} project - Project ID or project name - * @param {number} definitionToCloneId - * @param {number} definitionToCloneRevision */ - createDefinition(definition, project, definitionToCloneId, definitionToCloneRevision) { + createPullRequestIterationStatus(status, repositoryId, pullRequestId, iterationId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - definitionToCloneId: definitionToCloneId, - definitionToCloneRevision: definitionToCloneRevision, + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, definition, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + res = yield this.rest.create(url, status, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); resolve(ret); } catch (err) { @@ -9778,20 +21772,26 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Deletes a definition and all associated builds. + * Delete pull request iteration status. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. */ - deleteDefinition(project, definitionId) { + deletePullRequestIterationStatus(repositoryId, pullRequestId, iterationId, statusId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId, + statusId: statusId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -9806,35 +21806,31 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a definition, optionally at a specific revision. + * Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. - * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned. - * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. - * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results. - * @param {boolean} includeLatestBuilds */ - getDefinition(project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) { + getPullRequestIterationStatus(repositoryId, pullRequestId, iterationId, statusId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId - }; - let queryValues = { - revision: revision, - minMetricsTime: minMetricsTime, - propertyFilters: propertyFilters && propertyFilters.join(","), - includeLatestBuilds: includeLatestBuilds, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId, + statusId: statusId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); resolve(ret); } catch (err) { @@ -9844,57 +21840,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a list of definitions. + * Get all the statuses associated with a pull request iteration. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. * @param {string} project - Project ID or project name - * @param {string} name - If specified, filters to definitions whose names match this pattern. - * @param {string} repositoryId - A repository ID. If specified, filters to definitions that use this repository. - * @param {string} repositoryType - If specified, filters to definitions that have a repository of this type. - * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - Indicates the order in which definitions should be returned. - * @param {number} top - The maximum number of definitions to return. - * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions. - * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. - * @param {number[]} definitionIds - A comma-delimited list that specifies the IDs of definitions to retrieve. - * @param {string} path - If specified, filters to definitions under this folder. - * @param {Date} builtAfter - If specified, filters to definitions that have builds after this date. - * @param {Date} notBuiltAfter - If specified, filters to definitions that do not have builds after this date. - * @param {boolean} includeAllProperties - Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned. - * @param {boolean} includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition. - * @param {string} taskIdFilter - If specified, filters to definitions that use the specified task. - * @param {number} processType - If specified, filters to definitions with the given process type. - * @param {string} yamlFilename - If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true */ - getDefinitions(project, name, repositoryId, repositoryType, queryOrder, top, continuationToken, minMetricsTime, definitionIds, path, builtAfter, notBuiltAfter, includeAllProperties, includeLatestBuilds, taskIdFilter, processType, yamlFilename) { + getPullRequestIterationStatuses(repositoryId, pullRequestId, iterationId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - name: name, + project: project, repositoryId: repositoryId, - repositoryType: repositoryType, - queryOrder: queryOrder, - '$top': top, - continuationToken: continuationToken, - minMetricsTime: minMetricsTime, - definitionIds: definitionIds && definitionIds.join(","), - path: path, - builtAfter: builtAfter, - notBuiltAfter: notBuiltAfter, - includeAllProperties: includeAllProperties, - includeLatestBuilds: includeLatestBuilds, - taskIdFilter: taskIdFilter, - processType: processType, - yamlFilename: yamlFilename, + pullRequestId: pullRequestId, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionReference, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, true); resolve(ret); } catch (err) { @@ -9904,32 +21872,33 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Restores a deleted definition + * Update pull request iteration statuses collection. The only supported operation type is `remove`. * + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. * @param {string} project - Project ID or project name - * @param {number} definitionId - The identifier of the definition to restore. - * @param {boolean} deleted - When false, restores a deleted definition. */ - restoreDefinition(project, definitionId, deleted) { + updatePullRequestIterationStatuses(customHeaders, patchDocument, repositoryId, pullRequestId, iterationId, project) { return __awaiter(this, void 0, void 0, function* () { - if (deleted == null) { - throw new TypeError('deleted can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId - }; - let queryValues = { - deleted: deleted, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.update(url, null, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + res = yield this.rest.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -9939,32 +21908,32 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT. + * Create a label for a specified pull request. The only required field is the name of the new label. * - * @param {BuildInterfaces.BuildDefinition} definition - The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted. + * @param {TfsCoreInterfaces.WebApiCreateTagRequestData} label - Label to assign to the pull request. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. - * @param {number} secretsSourceDefinitionId - * @param {number} secretsSourceDefinitionRevision + * @param {string} projectId - Project ID or project name. */ - updateDefinition(definition, project, definitionId, secretsSourceDefinitionId, secretsSourceDefinitionRevision) { + createPullRequestLabel(label, repositoryId, pullRequestId, project, projectId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId, + pullRequestId: pullRequestId }; let queryValues = { - secretsSourceDefinitionId: secretsSourceDefinitionId, - secretsSourceDefinitionRevision: secretsSourceDefinitionRevision, + projectId: projectId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, definition, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + res = yield this.rest.create(url, label, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -9974,34 +21943,34 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the contents of a file in the given source code repository. + * Removes a label from the set of those assigned to the pull request. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} labelIdOrName - The name or ID of the label requested. * @param {string} project - Project ID or project name - * @param {string} providerName - The name of the source provider. - * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. - * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. - * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved. - * @param {string} path - The path to the file to retrieve, relative to the root of the repository. + * @param {string} projectId - Project ID or project name. */ - getFileContents(project, providerName, serviceEndpointId, repository, commitOrBranch, path) { + deletePullRequestLabels(repositoryId, pullRequestId, labelIdOrName, project, projectId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - providerName: providerName + repositoryId: repositoryId, + pullRequestId: pullRequestId, + labelIdOrName: labelIdOrName }; let queryValues = { - serviceEndpointId: serviceEndpointId, - repository: repository, - commitOrBranch: commitOrBranch, - path: path, + projectId: projectId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "29d12225-b1d9-425f-b668-6c594a981313", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -10010,31 +21979,33 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Creates a new folder. + * Retrieves a single label that has been assigned to a pull request. * - * @param {BuildInterfaces.Folder} folder - The folder. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} labelIdOrName - The name or ID of the label requested. * @param {string} project - Project ID or project name - * @param {string} path - The full path of the folder. + * @param {string} projectId - Project ID or project name. */ - createFolder(folder, project, path) { + getPullRequestLabel(repositoryId, pullRequestId, labelIdOrName, project, projectId) { return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + labelIdOrName: labelIdOrName }; let queryValues = { - path: path, + projectId: projectId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, folder, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -10044,30 +22015,31 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Deletes a definition folder. Definitions and their corresponding builds will also be deleted. + * Get all the labels assigned to a pull request. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {string} path - The full path to the folder. + * @param {string} projectId - Project ID or project name. */ - deleteFolder(project, path) { + getPullRequestLabels(repositoryId, pullRequestId, project, projectId) { return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; let queryValues = { - path: path, + projectId: projectId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -10077,29 +22049,27 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a list of build definition folders. + * Get external properties of the pull request. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {string} path - The path to start with. - * @param {BuildInterfaces.FolderQueryOrder} queryOrder - The order in which folders should be returned. */ - getFolders(project, path, queryOrder) { + getPullRequestProperties(repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - path: path - }; - let queryValues = { - queryOrder: queryOrder, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "48a52185-5b9e-4736-9dc1-bb1e2feac80b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -10109,31 +22079,31 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates an existing folder at given existing path + * Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed. * - * @param {BuildInterfaces.Folder} folder - The new version of the folder. + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Properties to add, replace or remove in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {string} path - The full path to the folder. */ - updateFolder(folder, project, path) { + updatePullRequestProperties(customHeaders, patchDocument, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - path: path, + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "48a52185-5b9e-4736-9dc1-bb1e2feac80b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.create(url, folder, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, false); + res = yield this.rest.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -10143,23 +22113,26 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets pipeline general settings. + * This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests. * + * @param {GitInterfaces.GitPullRequestQuery} queries - The list of queries to perform. + * @param {string} repositoryId - ID of the repository. * @param {string} project - Project ID or project name */ - getBuildGeneralSettings(project) { + getPullRequestQuery(queries, repositoryId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "c4aefd19-30ff-405b-80ad-aca021e7242a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b3a6eebe-9cf0-49ea-b6cb-1a4c5f5007b0", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, queries, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestQuery, false); resolve(ret); } catch (err) { @@ -10169,23 +22142,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates pipeline general settings. + * Add a reviewer to a pull request or cast a vote. * - * @param {BuildInterfaces.PipelineGeneralSettings} newSettings + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. * @param {string} project - Project ID or project name */ - updateBuildGeneralSettings(newSettings, project) { + createPullRequestReviewer(reviewer, repositoryId, pullRequestId, reviewerId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "c4aefd19-30ff-405b-80ad-aca021e7242a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, newSettings, options); + res = yield this.rest.replace(url, reviewer, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -10196,24 +22175,28 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline. + * Add reviewers to a pull request. * - * @param {number} daysToLookback + * @param {VSSInterfaces.IdentityRef[]} reviewers - Reviewers to add to the pull request. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name */ - getRetentionHistory(daysToLookback) { + createPullRequestReviewers(reviewers, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - daysToLookback: daysToLookback, + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "1a9c48be-0ef5-4ec2-b94f-f053bdd2d3bf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildRetentionHistory, false); + res = yield this.rest.create(url, reviewers, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -10223,29 +22206,28 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the latest build for a definition, optionally scoped to a specific branch. + * Add an unmaterialized identity to the reviewers of a pull request. * + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer to add to the pull request. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {string} definition - definition name with optional leading folder path, or the definition id - * @param {string} branchName - optional parameter that indicates the specific branch to use. If not specified, the default branch is used. */ - getLatestBuild(project, definition, branchName) { + createUnmaterializedPullRequestReviewer(reviewer, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definition: definition - }; - let queryValues = { - branchName: branchName, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "54481611-01f4-47f3-998f-160da0f0c229", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + res = yield this.rest.replace(url, reviewer, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -10255,24 +22237,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Adds new leases for pipeline runs. + * Remove a reviewer from a pull request. * - * @param {BuildInterfaces.NewRetentionLease[]} newLeases + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer to remove. * @param {string} project - Project ID or project name */ - addRetentionLeases(newLeases, project) { + deletePullRequestReviewer(repositoryId, pullRequestId, reviewerId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, newLeases, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -10282,29 +22269,28 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Removes specific retention leases. + * Retrieve information about a particular reviewer on a pull request * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. * @param {string} project - Project ID or project name - * @param {number[]} ids */ - deleteRetentionLeasesById(project, ids) { + getPullRequestReviewer(repositoryId, pullRequestId, reviewerId, project) { return __awaiter(this, void 0, void 0, function* () { - if (ids == null) { - throw new TypeError('ids can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - ids: ids && ids.join(","), + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -10315,25 +22301,27 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Returns the details of the retention lease given a lease id. + * Retrieve the reviewers for a pull request * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {number} leaseId */ - getRetentionLease(project, leaseId) { + getPullRequestReviewers(repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - leaseId: leaseId + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -10343,30 +22331,30 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Returns any leases matching the specified MinimalRetentionLeases + * Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined * + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. * @param {string} project - Project ID or project name - * @param {BuildInterfaces.MinimalRetentionLease[]} leasesToFetch - List of JSON-serialized MinimalRetentionLeases separated by '|' */ - getRetentionLeasesByMinimalRetentionLeases(project, leasesToFetch) { + updatePullRequestReviewer(reviewer, repositoryId, pullRequestId, reviewerId, project) { return __awaiter(this, void 0, void 0, function* () { - if (leasesToFetch == null) { - throw new TypeError('leasesToFetch can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - leasesToFetch: leasesToFetch && leasesToFetch.join("|"), + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + res = yield this.rest.update(url, reviewer, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -10376,31 +22364,28 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run. + * Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names. * + * @param {GitInterfaces.IdentityRefWithVote[]} patchVotes - IDs of the reviewers whose votes will be reset to zero + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request * @param {string} project - Project ID or project name - * @param {string} ownerId - * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition. - * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId. */ - getRetentionLeasesByOwnerId(project, ownerId, definitionId, runId) { + updatePullRequestReviewers(patchVotes, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - ownerId: ownerId, - definitionId: definitionId, - runId: runId, + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + res = yield this.rest.update(url, patchVotes, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -10410,34 +22395,25 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run. + * Retrieve a pull request. * + * @param {number} pullRequestId - The ID of the pull request to retrieve. * @param {string} project - Project ID or project name - * @param {string} userOwnerId - The user id to search for. - * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition. - * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId. */ - getRetentionLeasesByUserId(project, userOwnerId, definitionId, runId) { + getPullRequestById(pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { - if (userOwnerId == null) { - throw new TypeError('userOwnerId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - userOwnerId: userOwnerId, - definitionId: definitionId, - runId: runId, + project: project, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01a46dea-7d46-4d40-bc84-319e7c260d99", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); resolve(ret); } catch (err) { @@ -10447,26 +22423,36 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates the duration or pipeline protection status of a retention lease. + * Retrieve all pull requests matching a specified criteria. * - * @param {BuildInterfaces.RetentionLeaseUpdate} leaseUpdate - The new data for the retention lease. * @param {string} project - Project ID or project name - * @param {number} leaseId - The ID of the lease to update. + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. + * @param {number} maxCommentLength - Not used. + * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {number} top - The number of pull requests to retrieve. */ - updateRetentionLease(leaseUpdate, project, leaseId) { + getPullRequestsByProject(project, searchCriteria, maxCommentLength, skip, top) { return __awaiter(this, void 0, void 0, function* () { + if (searchCriteria == null) { + throw new TypeError('searchCriteria can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - leaseId: leaseId + project: project + }; + let queryValues = { + searchCriteria: searchCriteria, + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a5d28130-9cd2-40fa-9f08-902e7daa9efb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, leaseUpdate, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, true); resolve(ret); } catch (err) { @@ -10476,32 +22462,31 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets an individual log file for a build. + * Create a pull request. * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - The pull request to create. + * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {number} logId - The ID of the log file. - * @param {number} startLine - The start line. - * @param {number} endLine - The end line. + * @param {boolean} supportsIterations - If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed. */ - getBuildLog(project, buildId, logId, startLine, endLine) { + createPullRequest(gitPullRequestToCreate, repositoryId, project, supportsIterations) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId, - logId: logId + repositoryId: repositoryId }; let queryValues = { - startLine: startLine, - endLine: endLine, + supportsIterations: supportsIterations, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, gitPullRequestToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); } catch (err) { reject(err); @@ -10510,33 +22495,39 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets an individual log file for a build. + * Retrieve a pull request. * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - The ID of the pull request to retrieve. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {number} logId - The ID of the log file. - * @param {number} startLine - The start line. - * @param {number} endLine - The end line. + * @param {number} maxCommentLength - Not used. + * @param {number} skip - Not used. + * @param {number} top - Not used. + * @param {boolean} includeCommits - If true, the pull request will be returned with the associated commits. + * @param {boolean} includeWorkItemRefs - If true, the pull request will be returned with the associated work item references. */ - getBuildLogLines(project, buildId, logId, startLine, endLine) { + getPullRequest(repositoryId, pullRequestId, project, maxCommentLength, skip, top, includeCommits, includeWorkItemRefs) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId, - logId: logId + repositoryId: repositoryId, + pullRequestId: pullRequestId }; let queryValues = { - startLine: startLine, - endLine: endLine, + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + includeCommits: includeCommits, + includeWorkItemRefs: includeWorkItemRefs, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); resolve(ret); } catch (err) { @@ -10546,25 +22537,38 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the logs for a build. + * Retrieve all pull requests matching a specified criteria. * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. + * @param {number} maxCommentLength - Not used. + * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {number} top - The number of pull requests to retrieve. */ - getBuildLogs(project, buildId) { + getPullRequests(repositoryId, searchCriteria, project, maxCommentLength, skip, top) { return __awaiter(this, void 0, void 0, function* () { + if (searchCriteria == null) { + throw new TypeError('searchCriteria can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + repositoryId: repositoryId + }; + let queryValues = { + searchCriteria: searchCriteria, + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildLog, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, true); resolve(ret); } catch (err) { @@ -10574,24 +22578,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the logs for a build. + * Update a pull request * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - The pull request content that should be updated. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request to update. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. */ - getBuildLogsZip(project, buildId) { + updatePullRequest(gitPullRequestToUpdate, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, gitPullRequestToUpdate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); } catch (err) { reject(err); @@ -10600,32 +22609,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets an individual log file for a build. + * Sends an e-mail notification about a specific pull request to a set of recipients * + * @param {GitInterfaces.ShareNotificationContext} userMessage + * @param {string} repositoryId - ID of the git repository. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {number} logId - The ID of the log file. - * @param {number} startLine - The start line. - * @param {number} endLine - The end line. */ - getBuildLogZip(project, buildId, logId, startLine, endLine) { + sharePullRequest(userMessage, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId, - logId: logId - }; - let queryValues = { - startLine: startLine, - endLine: endLine, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "696f3a82-47c9-487f-9117-b9d00972ca84", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, userMessage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -10634,29 +22640,28 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets build metrics for a project. + * Create a pull request status. * + * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {string} metricAggregationType - The aggregation type to use (hourly, daily). - * @param {Date} minMetricsTime - The date from which to calculate metrics. */ - getProjectMetrics(project, metricAggregationType, minMetricsTime) { + createPullRequestStatus(status, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - metricAggregationType: metricAggregationType - }; - let queryValues = { - minMetricsTime: minMetricsTime, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7433fae7-a6bc-41dc-a6e2-eef9005ce41a", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildMetric, true); + res = yield this.rest.create(url, status, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); resolve(ret); } catch (err) { @@ -10666,29 +22671,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets build metrics for a definition. + * Delete pull request status. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. - * @param {Date} minMetricsTime - The date from which to calculate metrics. */ - getDefinitionMetrics(project, definitionId, minMetricsTime) { + deletePullRequestStatus(repositoryId, pullRequestId, statusId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId - }; - let queryValues = { - minMetricsTime: minMetricsTime, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + statusId: statusId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d973b939-0ce0-4fec-91d8-da3940fa1827", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildMetric, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -10698,23 +22703,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets all build definition options supported by the system. + * Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name */ - getBuildOptionDefinitions(project) { + getPullRequestStatus(repositoryId, pullRequestId, statusId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + statusId: statusId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "591cb5a4-2d46-4f3a-a697-5cd42b6bd332", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildOptionDefinition, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); resolve(ret); } catch (err) { @@ -10724,35 +22735,27 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the contents of a directory in the given source code repository. + * Get all the statuses associated with a pull request. * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {string} providerName - The name of the source provider. - * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. - * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. - * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved. - * @param {string} path - The path contents to list, relative to the root of the repository. */ - getPathContents(project, providerName, serviceEndpointId, repository, commitOrBranch, path) { + getPullRequestStatuses(repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - providerName: providerName - }; - let queryValues = { - serviceEndpointId: serviceEndpointId, - repository: repository, - commitOrBranch: commitOrBranch, - path: path, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7944d6fb-df01-4709-920a-7a189aa34037", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, true); resolve(ret); } catch (err) { @@ -10762,28 +22765,30 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets properties for a build. + * Update pull request statuses collection. The only supported operation type is `remove`. * + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties. */ - getBuildProperties(project, buildId, filter) { + updatePullRequestStatuses(customHeaders, patchDocument, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId - }; - let queryValues = { - filter: filter && filter.join(","), + repositoryId: repositoryId, + pullRequestId: pullRequestId }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "0a6312e9-0627-49b7-8083-7d74a64849c9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); + res = yield this.rest.update(url, patchDocument, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -10794,29 +22799,30 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates properties for a build. + * Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). * - * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update. + * @param {GitInterfaces.Comment} comment - The comment to create. Comments can be up to 150,000 characters. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. */ - updateBuildProperties(customHeaders, document, project, buildId) { + createComment(comment, repositoryId, pullRequestId, threadId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "0a6312e9-0627-49b7-8083-7d74a64849c9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.update(url, document, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, comment, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); resolve(ret); } catch (err) { @@ -10826,28 +22832,30 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets properties for a definition. + * Delete a comment associated with a specific thread in a pull request. * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. - * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties. */ - getDefinitionProperties(project, definitionId, filter) { + deleteComment(repositoryId, pullRequestId, threadId, commentId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId - }; - let queryValues = { - filter: filter && filter.join(","), + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d9826ad7-2a68-46a9-a6e9-677698777895", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -10858,29 +22866,31 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates properties for a definition. + * Retrieve a comment associated with a specific thread in a pull request. * - * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. */ - updateDefinitionProperties(customHeaders, document, project, definitionId) { + getComment(repositoryId, pullRequestId, threadId, commentId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d9826ad7-2a68-46a9-a6e9-677698777895", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.update(url, document, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); resolve(ret); } catch (err) { @@ -10890,33 +22900,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a pull request object from source provider. + * Retrieve all comments associated with a specific thread in a pull request. * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread. * @param {string} project - Project ID or project name - * @param {string} providerName - The name of the source provider. - * @param {string} pullRequestId - Vendor-specific id of the pull request. - * @param {string} repositoryId - Vendor-specific identifier or the name of the repository that contains the pull request. - * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. */ - getPullRequest(project, providerName, pullRequestId, repositoryId, serviceEndpointId) { + getComments(repositoryId, pullRequestId, threadId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - providerName: providerName, - pullRequestId: pullRequestId - }; - let queryValues = { repositoryId: repositoryId, - serviceEndpointId: serviceEndpointId, + pullRequestId: pullRequestId, + threadId: threadId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d8763ec7-9ff0-4fb4-b2b2-9d757906ff14", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, true); resolve(ret); } catch (err) { @@ -10926,29 +22932,32 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a build report. + * Update a comment associated with a specific thread in a pull request. * + * @param {GitInterfaces.Comment} comment - The comment content that should be updated. Comments can be up to 150,000 characters. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment to update. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} type */ - getBuildReport(project, buildId, type) { + updateComment(comment, repositoryId, pullRequestId, threadId, commentId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId - }; - let queryValues = { - type: type, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "45bcaa88-67e1-4042-a035-56d3b4a7d44c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, comment, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); resolve(ret); } catch (err) { @@ -10958,28 +22967,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a build report. + * Create a thread in a pull request. * + * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread to create. Thread must contain at least one comment. + * @param {string} repositoryId - Repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} type */ - getBuildReportHtmlContent(project, buildId, type) { + createThread(commentThread, repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId - }; - let queryValues = { - type: type, + repositoryId: repositoryId, + pullRequestId: pullRequestId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "45bcaa88-67e1-4042-a035-56d3b4a7d44c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/html", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, commentThread, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + resolve(ret); } catch (err) { reject(err); @@ -10988,37 +22998,35 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a list of source code repositories. + * Retrieve a thread in a pull request. * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread. * @param {string} project - Project ID or project name - * @param {string} providerName - The name of the source provider. - * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. - * @param {string} repository - If specified, the vendor-specific identifier or the name of a single repository to get. - * @param {BuildInterfaces.ResultSet} resultSet - 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set. - * @param {boolean} pageResults - If set to true, this will limit the set of results and will return a continuation token to continue the query. - * @param {string} continuationToken - When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories. + * @param {number} iteration - If specified, thread position will be tracked using this iteration as the right side of the diff. + * @param {number} baseIteration - If specified, thread position will be tracked using this iteration as the left side of the diff. */ - listRepositories(project, providerName, serviceEndpointId, repository, resultSet, pageResults, continuationToken) { + getPullRequestThread(repositoryId, pullRequestId, threadId, project, iteration, baseIteration) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - providerName: providerName + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId }; let queryValues = { - serviceEndpointId: serviceEndpointId, - repository: repository, - resultSet: resultSet, - pageResults: pageResults, - continuationToken: continuationToken, + '$iteration': iteration, + '$baseIteration': baseIteration, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d44d1680-f978-4834-9b93-8c6e132329c9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); resolve(ret); } catch (err) { @@ -11028,24 +23036,33 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * @param {BuildInterfaces.DefinitionResourceReference[]} resources + * Retrieve all threads in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {number} definitionId + * @param {number} iteration - If specified, thread positions will be tracked using this iteration as the right side of the diff. + * @param {number} baseIteration - If specified, thread positions will be tracked using this iteration as the left side of the diff. */ - authorizeDefinitionResources(resources, project, definitionId) { + getThreads(repositoryId, pullRequestId, project, iteration, baseIteration) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + '$iteration': iteration, + '$baseIteration': baseIteration, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "ea623316-1967-45eb-89ab-e9e6110cf2d6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, resources, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, true); resolve(ret); } catch (err) { @@ -11055,23 +23072,30 @@ class BuildApi extends basem.ClientApiBase { }); } /** + * Update a thread in a pull request. + * + * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread content that should be updated. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread to update. * @param {string} project - Project ID or project name - * @param {number} definitionId */ - getDefinitionResources(project, definitionId) { + updateThread(commentThread, repositoryId, pullRequestId, threadId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "ea623316-1967-45eb-89ab-e9e6110cf2d6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, commentThread, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); resolve(ret); } catch (err) { @@ -11081,20 +23105,27 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets information about build resources in the system. + * Retrieve a list of work items associated with a pull request. * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name */ - getResourceUsage() { + getPullRequestWorkItemRefs(repositoryId, pullRequestId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "3813d06c-9e36-4ea1-aac3-61a485d60e3d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "0a637fcc-5370-4ce8-b0e8-98091f5f9482", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -11104,23 +23135,26 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the project's retention settings. + * Push changes to the repository. * + * @param {GitInterfaces.GitPush} push + * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name */ - getRetentionSettings(project) { + createPush(push, repositoryId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "dadb46e7-5851-4c72-820e-ae8abb82f59f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, push, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, false); resolve(ret); } catch (err) { @@ -11130,24 +23164,33 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates the project's retention settings. + * Retrieves a particular push. * - * @param {BuildInterfaces.UpdateProjectRetentionSettingModel} updateModel + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} pushId - ID of the push. * @param {string} project - Project ID or project name + * @param {number} includeCommits - The number of commits to include in the result. + * @param {boolean} includeRefUpdates - If true, include the list of refs that were updated by the push. */ - updateRetentionSettings(updateModel, project) { + getPush(repositoryId, pushId, project, includeCommits, includeRefUpdates) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + pushId: pushId + }; + let queryValues = { + includeCommits: includeCommits, + includeRefUpdates: includeRefUpdates, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "dadb46e7-5851-4c72-820e-ae8abb82f59f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, updateModel, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, false); resolve(ret); } catch (err) { @@ -11157,25 +23200,33 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets all revisions of a definition. + * Retrieves pushes associated with the specified repository. * + * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. + * @param {number} skip - Number of pushes to skip. + * @param {number} top - Number of pushes to return. + * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references. */ - getDefinitionRevisions(project, definitionId) { + getPushes(repositoryId, project, skip, top, searchCriteria) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId + }; + let queryValues = { + '$skip': skip, + '$top': top, + searchCriteria: searchCriteria, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "7c116775-52e5-453e-8c5d-914d9762d8c4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionRevision, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, true); resolve(ret); } catch (err) { @@ -11185,22 +23236,24 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the build settings. + * Destroy (hard delete) a soft-deleted Git repository. * * @param {string} project - Project ID or project name + * @param {string} repositoryId - The ID of the repository. */ - getBuildSettings(project) { + deleteRepositoryFromRecycleBin(project, repositoryId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -11211,24 +23264,23 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates the build settings. + * Retrieve soft-deleted git repositories from the recycle bin. * - * @param {BuildInterfaces.BuildSettings} settings - The new settings. * @param {string} project - Project ID or project name */ - updateBuildSettings(settings, project) { + getRecycleBinRepositories(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, settings, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitDeletedRepository, true); resolve(ret); } catch (err) { @@ -11238,23 +23290,26 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Get a list of source providers and their capabilities. + * Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable. * + * @param {GitInterfaces.GitRecycleBinRepositoryDetails} repositoryDetails * @param {string} project - Project ID or project name + * @param {string} repositoryId - The ID of the repository. */ - listSourceProviders(project) { + restoreRepositoryFromRecycleBin(repositoryDetails, project, repositoryId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "3ce81729-954f-423d-a581-9fea01d25186", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.SourceProviderAttributes, true); + res = yield this.rest.update(url, repositoryDetails, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); resolve(ret); } catch (err) { @@ -11264,28 +23319,41 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Update a build stage + * Queries the provided repository for its refs and returns them. * - * @param {BuildInterfaces.UpdateStageParameters} updateParameters - * @param {number} buildId - * @param {string} stageRefName + * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name + * @param {string} filter - [optional] A filter to apply to the refs (starts with). + * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. + * @param {boolean} includeStatuses - [optional] Includes up to the first 1000 commit statuses for each ref. The default value is false. + * @param {boolean} includeMyBranches - [optional] Includes only branches that the user owns, the branches the user favorites, and the default branch. The default value is false. Cannot be combined with the filter parameter. + * @param {boolean} latestStatusesOnly - [optional] True to include only the tip commit status for each ref. This option requires `includeStatuses` to be true. The default value is false. + * @param {boolean} peelTags - [optional] Annotated tags will populate the PeeledObjectId property. default is false. + * @param {string} filterContains - [optional] A filter to apply to the refs (contains). */ - updateStage(updateParameters, buildId, stageRefName, project) { + getRefs(repositoryId, project, filter, includeLinks, includeStatuses, includeMyBranches, latestStatusesOnly, peelTags, filterContains) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId, - stageRefName: stageRefName + repositoryId: repositoryId + }; + let queryValues = { + filter: filter, + includeLinks: includeLinks, + includeStatuses: includeStatuses, + includeMyBranches: includeMyBranches, + latestStatusesOnly: latestStatusesOnly, + peelTags: peelTags, + filterContains: filterContains, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "b8aac6c9-744b-46e1-88fc-3550969f9313", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, updateParameters, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRef, true); resolve(ret); } catch (err) { @@ -11295,37 +23363,35 @@ class BuildApi extends basem.ClientApiBase { }); } /** - *

Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.

If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.

+ * Lock or Unlock a branch. * - * @param {string} project - Project ID or project name - * @param {string} definition - Either the definition name with optional leading folder path, or the definition id. - * @param {string} branchName - Only consider the most recent build for this branch. If not specified, the default branch is used. - * @param {string} stageName - Use this stage within the pipeline to render the status. - * @param {string} jobName - Use this job within a stage of the pipeline to render the status. - * @param {string} configuration - Use this job configuration to render the status - * @param {string} label - Replaces the default text on the left side of the badge. + * @param {GitInterfaces.GitRefUpdate} newRefInfo - The ref update action (lock/unlock) to perform + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} filter - The name of the branch to lock/unlock + * @param {string} project - Project ID or project name + * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. */ - getStatusBadge(project, definition, branchName, stageName, jobName, configuration, label) { + updateRef(newRefInfo, repositoryId, filter, project, projectId) { return __awaiter(this, void 0, void 0, function* () { + if (filter == null) { + throw new TypeError('filter can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definition: definition + repositoryId: repositoryId }; let queryValues = { - branchName: branchName, - stageName: stageName, - jobName: jobName, - configuration: configuration, - label: label, + filter: filter, + projectId: projectId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "07acfdce-4757-4439-b422-ddd13a2fcc10", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, newRefInfo, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRef, false); resolve(ret); } catch (err) { @@ -11335,27 +23401,30 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Adds a tag to a build. + * Creating, updating, or deleting refs(branches). * + * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform + * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} tag - The tag to add. + * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. */ - addBuildTag(project, buildId, tag) { + updateRefs(refUpdates, repositoryId, project, projectId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId, - tag: tag + repositoryId: repositoryId + }; + let queryValues = { + projectId: projectId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, refUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefUpdateResult, true); resolve(ret); } catch (err) { @@ -11365,26 +23434,24 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Adds tags to a build. + * Creates a ref favorite * - * @param {string[]} tags - The tags to add. Request body is composed directly from listed tags. + * @param {GitInterfaces.GitRefFavorite} favorite - The ref favorite to create. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. */ - addBuildTags(tags, project, buildId) { + createFavorite(favorite, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - buildId: buildId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, tags, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, favorite, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, false); resolve(ret); } catch (err) { @@ -11394,27 +23461,25 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + * Deletes the refs favorite specified * * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {string} tag - The tag to remove. + * @param {number} favoriteId - The Id of the ref favorite to delete. */ - deleteBuildTag(project, buildId, tag) { + deleteRefFavorite(project, favoriteId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId, - tag: tag + favoriteId: favoriteId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -11424,25 +23489,25 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the tags for a build. + * Gets the refs favorite for a favorite Id. * * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. + * @param {number} favoriteId - The Id of the requested ref favorite. */ - getBuildTags(project, buildId) { + getRefFavorite(project, favoriteId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + favoriteId: favoriteId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, false); resolve(ret); } catch (err) { @@ -11452,26 +23517,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Adds/Removes tags from a build. + * Gets the refs favorites for a repo and an identity. * - * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. + * @param {string} repositoryId - The id of the repository. + * @param {string} identityId - The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used. */ - updateBuildTags(updateParameters, project, buildId) { + getRefFavorites(project, repositoryId, identityId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - buildId: buildId + project: project + }; + let queryValues = { + repositoryId: repositoryId, + identityId: identityId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, updateParameters, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, true); resolve(ret); } catch (err) { @@ -11481,27 +23549,28 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Adds a tag to a definition + * Create a git repository in a team project. * + * @param {GitInterfaces.GitRepositoryCreateOptions} gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. - * @param {string} tag - The tag to add. + * @param {string} sourceRef - [optional] Specify the source refs to use while creating a fork repo */ - addDefinitionTag(project, definitionId, tag) { + createRepository(gitRepositoryToCreate, project, sourceRef) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - definitionId: definitionId, - tag: tag + project: project + }; + let queryValues = { + sourceRef: sourceRef, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, gitRepositoryToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); resolve(ret); } catch (err) { @@ -11511,26 +23580,25 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Adds multiple tags to a definition. + * Delete a git repository * - * @param {string[]} tags - The tags to add. + * @param {string} repositoryId - The ID of the repository. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. */ - addDefinitionTags(tags, project, definitionId) { + deleteRepository(repositoryId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, tags, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -11540,27 +23608,31 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + * Retrieve git repositories. * * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. - * @param {string} tag - The tag to remove. + * @param {boolean} includeLinks - [optional] True to include reference links. The default value is false. + * @param {boolean} includeAllUrls - [optional] True to include all remote URLs. The default value is false. + * @param {boolean} includeHidden - [optional] True to include hidden repositories. The default value is false. */ - deleteDefinitionTag(project, definitionId, tag) { + getRepositories(project, includeLinks, includeAllUrls, includeHidden) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - definitionId: definitionId, - tag: tag + project: project + }; + let queryValues = { + includeLinks: includeLinks, + includeAllUrls: includeAllUrls, + includeHidden: includeHidden, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, true); resolve(ret); } catch (err) { @@ -11570,29 +23642,25 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the tags for a definition. + * Retrieve a git repository. * + * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. - * @param {number} revision - The definition revision number. If not specified, uses the latest revision of the definition. */ - getDefinitionTags(project, definitionId, revision) { + getRepository(repositoryId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId - }; - let queryValues = { - revision: revision, + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); resolve(ret); } catch (err) { @@ -11602,26 +23670,32 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Adds/Removes tags from a definition. + * Retrieve a git repository. * - * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove. + * @param {string} repositoryId - The name or ID of the repository. + * @param {boolean} includeParent - True to include parent repository. Only available in authenticated calls. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. */ - updateDefinitionTags(updateParameters, project, definitionId) { + getRepositoryWithParent(repositoryId, includeParent, project) { return __awaiter(this, void 0, void 0, function* () { + if (includeParent == null) { + throw new TypeError('includeParent can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId + }; + let queryValues = { + includeParent: includeParent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, updateParameters, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); resolve(ret); } catch (err) { @@ -11631,25 +23705,26 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Removes a tag from builds, definitions, and from the tag store + * Updates the Git repository with either a new repo name or a new default branch. * + * @param {GitInterfaces.GitRepository} newRepositoryInfo - Specify a new repo name or a new default branch of the repository + * @param {string} repositoryId - The ID of the repository. * @param {string} project - Project ID or project name - * @param {string} tag - The tag to remove. */ - deleteTag(project, tag) { + updateRepository(newRepositoryInfo, repositoryId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - tag: tag + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "d84ac5c6-edc7-43d5-adc9-1b34be5dea09", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, newRepositoryInfo, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); resolve(ret); } catch (err) { @@ -11659,23 +23734,29 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a list of all build tags in the project. + * Retrieve one conflict for a revert by ID * + * @param {string} repositoryId + * @param {number} revertId + * @param {number} conflictId * @param {string} project - Project ID or project name */ - getTags(project) { + getRevertConflict(repositoryId, revertId, conflictId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + revertId: revertId, + conflictId: conflictId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "d84ac5c6-edc7-43d5-adc9-1b34be5dea09", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); resolve(ret); } catch (err) { @@ -11685,25 +23766,39 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Deletes a build definition template. + * Retrieve all conflicts for a revert * + * @param {string} repositoryId + * @param {number} revertId * @param {string} project - Project ID or project name - * @param {string} templateId - The ID of the template. + * @param {string} continuationToken + * @param {number} top + * @param {boolean} excludeResolved + * @param {boolean} onlyResolved + * @param {boolean} includeObsolete */ - deleteTemplate(project, templateId) { + getRevertConflicts(repositoryId, revertId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - templateId: templateId + repositoryId: repositoryId, + revertId: revertId + }; + let queryValues = { + continuationToken: continuationToken, + '$top': top, + excludeResolved: excludeResolved, + onlyResolved: onlyResolved, + includeObsolete: includeObsolete, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); resolve(ret); } catch (err) { @@ -11713,25 +23808,30 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a specific build definition template. + * Update merge conflict resolution * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} revertId + * @param {number} conflictId * @param {string} project - Project ID or project name - * @param {string} templateId - The ID of the requested template. */ - getTemplate(project, templateId) { + updateRevertConflict(conflict, repositoryId, revertId, conflictId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - templateId: templateId + repositoryId: repositoryId, + revertId: revertId, + conflictId: conflictId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, false); + res = yield this.rest.update(url, conflict, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); resolve(ret); } catch (err) { @@ -11741,23 +23841,28 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets all definition templates. + * Update multiple merge conflict resolutions * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} revertId * @param {string} project - Project ID or project name */ - getTemplates(project) { + updateRevertConflicts(conflictUpdates, repositoryId, revertId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + revertId: revertId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, true); + res = yield this.rest.update(url, conflictUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); resolve(ret); } catch (err) { @@ -11767,26 +23872,26 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Updates an existing build definition template. + * Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request. * - * @param {BuildInterfaces.BuildDefinitionTemplate} template - The new version of the template. + * @param {GitInterfaces.GitAsyncRefOperationParameters} revertToCreate * @param {string} project - Project ID or project name - * @param {string} templateId - The ID of the template. + * @param {string} repositoryId - ID of the repository. */ - saveTemplate(template, project, templateId) { + createRevert(revertToCreate, project, repositoryId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - templateId: templateId + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, template, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, false); + res = yield this.rest.create(url, revertToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); resolve(ret); } catch (err) { @@ -11796,33 +23901,27 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets details for a build + * Retrieve information about a revert operation by revert Id. * * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} timelineId - * @param {number} changeId - * @param {string} planId + * @param {number} revertId - ID of the revert operation. + * @param {string} repositoryId - ID of the repository. */ - getBuildTimeline(project, buildId, timelineId, changeId, planId) { + getRevert(project, revertId, repositoryId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId, - timelineId: timelineId - }; - let queryValues = { - changeId: changeId, - planId: planId, + revertId: revertId, + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "8baac422-4c6e-4de5-8532-db96d92acffa", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Timeline, false); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); resolve(ret); } catch (err) { @@ -11832,32 +23931,32 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Recreates the webhooks for the specified triggers in the given source code repository. + * Retrieve information about a revert operation for a specific branch. * - * @param {BuildInterfaces.DefinitionTriggerType[]} triggerTypes - The types of triggers to restore webhooks for. * @param {string} project - Project ID or project name - * @param {string} providerName - The name of the source provider. - * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. - * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + * @param {string} repositoryId - ID of the repository. + * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the revert operation. */ - restoreWebhooks(triggerTypes, project, providerName, serviceEndpointId, repository) { + getRevertForRefName(project, repositoryId, refName) { return __awaiter(this, void 0, void 0, function* () { + if (refName == null) { + throw new TypeError('refName can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - providerName: providerName + repositoryId: repositoryId }; let queryValues = { - serviceEndpointId: serviceEndpointId, - repository: repository, + refName: refName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "793bceb8-9736-4030-bd2f-fb3ce6d6b478", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, triggerTypes, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); resolve(ret); } catch (err) { @@ -11867,31 +23966,28 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets a list of webhooks installed in the given source code repository. + * Create Git commit status. * + * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - Git commit status object to create. + * @param {string} commitId - ID of the Git commit. + * @param {string} repositoryId - ID of the repository. * @param {string} project - Project ID or project name - * @param {string} providerName - The name of the source provider. - * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. - * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. */ - listWebhooks(project, providerName, serviceEndpointId, repository) { + createCommitStatus(gitCommitStatusToCreate, commitId, repositoryId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - providerName: providerName - }; - let queryValues = { - serviceEndpointId: serviceEndpointId, - repository: repository, + commitId: commitId, + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "8f20ff82-9498-4812-9f6e-9c01bdc50e99", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "428dd4fb-fda5-4722-af02-9313b80305da", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RepositoryWebhook, true); + res = yield this.rest.create(url, gitCommitStatusToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitStatus, false); resolve(ret); } catch (err) { @@ -11901,29 +23997,35 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the work items associated with a build. Only work items in the same project are returned. + * Get statuses associated with the Git commit. * + * @param {string} commitId - ID of the Git commit. + * @param {string} repositoryId - ID of the repository. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {number} top - The maximum number of work items to return. + * @param {number} top - Optional. The number of statuses to retrieve. Default is 1000. + * @param {number} skip - Optional. The number of statuses to ignore. Default is 0. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {boolean} latestOnly - The flag indicates whether to get only latest statuses grouped by `Context.Name` and `Context.Genre`. */ - getBuildWorkItemsRefs(project, buildId, top) { + getStatuses(commitId, repositoryId, project, top, skip, latestOnly) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId + commitId: commitId, + repositoryId: repositoryId }; let queryValues = { - '$top': top, + top: top, + skip: skip, + latestOnly: latestOnly, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "5a21f5d2-5642-47e4-a0bd-1356e6731bee", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "428dd4fb-fda5-4722-af02-9313b80305da", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitStatus, true); resolve(ret); } catch (err) { @@ -11933,29 +24035,24 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets the work items associated with a build, filtered to specific commits. + * Retrieve a pull request suggestion for a particular repository or team project. * - * @param {string[]} commitIds - A comma-delimited list of commit IDs. + * @param {string} repositoryId - ID of the git repository. * @param {string} project - Project ID or project name - * @param {number} buildId - The ID of the build. - * @param {number} top - The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified. */ - getBuildWorkItemsRefsFromCommits(commitIds, project, buildId, top) { + getSuggestions(repositoryId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - buildId: buildId - }; - let queryValues = { - '$top': top, + repositoryId: repositoryId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "5a21f5d2-5642-47e4-a0bd-1356e6731bee", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9393b4fb-4445-4919-972b-9ad16f442d83", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, commitIds, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, true); resolve(ret); } @@ -11966,37 +24063,35 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Gets all the work items between two builds. + * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. * + * @param {string} repositoryId - Repository Id. + * @param {string} sha1 - SHA1 hash of the tree object. * @param {string} project - Project ID or project name - * @param {number} fromBuildId - The ID of the first build. - * @param {number} toBuildId - The ID of the last build. - * @param {number} top - The maximum number of work items to return. + * @param {string} projectId - Project Id. + * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. + * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. */ - getWorkItemsBetweenBuilds(project, fromBuildId, toBuildId, top) { + getTree(repositoryId, sha1, project, projectId, recursive, fileName) { return __awaiter(this, void 0, void 0, function* () { - if (fromBuildId == null) { - throw new TypeError('fromBuildId can not be null or undefined'); - } - if (toBuildId == null) { - throw new TypeError('toBuildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + repositoryId: repositoryId, + sha1: sha1 }; let queryValues = { - fromBuildId: fromBuildId, - toBuildId: toBuildId, - '$top': top, + projectId: projectId, + recursive: recursive, + fileName: fileName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "52ba8915-5518-42e3-a4bb-b0182d159e2d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "729f6437-6f92-44ec-8bee-273a7111063c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitTreeRef, false); resolve(ret); } catch (err) { @@ -12006,36 +24101,34 @@ class BuildApi extends basem.ClientApiBase { }); } /** - * Converts a definition to YAML, optionally at a specific revision. + * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. * + * @param {string} repositoryId - Repository Id. + * @param {string} sha1 - SHA1 hash of the tree object. * @param {string} project - Project ID or project name - * @param {number} definitionId - The ID of the definition. - * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned. - * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. - * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results. - * @param {boolean} includeLatestBuilds + * @param {string} projectId - Project Id. + * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. + * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. */ - getDefinitionYaml(project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) { + getTreeZip(repositoryId, sha1, project, projectId, recursive, fileName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + repositoryId: repositoryId, + sha1: sha1 }; let queryValues = { - revision: revision, - minMetricsTime: minMetricsTime, - propertyFilters: propertyFilters && propertyFilters.join(","), - includeLatestBuilds: includeLatestBuilds, + projectId: projectId, + recursive: recursive, + fileName: fileName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7c3df3a1-7e51-4150-8cf7-540347f8697f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "729f6437-6f92-44ec-8bee-273a7111063c", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -12044,55 +24137,13 @@ class BuildApi extends basem.ClientApiBase { }); } } -BuildApi.RESOURCE_AREA_ID = "965220d5-5bb9-42cf-8d67-9b146df2a5a4"; -exports.BuildApi = BuildApi; - - -/***/ }), - -/***/ 273: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", ({ value: true })); -const vsom = __nccwpck_require__(9686); -const serm = __nccwpck_require__(5817); -const rm = __nccwpck_require__(7405); -const hm = __nccwpck_require__(5538); -class ClientApiBase { - constructor(baseUrl, handlers, userAgent, options) { - this.baseUrl = baseUrl; - this.http = new hm.HttpClient(userAgent, handlers, options); - this.rest = new rm.RestClient(userAgent, null, handlers, options); - this.vsoClient = new vsom.VsoClient(baseUrl, this.rest); - this.userAgent = userAgent; - } - createAcceptHeader(type, apiVersion) { - return type + (apiVersion ? (';api-version=' + apiVersion) : ''); - } - createRequestOptions(type, apiVersion) { - let options = {}; - options.acceptHeader = this.createAcceptHeader(type, apiVersion); - return options; - } - formatResponse(data, responseTypeMetadata, isCollection) { - let serializationData = { - responseTypeMetadata: responseTypeMetadata, - responseIsCollection: isCollection - }; - let deserializedResult = serm.ContractSerializer.deserialize(data, serializationData.responseTypeMetadata, false, serializationData.responseIsCollection); - return deserializedResult; - } -} -exports.ClientApiBase = ClientApiBase; +GitApi.RESOURCE_AREA_ID = "4e080c62-fa21-4fbc-8fef-2a10a2b38049"; +exports.GitApi = GitApi; /***/ }), -/***/ 4020: +/***/ 44771: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -12115,31 +24166,35 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const CoreInterfaces = __nccwpck_require__(3931); -const OperationsInterfaces = __nccwpck_require__(3052); -class CoreApi extends basem.ClientApiBase { +const basem = __nccwpck_require__(80273); +const LocationsInterfaces = __nccwpck_require__(13215); +class LocationsApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Core-api', options); + super(baseUrl, handlers, 'node-Locations-api', options); } /** - * Removes the avatar for the project. + * This was copied and adapted from TeamFoundationConnectionService.Connect() * - * @param {string} projectId - The ID or name of the project. + * @param {VSSInterfaces.ConnectOptions} connectOptions + * @param {number} lastChangeId - Obsolete 32-bit LastChangeId + * @param {number} lastChangeId64 - Non-truncated 64-bit LastChangeId */ - removeProjectAvatar(projectId) { + getConnectionData(connectOptions, lastChangeId, lastChangeId64) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - projectId: projectId + let routeValues = {}; + let queryValues = { + connectOptions: connectOptions, + lastChangeId: lastChangeId, + lastChangeId64: lastChangeId64, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "54b2a2a0-859b-4d05-827c-ec4c862f641a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "00d9565f-ed9c-4a06-9a50-00e7896ccab4", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ConnectionData, false); resolve(ret); } catch (err) { @@ -12149,23 +24204,26 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Sets the avatar for the project. - * - * @param {CoreInterfaces.ProjectAvatar} avatarBlob - The avatar blob data object to upload. - * @param {string} projectId - The ID or name of the project. + * @param {string} areaId + * @param {string} enterpriseName + * @param {string} organizationName */ - setProjectAvatar(avatarBlob, projectId) { + getResourceArea(areaId, enterpriseName, organizationName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId + areaId: areaId + }; + let queryValues = { + enterpriseName: enterpriseName, + organizationName: organizationName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "54b2a2a0-859b-4d05-827c-ec4c862f641a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, avatarBlob, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -12176,22 +24234,28 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData - * @param {string} projectId + * @param {string} areaId + * @param {string} hostId */ - createConnectedService(connectedServiceCreationData, projectId) { + getResourceAreaByHost(areaId, hostId) { return __awaiter(this, void 0, void 0, function* () { + if (hostId == null) { + throw new TypeError('hostId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId + areaId: areaId + }; + let queryValues = { + hostId: hostId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, connectedServiceCreationData, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedService, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -12201,23 +24265,24 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {string} projectId - * @param {string} name + * @param {string} enterpriseName + * @param {string} organizationName */ - getConnectedServiceDetails(projectId, name) { + getResourceAreas(enterpriseName, organizationName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - projectId: projectId, - name: name + let routeValues = {}; + let queryValues = { + enterpriseName: enterpriseName, + organizationName: organizationName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedServiceDetails, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -12227,25 +24292,25 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {string} projectId - * @param {CoreInterfaces.ConnectedServiceKind} kind + * @param {string} hostId */ - getConnectedServices(projectId, kind) { + getResourceAreasByHost(hostId) { return __awaiter(this, void 0, void 0, function* () { + if (hostId == null) { + throw new TypeError('hostId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - projectId: projectId - }; + let routeValues = {}; let queryValues = { - kind: kind, + hostId: hostId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedService, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -12255,21 +24320,22 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName + * @param {string} serviceType + * @param {string} identifier */ - createIdentityMru(mruData, mruName) { + deleteServiceDefinition(serviceType, identifier) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - mruName: mruName + serviceType: serviceType, + identifier: identifier }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, mruData, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -12280,22 +24346,31 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName + * Finds a given service definition. + * + * @param {string} serviceType + * @param {string} identifier + * @param {boolean} allowFaultIn - If true, we will attempt to fault in a host instance mapping if in SPS. + * @param {boolean} previewFaultIn - If true, we will calculate and return a host instance mapping, but not persist it. */ - deleteIdentityMru(mruData, mruName) { + getServiceDefinition(serviceType, identifier, allowFaultIn, previewFaultIn) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - mruName: mruName + serviceType: serviceType, + identifier: identifier + }; + let queryValues = { + allowFaultIn: allowFaultIn, + previewFaultIn: previewFaultIn, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, false); resolve(ret); } catch (err) { @@ -12305,21 +24380,21 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {string} mruName + * @param {string} serviceType */ - getIdentityMru(mruName) { + getServiceDefinitions(serviceType) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - mruName: mruName + serviceType: serviceType }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, true); resolve(ret); } catch (err) { @@ -12329,21 +24404,76 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName + * @param {VSSInterfaces.VssJsonCollectionWrapperV} serviceDefinitions */ - updateIdentityMru(mruData, mruName) { + updateServiceDefinitions(serviceDefinitions) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - mruName: mruName - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, mruData, options); + res = yield this.rest.update(url, serviceDefinitions, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.LocationsApi = LocationsApi; + + +/***/ }), + +/***/ 18221: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const NotificationInterfaces = __nccwpck_require__(13044); +const VSSInterfaces = __nccwpck_require__(94498); +class NotificationApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Notification-api', options); + } + /** + * @param {NotificationInterfaces.BatchNotificationOperation} operation + */ + performBatchNotificationOperations(operation) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "8f3c6ab2-5bae-4537-b16e-f84e0955599e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, operation, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -12354,31 +24484,31 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get a list of members for a specific team. + * Get a list of diagnostic logs for this service. * - * @param {string} projectId - The name or ID (GUID) of the team project the team belongs to. - * @param {string} teamId - The name or ID (GUID) of the team . - * @param {number} top - * @param {number} skip + * @param {string} source - ID specifying which type of logs to check diagnostics for. + * @param {string} entryId - The ID of the specific log to query for. + * @param {Date} startTime - Start time for the time range to query in. + * @param {Date} endTime - End time for the time range to query in. */ - getTeamMembersWithExtendedProperties(projectId, teamId, top, skip) { + listLogs(source, entryId, startTime, endTime) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId, - teamId: teamId + source: source, + entryId: entryId }; let queryValues = { - '$top': top, - '$skip': skip, + startTime: startTime, + endTime: endTime, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "294c494c-2600-4d7e-b76c-3dd50c3c95be", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "991842f3-eb16-4aea-ac81-81353ef2b75c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.INotificationDiagnosticLog, true); resolve(ret); } catch (err) { @@ -12388,23 +24518,23 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get a process by ID. + * Get the diagnostics settings for a subscription. * - * @param {string} processId - ID for a process. + * @param {string} subscriptionId - The id of the notifications subscription. */ - getProcessById(processId) { + getSubscriptionDiagnostics(subscriptionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - processId: processId + subscriptionId: subscriptionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "93878975-88c5-4e6a-8abb-7ddd77a8a7d8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "20f1929d-4be7-4c2e-a74e-d47640ff3418", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.Process, false); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false); resolve(ret); } catch (err) { @@ -12414,20 +24544,24 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get a list of processes. + * Update the diagnostics settings for a subscription. * + * @param {NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters} updateParameters + * @param {string} subscriptionId - The id of the notifications subscription. */ - getProcesses() { + updateSubscriptionDiagnostics(updateParameters, subscriptionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + subscriptionId: subscriptionId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "93878975-88c5-4e6a-8abb-7ddd77a8a7d8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "20f1929d-4be7-4c2e-a74e-d47640ff3418", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.Process, true); + res = yield this.rest.replace(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false); resolve(ret); } catch (err) { @@ -12437,23 +24571,21 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get project collection with the specified id or name. + * Publish an event. This request must be directed to the service "extmgmt". * - * @param {string} collectionId + * @param {VSSInterfaces.VssNotificationEvent} notificationEvent */ - getProjectCollection(collectionId) { + publishEvent(notificationEvent) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - collectionId: collectionId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "8031090f-ef1d-4af6-85fc-698cd75d42bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "14c57b7a-c0e6-4555-9f51-e067188fdd8e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProjectCollection, false); + res = yield this.rest.create(url, notificationEvent, options); + let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false); resolve(ret); } catch (err) { @@ -12463,26 +24595,21 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get project collection references for this application. + * Tranform a notification event. * - * @param {number} top - * @param {number} skip + * @param {NotificationInterfaces.EventTransformRequest} transformRequest - Object to be transformed. */ - getProjectCollections(top, skip) { + transformEvent(transformRequest) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; - let queryValues = { - '$top': top, - '$skip': skip, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "8031090f-ef1d-4af6-85fc-698cd75d42bf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "9463a800-1b44-450e-9083-f948ea174b45", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, transformRequest, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -12492,24 +24619,22 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Gets the history of changes to the project. - * - * @param {number} minRevision - The minimum revision number to return in the history. + * @param {NotificationInterfaces.FieldValuesQuery} inputValuesQuery + * @param {string} eventType */ - getProjectHistoryEntries(minRevision) { + queryEventTypes(inputValuesQuery, eventType) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - minRevision: minRevision, + let routeValues = { + eventType: eventType }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "6488a877-4749-4954-82ea-7340d36be9f2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "b5bbdd21-c178-4398-b6db-0166d910028a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.ProjectInfo, true); + res = yield this.rest.create(url, inputValuesQuery, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventField, true); resolve(ret); } catch (err) { @@ -12519,29 +24644,23 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get project with the specified id or name, optionally including capabilities. + * Get a specific event type. * - * @param {string} projectId - * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). - * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). + * @param {string} eventType - The ID of the event type. */ - getProject(projectId, includeCapabilities, includeHistory) { + getEventType(eventType) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId - }; - let queryValues = { - includeCapabilities: includeCapabilities, - includeHistory: includeHistory, + eventType: eventType }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProject, false); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventType, false); resolve(ret); } catch (err) { @@ -12551,32 +24670,24 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get all projects in the organization that the authenticated user has access to. + * List available event types for this service. Optionally filter by only event types for the specified publisher. * - * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). - * @param {number} top - * @param {number} skip - * @param {string} continuationToken - * @param {boolean} getDefaultTeamImageUrl + * @param {string} publisherId - Limit to event types for this publisher */ - getProjects(stateFilter, top, skip, continuationToken, getDefaultTeamImageUrl) { + listEventTypes(publisherId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; let queryValues = { - stateFilter: stateFilter, - '$top': top, - '$skip': skip, - continuationToken: continuationToken, - getDefaultTeamImageUrl: getDefaultTeamImageUrl, + publisherId: publisherId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProjectReference, true); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventType, true); resolve(ret); } catch (err) { @@ -12586,21 +24697,21 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status. - * - * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. + * @param {number} notificationId */ - queueCreateProject(projectToCreate) { + getNotificationReasons(notificationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + notificationId: notificationId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "19824fa9-1c76-40e6-9cce-cf0b9ca1cb60", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, projectToCreate, options); - let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, false); resolve(ret); } catch (err) { @@ -12610,23 +24721,22 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status. - * - * @param {string} projectId - The project id of the project to delete. + * @param {number} notificationIds */ - queueDeleteProject(projectId) { + listNotificationReasons(notificationIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - projectId: projectId + let routeValues = {}; + let queryValues = { + notificationIds: notificationIds, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "19824fa9-1c76-40e6-9cce-cf0b9ca1cb60", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, true); resolve(ret); } catch (err) { @@ -12636,24 +24746,18 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Update an existing project's name, abbreviation, description, or restore a project. - * - * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. The state must be set to wellFormed to restore the project. - * @param {string} projectId - The project id of the project to update. */ - updateProject(projectUpdate, projectId) { + getSettings() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - projectId: projectId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cbe076d8-2803-45ff-8d8d-44653686ea2a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, projectUpdate, options); - let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false); resolve(ret); } catch (err) { @@ -12663,29 +24767,19 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get a collection of team project properties for multiple projects. - * - * @param {string[]} projectIds - A comma-delimited string of team project IDs - * @param {string[]} properties + * @param {NotificationInterfaces.NotificationAdminSettingsUpdateParameters} updateParameters */ - getProjectsProperties(projectIds, properties) { + updateSettings(updateParameters) { return __awaiter(this, void 0, void 0, function* () { - if (projectIds == null) { - throw new TypeError('projectIds can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; - let queryValues = { - projectIds: projectIds && projectIds.join(","), - properties: properties && properties.join(","), - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "0a3ffdfc-fe94-47a6-bb27-79bf3f762eac", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cbe076d8-2803-45ff-8d8d-44653686ea2a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false); resolve(ret); } catch (err) { @@ -12695,27 +24789,23 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get a collection of team project properties. + * Get delivery preferences of a notifications subscriber. * - * @param {string} projectId - The team project ID. - * @param {string[]} keys - A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned. + * @param {string} subscriberId - ID of the user or group. */ - getProjectProperties(projectId, keys) { + getSubscriber(subscriberId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId - }; - let queryValues = { - keys: keys && keys.join(","), + subscriberId: subscriberId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "4976a71a-4487-49aa-8aab-a1eda469037a", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "4d5caff1-25ba-430b-b808-7a1f352cc197", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false); resolve(ret); } catch (err) { @@ -12725,27 +24815,24 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Create, update, and delete team project properties. + * Update delivery preferences of a notifications subscriber. * - * @param {string} projectId - The team project ID. - * @param {VSSInterfaces.JsonPatchDocument} patchDocument - A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. + * @param {NotificationInterfaces.NotificationSubscriberUpdateParameters} updateParameters + * @param {string} subscriberId - ID of the user or group. */ - setProjectProperties(customHeaders, projectId, patchDocument) { + updateSubscriber(updateParameters, subscriberId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId + subscriberId: subscriberId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "4976a71a-4487-49aa-8aab-a1eda469037a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "4d5caff1-25ba-430b-b808-7a1f352cc197", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.update(url, patchDocument, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false); resolve(ret); } catch (err) { @@ -12755,19 +24842,21 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {CoreInterfaces.Proxy} proxy + * Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + * + * @param {NotificationInterfaces.SubscriptionQuery} subscriptionQuery */ - createOrUpdateProxy(proxy) { + querySubscriptions(subscriptionQuery) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "6864db85-08c0-4006-8e8e-cc1bebe31675", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, proxy, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, subscriptionQuery, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true); resolve(ret); } catch (err) { @@ -12777,27 +24866,21 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {string} proxyUrl - * @param {string} site + * Create a new subscription. + * + * @param {NotificationInterfaces.NotificationSubscriptionCreateParameters} createParameters */ - deleteProxy(proxyUrl, site) { + createSubscription(createParameters) { return __awaiter(this, void 0, void 0, function* () { - if (proxyUrl == null) { - throw new TypeError('proxyUrl can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; - let queryValues = { - proxyUrl: proxyUrl, - site: site, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, createParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); resolve(ret); } catch (err) { @@ -12807,22 +24890,23 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * @param {string} proxyUrl + * Delete a subscription. + * + * @param {string} subscriptionId */ - getProxies(proxyUrl) { + deleteSubscription(subscriptionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - proxyUrl: proxyUrl, + let routeValues = { + subscriptionId: subscriptionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -12832,30 +24916,27 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get a list of all teams. + * Get a notification subscription by its ID. * - * @param {boolean} mine - If true, then return all teams requesting user is member. Otherwise return all teams user has read access. - * @param {number} top - Maximum number of teams to return. - * @param {number} skip - Number of teams to skip. - * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + * @param {string} subscriptionId + * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags */ - getAllTeams(mine, top, skip, expandIdentity) { + getSubscription(subscriptionId, queryFlags) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + subscriptionId: subscriptionId + }; let queryValues = { - '$mine': mine, - '$top': top, - '$skip': skip, - '$expandIdentity': expandIdentity, + queryFlags: queryFlags, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "7a4d9ee9-3433-4347-b47a-7a80f1cf307e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); resolve(ret); } catch (err) { @@ -12865,24 +24946,28 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Create a team in a team project. + * Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group. * - * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. - * @param {string} projectId - The name or ID (GUID) of the team project in which to create the team. + * @param {string} targetId - User or Group ID + * @param {string[]} ids - List of subscription IDs + * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags */ - createTeam(team, projectId) { + listSubscriptions(targetId, ids, queryFlags) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - projectId: projectId + let routeValues = {}; + let queryValues = { + targetId: targetId, + ids: ids && ids.join(","), + queryFlags: queryFlags, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, team, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true); resolve(ret); } catch (err) { @@ -12892,25 +24977,24 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Delete a team. + * Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. * - * @param {string} projectId - The name or ID (GUID) of the team project containing the team to delete. - * @param {string} teamId - The name or ID of the team to delete. + * @param {NotificationInterfaces.NotificationSubscriptionUpdateParameters} updateParameters + * @param {string} subscriptionId */ - deleteTeam(projectId, teamId) { + updateSubscription(updateParameters, subscriptionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId, - teamId: teamId + subscriptionId: subscriptionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); resolve(ret); } catch (err) { @@ -12920,29 +25004,20 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get a specific team. + * Get available subscription templates. * - * @param {string} projectId - The name or ID (GUID) of the team project containing the team. - * @param {string} teamId - The name or ID (GUID) of the team. - * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. */ - getTeam(projectId, teamId, expandIdentity) { + getSubscriptionTemplates() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - projectId: projectId, - teamId: teamId - }; - let queryValues = { - '$expandIdentity': expandIdentity, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "fa5d24ba-7484-4f3d-888d-4ec6b1974082", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriptionTemplate, true); resolve(ret); } catch (err) { @@ -12952,33 +25027,21 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Get a list of teams. + * Publish an event. This request is only for the Token service since it's a deploy only service. * - * @param {string} projectId - * @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access. - * @param {number} top - Maximum number of teams to return. - * @param {number} skip - Number of teams to skip. - * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + * @param {VSSInterfaces.VssNotificationEvent} notificationEvent */ - getTeams(projectId, mine, top, skip, expandIdentity) { + publishTokenEvent(notificationEvent) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - projectId: projectId - }; - let queryValues = { - '$mine': mine, - '$top': top, - '$skip': skip, - '$expandIdentity': expandIdentity, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "31dc86a2-67e8-4452-99a4-2b301ba28291", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, notificationEvent, options); + let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false); resolve(ret); } catch (err) { @@ -12988,25 +25051,25 @@ class CoreApi extends basem.ClientApiBase { }); } /** - * Update a team's name and/or description. + * Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. * - * @param {CoreInterfaces.WebApiTeam} teamData - * @param {string} projectId - The name or ID (GUID) of the team project containing the team to update. - * @param {string} teamId - The name of ID of the team to update. + * @param {NotificationInterfaces.SubscriptionUserSettings} userSettings + * @param {string} subscriptionId + * @param {string} userId - ID of the user */ - updateTeam(teamData, projectId, teamId) { + updateSubscriptionUserSettings(userSettings, subscriptionId, userId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId, - teamId: teamId + subscriptionId: subscriptionId, + userId: userId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "ed5a3dff-aeb5-41b1-b4f7-89e66e58b62e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, teamData, options); + res = yield this.rest.replace(url, userSettings, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -13017,13 +25080,12 @@ class CoreApi extends basem.ClientApiBase { }); } } -CoreApi.RESOURCE_AREA_ID = "79134c72-4a58-4b42-976c-04e7115f32bf"; -exports.CoreApi = CoreApi; +exports.NotificationApi = NotificationApi; /***/ }), -/***/ 7539: +/***/ 40266: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -13046,38 +25108,31 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const DashboardInterfaces = __nccwpck_require__(6890); -class DashboardApi extends basem.ClientApiBase { +const basem = __nccwpck_require__(80273); +const PolicyInterfaces = __nccwpck_require__(88555); +class PolicyApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Dashboard-api', options); + super(baseUrl, handlers, 'node-Policy-api', options); } /** - * Create the supplied dashboard. + * Create a policy configuration of a given policy type. * - * @param {DashboardInterfaces.Dashboard} dashboard - The initial state of the dashboard - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to create. + * @param {string} project - Project ID or project name */ - createDashboard(dashboard, teamContext) { + createPolicyConfiguration(configuration, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { - project: project, - team: team + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, dashboard, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + res = yield this.rest.create(url, configuration, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); resolve(ret); } catch (err) { @@ -13087,27 +25142,20 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard. + * Delete a policy configuration by its ID. * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} dashboardId - ID of the dashboard to delete. + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the policy configuration to delete. */ - deleteDashboard(teamContext, dashboardId) { + deletePolicyConfiguration(project, configurationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team, - dashboardId: dashboardId + configurationId: configurationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -13122,32 +25170,25 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Get a dashboard by its ID. + * Get a policy configuration by its ID. * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} dashboardId + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the policy configuration */ - getDashboard(teamContext, dashboardId) { + getPolicyConfiguration(project, configurationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team, - dashboardId: dashboardId + configurationId: configurationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); resolve(ret); } catch (err) { @@ -13157,30 +25198,29 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Get a list of dashboards under a project. + * Get a list of policy configurations in a project. * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} project - Project ID or project name + * @param {string} scope - [Provided for legacy reasons] The scope on which a subset of policies is defined. + * @param {string} policyType - Filter returned policies to only this type */ - getDashboardsByProject(teamContext) { + getPolicyConfigurations(project, scope, policyType) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { - project: project, - team: team + project: project + }; + let queryValues = { + scope: scope, + policyType: policyType, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, true); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true); resolve(ret); } catch (err) { @@ -13190,33 +25230,26 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied. + * Update a policy configuration by its ID. * - * @param {DashboardInterfaces.Dashboard} dashboard - The Configuration of the dashboard to replace. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} dashboardId - ID of the dashboard to replace. + * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to update. + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the existing policy configuration to be updated. */ - replaceDashboard(dashboard, teamContext, dashboardId) { + updatePolicyConfiguration(configuration, project, configurationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team, - dashboardId: dashboardId + configurationId: configurationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, dashboard, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + res = yield this.rest.replace(url, configuration, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); resolve(ret); } catch (err) { @@ -13226,31 +25259,25 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content. + * Gets the present evaluation state of a policy. * - * @param {DashboardInterfaces.DashboardGroup} group - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} project - Project ID or project name + * @param {string} evaluationId - ID of the policy evaluation to be retrieved. */ - replaceDashboards(group, teamContext) { + getPolicyEvaluation(project, evaluationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team + evaluationId: evaluationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "46aecb7a-5d2c-4647-897b-0209505a9fe4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, group, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.DashboardGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false); resolve(ret); } catch (err) { @@ -13260,33 +25287,25 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Create a widget on the specified dashboard. + * Requeue the policy evaluation. * - * @param {DashboardInterfaces.Widget} widget - State of the widget to add - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} dashboardId - ID of dashboard the widget will be added to. + * @param {string} project - Project ID or project name + * @param {string} evaluationId - ID of the policy evaluation to be retrieved. */ - createWidget(widget, teamContext, dashboardId) { + requeuePolicyEvaluation(project, evaluationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team, - dashboardId: dashboardId + evaluationId: evaluationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "46aecb7a-5d2c-4647-897b-0209505a9fe4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, widget, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false); resolve(ret); } catch (err) { @@ -13296,71 +25315,36 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Delete the specified widget. + * Retrieves a list of all the policy evaluation statuses for a specific pull request. * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} dashboardId - ID of the dashboard containing the widget. - * @param {string} widgetId - ID of the widget to update. + * @param {string} project - Project ID or project name + * @param {string} artifactId - A string which uniquely identifies the target of a policy evaluation. + * @param {boolean} includeNotApplicable - Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request. + * @param {number} top - The number of policy evaluation records to retrieve. + * @param {number} skip - The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. */ - deleteWidget(teamContext, dashboardId, widgetId) { + getPolicyEvaluations(project, artifactId, includeNotApplicable, top, skip) { return __awaiter(this, void 0, void 0, function* () { + if (artifactId == null) { + throw new TypeError('artifactId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { - project: project, - team: team, - dashboardId: dashboardId, - widgetId: widgetId + project: project }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Get the current state of the specified widget. - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} dashboardId - ID of the dashboard containing the widget. - * @param {string} widgetId - ID of the widget to read. - */ - getWidget(teamContext, dashboardId, widgetId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - dashboardId: dashboardId, - widgetId: widgetId + let queryValues = { + artifactId: artifactId, + includeNotApplicable: includeNotApplicable, + '$top': top, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "c23ddff5-229c-4d04-a80b-0fdce9f360c8", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, true); resolve(ret); } catch (err) { @@ -13370,35 +25354,27 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Override the state of the specified widget. + * Retrieve a specific revision of a given policy by ID. * - * @param {DashboardInterfaces.Widget} widget - State to be written for the widget. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} dashboardId - ID of the dashboard containing the widget. - * @param {string} widgetId - ID of the widget to update. + * @param {string} project - Project ID or project name + * @param {number} configurationId - The policy configuration ID. + * @param {number} revisionId - The revision ID. */ - replaceWidget(widget, teamContext, dashboardId, widgetId) { + getPolicyConfigurationRevision(project, configurationId, revisionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team, - dashboardId: dashboardId, - widgetId: widgetId + configurationId: configurationId, + revisionId: revisionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "fe1e68a2-60d3-43cb-855b-85e41ae97c95", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, widget, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); resolve(ret); } catch (err) { @@ -13408,35 +25384,31 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Perform a partial update of the specified widget. + * Retrieve all revisions for a given policy. * - * @param {DashboardInterfaces.Widget} widget - Description of the widget changes to apply. All non-null fields will be replaced. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} dashboardId - ID of the dashboard containing the widget. - * @param {string} widgetId - ID of the widget to update. + * @param {string} project - Project ID or project name + * @param {number} configurationId - The policy configuration ID. + * @param {number} top - The number of revisions to retrieve. + * @param {number} skip - The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. */ - updateWidget(widget, teamContext, dashboardId, widgetId) { + getPolicyConfigurationRevisions(project, configurationId, top, skip) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team, - dashboardId: dashboardId, - widgetId: widgetId + configurationId: configurationId + }; + let queryValues = { + '$top': top, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "fe1e68a2-60d3-43cb-855b-85e41ae97c95", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, widget, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true); resolve(ret); } catch (err) { @@ -13446,25 +25418,25 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Get the widget metadata satisfying the specified contribution ID. + * Retrieve a specific policy type by ID. * - * @param {string} contributionId - The ID of Contribution for the Widget * @param {string} project - Project ID or project name + * @param {string} typeId - The policy ID. */ - getWidgetMetadata(contributionId, project) { + getPolicyType(project, typeId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - contributionId: contributionId + typeId: typeId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Dashboard", "6b3628d3-e96f-4fc7-b176-50240b03b515", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "44096322-2d3d-466a-bb30-d1b7de69f61f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.WidgetMetadataResponse, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -13474,30 +25446,23 @@ class DashboardApi extends basem.ClientApiBase { }); } /** - * Get all available widget metadata in alphabetical order, including widgets marked with isVisibleFromCatalog == false. + * Retrieve all available policy types. * - * @param {DashboardInterfaces.WidgetScope} scope * @param {string} project - Project ID or project name */ - getWidgetTypes(scope, project) { + getPolicyTypes(project) { return __awaiter(this, void 0, void 0, function* () { - if (scope == null) { - throw new TypeError('scope can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - '$scope': scope, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Dashboard", "6b3628d3-e96f-4fc7-b176-50240b03b515", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "44096322-2d3d-466a-bb30-d1b7de69f61f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.WidgetTypesResponse, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -13507,26 +25472,26 @@ class DashboardApi extends basem.ClientApiBase { }); } } -DashboardApi.RESOURCE_AREA_ID = "31c84e0a-3ece-48fd-a29d-100849af99ba"; -exports.DashboardApi = DashboardApi; +PolicyApi.RESOURCE_AREA_ID = "fb13a388-40dd-4a04-b530-013a739c72ef"; +exports.PolicyApi = PolicyApi; /***/ }), -/***/ 4605: +/***/ 98101: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; /* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } @@ -13536,67 +25501,32 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const ExtensionManagementInterfaces = __nccwpck_require__(7357); -const GalleryInterfaces = __nccwpck_require__(8905); -class ExtensionManagementApi extends basem.ClientApiBase { +const basem = __nccwpck_require__(80273); +const ProfileInterfaces = __nccwpck_require__(40879); +class ProfileApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-ExtensionManagement-api', options); + super(baseUrl, handlers, 'node-Profile-api', options); } /** - * @param {string} itemId - * @param {boolean} testCommerce - * @param {boolean} isFreeOrTrialInstall - * @param {boolean} isAccountOwner - * @param {boolean} isLinked - * @param {boolean} isConnectedServer - * @param {boolean} isBuyOperationValid - */ - getAcquisitionOptions(itemId, testCommerce, isFreeOrTrialInstall, isAccountOwner, isLinked, isConnectedServer, isBuyOperationValid) { + * @param {string} id + * @param {string} descriptor + */ + deleteProfileAttribute(id, descriptor) { return __awaiter(this, void 0, void 0, function* () { - if (itemId == null) { - throw new TypeError('itemId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + id: id + }; let queryValues = { - itemId: itemId, - testCommerce: testCommerce, - isFreeOrTrialInstall: isFreeOrTrialInstall, - isAccountOwner: isAccountOwner, - isLinked: isLinked, - isConnectedServer: isConnectedServer, - isBuyOperationValid: isBuyOperationValid, + descriptor: descriptor, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "288dff58-d13b-468e-9671-0fb754e9398c", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.AcquisitionOptions, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * @param {ExtensionManagementInterfaces.ExtensionAcquisitionRequest} acquisitionRequest - */ - requestAcquisition(acquisitionRequest) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "da616457-eed3-4672-92d7-18d21f5c1658", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, acquisitionRequest, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionAcquisitionRequest, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -13606,23 +25536,25 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - */ - getAuditLog(publisherName, extensionName) { + * @param {string} id + * @param {string} descriptor + */ + getProfileAttribute(id, descriptor) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + id: id + }; + let queryValues = { + descriptor: descriptor, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "23a312e0-562d-42fb-a505-5a046b5635db", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionAuditLog, false); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.ProfileAttribute, false); resolve(ret); } catch (err) { @@ -13632,58 +25564,33 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} registrationId - */ - registerAuthorization(publisherName, extensionName, registrationId) { + * @param {string} id + * @param {string} partition + * @param {string} modifiedSince + * @param {string} modifiedAfterRevision + * @param {boolean} withCoreAttributes + * @param {string} coreAttributes + */ + getProfileAttributes(id, partition, modifiedSince, modifiedAfterRevision, withCoreAttributes, coreAttributes) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - registrationId: registrationId + id: id }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f21cfc80-d2d2-4248-98bb-7820c74c4606", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * @param {any} doc - * @param {string} publisherName - * @param {string} extensionName - * @param {string} scopeType - * @param {string} scopeValue - * @param {string} collectionName - */ - createDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - scopeType: scopeType, - scopeValue: scopeValue, - collectionName: collectionName + let queryValues = { + partition: partition, + modifiedSince: modifiedSince, + modifiedAfterRevision: modifiedAfterRevision, + withCoreAttributes: withCoreAttributes, + coreAttributes: coreAttributes, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, doc, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.ProfileAttribute, true); resolve(ret); } catch (err) { @@ -13693,30 +25600,25 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} scopeType - * @param {string} scopeValue - * @param {string} collectionName - * @param {string} documentId - */ - deleteDocumentByName(publisherName, extensionName, scopeType, scopeValue, collectionName, documentId) { + * @param {any} container + * @param {string} id + * @param {string} descriptor + */ + setProfileAttribute(container, id, descriptor) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - scopeType: scopeType, - scopeValue: scopeValue, - collectionName: collectionName, - documentId: documentId + id: id + }; + let queryValues = { + descriptor: descriptor, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.replace(url, container, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -13727,30 +25629,21 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} scopeType - * @param {string} scopeValue - * @param {string} collectionName - * @param {string} documentId - */ - getDocumentByName(publisherName, extensionName, scopeType, scopeValue, collectionName, documentId) { + * @param {VSSInterfaces.VssJsonCollectionWrapperV[]>} attributesCollection + * @param {string} id + */ + setProfileAttributes(attributesCollection, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - scopeType: scopeType, - scopeValue: scopeValue, - collectionName: collectionName, - documentId: documentId + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.update(url, attributesCollection, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -13761,29 +25654,27 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} scopeType - * @param {string} scopeValue - * @param {string} collectionName - */ - getDocumentsByName(publisherName, extensionName, scopeType, scopeValue, collectionName) { + * @param {string} id + * @param {string} size + * @param {string} format + */ + getAvatar(id, size, format) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - scopeType: scopeType, - scopeValue: scopeValue, - collectionName: collectionName + id: id + }; + let queryValues = { + size: size, + format: format, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false); resolve(ret); } catch (err) { @@ -13793,30 +25684,30 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {any} doc - * @param {string} publisherName - * @param {string} extensionName - * @param {string} scopeType - * @param {string} scopeValue - * @param {string} collectionName - */ - setDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { + * @param {any} container + * @param {string} id + * @param {string} size + * @param {string} format + * @param {string} displayName + */ + getAvatarPreview(container, id, size, format, displayName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - scopeType: scopeType, - scopeValue: scopeValue, - collectionName: collectionName + id: id + }; + let queryValues = { + size: size, + format: format, + displayName: displayName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, doc, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, container, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false); resolve(ret); } catch (err) { @@ -13826,29 +25717,20 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {any} doc - * @param {string} publisherName - * @param {string} extensionName - * @param {string} scopeType - * @param {string} scopeValue - * @param {string} collectionName - */ - updateDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { + * @param {string} id + */ + resetAvatar(id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - scopeType: scopeType, - scopeValue: scopeValue, - collectionName: collectionName + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, doc, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -13859,26 +25741,22 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * Query for one or more data collections for the specified extension. Note: the token used for authorization must have been issued on behalf of the specified extension. - * - * @param {ExtensionManagementInterfaces.ExtensionDataCollectionQuery} collectionQuery - * @param {string} publisherName - Name of the publisher. Example: "fabrikam". - * @param {string} extensionName - Name of the extension. Example: "ops-tools". - */ - queryCollectionsByName(collectionQuery, publisherName, extensionName) { + * @param {any} container + * @param {string} id + */ + setAvatar(container, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "56c331f1-ce53-4318-adfd-4db5c52a7a2e", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, collectionQuery, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.replace(url, container, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -13888,52 +25766,24 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * List state and version information for all installed extensions. - * - * @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results. - * @param {boolean} includeErrors - If true, include installed extensions in an error state in the results. - * @param {boolean} includeInstallationIssues - * @param {boolean} forceRefresh - */ - getStates(includeDisabled, includeErrors, includeInstallationIssues, forceRefresh) { + * Lookup up country/region based on provided IPv4, null if using the remote IPv4 address. + * + * @param {string} ipaddress - IPv4 address to be used for reverse lookup, null if using RemoteIPAddress in request context + */ + getGeoRegion(ipaddress) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; let queryValues = { - includeDisabled: includeDisabled, - includeErrors: includeErrors, - includeInstallationIssues: includeInstallationIssues, - forceRefresh: forceRefresh, + ipaddress: ipaddress, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "92755d3d-9a8a-42b3-8a4d-87359fe5aa93", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "3bcda9c0-3078-48a5-a1e0-83bd05931ad0", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionState, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * @param {ExtensionManagementInterfaces.InstalledExtensionQuery} query - */ - queryExtensions(query) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "046c980f-1345-4ce2-bf85-b46d10ff4cfd", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, query, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -13943,54 +25793,25 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * List the installed extensions in the account / project collection. - * - * @param {boolean} includeDisabledExtensions - If true (the default), include disabled extensions in the results. - * @param {boolean} includeErrors - If true, include installed extensions with errors. - * @param {string[]} assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. - * @param {boolean} includeInstallationIssues - */ - getInstalledExtensions(includeDisabledExtensions, includeErrors, assetTypes, includeInstallationIssues) { + * Create profile + * + * @param {ProfileInterfaces.CreateProfileContext} createProfileContext - Context for profile creation + * @param {boolean} autoCreate - Create profile automatically + */ + createProfile(createProfileContext, autoCreate) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; let queryValues = { - includeDisabledExtensions: includeDisabledExtensions, - includeErrors: includeErrors, - assetTypes: assetTypes && assetTypes.join(":"), - includeInstallationIssues: includeInstallationIssues, + autoCreate: autoCreate, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "275424d0-c844-4fe2-bda6-04933a1357d8", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Update an installed extension. Typically this API is used to enable or disable an extension. - * - * @param {ExtensionManagementInterfaces.InstalledExtension} extension - */ - updateInstalledExtension(extension) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "275424d0-c844-4fe2-bda6-04933a1357d8", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, extension, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + res = yield this.rest.create(url, createProfileContext, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); resolve(ret); } catch (err) { @@ -14000,29 +25821,33 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * Get an installed extension by its publisher and extension name. - * - * @param {string} publisherName - Name of the publisher. Example: "fabrikam". - * @param {string} extensionName - Name of the extension. Example: "ops-tools". - * @param {string[]} assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. - */ - getInstalledExtensionByName(publisherName, extensionName, assetTypes) { + * @param {string} id + * @param {boolean} details + * @param {boolean} withAttributes + * @param {string} partition + * @param {string} coreAttributes + * @param {boolean} forceRefresh + */ + getProfile(id, details, withAttributes, partition, coreAttributes, forceRefresh) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + id: id }; let queryValues = { - assetTypes: assetTypes && assetTypes.join(":"), + details: details, + withAttributes: withAttributes, + partition: partition, + coreAttributes: coreAttributes, + forceRefresh: forceRefresh, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); resolve(ret); } catch (err) { @@ -14032,27 +25857,24 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * Install the specified extension into the account / project collection. - * - * @param {string} publisherName - Name of the publisher. Example: "fabrikam". - * @param {string} extensionName - Name of the extension. Example: "ops-tools". - * @param {string} version - */ - installExtensionByName(publisherName, extensionName, version) { + * Update profile + * + * @param {ProfileInterfaces.Profile} profile - Update profile + * @param {string} id - Profile ID + */ + updateProfile(profile, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + res = yield this.rest.update(url, profile, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -14062,30 +25884,17 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * Uninstall the specified extension from the account / project collection. - * - * @param {string} publisherName - Name of the publisher. Example: "fabrikam". - * @param {string} extensionName - Name of the extension. Example: "ops-tools". - * @param {string} reason - * @param {string} reasonCode - */ - uninstallExtensionByName(publisherName, extensionName, reason, reasonCode) { + */ + getRegions() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - let queryValues = { - reason: reason, - reasonCode: reasonCode, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "92d8d1c9-26b8-4774-a929-d640a73da524", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -14096,21 +25905,18 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} userId - */ - getPolicies(userId) { + */ + getSupportedLcids() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - userId: userId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "e5cc8c09-407b-4867-8319-2ae3338cbf6f", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "d5bd1aa6-c269-4bcd-ad32-75fa17475584", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.UserExtensionPolicy, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -14120,33 +25926,22 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} rejectMessage - * @param {string} publisherName - * @param {string} extensionName - * @param {string} requesterId - * @param {ExtensionManagementInterfaces.ExtensionRequestState} state - */ - resolveRequest(rejectMessage, publisherName, extensionName, requesterId, state) { + * @param {boolean} includeAvatar + */ + getUserDefaults(includeAvatar) { return __awaiter(this, void 0, void 0, function* () { - if (state == null) { - throw new TypeError('state can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - requesterId: requesterId - }; + let routeValues = {}; let queryValues = { - state: state, + includeAvatar: includeAvatar, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "aa93e1f3-511c-4364-8b9c-eb98818f2e0b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "b583a356-1da7-4237-9f4c-1deb2edbc7e8", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, rejectMessage, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); resolve(ret); } catch (err) { @@ -14156,18 +25951,21 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - */ - getRequests() { + * @param {string} id + */ + refreshUserDefaults(id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + id: id + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "216b978f-b164-424e-ada2-b77561e842b7", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "b583a356-1da7-4237-9f4c-1deb2edbc7e8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.RequestedExtension, true); + res = yield this.rest.replace(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); resolve(ret); } catch (err) { @@ -14176,32 +25974,57 @@ class ExtensionManagementApi extends basem.ClientApiBase { })); }); } +} +exports.ProfileApi = ProfileApi; + + +/***/ }), + +/***/ 21682: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const ProjectAnalysisInterfaces = __nccwpck_require__(84323); +class ProjectAnalysisApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-ProjectAnalysis-api', options); + } /** - * @param {string} rejectMessage - * @param {string} publisherName - * @param {string} extensionName - * @param {ExtensionManagementInterfaces.ExtensionRequestState} state + * @param {string} project - Project ID or project name */ - resolveAllRequests(rejectMessage, publisherName, extensionName, state) { + getProjectLanguageAnalytics(project) { return __awaiter(this, void 0, void 0, function* () { - if (state == null) { - throw new TypeError('state can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - let queryValues = { - state: state, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "ba93e1f3-511c-4364-8b9c-eb98818f2e0b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "5b02a779-1867-433f-90b7-d23ed5e33e57", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, rejectMessage, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectLanguageAnalytics, false); resolve(ret); } catch (err) { @@ -14211,23 +26034,33 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName + * @param {string} project - Project ID or project name + * @param {Date} fromDate + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType */ - deleteRequest(publisherName, extensionName) { + getProjectActivityMetrics(project, fromDate, aggregationType) { return __awaiter(this, void 0, void 0, function* () { + if (fromDate == null) { + throw new TypeError('fromDate can not be null or undefined'); + } + if (aggregationType == null) { + throw new TypeError('aggregationType can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + project: project + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f5afca1e-a728-4294-aa2d-4af0173431b5", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "e40ae584-9ea6-4f06-a7c7-6284651b466b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectActivityMetrics, false); resolve(ret); } catch (err) { @@ -14237,24 +26070,45 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} requestMessage + * Retrieves git activity metrics for repositories matching a specified criteria. + * + * @param {string} project - Project ID or project name + * @param {Date} fromDate - Date from which, the trends are to be fetched. + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType - Bucket size on which, trends are to be aggregated. + * @param {number} skip - The number of repositories to ignore. + * @param {number} top - The number of repositories for which activity metrics are to be retrieved. */ - requestExtension(publisherName, extensionName, requestMessage) { + getGitRepositoriesActivityMetrics(project, fromDate, aggregationType, skip, top) { return __awaiter(this, void 0, void 0, function* () { + if (fromDate == null) { + throw new TypeError('fromDate can not be null or undefined'); + } + if (aggregationType == null) { + throw new TypeError('aggregationType can not be null or undefined'); + } + if (skip == null) { + throw new TypeError('skip can not be null or undefined'); + } + if (top == null) { + throw new TypeError('top can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + project: project + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, + '$skip': skip, + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f5afca1e-a728-4294-aa2d-4af0173431b5", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "df7fbbca-630a-40e3-8aa3-7a3faf66947e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, requestMessage, options); - let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.RequestedExtension, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, true); resolve(ret); } catch (err) { @@ -14264,18 +26118,35 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } /** + * @param {string} project - Project ID or project name + * @param {string} repositoryId + * @param {Date} fromDate + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType */ - getToken() { + getRepositoryActivityMetrics(project, repositoryId, fromDate, aggregationType) { return __awaiter(this, void 0, void 0, function* () { + if (fromDate == null) { + throw new TypeError('fromDate can not be null or undefined'); + } + if (aggregationType == null) { + throw new TypeError('aggregationType can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "3a2e24ed-1d6f-4cb2-9f3b-45a96bbfaf50", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "df7fbbca-630a-40e3-8aa3-7a3faf66947e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, false); resolve(ret); } catch (err) { @@ -14285,13 +26156,13 @@ class ExtensionManagementApi extends basem.ClientApiBase { }); } } -ExtensionManagementApi.RESOURCE_AREA_ID = "6c2b0933-3600-42ae-bf8b-93d4f7e83594"; -exports.ExtensionManagementApi = ExtensionManagementApi; +ProjectAnalysisApi.RESOURCE_AREA_ID = "7658fa33-b1bf-4580-990f-fac5896773d3"; +exports.ProjectAnalysisApi = ProjectAnalysisApi; /***/ }), -/***/ 3193: +/***/ 63075: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -14314,30 +26185,32 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const FeatureManagementInterfaces = __nccwpck_require__(7278); -class FeatureManagementApi extends basem.ClientApiBase { +const basem = __nccwpck_require__(80273); +const ReleaseInterfaces = __nccwpck_require__(47421); +class ReleaseApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-FeatureManagement-api', options); + super(baseUrl, handlers, 'node-Release-api', options); } /** - * Get a specific feature by its id + * Returns the artifact details that automation agent requires * - * @param {string} featureId - The contribution id of the feature + * @param {string} project - Project ID or project name + * @param {number} releaseId */ - getFeature(featureId) { + getAgentArtifactDefinitions(project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - featureId: featureId + project: project, + releaseId: releaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "c4209f25-7a27-41dd-9f04-06080c7b6afd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "f2571c27-bf50-4938-b396-32d109ddef26", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AgentArtifactDefinition, true); resolve(ret); } catch (err) { @@ -14347,24 +26220,41 @@ class FeatureManagementApi extends basem.ClientApiBase { }); } /** - * Get a list of all defined features + * Get a list of approvals * - * @param {string} targetContributionId - Optional target contribution. If null/empty, return all features. If specified include the features that target the specified contribution. + * @param {string} project - Project ID or project name + * @param {string} assignedToFilter - Approvals assigned to this user. + * @param {ReleaseInterfaces.ApprovalStatus} statusFilter - Approvals with this status. Default is 'pending'. + * @param {number[]} releaseIdsFilter - Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4. + * @param {ReleaseInterfaces.ApprovalType} typeFilter - Approval with this type. + * @param {number} top - Number of approvals to get. Default is 50. + * @param {number} continuationToken - Gets the approvals after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created approvals. Default is 'descending'. + * @param {boolean} includeMyGroupApprovals - 'true' to include my group approvals. Default is 'false'. */ - getFeatures(targetContributionId) { + getApprovals(project, assignedToFilter, statusFilter, releaseIdsFilter, typeFilter, top, continuationToken, queryOrder, includeMyGroupApprovals) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; let queryValues = { - targetContributionId: targetContributionId, + assignedToFilter: assignedToFilter, + statusFilter: statusFilter, + releaseIdsFilter: releaseIdsFilter && releaseIdsFilter.join(","), + typeFilter: typeFilter, + top: top, + continuationToken: continuationToken, + queryOrder: queryOrder, + includeMyGroupApprovals: includeMyGroupApprovals, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "c4209f25-7a27-41dd-9f04-06080c7b6afd", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "b47c6458-e73b-47cb-a770-4df1e8813a91", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, true); resolve(ret); } catch (err) { @@ -14374,25 +26264,25 @@ class FeatureManagementApi extends basem.ClientApiBase { }); } /** - * Get the state of the specified feature for the given user/all-users scope + * Get approval history. * - * @param {string} featureId - Contribution id of the feature - * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {string} project - Project ID or project name + * @param {number} approvalStepId - Id of the approval. */ - getFeatureState(featureId, userScope) { + getApprovalHistory(project, approvalStepId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - featureId: featureId, - userScope: userScope + project: project, + approvalStepId: approvalStepId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "98911314-3f9b-4eaf-80e8-83900d8e85d9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "250c7158-852e-4130-a00f-a0cce9b72d05", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); resolve(ret); } catch (err) { @@ -14402,32 +26292,29 @@ class FeatureManagementApi extends basem.ClientApiBase { }); } /** - * Set the state of a feature + * Get an approval. * - * @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value. - * @param {string} featureId - Contribution id of the feature - * @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. - * @param {string} reason - Reason for changing the state - * @param {string} reasonCode - Short reason code + * @param {string} project - Project ID or project name + * @param {number} approvalId - Id of the approval. + * @param {boolean} includeHistory - 'true' to include history of the approval. Default is 'false'. */ - setFeatureState(feature, featureId, userScope, reason, reasonCode) { + getApproval(project, approvalId, includeHistory) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - featureId: featureId, - userScope: userScope + project: project, + approvalId: approvalId }; let queryValues = { - reason: reason, - reasonCode: reasonCode, + includeHistory: includeHistory, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "98911314-3f9b-4eaf-80e8-83900d8e85d9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "9328e074-59fb-465a-89d9-b09c82ee5109", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, feature, options); - let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); resolve(ret); } catch (err) { @@ -14437,29 +26324,26 @@ class FeatureManagementApi extends basem.ClientApiBase { }); } /** - * Get the state of the specified feature for the given named scope + * Update status of an approval * - * @param {string} featureId - Contribution id of the feature - * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. - * @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team") - * @param {string} scopeValue - Value of the scope (e.g. the project or team id) + * @param {ReleaseInterfaces.ReleaseApproval} approval - ReleaseApproval object having status, approver and comments. + * @param {string} project - Project ID or project name + * @param {number} approvalId - Id of the approval. */ - getFeatureStateForScope(featureId, userScope, scopeName, scopeValue) { + updateReleaseApproval(approval, project, approvalId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - featureId: featureId, - userScope: userScope, - scopeName: scopeName, - scopeValue: scopeValue + project: project, + approvalId: approvalId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "dd291e43-aa9f-4cee-8465-a93c78e414a4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "9328e074-59fb-465a-89d9-b09c82ee5109", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + res = yield this.rest.update(url, approval, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); resolve(ret); } catch (err) { @@ -14469,36 +26353,22 @@ class FeatureManagementApi extends basem.ClientApiBase { }); } /** - * Set the state of a feature at a specific scope - * - * @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value. - * @param {string} featureId - Contribution id of the feature - * @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. - * @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team") - * @param {string} scopeValue - Value of the scope (e.g. the project or team id) - * @param {string} reason - Reason for changing the state - * @param {string} reasonCode - Short reason code + * @param {ReleaseInterfaces.ReleaseApproval[]} approvals + * @param {string} project - Project ID or project name */ - setFeatureStateForScope(feature, featureId, userScope, scopeName, scopeValue, reason, reasonCode) { + updateReleaseApprovals(approvals, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - featureId: featureId, - userScope: userScope, - scopeName: scopeName, - scopeValue: scopeValue - }; - let queryValues = { - reason: reason, - reasonCode: reasonCode, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "dd291e43-aa9f-4cee-8465-a93c78e414a4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "c957584a-82aa-4131-8222-6d47f78bfa7a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, feature, options); - let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + res = yield this.rest.update(url, approvals, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, true); resolve(ret); } catch (err) { @@ -14508,22 +26378,36 @@ class FeatureManagementApi extends basem.ClientApiBase { }); } /** - * Get the effective state for a list of feature ids + * Get a task attachment. * - * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Features to query along with current scope values + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} recordId - Record Id of attachment. + * @param {string} type - Type of the attachment. + * @param {string} name - Name of the attachment. */ - queryFeatureStates(query) { + getTaskAttachmentContent(project, releaseId, environmentId, attemptId, timelineId, recordId, type, name) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "2b4486ad-122b-400c-ae65-17b6672c1f9d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c4071f6d-3697-46ca-858e-8b10ff09e52f", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, query, options); - let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -14532,24 +26416,73 @@ class FeatureManagementApi extends basem.ClientApiBase { }); } /** - * Get the states of the specified features for the default scope + * Get a release task attachment. * - * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query. - * @param {string} userScope + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} planId - Plan Id of the deploy phase. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} recordId - Record Id of attachment. + * @param {string} type - Type of the attachment. + * @param {string} name - Name of the attachment. */ - queryFeatureStatesForDefaultScope(query, userScope) { + getReleaseTaskAttachmentContent(project, releaseId, environmentId, attemptId, planId, timelineId, recordId, type, name) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - userScope: userScope + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "3f810f28-03e2-4239-b0bc-788add3005e5", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "60b86efb-7b8c-4853-8f9f-aa142b77b479", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the task attachments. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} type - Type of the attachment. + */ + getTaskAttachments(project, releaseId, environmentId, attemptId, timelineId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "214111ee-2415-4df2-8ed2-74417f7d61f9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, query, options); - let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTaskAttachment, true); resolve(ret); } catch (err) { @@ -14559,28 +26492,33 @@ class FeatureManagementApi extends basem.ClientApiBase { }); } /** - * Get the states of the specified features for the specific named scope + * Get the release task attachments. * - * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query. - * @param {string} userScope - * @param {string} scopeName - * @param {string} scopeValue + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} planId - Plan Id of the deploy phase. + * @param {string} type - Type of the attachment. */ - queryFeatureStatesForNamedScope(query, userScope, scopeName, scopeValue) { + getReleaseTaskAttachments(project, releaseId, environmentId, attemptId, planId, type) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - userScope: userScope, - scopeName: scopeName, - scopeValue: scopeValue + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + planId: planId, + type: type }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "f29e997b-c2da-4d15-8380-765788a1a74c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "a4d06688-0dfa-4895-82a5-f43ec9452306", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, query, options); - let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTaskAttachment, true); resolve(ret); } catch (err) { @@ -14589,109 +26527,40 @@ class FeatureManagementApi extends basem.ClientApiBase { })); }); } -} -exports.FeatureManagementApi = FeatureManagementApi; - - -/***/ }), - -/***/ 7558: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* -* --------------------------------------------------------- -* Copyright(C) Microsoft Corporation. All rights reserved. -* --------------------------------------------------------- -* -* --------------------------------------------------------- -* Generated file, DO NOT EDIT -* --------------------------------------------------------- -*/ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -const stream = __nccwpck_require__(2781); -const zlib = __nccwpck_require__(9796); -const httpm = __nccwpck_require__(5538); -const FileContainerApiBase = __nccwpck_require__(5145); -const FileContainerInterfaces = __nccwpck_require__(6110); -class FileContainerApi extends FileContainerApiBase.FileContainerApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, options); - } /** - * @param {number} containerId - * @param {string} scope - * @param {string} itemPath - * @param {string} downloadFileName + * @param {string} artifactType + * @param {string} sourceId + * @param {string} artifactVersionId + * @param {string} project - Project ID or project name */ - getItem(containerId, scope, itemPath, downloadFileName) { + getAutoTriggerIssues(artifactType, sourceId, artifactVersionId, project) { return __awaiter(this, void 0, void 0, function* () { + if (artifactType == null) { + throw new TypeError('artifactType can not be null or undefined'); + } + if (sourceId == null) { + throw new TypeError('sourceId can not be null or undefined'); + } + if (artifactVersionId == null) { + throw new TypeError('artifactVersionId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - containerId: containerId + project: project }; let queryValues = { - scope: scope, - itemPath: itemPath, - '$format': "OctetStream", - downloadFileName: downloadFileName + artifactType: artifactType, + sourceId: sourceId, + artifactVersionId: artifactVersionId, }; try { - let verData = yield this.vsoClient.getVersioningData("4.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c1a68497-69da-40fb-9423-cab19cfeeca9", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/octet-stream', verData.apiVersion); - let res = yield this.http.get(url); - let rres = {}; - let statusCode = res.message.statusCode; - rres.statusCode = statusCode; - // not found leads to null obj returned - if (statusCode == httpm.HttpCodes.NotFound) { - resolve(rres); - } - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - let contents = yield res.readBody(); - let obj; - if (contents && contents.length > 0) { - obj = JSON.parse(contents); - if (options && options.responseProcessor) { - rres.result = options.responseProcessor(obj); - } - else { - rres.result = obj; - } - } - if (obj && obj.message) { - msg = obj.message; - } - else { - msg = "Failed request: (" + statusCode + ") " + res.message.url; - } - reject(new Error(msg)); - } - else { - // if the response is gzipped, unzip it - if (res.message.headers["content-encoding"] === "gzip") { - let unzipStream = zlib.createGunzip(); - res.message.pipe(unzipStream); - rres.result = unzipStream; - } - else { - rres.result = res.message; - } - resolve(rres); - } + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AutoTriggerIssue, true); + resolve(ret); } catch (err) { reject(err); @@ -14699,197 +26568,64 @@ class FileContainerApi extends FileContainerApiBase.FileContainerApiBase { })); }); } - createItem(contentStream, uncompressedLength, containerId, itemPath, scope, options) { - return new Promise((resolve, reject) => { - let chunkStream = new ChunkStream(this, uncompressedLength, containerId, itemPath, scope, options); - chunkStream.on('finish', () => { - resolve(chunkStream.getItem()); - }); - contentStream.pipe(chunkStream); - }); - } - // used by ChunkStream - _createItem(customHeaders, contentStream, containerId, itemPath, scope, onResult) { - var routeValues = { - containerId: containerId - }; - var queryValues = { - itemPath: itemPath, - scope: scope, - }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = ""; - this.vsoClient.getVersioningData("4.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues) - .then((versioningData) => { - var url = versioningData.requestUrl; - var serializationData = { responseTypeMetadata: FileContainerInterfaces.TypeInfo.FileContainerItem, responseIsCollection: false }; - let options = this.createRequestOptions('application/octet-stream', versioningData.apiVersion); - options.additionalHeaders = customHeaders; - this.rest.uploadStream('PUT', url, contentStream, options) - .then((res) => { - let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, false); - onResult(null, res.statusCode, ret); - }) - .catch((err) => { - onResult(err, err.statusCode, null); - }); - }, (error) => { - onResult(error, error.statusCode, null); - }); - } -} -exports.FileContainerApi = FileContainerApi; -class ChunkStream extends stream.Writable { - constructor(api, uncompressedLength, containerId, itemPath, scope, options) { - super(); - this._buffer = new Buffer(ChunkStream.ChunkSize); - this._length = 0; - this._startRange = 0; - this._bytesToSend = 0; - this._totalReceived = 0; - this._api = api; - this._options = options || {}; - this._uncompressedLength = uncompressedLength; - this._containerId = containerId; - this._itemPath = itemPath; - this._scope = scope; - this._bytesToSend = this._options.isGzipped ? this._options.compressedLength : uncompressedLength; - } - _write(data, encoding, callback) { - let chunk = data; - if (!chunk) { - if (this._length == 0) { - callback(); - } - else { - // last chunk - this._sendChunk(callback); - } - return; - } - let newBuffer = null; - if (this._length + chunk.length > ChunkStream.ChunkSize) { - // overflow - let overflowPosition = chunk.length - (ChunkStream.ChunkSize - this._length); - chunk.copy(this._buffer, this._length, 0, overflowPosition); - this._length += overflowPosition; - newBuffer = chunk.slice(overflowPosition); - } - else { - chunk.copy(this._buffer, this._length, 0, chunk.length); - this._length += chunk.length; - } - this._totalReceived += chunk.length; - if (this._length >= ChunkStream.ChunkSize || this._totalReceived >= this._bytesToSend) { - this._sendChunk(callback, newBuffer); - } - else { - callback(); - } - } - _sendChunk(callback, newBuffer) { - let endRange = this._startRange + this._length; - let headers = { - "Content-Range": "bytes " + this._startRange + "-" + (endRange - 1) + "/" + this._bytesToSend, - "Content-Length": this._length - }; - if (this._options.isGzipped) { - headers["Accept-Encoding"] = "gzip"; - headers["Content-Encoding"] = "gzip"; - headers["x-tfs-filelength"] = this._uncompressedLength; - } - this._startRange = endRange; - this._api._createItem(headers, new BufferStream(this._buffer, this._length), this._containerId, this._itemPath, this._scope, (err, statusCode, item) => { - if (newBuffer) { - this._length = newBuffer.length; - newBuffer.copy(this._buffer); - } - else { - this._length = 0; - } - this._item = item; - callback(err); + /** + * Gets a badge that indicates the status of the most recent deployment for an environment. + * + * @param {string} projectId - The ID of the Project. + * @param {number} releaseDefinitionId - The ID of the Release Definition. + * @param {number} environmentId - The ID of the Environment. + * @param {string} branchName - The name of the branch. + */ + getDeploymentBadge(projectId, releaseDefinitionId, environmentId, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + releaseDefinitionId: releaseDefinitionId, + environmentId: environmentId, + branchName: branchName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "1a60a35d-b8c9-45fb-bf67-da0829711147", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); }); } - getItem() { - return this._item; - } -} -ChunkStream.ChunkSize = (16 * 1024 * 1024); -class BufferStream extends stream.Readable { - constructor(buffer, length) { - super(); - this._position = 0; - this._length = 0; - this._buffer = buffer; - this._length = length; - } - _read(size) { - if (this._position >= this._length) { - this.push(null); - return; - } - let end = Math.min(this._position + size, this._length); - this.push(this._buffer.slice(this._position, end)); - this._position = end; - } -} - - -/***/ }), - -/***/ 5145: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const FileContainerInterfaces = __nccwpck_require__(6110); -class FileContainerApiBase extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-FileContainer-api', options); - } /** - * Creates the specified items in the referenced container. - * - * @param {VSSInterfaces.VssJsonCollectionWrapperV} items - * @param {number} containerId - * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param {string} artifactAlias */ - createItems(items, containerId, scope) { + getReleaseChanges(project, releaseId, baseReleaseId, top, artifactAlias) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - containerId: containerId + project: project, + releaseId: releaseId }; let queryValues = { - scope: scope, + baseReleaseId: baseReleaseId, + '$top': top, + artifactAlias: artifactAlias, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "8dcf9fe9-ca37-4113-8ee1-37928e98407c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, items, options); - let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Change, true); resolve(ret); } catch (err) { @@ -14899,32 +26635,27 @@ class FileContainerApiBase extends basem.ClientApiBase { }); } /** - * Deletes the specified items in a container. - * - * @param {number} containerId - Container Id. - * @param {string} itemPath - Path to delete. - * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {string[]} propertyFilters */ - deleteItem(containerId, itemPath, scope) { + getDefinitionEnvironments(project, taskGroupId, propertyFilters) { return __awaiter(this, void 0, void 0, function* () { - if (itemPath == null) { - throw new TypeError('itemPath can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - containerId: containerId + project: project }; let queryValues = { - itemPath: itemPath, - scope: scope, + taskGroupId: taskGroupId, + propertyFilters: propertyFilters && propertyFilters.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "12b5d21a-f54c-430e-a8c1-7515d196890e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -14934,26 +26665,24 @@ class FileContainerApiBase extends basem.ClientApiBase { }); } /** - * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers + * Create a release definition * - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param {string} artifactUris + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - release definition object to create. + * @param {string} project - Project ID or project name */ - getContainers(scope, artifactUris) { + createReleaseDefinition(releaseDefinition, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - scope: scope, - artifactUris: artifactUris, + let routeValues = { + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainer, true); + res = yield this.rest.create(url, releaseDefinition, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); resolve(ret); } catch (err) { @@ -14963,43 +26692,31 @@ class FileContainerApiBase extends basem.ClientApiBase { }); } /** - * @param {number} containerId - * @param {string} scope - * @param {string} itemPath - * @param {boolean} metadata - * @param {string} format - * @param {string} downloadFileName - * @param {boolean} includeDownloadTickets - * @param {boolean} isShallow - * @param {boolean} ignoreRequestedMediaType - * @param {boolean} includeBlobMetadata - * @param {boolean} saveAbsolutePath + * Delete a release definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {string} comment - Comment for deleting a release definition. + * @param {boolean} forceDelete - 'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'. */ - getItems(containerId, scope, itemPath, metadata, format, downloadFileName, includeDownloadTickets, isShallow, ignoreRequestedMediaType, includeBlobMetadata, saveAbsolutePath) { + deleteReleaseDefinition(project, definitionId, comment, forceDelete) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - containerId: containerId + project: project, + definitionId: definitionId }; let queryValues = { - scope: scope, - itemPath: itemPath, - metadata: metadata, - '$format': format, - downloadFileName: downloadFileName, - includeDownloadTickets: includeDownloadTickets, - isShallow: isShallow, - ignoreRequestedMediaType: ignoreRequestedMediaType, - includeBlobMetadata: includeBlobMetadata, - saveAbsolutePath: saveAbsolutePath, + comment: comment, + forceDelete: forceDelete, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -15008,59 +26725,30 @@ class FileContainerApiBase extends basem.ClientApiBase { })); }); } -} -exports.FileContainerApiBase = FileContainerApiBase; - - -/***/ }), - -/***/ 1939: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const compatBase = __nccwpck_require__(946); -const GalleryInterfaces = __nccwpck_require__(8905); -class GalleryApi extends compatBase.GalleryCompatHttpClientBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Gallery-api', options); - } /** - * @param {string} extensionId - * @param {string} accountName + * Get a release definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included. */ - shareExtensionById(extensionId, accountName) { + getReleaseDefinition(project, definitionId, propertyFilters) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - extensionId: extensionId, - accountName: accountName + project: project, + definitionId: definitionId + }; + let queryValues = { + propertyFilters: propertyFilters && propertyFilters.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1f19631b-a0b4-4a03-89c2-d79785d24360", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); resolve(ret); } catch (err) { @@ -15070,23 +26758,86 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} extensionId - * @param {string} accountName + * Get release definition of a given revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {number} revision - Revision number of the release definition. */ - unshareExtensionById(extensionId, accountName) { + getReleaseDefinitionRevision(project, definitionId, revision) { return __awaiter(this, void 0, void 0, function* () { + if (revision == null) { + throw new TypeError('revision can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - extensionId: extensionId, - accountName: accountName + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1f19631b-a0b4-4a03-89c2-d79785d24360", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of release definitions. + * + * @param {string} project - Project ID or project name + * @param {string} searchText - Get release definitions with names containing searchText. + * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - The properties that should be expanded in the list of Release definitions. + * @param {string} artifactType - Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + * @param {string} artifactSourceId - Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + * @param {number} top - Number of release definitions to get. + * @param {string} continuationToken - Gets the release definitions after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseDefinitionQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdAscending'. + * @param {string} path - Gets the release definitions under the specified path. + * @param {boolean} isExactNameMatch - 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'. + * @param {string[]} tagFilter - A comma-delimited list of tags. Only release definitions with these tags will be returned. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not. + * @param {string[]} definitionIdFilter - A comma-delimited list of release definitions to retrieve. + * @param {boolean} isDeleted - 'true' to get release definitions that has been deleted. Default is 'false' + * @param {boolean} searchTextContainsFolderName - 'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'. + */ + getReleaseDefinitions(project, searchText, expand, artifactType, artifactSourceId, top, continuationToken, queryOrder, path, isExactNameMatch, tagFilter, propertyFilters, definitionIdFilter, isDeleted, searchTextContainsFolderName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + searchText: searchText, + '$expand': expand, + artifactType: artifactType, + artifactSourceId: artifactSourceId, + '$top': top, + continuationToken: continuationToken, + queryOrder: queryOrder, + path: path, + isExactNameMatch: isExactNameMatch, + tagFilter: tagFilter && tagFilter.join(","), + propertyFilters: propertyFilters && propertyFilters.join(","), + definitionIdFilter: definitionIdFilter && definitionIdFilter.join(","), + isDeleted: isDeleted, + searchTextContainsFolderName: searchTextContainsFolderName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, true); resolve(ret); } catch (err) { @@ -15096,25 +26847,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName + * Undelete a release definition. + * + * @param {ReleaseInterfaces.ReleaseDefinitionUndeleteParameter} releaseDefinitionUndeleteParameter - Object for undelete release definition. + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition to be undeleted */ - shareExtension(publisherName, extensionName, accountName) { + undeleteReleaseDefinition(releaseDefinitionUndeleteParameter, project, definitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - accountName: accountName + project: project, + definitionId: definitionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a1e66d8f-f5de-4d16-8309-91a4e015ee46", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, releaseDefinitionUndeleteParameter, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); resolve(ret); } catch (err) { @@ -15124,25 +26876,24 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName + * Update a release definition. + * + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - Release definition object to update. + * @param {string} project - Project ID or project name */ - unshareExtension(publisherName, extensionName, accountName) { + updateReleaseDefinition(releaseDefinition, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - accountName: accountName + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a1e66d8f-f5de-4d16-8309-91a4e015ee46", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, releaseDefinition, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); resolve(ret); } catch (err) { @@ -15152,32 +26903,53 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} itemId - * @param {string} installationTarget - * @param {boolean} testCommerce - * @param {boolean} isFreeOrTrialInstall + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} definitionEnvironmentId + * @param {string} createdBy + * @param {Date} minModifiedTime + * @param {Date} maxModifiedTime + * @param {ReleaseInterfaces.DeploymentStatus} deploymentStatus + * @param {ReleaseInterfaces.DeploymentOperationStatus} operationStatus + * @param {boolean} latestAttemptsOnly + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder + * @param {number} top + * @param {number} continuationToken + * @param {string} createdFor + * @param {Date} minStartedTime + * @param {Date} maxStartedTime + * @param {string} sourceBranch */ - getAcquisitionOptions(itemId, installationTarget, testCommerce, isFreeOrTrialInstall) { + getDeployments(project, definitionId, definitionEnvironmentId, createdBy, minModifiedTime, maxModifiedTime, deploymentStatus, operationStatus, latestAttemptsOnly, queryOrder, top, continuationToken, createdFor, minStartedTime, maxStartedTime, sourceBranch) { return __awaiter(this, void 0, void 0, function* () { - if (installationTarget == null) { - throw new TypeError('installationTarget can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - itemId: itemId + project: project }; let queryValues = { - installationTarget: installationTarget, - testCommerce: testCommerce, - isFreeOrTrialInstall: isFreeOrTrialInstall, + definitionId: definitionId, + definitionEnvironmentId: definitionEnvironmentId, + createdBy: createdBy, + minModifiedTime: minModifiedTime, + maxModifiedTime: maxModifiedTime, + deploymentStatus: deploymentStatus, + operationStatus: operationStatus, + latestAttemptsOnly: latestAttemptsOnly, + queryOrder: queryOrder, + '$top': top, + continuationToken: continuationToken, + createdFor: createdFor, + minStartedTime: minStartedTime, + maxStartedTime: maxStartedTime, + sourceBranch: sourceBranch, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9d0a0105-075e-4760-aa15-8bcf54d1bd7d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "b005ef73-cddc-448e-9ba2-5193bf36b19f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.AcquisitionOptions, false); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Deployment, true); resolve(ret); } catch (err) { @@ -15187,19 +26959,22 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + * @param {ReleaseInterfaces.DeploymentQueryParameters} queryParameters + * @param {string} project - Project ID or project name */ - requestAcquisition(acquisitionRequest) { + getDeploymentsForMultipleEnvironments(queryParameters, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "3adb1f2d-e328-446e-be73-9f6d98071c45", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "b005ef73-cddc-448e-9ba2-5193bf36b19f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, acquisitionRequest, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionAcquisitionRequest, false); + res = yield this.rest.create(url, queryParameters, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Deployment, true); resolve(ret); } catch (err) { @@ -15209,35 +26984,32 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param {String} accountTokenHeader - Header to pass the account token + * Get a release environment. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {ReleaseInterfaces.ReleaseEnvironmentExpands} expand - A property that should be expanded in the environment. */ - getAssetByName(customHeaders, publisherName, extensionName, version, assetType, accountToken, acceptDefault, accountTokenHeader) { + getReleaseEnvironment(project, releaseId, environmentId, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version, - assetType: assetType + project: project, + releaseId: releaseId, + environmentId: environmentId }; let queryValues = { - accountToken: accountToken, - acceptDefault: acceptDefault, + '$expand': expand, }; - customHeaders = customHeaders || {}; - customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7529171f-a002-4180-93ba-685f358a0482", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "Release", "a7e426b1-03dc-48af-9dfe-c98bac612dcb", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseEnvironment, false); + resolve(ret); } catch (err) { reject(err); @@ -15246,33 +27018,29 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} extensionId - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param {String} accountTokenHeader - Header to pass the account token + * Update the status of a release environment + * + * @param {ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata} environmentUpdateData - Environment update meta data. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. */ - getAsset(customHeaders, extensionId, version, assetType, accountToken, acceptDefault, accountTokenHeader) { + updateReleaseEnvironment(environmentUpdateData, project, releaseId, environmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - extensionId: extensionId, - version: version, - assetType: assetType - }; - let queryValues = { - accountToken: accountToken, - acceptDefault: acceptDefault, + project: project, + releaseId: releaseId, + environmentId: environmentId }; - customHeaders = customHeaders || {}; - customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "5d545f3d-ef47-488b-8be3-f5ee1517856c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "Release", "a7e426b1-03dc-48af-9dfe-c98bac612dcb", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, environmentUpdateData, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseEnvironment, false); + resolve(ret); } catch (err) { reject(err); @@ -15281,33 +27049,25 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {String} accountTokenHeader - Header to pass the account token + * Creates a definition environment template + * + * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - Definition environment template to create + * @param {string} project - Project ID or project name */ - getAssetAuthenticated(customHeaders, publisherName, extensionName, version, assetType, accountToken, accountTokenHeader) { + createDefinitionEnvironmentTemplate(template, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version, - assetType: assetType - }; - let queryValues = { - accountToken: accountToken, + project: project }; - customHeaders = customHeaders || {}; - customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "506aff36-2622-4f70-8063-77cce6366d20", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, template, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + resolve(ret); } catch (err) { reject(err); @@ -15316,27 +27076,29 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} azurePublisherId + * Delete a definition environment template + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template */ - associateAzurePublisher(publisherName, azurePublisherId) { + deleteDefinitionEnvironmentTemplate(project, templateId) { return __awaiter(this, void 0, void 0, function* () { - if (azurePublisherId == null) { - throw new TypeError('azurePublisherId can not be null or undefined'); + if (templateId == null) { + throw new TypeError('templateId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName + project: project }; let queryValues = { - azurePublisherId: azurePublisherId, + templateId: templateId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, null, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -15347,21 +27109,30 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName + * Gets a definition environment template + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template */ - queryAssociatedAzurePublisher(publisherName) { + getDefinitionEnvironmentTemplate(project, templateId) { return __awaiter(this, void 0, void 0, function* () { + if (templateId == null) { + throw new TypeError('templateId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName + project: project + }; + let queryValues = { + templateId: templateId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); resolve(ret); } catch (err) { @@ -15371,22 +27142,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} languages + * Gets a list of definition environment templates + * + * @param {string} project - Project ID or project name + * @param {boolean} isDeleted - 'true' to get definition environment templates that have been deleted. Default is 'false' */ - getCategories(languages) { + listDefinitionEnvironmentTemplates(project, isDeleted) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; let queryValues = { - languages: languages, + isDeleted: isDeleted, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e0a5a71e-3ac3-43a0-ae7d-0bb5c3046a2a", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, true); resolve(ret); } catch (err) { @@ -15396,27 +27172,30 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} categoryName - * @param {string} languages - * @param {string} product + * Undelete a release definition environment template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template to be undeleted */ - getCategoryDetails(categoryName, languages, product) { + undeleteReleaseDefinitionEnvironmentTemplate(project, templateId) { return __awaiter(this, void 0, void 0, function* () { + if (templateId == null) { + throw new TypeError('templateId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - categoryName: categoryName + project: project }; let queryValues = { - languages: languages, - product: product, + templateId: templateId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "75d3c04d-84d2-4973-acd2-22627587dabc", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); resolve(ret); } catch (err) { @@ -15426,37 +27205,28 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} product - * @param {string} categoryId - * @param {number} lcid - * @param {string} source - * @param {string} productVersion - * @param {string} skus - * @param {string} subSkus - * @param {string} productArchitecture + * @param {ReleaseInterfaces.FavoriteItem[]} favoriteItems + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId */ - getCategoryTree(product, categoryId, lcid, source, productVersion, skus, subSkus, productArchitecture) { + createFavorites(favoriteItems, project, scope, identityId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - product: product, - categoryId: categoryId + project: project, + scope: scope }; let queryValues = { - lcid: lcid, - source: source, - productVersion: productVersion, - skus: skus, - subSkus: subSkus, - productArchitecture: productArchitecture, + identityId: identityId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1102bb42-82b0-4955-8d8a-435d6b4cedd3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, favoriteItems, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -15466,32 +27236,28 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} product - * @param {number} lcid - * @param {string} source - * @param {string} productVersion - * @param {string} skus - * @param {string} subSkus + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + * @param {string} favoriteItemIds */ - getRootCategories(product, lcid, source, productVersion, skus, subSkus) { + deleteFavorites(project, scope, identityId, favoriteItemIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - product: product + project: project, + scope: scope }; let queryValues = { - lcid: lcid, - source: source, - productVersion: productVersion, - skus: skus, - subSkus: subSkus, + identityId: identityId, + favoriteItemIds: favoriteItemIds, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "31fba831-35b2-46f6-a641-d05de5a877d8", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -15502,24 +27268,28 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId */ - getCertificate(publisherName, extensionName, version) { + getFavorites(project, scope, identityId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version + project: project, + scope: scope + }; + let queryValues = { + identityId: identityId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e905ad6a-3f1f-4d08-9f6d-7d357ff8b7d0", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); } catch (err) { reject(err); @@ -15528,22 +27298,23 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName + * @param {string} flightName */ - getContentVerificationLog(publisherName, extensionName) { + getFlightAssignments(flightName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName + let routeValues = {}; + let queryValues = { + flightName: flightName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c0f1c7c4-3557-4ffb-b774-1e48c4865e99", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "409d301f-3046-46f3-beb9-4357fbce0a8c", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); } catch (err) { reject(err); @@ -15552,19 +27323,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.CustomerSupportRequest} customerSupportRequest + * Creates a new folder. + * + * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder. */ - createSupportRequest(customerSupportRequest) { + createFolder(folder, project, path) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + path: path + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "8eded385-026a-4c15-b810-b8eb402771f1", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, customerSupportRequest, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, folder, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, false); resolve(ret); } catch (err) { @@ -15574,23 +27352,25 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName + * Deletes a definition folder for given folder name and path and all it's existing definitions. + * + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder to delete. */ - createDraftForEditExtension(publisherName, extensionName) { + deleteFolder(project, path) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + project: project, + path: path }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -15600,26 +27380,29 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch - * @param {string} publisherName - * @param {string} extensionName - * @param {string} draftId + * Gets folders. + * + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder. + * @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder - Gets the results in the defined order. Default is 'None'. */ - performEditExtensionDraftOperation(draftPatch, publisherName, extensionName, draftId) { + getFolders(project, path, queryOrder) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - draftId: draftId + project: project, + path: path + }; + let queryValues = { + queryOrder: queryOrder, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, draftPatch, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, true); resolve(ret); } catch (err) { @@ -15629,31 +27412,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} publisherName - * @param {string} extensionName - * @param {string} draftId - * @param {String} fileName - Header to pass the filename of the uploaded data + * Updates an existing folder at given existing path. + * + * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder to update. */ - updatePayloadInDraftForEditExtension(customHeaders, contentStream, publisherName, extensionName, draftId, fileName) { + updateFolder(folder, project, path) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - draftId: draftId + project: project, + path: path }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; - customHeaders["X-Market-UploadFileName"] = "fileName"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("PUT", url, contentStream, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + res = yield this.rest.update(url, folder, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, false); resolve(ret); } catch (err) { @@ -15663,31 +27441,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} publisherName - * @param {string} extensionName - * @param {string} draftId - * @param {string} assetType + * Updates the gate for a deployment. + * + * @param {ReleaseInterfaces.GateUpdateMetadata} gateUpdateMetadata - Metadata to patch the Release Gates. + * @param {string} project - Project ID or project name + * @param {number} gateStepId - Gate step Id. */ - addAssetForEditExtensionDraft(customHeaders, contentStream, publisherName, extensionName, draftId, assetType) { + updateGates(gateUpdateMetadata, project, gateStepId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - draftId: draftId, - assetType: assetType + project: project, + gateStepId: gateStepId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "f1db9c47-6619-4998-a7e5-d7f9f41a4617", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "2666a539-2001-4f80-bcc7-0379956749d4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("PUT", url, contentStream, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, gateUpdateMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseGates, false); resolve(ret); } catch (err) { @@ -15697,29 +27470,23 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} publisherName - * @param {String} product - Header to pass the product type of the payload file - * @param {String} fileName - Header to pass the filename of the uploaded data + * @param {string} project - Project ID or project name + * @param {number} releaseId */ - createDraftForNewExtension(customHeaders, contentStream, publisherName, product, fileName) { + getReleaseHistory(project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName + project: project, + releaseId: releaseId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; - customHeaders["X-Market-UploadFileProduct"] = "product"; - customHeaders["X-Market-UploadFileName"] = "fileName"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "23f461c8-629a-4144-a076-3054fa5f268a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("POST", url, contentStream, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseRevision, true); resolve(ret); } catch (err) { @@ -15729,24 +27496,22 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch - * @param {string} publisherName - * @param {string} draftId + * @param {FormInputInterfaces.InputValuesQuery} query + * @param {string} project - Project ID or project name */ - performNewExtensionDraftOperation(draftPatch, publisherName, draftId) { + getInputValues(query, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - draftId: draftId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "71dd499b-317d-45ea-9134-140ea1932b5e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, draftPatch, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -15756,29 +27521,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} publisherName - * @param {string} draftId - * @param {String} fileName - Header to pass the filename of the uploaded data + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} sourceId */ - updatePayloadInDraftForNewExtension(customHeaders, contentStream, publisherName, draftId, fileName) { + getIssues(project, buildId, sourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - draftId: draftId + project: project, + buildId: buildId + }; + let queryValues = { + sourceId: sourceId, }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; - customHeaders["X-Market-UploadFileName"] = "fileName"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "cd42261a-f5c6-41c8-9259-f078989b9f25", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("PUT", url, contentStream, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AutoTriggerIssue, true); resolve(ret); } catch (err) { @@ -15788,30 +27551,30 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} publisherName - * @param {string} draftId - * @param {string} assetType + * Gets gate logs + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} gateId - Id of the gate. + * @param {number} taskId - ReleaseTask Id for the log. */ - addAssetForNewExtensionDraft(customHeaders, contentStream, publisherName, draftId, assetType) { + getGateLog(project, releaseId, environmentId, gateId, taskId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - draftId: draftId, - assetType: assetType + project: project, + releaseId: releaseId, + environmentId: environmentId, + gateId: gateId, + taskId: taskId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "dec7ca5a-7f7f-4797-8bf1-8efc0dc93b28", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; - let res; - res = yield this.rest.uploadStream("PUT", url, contentStream, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -15820,30 +27583,23 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} draftId - * @param {string} assetType - * @param {string} extensionName + * Get logs for a release Id. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. */ - getAssetFromEditExtensionDraft(publisherName, draftId, assetType, extensionName) { + getLogs(project, releaseId) { return __awaiter(this, void 0, void 0, function* () { - if (extensionName == null) { - throw new TypeError('extensionName can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - draftId: draftId, - assetType: assetType - }; - let queryValues = { - extensionName: extensionName, + project: project, + releaseId: releaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "c37fbab5-214b-48e4-a55b-cb6b4f6e4038", routeValues); let url = verData.requestUrl; let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + let accept = this.createAcceptHeader("application/zip", apiVersion); resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { @@ -15853,23 +27609,31 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} draftId - * @param {string} assetType + * Gets logs + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} attemptId - Id of the attempt. */ - getAssetFromNewExtensionDraft(publisherName, draftId, assetType) { + getLog(project, releaseId, environmentId, taskId, attemptId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - draftId: draftId, - assetType: assetType + project: project, + releaseId: releaseId, + environmentId: environmentId, + taskId: taskId + }; + let queryValues = { + attemptId: attemptId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "e71ba1ed-c0a4-4a28-a61f-2dd5f68cf3fd", routeValues, queryValues); let url = verData.requestUrl; let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + let accept = this.createAcceptHeader("text/plain", apiVersion); resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { @@ -15879,36 +27643,38 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence. + * Gets the task log of a release as a plain text file. * - * @param {string} publisherName - Name of the publisher - * @param {string} extensionName - Name of the extension - * @param {number} count - Count of events to fetch, applies to each event type. - * @param {Date} afterDate - Fetch events that occurred on or after this date - * @param {string} include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events - * @param {string} includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} attemptId + * @param {string} timelineId + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} startLine - Starting line number for logs + * @param {number} endLine - Ending line number for logs */ - getExtensionEvents(publisherName, extensionName, count, afterDate, include, includeProperty) { + getTaskLog2(project, releaseId, environmentId, attemptId, timelineId, taskId, startLine, endLine) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId, + taskId: taskId }; let queryValues = { - count: count, - afterDate: afterDate, - include: include, - includeProperty: includeProperty, + startLine: startLine, + endLine: endLine, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "3d13c499-2168-4d06-bef4-14aba185dcd5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "2577e6c3-6999-4400-bc69-fe1d837755fe", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionEvents, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -15917,22 +27683,36 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension. + * Gets the task log of a release as a plain text file. * - * @param {GalleryInterfaces.ExtensionEvents[]} extensionEvents + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} releaseDeployPhaseId - Release deploy phase Id. + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} startLine - Starting line number for logs + * @param {number} endLine - Ending line number for logs */ - publishExtensionEvents(extensionEvents) { + getTaskLog(project, releaseId, environmentId, releaseDeployPhaseId, taskId, startLine, endLine) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + releaseDeployPhaseId: releaseDeployPhaseId, + taskId: taskId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "0bf2bd3a-70e0-4d5d-8bf7-bd4a9c2ab6e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "17c91af7-09fd-4256-bff1-c24ee4f73bc0", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, extensionEvents, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -15941,27 +27721,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.ExtensionQuery} extensionQuery - * @param {string} accountToken - * @param {String} accountTokenHeader - Header to pass the account token + * Get manual intervention for a given release and manual intervention id. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} manualInterventionId - Id of the manual intervention. */ - queryExtensions(customHeaders, extensionQuery, accountToken, accountTokenHeader) { + getManualIntervention(project, releaseId, manualInterventionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - accountToken: accountToken, + let routeValues = { + project: project, + releaseId: releaseId, + manualInterventionId: manualInterventionId }; - customHeaders = customHeaders || {}; - customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "eb9d5ee1-6d43-456b-b80e-8a96fbc014b6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.create(url, extensionQuery, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionQueryResult, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, false); resolve(ret); } catch (err) { @@ -15971,28 +27751,25 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} extensionType - * @param {string} reCaptchaToken + * List all manual interventions for a given release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. */ - createExtension(customHeaders, contentStream, extensionType, reCaptchaToken) { + getManualInterventions(project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - extensionType: extensionType, - reCaptchaToken: reCaptchaToken, + let routeValues = { + project: project, + releaseId: releaseId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("POST", url, contentStream, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, true); resolve(ret); } catch (err) { @@ -16002,25 +27779,28 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} extensionId - * @param {string} version + * Update manual intervention. + * + * @param {ReleaseInterfaces.ManualInterventionUpdateMetadata} manualInterventionUpdateMetadata - Meta data to update manual intervention. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} manualInterventionId - Id of the manual intervention. */ - deleteExtensionById(extensionId, version) { + updateManualIntervention(manualInterventionUpdateMetadata, project, releaseId, manualInterventionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - extensionId: extensionId - }; - let queryValues = { - version: version, + project: project, + releaseId: releaseId, + manualInterventionId: manualInterventionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, manualInterventionUpdateMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, false); resolve(ret); } catch (err) { @@ -16030,27 +27810,25 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} extensionId - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags + * @param {string} project - Project ID or project name + * @param {Date} minMetricsTime */ - getExtensionById(extensionId, version, flags) { + getMetrics(project, minMetricsTime) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - extensionId: extensionId + project: project }; let queryValues = { - version: version, - flags: flags, + minMetricsTime: minMetricsTime, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "cd1502bb-3c73-4e11-80a6-d11308dceae5", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16060,25 +27838,20 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} extensionId - * @param {string} reCaptchaToken + * Gets Org pipeline release settings + * */ - updateExtensionById(extensionId, reCaptchaToken) { + getOrgPipelineReleaseSettings() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - extensionId: extensionId - }; - let queryValues = { - reCaptchaToken: reCaptchaToken, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "d156c759-ca4e-492b-90d4-db03971796ea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -16088,31 +27861,21 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} publisherName - * @param {string} extensionType - * @param {string} reCaptchaToken + * Updates Org pipeline release settings + * + * @param {ReleaseInterfaces.OrgPipelineReleaseSettingsUpdateParameters} newSettings */ - createExtensionWithPublisher(customHeaders, contentStream, publisherName, extensionType, reCaptchaToken) { + updateOrgPipelineReleaseSettings(newSettings) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName - }; - let queryValues = { - extensionType: extensionType, - reCaptchaToken: reCaptchaToken, - }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "d156c759-ca4e-492b-90d4-db03971796ea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("POST", url, contentStream, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + res = yield this.rest.update(url, newSettings, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -16122,26 +27885,22 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version + * Gets pipeline release settings + * + * @param {string} project - Project ID or project name */ - deleteExtension(publisherName, extensionName, version) { + getPipelineReleaseSettings(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - let queryValues = { - version: version, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "e816b9f4-f9fe-46ba-bdcc-a9af6abf3144", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -16152,35 +27911,24 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - * @param {string} accountToken - * @param {String} accountTokenHeader - Header to pass the account token + * Updates pipeline release settings + * + * @param {ReleaseInterfaces.ProjectPipelineReleaseSettingsUpdateParameters} newSettings + * @param {string} project - Project ID or project name */ - getExtension(customHeaders, publisherName, extensionName, version, flags, accountToken, accountTokenHeader) { + updatePipelineReleaseSettings(newSettings, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - let queryValues = { - version: version, - flags: flags, - accountToken: accountToken, + project: project }; - customHeaders = customHeaders || {}; - customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "e816b9f4-f9fe-46ba-bdcc-a9af6abf3144", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + res = yield this.rest.update(url, newSettings, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -16190,37 +27938,30 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * REST endpoint to update an extension. - * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} publisherName - Name of the publisher - * @param {string} extensionName - Name of the extension - * @param {string} extensionType - * @param {string} reCaptchaToken - * @param {boolean} bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not + * @param {string} artifactType + * @param {string} artifactSourceId */ - updateExtension(customHeaders, contentStream, publisherName, extensionName, extensionType, reCaptchaToken, bypassScopeCheck) { + getReleaseProjects(artifactType, artifactSourceId) { return __awaiter(this, void 0, void 0, function* () { + if (artifactType == null) { + throw new TypeError('artifactType can not be null or undefined'); + } + if (artifactSourceId == null) { + throw new TypeError('artifactSourceId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; + let routeValues = {}; let queryValues = { - extensionType: extensionType, - reCaptchaToken: reCaptchaToken, - bypassScopeCheck: bypassScopeCheck, + artifactType: artifactType, + artifactSourceId: artifactSourceId, }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "917ace4a-79d1-45a7-987c-7be4db4268fa", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("PUT", url, contentStream, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16230,30 +27971,67 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {GalleryInterfaces.PublishedExtensionFlags} flags + * Get a list of releases + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Releases from this release definition Id. + * @param {number} definitionEnvironmentId + * @param {string} searchText - Releases with names containing searchText. + * @param {string} createdBy - Releases created by this user. + * @param {ReleaseInterfaces.ReleaseStatus} statusFilter - Releases that have this status. + * @param {number} environmentStatusFilter + * @param {Date} minCreatedTime - Releases that were created after this time. + * @param {Date} maxCreatedTime - Releases that were created before this time. + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created date for releases. Default is descending. + * @param {number} top - Number of releases to get. Default is 50. + * @param {number} continuationToken - Gets the releases after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseExpands} expand - The property that should be expanded in the list of releases. + * @param {string} artifactTypeId - Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + * @param {string} sourceId - Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + * @param {string} artifactVersionId - Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId. + * @param {string} sourceBranchFilter - Releases with given sourceBranchFilter will be returned. + * @param {boolean} isDeleted - Gets the soft deleted releases, if true. + * @param {string[]} tagFilter - A comma-delimited list of tags. Only releases with these tags will be returned. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not. + * @param {number[]} releaseIdFilter - A comma-delimited list of releases Ids. Only releases with these Ids will be returned. + * @param {string} path - Releases under this folder path will be returned */ - updateExtensionProperties(publisherName, extensionName, flags) { + getReleases(project, definitionId, definitionEnvironmentId, searchText, createdBy, statusFilter, environmentStatusFilter, minCreatedTime, maxCreatedTime, queryOrder, top, continuationToken, expand, artifactTypeId, sourceId, artifactVersionId, sourceBranchFilter, isDeleted, tagFilter, propertyFilters, releaseIdFilter, path) { return __awaiter(this, void 0, void 0, function* () { - if (flags == null) { - throw new TypeError('flags can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + project: project }; let queryValues = { - flags: flags, + definitionId: definitionId, + definitionEnvironmentId: definitionEnvironmentId, + searchText: searchText, + createdBy: createdBy, + statusFilter: statusFilter, + environmentStatusFilter: environmentStatusFilter, + minCreatedTime: minCreatedTime, + maxCreatedTime: maxCreatedTime, + queryOrder: queryOrder, + '$top': top, + continuationToken: continuationToken, + '$expand': expand, + artifactTypeId: artifactTypeId, + sourceId: sourceId, + artifactVersionId: artifactVersionId, + sourceBranchFilter: sourceBranchFilter, + isDeleted: isDeleted, + tagFilter: tagFilter && tagFilter.join(","), + propertyFilters: propertyFilters && propertyFilters.join(","), + releaseIdFilter: releaseIdFilter && releaseIdFilter.join(","), + path: path, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, null, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, true); resolve(ret); } catch (err) { @@ -16263,27 +28041,24 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} hostType - * @param {string} hostName + * Create a release. + * + * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - Metadata to create a release. + * @param {string} project - Project ID or project name */ - shareExtensionWithHost(publisherName, extensionName, hostType, hostName) { + createRelease(releaseStartMetadata, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - hostType: hostType, - hostName: hostName + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "328a3af8-d124-46e9-9483-01690cd415b9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, releaseStartMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); resolve(ret); } catch (err) { @@ -16293,22 +28068,24 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} hostType - * @param {string} hostName + * Soft delete a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {string} comment - Comment for deleting a release. */ - unshareExtensionWithHost(publisherName, extensionName, hostType, hostName) { + deleteRelease(project, releaseId, comment) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - hostType: hostType, - hostName: hostName + project: project, + releaseId: releaseId + }; + let queryValues = { + comment: comment, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "328a3af8-d124-46e9-9483-01690cd415b9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -16323,19 +28100,35 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel + * Get a Release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {ReleaseInterfaces.ApprovalFilters} approvalFilters - A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included. + * @param {ReleaseInterfaces.SingleReleaseExpands} expand - A property that should be expanded in the release. + * @param {number} topGateRecords - Number of release gate records to get. Default is 5. */ - extensionValidator(azureRestApiRequestModel) { + getRelease(project, releaseId, approvalFilters, propertyFilters, expand, topGateRecords) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + releaseId: releaseId + }; + let queryValues = { + approvalFilters: approvalFilters, + propertyFilters: propertyFilters && propertyFilters.join(","), + '$expand': expand, + '$topGateRecords': topGateRecords, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "05e8a5e1-8c59-4c2c-8856-0ff087d1a844", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, azureRestApiRequestModel, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); resolve(ret); } catch (err) { @@ -16345,21 +28138,39 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Send Notification + * Get release summary of a given definition Id. * - * @param {GalleryInterfaces.NotificationsData} notificationData - Denoting the data needed to send notification + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition to get release summary. + * @param {number} releaseCount - Count of releases to be included in summary. + * @param {boolean} includeArtifact - Include artifact details.Default is 'false'. + * @param {number[]} definitionEnvironmentIdsFilter */ - sendNotifications(notificationData) { + getReleaseDefinitionSummary(project, definitionId, releaseCount, includeArtifact, definitionEnvironmentIdsFilter) { return __awaiter(this, void 0, void 0, function* () { + if (definitionId == null) { + throw new TypeError('definitionId can not be null or undefined'); + } + if (releaseCount == null) { + throw new TypeError('releaseCount can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; + let queryValues = { + definitionId: definitionId, + releaseCount: releaseCount, + includeArtifact: includeArtifact, + definitionEnvironmentIdsFilter: definitionEnvironmentIdsFilter && definitionEnvironmentIdsFilter.join(","), + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "eab39817-413c-4602-a49f-07ad00844980", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, notificationData, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionSummary, false); resolve(ret); } catch (err) { @@ -16369,34 +28180,30 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * This endpoint gets hit when you download a VSTS extension from the Web UI + * Get release for a given revision number. * - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param {String} accountTokenHeader - Header to pass the account token + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} definitionSnapshotRevision - Definition snapshot revision number. */ - getPackage(customHeaders, publisherName, extensionName, version, accountToken, acceptDefault, accountTokenHeader) { + getReleaseRevision(project, releaseId, definitionSnapshotRevision) { return __awaiter(this, void 0, void 0, function* () { + if (definitionSnapshotRevision == null) { + throw new TypeError('definitionSnapshotRevision can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version + project: project, + releaseId: releaseId }; let queryValues = { - accountToken: accountToken, - acceptDefault: acceptDefault, + definitionSnapshotRevision: definitionSnapshotRevision, }; - customHeaders = customHeaders || {}; - customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7cb576f8-1cae-4c4b-b7b1-e4af5759e965", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); let url = verData.requestUrl; let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + let accept = this.createAcceptHeader("text/plain", apiVersion); resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { @@ -16406,37 +28213,33 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} assetToken - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param {String} accountTokenHeader - Header to pass the account token + * Undelete a soft deleted release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of release to be undeleted. + * @param {string} comment - Any comment for undeleting. */ - getAssetWithToken(customHeaders, publisherName, extensionName, version, assetType, assetToken, accountToken, acceptDefault, accountTokenHeader) { + undeleteRelease(project, releaseId, comment) { return __awaiter(this, void 0, void 0, function* () { + if (comment == null) { + throw new TypeError('comment can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version, - assetType: assetType, - assetToken: assetToken + project: project, + releaseId: releaseId }; let queryValues = { - accountToken: accountToken, - acceptDefault: acceptDefault, + comment: comment, }; - customHeaders = customHeaders || {}; - customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "364415a1-0077-4a41-a7a0-06edd4497492", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -16445,27 +28248,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Delete publisher asset like logo + * Update a complete release object. * - * @param {string} publisherName - Internal name of the publisher - * @param {string} assetType - Type of asset. Default value is 'logo'. + * @param {ReleaseInterfaces.Release} release - Release object for update. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release to update. */ - deletePublisherAsset(publisherName, assetType) { + updateRelease(release, project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName - }; - let queryValues = { - assetType: assetType, + project: project, + releaseId: releaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, release, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); resolve(ret); } catch (err) { @@ -16475,26 +28277,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Get publisher asset like logo as a stream + * Update few properties of a release. * - * @param {string} publisherName - Internal name of the publisher - * @param {string} assetType - Type of asset. Default value is 'logo'. + * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - Properties of release to update. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release to update. */ - getPublisherAsset(publisherName, assetType) { + updateReleaseResource(releaseUpdateMetadata, project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName - }; - let queryValues = { - assetType: assetType, + project: project, + releaseId: releaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, releaseUpdateMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); } catch (err) { reject(err); @@ -16503,33 +28306,23 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values. + * Gets the release settings * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} publisherName - Internal name of the publisher - * @param {string} assetType - Type of asset. Default value is 'logo'. - * @param {String} fileName - Header to pass the filename of the uploaded data + * @param {string} project - Project ID or project name */ - updatePublisherAsset(customHeaders, contentStream, publisherName, assetType, fileName) { + getReleaseSettings(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName - }; - let queryValues = { - assetType: assetType, + project: project }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; - customHeaders["X-Market-UploadFileName"] = "fileName"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c63c3718-7cfd-41e0-b89b-81c1ca143437", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("PUT", url, contentStream, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -16539,20 +28332,23 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName + * Updates the release settings + * + * @param {ReleaseInterfaces.ReleaseSettings} releaseSettings + * @param {string} project - Project ID or project name */ - fetchDomainToken(publisherName) { + updateReleaseSettings(releaseSettings, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "67a609ef-fa74-4b52-8664-78d76f7b3634", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c63c3718-7cfd-41e0-b89b-81c1ca143437", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.replace(url, releaseSettings, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -16563,22 +28359,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName + * Get release definition for a given definitionId and revision + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition. + * @param {number} revision - Id of the revision. */ - verifyDomainToken(publisherName) { + getDefinitionRevision(project, definitionId, revision) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName + project: project, + definitionId: definitionId, + revision: revision }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "67a609ef-fa74-4b52-8664-78d76f7b3634", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "258b82e0-9d41-43f3-86d6-fef14ddd44bc", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -16587,19 +28387,25 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.PublisherQuery} publisherQuery + * Get revision history for a release definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition. */ - queryPublishers(publisherQuery) { + getReleaseDefinitionHistory(project, definitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + definitionId: definitionId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "2ad6ee0a-b53f-4034-9d1d-d009fda1212e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "258b82e0-9d41-43f3-86d6-fef14ddd44bc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, publisherQuery, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublisherQueryResult, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionRevision, true); resolve(ret); } catch (err) { @@ -16609,19 +28415,23 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.Publisher} publisher + * @param {string} project - Project ID or project name + * @param {number} releaseId */ - createPublisher(publisher) { + getSummaryMailSections(project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + releaseId: releaseId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "224e92b2-8d13-4c14-b120-13d877c516f8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, publisher, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.SummaryMailSection, true); resolve(ret); } catch (err) { @@ -16631,20 +28441,23 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName + * @param {ReleaseInterfaces.MailMessage} mailMessage + * @param {string} project - Project ID or project name + * @param {number} releaseId */ - deletePublisher(publisherName) { + sendSummaryMail(mailMessage, project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName + project: project, + releaseId: releaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "224e92b2-8d13-4c14-b120-13d877c516f8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.create(url, mailMessage, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -16655,25 +28468,23 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName - * @param {number} flags + * @param {string} project - Project ID or project name + * @param {number} definitionId */ - getPublisher(publisherName, flags) { + getSourceBranches(project, definitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName - }; - let queryValues = { - flags: flags, + project: project, + definitionId: definitionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "0e5def23-78b3-461f-8198-1558f25041c8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16683,22 +28494,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.Publisher} publisher - * @param {string} publisherName + * Adds a tag to a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param {string} tag */ - updatePublisher(publisher, publisherName) { + addDefinitionTag(project, releaseDefinitionId, tag) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName + project: project, + releaseDefinitionId: releaseDefinitionId, + tag: tag }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, publisher, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16708,28 +28524,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Endpoint to add/modify publisher membership. Currently Supports only addition/modification of 1 user at a time Works only for adding members of same tenant. + * Adds multiple tags to a definition * - * @param {GalleryInterfaces.PublisherUserRoleAssignmentRef[]} roleAssignments - List of user identifiers(email address) and role to be added. Currently only one entry is supported. - * @param {string} publisherName - The name/id of publisher to which users have to be added - * @param {boolean} limitToCallerIdentityDomain - Should cross tenant addtions be allowed or not. + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId */ - updatePublisherMembers(roleAssignments, publisherName, limitToCallerIdentityDomain) { + addDefinitionTags(tags, project, releaseDefinitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName - }; - let queryValues = { - limitToCallerIdentityDomain: limitToCallerIdentityDomain, + project: project, + releaseDefinitionId: releaseDefinitionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, roleAssignments, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublisherRoleAssignment, true); + res = yield this.rest.create(url, tags, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16739,21 +28553,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} publisherName + * Deletes a tag from a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param {string} tag */ - getPublisherWithoutToken(publisherName) { + deleteDefinitionTag(project, releaseDefinitionId, tag) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName + project: project, + releaseDefinitionId: releaseDefinitionId, + tag: tag }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "215a2ed8-458a-4850-ad5a-45f1dabc3461", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16763,33 +28583,25 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Returns a list of questions with their responses associated with an extension. + * Gets the tags for a definition * - * @param {string} publisherName - Name of the publisher who published the extension. - * @param {string} extensionName - Name of the extension. - * @param {number} count - Number of questions to retrieve (defaults to 10). - * @param {number} page - Page number from which set of questions are to be retrieved. - * @param {Date} afterDate - If provided, results questions are returned which were posted after this date + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId */ - getQuestions(publisherName, extensionName, count, page, afterDate) { + getDefinitionTags(project, releaseDefinitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - let queryValues = { - count: count, - page: page, - afterDate: afterDate, + project: project, + releaseDefinitionId: releaseDefinitionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c010d03d-812c-4ade-ae07-c1862475eda5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.QuestionsResult, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16799,28 +28611,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Flags a concern with an existing question for an extension. + * Adds a tag to a releaseId * - * @param {GalleryInterfaces.Concern} concern - User reported concern with a question for the extension. - * @param {string} pubName - Name of the publisher who published the extension. - * @param {string} extName - Name of the extension. - * @param {number} questionId - Identifier of the question to be updated for the extension. + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} tag */ - reportQuestion(concern, pubName, extName, questionId) { + addReleaseTag(project, releaseId, tag) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - pubName: pubName, - extName: extName, - questionId: questionId + project: project, + releaseId: releaseId, + tag: tag }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "784910cd-254a-494d-898b-0728549b2f10", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, concern, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Concern, false); + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16830,26 +28641,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Creates a new question for an extension. + * Adds tag to a release * - * @param {GalleryInterfaces.Question} question - Question to be created for the extension. - * @param {string} publisherName - Name of the publisher who published the extension. - * @param {string} extensionName - Name of the extension. + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} releaseId */ - createQuestion(question, publisherName, extensionName) { + addReleaseTags(tags, project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + project: project, + releaseId: releaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, question, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Question, false); + res = yield this.rest.create(url, tags, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16859,27 +28670,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Deletes an existing question and all its associated responses for an extension. (soft delete) + * Deletes a tag from a release * - * @param {string} publisherName - Name of the publisher who published the extension. - * @param {string} extensionName - Name of the extension. - * @param {number} questionId - Identifier of the question to be deleted for the extension. + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} tag */ - deleteQuestion(publisherName, extensionName, questionId) { + deleteReleaseTag(project, releaseId, tag) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - questionId: questionId + project: project, + releaseId: releaseId, + tag: tag }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16889,28 +28700,25 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Updates an existing question for an extension. + * Gets the tags for a release * - * @param {GalleryInterfaces.Question} question - Updated question to be set for the extension. - * @param {string} publisherName - Name of the publisher who published the extension. - * @param {string} extensionName - Name of the extension. - * @param {number} questionId - Identifier of the question to be updated for the extension. + * @param {string} project - Project ID or project name + * @param {number} releaseId */ - updateQuestion(question, publisherName, extensionName, questionId) { + getReleaseTags(project, releaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - questionId: questionId + project: project, + releaseId: releaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, question, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Question, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16920,28 +28728,21 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Creates a new response for a given question for an extension. - * - * @param {GalleryInterfaces.Response} response - Response to be created for the extension. - * @param {string} publisherName - Name of the publisher who published the extension. - * @param {string} extensionName - Name of the extension. - * @param {number} questionId - Identifier of the question for which response is to be created for the extension. + * @param {string} project - Project ID or project name */ - createResponse(response, publisherName, extensionName, questionId) { + getTags(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - questionId: questionId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "86cee25a-68ba-4ba3-9171-8ad6ffc6df93", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, response, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Response, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -16951,29 +28752,27 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Deletes a response for an extension. (soft delete) - * - * @param {string} publisherName - Name of the publisher who published the extension. - * @param {string} extensionName - Name of the extension. - * @param {number} questionId - Identifies the question whose response is to be deleted. - * @param {number} responseId - Identifies the response to be deleted. + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} releaseDeployPhaseId */ - deleteResponse(publisherName, extensionName, questionId, responseId) { + getTasksForTaskGroup(project, releaseId, environmentId, releaseDeployPhaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - questionId: questionId, - responseId: responseId + project: project, + releaseId: releaseId, + environmentId: environmentId, + releaseDeployPhaseId: releaseDeployPhaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "4259191d-4b0a-4409-9fb3-09f22ab9bc47", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); resolve(ret); } catch (err) { @@ -16983,30 +28782,29 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Updates an existing response for a given question for an extension. - * - * @param {GalleryInterfaces.Response} response - Updated response to be set for the extension. - * @param {string} publisherName - Name of the publisher who published the extension. - * @param {string} extensionName - Name of the extension. - * @param {number} questionId - Identifier of the question for which response is to be updated for the extension. - * @param {number} responseId - Identifier of the response which has to be updated. + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + * @param {string} timelineId */ - updateResponse(response, publisherName, extensionName, questionId, responseId) { + getTasks2(project, releaseId, environmentId, attemptId, timelineId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - questionId: questionId, - responseId: responseId + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "4259291d-4b0a-4409-9fb3-04f22ab9bc47", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, response, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Response, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); resolve(ret); } catch (err) { @@ -17016,33 +28814,29 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Returns extension reports - * - * @param {string} publisherName - Name of the publisher who published the extension - * @param {string} extensionName - Name of the extension - * @param {number} days - Last n days report. If afterDate and days are specified, days will take priority - * @param {number} count - Number of events to be returned - * @param {Date} afterDate - Use if you want to fetch events newer than the specified date + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId */ - getExtensionReports(publisherName, extensionName, days, count, afterDate) { + getTasks(project, releaseId, environmentId, attemptId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName + project: project, + releaseId: releaseId, + environmentId: environmentId }; let queryValues = { - days: days, - count: count, - afterDate: afterDate, + attemptId: attemptId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "79e0c74f-157f-437e-845f-74fbb4121d4c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "36b276e0-3c70-4320-a63c-1a2e1466a0d1", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); resolve(ret); } catch (err) { @@ -17052,35 +28846,21 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Returns a list of reviews associated with an extension - * - * @param {string} publisherName - Name of the publisher who published the extension - * @param {string} extensionName - Name of the extension - * @param {number} count - Number of reviews to retrieve (defaults to 5) - * @param {GalleryInterfaces.ReviewFilterOptions} filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none - * @param {Date} beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null - * @param {Date} afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null + * @param {string} project - Project ID or project name */ - getReviews(publisherName, extensionName, count, filterOptions, beforeDate, afterDate) { + getArtifactTypeDefinitions(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - let queryValues = { - count: count, - filterOptions: filterOptions, - beforeDate: beforeDate, - afterDate: afterDate, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "5b3f819f-f247-42ad-8c00-dd9ab9ab246d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "8efc2a3c-1fc8-4f6d-9822-75e98cecb48f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ReviewsResult, false); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactTypeDefinition, true); resolve(ret); } catch (err) { @@ -17090,31 +28870,28 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Returns a summary of the reviews - * - * @param {string} pubName - Name of the publisher who published the extension - * @param {string} extName - Name of the extension - * @param {Date} beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null - * @param {Date} afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId */ - getReviewsSummary(pubName, extName, beforeDate, afterDate) { + getArtifactVersions(project, releaseDefinitionId) { return __awaiter(this, void 0, void 0, function* () { + if (releaseDefinitionId == null) { + throw new TypeError('releaseDefinitionId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - pubName: pubName, - extName: extName + project: project }; let queryValues = { - beforeDate: beforeDate, - afterDate: afterDate, + releaseDefinitionId: releaseDefinitionId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b7b44e21-209e-48f0-ae78-04727fc37d77", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "30fc787e-a9e0-4a07-9fbc-3e903aa051d2", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactVersionQueryResult, false); resolve(ret); } catch (err) { @@ -17124,26 +28901,22 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Creates a new review for an extension - * - * @param {GalleryInterfaces.Review} review - Review to be created for the extension - * @param {string} pubName - Name of the publisher who published the extension - * @param {string} extName - Name of the extension + * @param {ReleaseInterfaces.Artifact[]} artifacts + * @param {string} project - Project ID or project name */ - createReview(review, pubName, extName) { + getArtifactVersionsForSources(artifacts, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - pubName: pubName, - extName: extName + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "30fc787e-a9e0-4a07-9fbc-3e903aa051d2", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, review, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Review, false); + res = yield this.rest.create(url, artifacts, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactVersionQueryResult, false); resolve(ret); } catch (err) { @@ -17153,27 +28926,31 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Deletes a review - * - * @param {string} pubName - Name of the publisher who published the extension - * @param {string} extName - Name of the extension - * @param {number} reviewId - Id of the review which needs to be updated + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param {string} artifactAlias */ - deleteReview(pubName, extName, reviewId) { + getReleaseWorkItemsRefs(project, releaseId, baseReleaseId, top, artifactAlias) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - pubName: pubName, - extName: extName, - reviewId: reviewId + project: project, + releaseId: releaseId + }; + let queryValues = { + baseReleaseId: baseReleaseId, + '$top': top, + artifactAlias: artifactAlias, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "4f165cc0-875c-4768-b148-f12f78769fab", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -17182,29 +28959,60 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { })); }); } +} +ReleaseApi.RESOURCE_AREA_ID = "efc2f575-36ef-48e9-b672-0c6fb4a48ac5"; +exports.ReleaseApi = ReleaseApi; + + +/***/ }), + +/***/ 10806: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const SecurityRolesInterfaces = __nccwpck_require__(6573); +class SecurityRolesApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-SecurityRoles-api', options); + } /** - * Updates or Flags a review - * - * @param {GalleryInterfaces.ReviewPatch} reviewPatch - ReviewPatch object which contains the changes to be applied to the review - * @param {string} pubName - Name of the publisher who published the extension - * @param {string} extName - Name of the extension - * @param {number} reviewId - Id of the review which needs to be updated + * @param {string} scopeId + * @param {string} resourceId */ - updateReview(reviewPatch, pubName, extName, reviewId) { + getRoleAssignments(scopeId, resourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - pubName: pubName, - extName: extName, - reviewId: reviewId + scopeId: scopeId, + resourceId: resourceId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, reviewPatch, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ReviewPatch, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true); resolve(ret); } catch (err) { @@ -17214,18 +29022,24 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {GalleryInterfaces.ExtensionCategory} category + * @param {string} scopeId + * @param {string} resourceId + * @param {string} identityId */ - createCategory(category) { + removeRoleAssignment(scopeId, resourceId, identityId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + scopeId: scopeId, + resourceId: resourceId, + identityId: identityId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "476531a3-7024-4516-a76a-ed64d3008ad6", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, category, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -17236,25 +29050,24 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Get all setting entries for the given user/all-users scope - * - * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. - * @param {string} key - Optional key under which to filter all the entries + * @param {string[]} identityIds + * @param {string} scopeId + * @param {string} resourceId */ - getGalleryUserSettings(userScope, key) { + removeRoleAssignments(identityIds, scopeId, resourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - userScope: userScope, - key: key + scopeId: scopeId, + resourceId: resourceId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9b75ece3-7960-401c-848b-148ac01ca350", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, identityIds, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -17264,24 +29077,26 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * Set all setting entries for the given user/all-users scope - * - * @param {{ [key: string] : any; }} entries - A key-value pair of all settings that need to be set - * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {SecurityRolesInterfaces.UserRoleAssignmentRef} roleAssignment + * @param {string} scopeId + * @param {string} resourceId + * @param {string} identityId */ - setGalleryUserSettings(entries, userScope) { + setRoleAssignment(roleAssignment, scopeId, resourceId, identityId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - userScope: userScope + scopeId: scopeId, + resourceId: resourceId, + identityId: identityId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9b75ece3-7960-401c-848b-148ac01ca350", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, entries, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, roleAssignment, options); + let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, false); resolve(ret); } catch (err) { @@ -17291,25 +29106,24 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} keyType - * @param {number} expireCurrentSeconds + * @param {SecurityRolesInterfaces.UserRoleAssignmentRef[]} roleAssignments + * @param {string} scopeId + * @param {string} resourceId */ - generateKey(keyType, expireCurrentSeconds) { + setRoleAssignments(roleAssignments, scopeId, resourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - keyType: keyType - }; - let queryValues = { - expireCurrentSeconds: expireCurrentSeconds, + scopeId: scopeId, + resourceId: resourceId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "92ed5cf4-c38b-465a-9059-2f2fb7c624b5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, roleAssignments, options); + let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true); resolve(ret); } catch (err) { @@ -17319,21 +29133,21 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { }); } /** - * @param {string} keyType + * @param {string} scopeId */ - getSigningKey(keyType) { + getRoleDefinitions(scopeId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - keyType: keyType + scopeId: scopeId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "92ed5cf4-c38b-465a-9059-2f2fb7c624b5", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "f4cc9a86-453c-48d2-b44d-d3bd5c105f4f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -17342,187 +29156,451 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { })); }); } +} +exports.SecurityRolesApi = SecurityRolesApi; + + +/***/ }), + +/***/ 15817: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** +* Module for handling serialization and deserialization of data contracts +* (contracts sent from the server using the VSO default REST api serialization settings) +*/ +var ContractSerializer; +(function (ContractSerializer) { + var _legacyDateRegExp; /** - * @param {GalleryInterfaces.ExtensionStatisticUpdate} extensionStatisticsUpdate - * @param {string} publisherName - * @param {string} extensionName + * Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and + * return a pure JSON object that can be posted to REST endpoint. + * + * @param data The object to serialize + * @param contractMetadata The type info/metadata for the contract type being serialized + * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). */ - updateExtensionStatistics(extensionStatisticsUpdate, publisherName, extensionName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a0ea3204-11e9-422d-a9ca-45851cc41400", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, extensionStatisticsUpdate, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + function serialize(data, contractMetadata, preserveOriginal) { + if (data && contractMetadata) { + if (Array.isArray(data)) { + return _getTranslatedArray(data, contractMetadata, true, preserveOriginal); + } + else { + return _getTranslatedObject(data, contractMetadata, true, preserveOriginal); + } + } + else { + return data; + } + } + ContractSerializer.serialize = serialize; + /** + * Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object + * where date strings are converted to Date objects and enum values are converted from strings into + * their numerical value. + * + * @param data The object to deserialize + * @param contractMetadata The type info/metadata for the contract type being deserialize + * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). + * @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object. + */ + function deserialize(data, contractMetadata, preserveOriginal, unwrapWrappedCollections) { + if (data) { + if (unwrapWrappedCollections && Array.isArray(data.value)) { + // Wrapped json array - unwrap it and send the array as the result + data = data.value; + } + if (contractMetadata) { + if (Array.isArray(data)) { + data = _getTranslatedArray(data, contractMetadata, false, preserveOriginal); } - catch (err) { - reject(err); + else { + data = _getTranslatedObject(data, contractMetadata, false, preserveOriginal); } - })); - }); + } + } + return data; + } + ContractSerializer.deserialize = deserialize; + function _getTranslatedArray(array, typeMetadata, serialize, preserveOriginal) { + var resultArray = array; + var arrayCopy = []; + var i; + for (i = 0; i < array.length; i++) { + var item = array[i]; + var processedItem; + // handle arrays of arrays + if (Array.isArray(item)) { + processedItem = _getTranslatedArray(item, typeMetadata, serialize, preserveOriginal); + } + else { + processedItem = _getTranslatedObject(item, typeMetadata, serialize, preserveOriginal); + } + if (preserveOriginal) { + arrayCopy.push(processedItem); + if (processedItem !== item) { + resultArray = arrayCopy; + } + } + else { + array[i] = processedItem; + } + } + return resultArray; + } + function _getTranslatedObject(typeObject, typeMetadata, serialize, preserveOriginal) { + var processedItem = typeObject, copiedItem = false; + if (typeObject && typeMetadata.fields) { + for (var fieldName in typeMetadata.fields) { + var fieldMetadata = typeMetadata.fields[fieldName]; + var fieldValue = typeObject[fieldName]; + var translatedValue = _getTranslatedField(fieldValue, fieldMetadata, serialize, preserveOriginal); + if (fieldValue !== translatedValue) { + if (preserveOriginal && !copiedItem) { + processedItem = this._extend({}, typeObject); + copiedItem = true; + } + processedItem[fieldName] = translatedValue; + } + } + } + return processedItem; + } + function _getTranslatedField(fieldValue, fieldMetadata, serialize, preserveOriginal) { + if (!fieldValue) { + return fieldValue; + } + if (fieldMetadata.isArray) { + if (Array.isArray(fieldValue)) { + var newArray = [], processedArray = fieldValue; + for (var index = 0; index < fieldValue.length; index++) { + var arrayValue = fieldValue[index]; + var processedValue = arrayValue; + if (fieldMetadata.isDate) { + processedValue = _getTranslatedDateValue(arrayValue, serialize); + } + else if (fieldMetadata.enumType) { + processedValue = _getTranslatedEnumValue(fieldMetadata.enumType, arrayValue, serialize); + } + else if (fieldMetadata.typeInfo) { + if (Array.isArray(arrayValue)) { + processedValue = _getTranslatedArray(arrayValue, fieldMetadata.typeInfo, serialize, preserveOriginal); + } + else { + processedValue = _getTranslatedObject(arrayValue, fieldMetadata.typeInfo, serialize, preserveOriginal); + } + } + if (preserveOriginal) { + newArray.push(processedValue); + if (processedValue !== arrayValue) { + processedArray = newArray; + } + } + else { + fieldValue[index] = processedValue; + } + } + return processedArray; + } + else { + return fieldValue; + } + } + else if (fieldMetadata.isDictionary) { + var dictionaryModified = false; + var newDictionary = {}; + for (var key in fieldValue) { + var dictionaryValue = fieldValue[key]; + var newKey = key, newValue = dictionaryValue; + if (fieldMetadata.dictionaryKeyIsDate) { + newKey = _getTranslatedDateValue(key, serialize); + } + else if (fieldMetadata.dictionaryKeyEnumType) { + newKey = _getTranslatedEnumValue(fieldMetadata.dictionaryKeyEnumType, key, serialize); + } + if (fieldMetadata.dictionaryValueIsDate) { + newValue = _getTranslatedDateValue(dictionaryValue, serialize); + } + else if (fieldMetadata.dictionaryValueEnumType) { + newValue = _getTranslatedEnumValue(fieldMetadata.dictionaryValueEnumType, dictionaryValue, serialize); + } + else if (fieldMetadata.dictionaryValueTypeInfo) { + newValue = _getTranslatedObject(newValue, fieldMetadata.dictionaryValueTypeInfo, serialize, preserveOriginal); + } + else if (fieldMetadata.dictionaryValueFieldInfo) { + newValue = _getTranslatedField(dictionaryValue, fieldMetadata.dictionaryValueFieldInfo, serialize, preserveOriginal); + } + newDictionary[newKey] = newValue; + if (key !== newKey || dictionaryValue !== newValue) { + dictionaryModified = true; + } + } + return dictionaryModified ? newDictionary : fieldValue; + } + else { + if (fieldMetadata.isDate) { + return _getTranslatedDateValue(fieldValue, serialize); + } + else if (fieldMetadata.enumType) { + return _getTranslatedEnumValue(fieldMetadata.enumType, fieldValue, serialize); + } + else if (fieldMetadata.typeInfo) { + return _getTranslatedObject(fieldValue, fieldMetadata.typeInfo, serialize, preserveOriginal); + } + else { + return fieldValue; + } + } + } + function _getTranslatedEnumValue(enumType, valueToConvert, serialize) { + if (serialize && typeof valueToConvert === "number") { + // Serialize: number --> String + // Because webapi handles the numerical value for enums, there is no need to convert to string. + // Let this fall through to return the numerical value. + } + else if (!serialize && typeof valueToConvert === "string") { + // Deserialize: String --> number + var result = 0; + if (valueToConvert) { + var splitValue = valueToConvert.split(","); + for (var i = 0; i < splitValue.length; i++) { + var valuePart = splitValue[i]; + //equivalent to jquery trim + //copied from https://github.com/HubSpot/youmightnotneedjquery/blob/ef987223c20e480fcbfb5924d96c11cd928e1226/comparisons/utils/trim/ie8.js + var enumName = valuePart.replace(/^\s+|\s+$/g, '') || ""; + if (enumName) { + var resultPart = enumType.enumValues[enumName]; + if (!resultPart) { + // No matching enum value. Try again but case insensitive + var lowerCaseEnumName = enumName.toLowerCase(); + if (lowerCaseEnumName !== enumName) { + for (var name in enumType.enumValues) { + var value = enumType.enumValues[name]; + if (name.toLowerCase() === lowerCaseEnumName) { + resultPart = value; + break; + } + } + } + } + if (resultPart) { + result |= resultPart; + } + } + } + } + return result; + } + return valueToConvert; + } + function _getTranslatedDateValue(valueToConvert, serialize) { + if (!serialize && typeof valueToConvert === "string") { + // Deserialize: String --> Date + var dateValue = new Date(valueToConvert); + if (isNaN(dateValue) && navigator.userAgent && /msie/i.test(navigator.userAgent)) { + dateValue = _convertLegacyIEDate(valueToConvert); + } + return dateValue; + } + return valueToConvert; + } + function _convertLegacyIEDate(dateStringValue) { + // IE 8/9 does not handle parsing dates in ISO form like: + // 2013-05-13T14:26:54.397Z + var match; + if (!_legacyDateRegExp) { + _legacyDateRegExp = new RegExp("(\\d+)-(\\d+)-(\\d+)T(\\d+):(\\d+):(\\d+).(\\d+)Z"); + } + match = _legacyDateRegExp.exec(dateStringValue); + if (match) { + return new Date(Date.UTC(parseInt(match[1]), parseInt(match[2]) - 1, parseInt(match[3]), parseInt(match[4]), parseInt(match[5]), parseInt(match[6]), parseInt(match[7]))); + } + else { + return null; + } + } + // jquery extend method in native javascript (used to clone objects) + // copied from https://github.com/HubSpot/youmightnotneedjquery/blob/ef987223c20e480fcbfb5924d96c11cd928e1226/comparisons/utils/extend/ie8.js + var _extend = function (out) { + out = out || {}; + for (var i = 1; i < arguments.length; i++) { + if (!arguments[i]) + continue; + for (var key in arguments[i]) { + if (arguments[i].hasOwnProperty(key)) + out[key] = arguments[i][key]; + } + } + return out; + }; +})(ContractSerializer = exports.ContractSerializer || (exports.ContractSerializer = {})); + + +/***/ }), + +/***/ 55899: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const taskagentbasem = __nccwpck_require__(63390); +const url = __nccwpck_require__(57310); +class TaskAgentApi extends taskagentbasem.TaskAgentApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, options); + // hang on to the handlers in case we need to fall back to an account-level client + this._handlers = handlers; + this._options = options; } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {number} days - * @param {GalleryInterfaces.ExtensionStatsAggregateType} aggregate - * @param {Date} afterDate + * @param {string} taskId + * @param onResult callback function */ - getExtensionDailyStats(publisherName, extensionName, days, aggregate, afterDate) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - let queryValues = { - days: days, - aggregate: aggregate, - afterDate: afterDate, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "ae06047e-51c5-4fb4-ab65-7be488544416", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDailyStats, false); - resolve(ret); + deleteTaskDefinition(taskId) { + let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") + .then((location) => { + if (location) { + // the resource exists at the url we were given. go! + return super.deleteTaskDefinition(taskId); + } + else { + // this is the case when the server doesn't support collection-level task definitions + var fallbackClient = this._getFallbackClient(this.baseUrl); + if (!fallbackClient) { + // couldn't convert + throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); } - catch (err) { - reject(err); + else { + // use the fallback client + return fallbackClient.deleteTaskDefinition(taskId); } - })); + } }); + return promise; } /** - * This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats. - * - * @param {string} publisherName - Name of the publisher - * @param {string} extensionName - Name of the extension - * @param {string} version - Version of the extension + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting ArrayBuffer */ - getExtensionDailyStatsAnonymous(publisherName, extensionName, version) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4fa7adb6-ca65-4075-a232-5f28323288ea", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDailyStats, false); - resolve(ret); + getTaskContentZip(taskId, versionString, visibility, scopeLocal) { + let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") + .then((location) => { + if (location) { + // the resource exists at the url we were given. go! + return super.getTaskContentZip(taskId, versionString, visibility, scopeLocal); + } + else { + // this is the case when the server doesn't support collection-level task definitions + var fallbackClient = this._getFallbackClient(this.baseUrl); + if (!fallbackClient) { + // couldn't convert + throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); } - catch (err) { - reject(err); + else { + // use the fallback client + return fallbackClient.getTaskContentZip(taskId, versionString, visibility, scopeLocal); } - })); + } }); + return promise; } /** - * Increments a daily statistic associated with the extension - * - * @param {string} publisherName - Name of the publisher - * @param {string} extensionName - Name of the extension - * @param {string} version - Version of the extension - * @param {string} statType - Type of stat to increment - * @param {string} targetPlatform + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition */ - incrementExtensionDailyStat(publisherName, extensionName, version, statType, targetPlatform) { - return __awaiter(this, void 0, void 0, function* () { - if (statType == null) { - throw new TypeError('statType can not be null or undefined'); + getTaskDefinition(taskId, versionString, visibility, scopeLocal) { + let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") + .then((location) => { + if (location) { + // the resource exists at the url we were given. go! + return super.getTaskDefinition(taskId, versionString, visibility, scopeLocal); } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version - }; - let queryValues = { - statType: statType, - targetPlatform: targetPlatform, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4fa7adb6-ca65-4075-a232-5f28323288ea", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + else { + // this is the case when the server doesn't support collection-level task definitions + var fallbackClient = this._getFallbackClient(this.baseUrl); + if (!fallbackClient) { + // couldn't convert + throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); } - catch (err) { - reject(err); + else { + // use the fallback client + return fallbackClient.getTaskDefinition(taskId, versionString, visibility, scopeLocal); } - })); + } }); + return promise; } /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} targetPlatform + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] */ - getVerificationLog(publisherName, extensionName, version, targetPlatform) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName, - version: version - }; - let queryValues = { - targetPlatform: targetPlatform, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c5523abe-b843-437f-875b-5833064efe4d", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + getTaskDefinitions(taskId, visibility, scopeLocal) { + let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") + .then((location) => { + if (location) { + // the resource exists at the url we were given. go! + return super.getTaskDefinitions(taskId, visibility, scopeLocal); + } + else { + // this is the case when the server doesn't support collection-level task definitions + var fallbackClient = this._getFallbackClient(this.baseUrl); + if (!fallbackClient) { + // couldn't convert + throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); } - catch (err) { - reject(err); + else { + // use the fallback client + return fallbackClient.getTaskDefinitions(taskId, visibility, scopeLocal); } - })); + } }); + return promise; } /** - * @param {string} itemName - * @param {string} version - * @param {GalleryInterfaces.VSCodeWebExtensionStatisicsType} statType + * @param {NodeJS.ReadableStream} contentStream + * @param {string} taskId + * @param {boolean} overwrite + * @param onResult callback function */ - updateVSCodeWebExtensionStatistics(itemName, version, statType) { + uploadTaskDefinition(customHeaders, contentStream, taskId, overwrite) { return __awaiter(this, void 0, void 0, function* () { + let routeValues = { + taskId: taskId + }; + let queryValues = { + overwrite: overwrite, + }; return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - itemName: itemName, - version: version, - statType: statType - }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "205c91a8-7841-4fd3-ae4f-5a745d5a8df5", routeValues); + let verData = yield this.vsoClient.getVersioningData("3.0-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + resolve(res.result); } catch (err) { reject(err); @@ -17530,140 +29608,49 @@ class GalleryApi extends compatBase.GalleryCompatHttpClientBase { })); }); } -} -GalleryApi.RESOURCE_AREA_ID = "69d21c00-f135-441b-b5ce-3626378e0819"; -exports.GalleryApi = GalleryApi; - - -/***/ }), - -/***/ 946: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* -* --------------------------------------------------------- -* Copyright(C) Microsoft Corporation. All rights reserved. -* --------------------------------------------------------- -* -* --------------------------------------------------------- -* Generated file, DO NOT EDIT -* --------------------------------------------------------- -*/ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const GalleryInterfaces = __nccwpck_require__(8905); -class GalleryCompatHttpClientBase extends basem.ClientApiBase { - constructor(baseUrl, handlers, userAgent, options) { - super(baseUrl, handlers, userAgent, options); - } - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - */ - createExtensionJson(extensionPackage) { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, extensionPackage, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - } - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} extensionId - */ - updateExtensionByIdJson(extensionPackage, extensionId) { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - extensionId: extensionId - }; - try { - let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, extensionPackage, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - } - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - */ - createExtensionWithPublisherJson(extensionPackage, publisherName) { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName - }; - try { - let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, extensionPackage, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); - resolve(ret); - } - catch (err) { - reject(err); + _getFallbackClient(baseUrl) { + if (!this._fallbackClient) { + var accountUrl = this._getAccountUrl(baseUrl); + if (accountUrl) { + this._fallbackClient = new TaskAgentApi(accountUrl, this._handlers, this._options); } - })); + } + return this._fallbackClient; } - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - * @param {string} extensionName - */ - updateExtensionJson(extensionPackage, publisherName, extensionName) { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - publisherName: publisherName, - extensionName: extensionName - }; - try { - let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, extensionPackage, options); - let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); + _getAccountUrl(collectionUrl) { + // converts a collection URL to an account URL + // returns null if the conversion can't be made + var purl = url.parse(collectionUrl); + if (!purl.protocol || !purl.host) { + return null; + } + var accountUrl = purl.protocol + '//' + purl.host; + // purl.path is something like /DefaultCollection or /tfs/DefaultCollection or /DefaultCollection/ + var splitPath = purl.path.split('/').slice(1); + if (splitPath.length === 0 || (splitPath.length === 1 && splitPath[0] === '')) { + return null; + } + // if the first segment of the path is tfs, the second is the collection. if the url ends in / there will be a third, empty entry + if (splitPath[0] === 'tfs' && (splitPath.length === 2 || (splitPath.length === 3 && splitPath[2].length === 0))) { + //on prem + accountUrl += '/' + 'tfs'; + } + else if (splitPath.length === 2 && splitPath[0] === '') { + // /DefaultCollection/ + return accountUrl; + } + else if (splitPath.length > 1) { + return null; + } + return accountUrl; } } -exports.GalleryCompatHttpClientBase = GalleryCompatHttpClientBase; +exports.TaskAgentApi = TaskAgentApi; /***/ }), -/***/ 4996: +/***/ 63390: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -17686,63 +29673,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const GitInterfaces = __nccwpck_require__(9803); -class GitApi extends basem.ClientApiBase { +const basem = __nccwpck_require__(80273); +const TaskAgentInterfaces = __nccwpck_require__(69565); +class TaskAgentApiBase extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Git-api', options); - } - /** - * Create an annotated tag. - * - * @param {GitInterfaces.GitAnnotatedTag} tagObject - Object containing details of tag to be created. - * @param {string} project - Project ID or project name - * @param {string} repositoryId - ID or name of the repository. - */ - createAnnotatedTag(tagObject, project, repositoryId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5e8a8081-3851-4626-b677-9891cc04102e", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, tagObject, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitAnnotatedTag, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); + super(baseUrl, handlers, 'node-TaskAgent-api', options); } /** - * Get an annotated tag. - * - * @param {string} project - Project ID or project name - * @param {string} repositoryId - ID or name of the repository. - * @param {string} objectId - ObjectId (Sha1Id) of tag to get. + * @param {TaskAgentInterfaces.TaskAgentCloud} agentCloud */ - getAnnotatedTag(project, repositoryId, objectId) { + addAgentCloud(agentCloud) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - objectId: objectId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5e8a8081-3851-4626-b677-9891cc04102e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitAnnotatedTag, false); + res = yield this.rest.create(url, agentCloud, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -17752,34 +29702,20 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get a single blob. - * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. - * @param {string} project - Project ID or project name - * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip - * @param {string} fileName - Provide a fileName to use for a download. - * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + * @param {number} agentCloudId */ - getBlob(repositoryId, sha1, project, download, fileName, resolveLfs) { + deleteAgentCloud(agentCloudId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - sha1: sha1 - }; - let queryValues = { - download: download, - fileName: fileName, - resolveLfs: resolveLfs, + agentCloudId: agentCloudId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -17790,137 +29726,21 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get a single blob. - * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. - * @param {string} project - Project ID or project name - * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip - * @param {string} fileName - Provide a fileName to use for a download. - * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types - */ - getBlobContent(repositoryId, sha1, project, download, fileName, resolveLfs) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - sha1: sha1 - }; - let queryValues = { - download: download, - fileName: fileName, - resolveLfs: resolveLfs, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Gets one or more blobs in a zip file download. - * - * @param {string[]} blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file. - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} project - Project ID or project name - * @param {string} filename - */ - getBlobsZip(blobIds, repositoryId, project, filename) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - filename: filename, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Get a single blob. - * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. - * @param {string} project - Project ID or project name - * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip - * @param {string} fileName - Provide a fileName to use for a download. - * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types - */ - getBlobZip(repositoryId, sha1, project, download, fileName, resolveLfs) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - sha1: sha1 - }; - let queryValues = { - download: download, - fileName: fileName, - resolveLfs: resolveLfs, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Retrieve statistics about a single branch. - * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} name - Name of the branch. - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. + * @param {number} agentCloudId */ - getBranch(repositoryId, name, project, baseVersionDescriptor) { + getAgentCloud(agentCloudId) { return __awaiter(this, void 0, void 0, function* () { - if (name == null) { - throw new TypeError('name can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - name: name, - baseVersionDescriptor: baseVersionDescriptor, + agentCloudId: agentCloudId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -17930,56 +29750,18 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve statistics about all branches within a repository. - * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. */ - getBranches(repositoryId, project, baseVersionDescriptor) { + getAgentClouds() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - baseVersionDescriptor: baseVersionDescriptor, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - getBranchStatsBatch(searchCriteria, repositoryId, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, searchCriteria, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -17989,33 +29771,22 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve changes for a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of changes to return. - * @param {number} skip - The number of changes to skip. + * @param {TaskAgentInterfaces.TaskAgentCloud} updatedCloud + * @param {number} agentCloudId */ - getChanges(commitId, repositoryId, project, top, skip) { + updateAgentCloud(updatedCloud, agentCloudId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - commitId: commitId, - repositoryId: repositoryId - }; - let queryValues = { - top: top, - skip: skip, + agentCloudId: agentCloudId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5bf884f5-3e07-42e9-afb8-1b872267bf16", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitChanges, false); + res = yield this.rest.update(url, updatedCloud, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18025,29 +29796,20 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve one conflict for a cherry pick by ID + * Get agent cloud types. * - * @param {string} repositoryId - * @param {number} cherryPickId - * @param {number} conflictId - * @param {string} project - Project ID or project name */ - getCherryPickConflict(repositoryId, cherryPickId, conflictId, project) { + getAgentCloudTypes() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - cherryPickId: cherryPickId, - conflictId: conflictId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "5932e193-f376-469d-9c3e-e5588ce12cb5", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentCloudType, true); resolve(ret); } catch (err) { @@ -18057,39 +29819,32 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all conflicts for a cherry pick - * - * @param {string} repositoryId - * @param {number} cherryPickId * @param {string} project - Project ID or project name - * @param {string} continuationToken + * @param {number} queueId * @param {number} top - * @param {boolean} excludeResolved - * @param {boolean} onlyResolved - * @param {boolean} includeObsolete + * @param {string} continuationToken */ - getCherryPickConflicts(repositoryId, cherryPickId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) { + getAgentRequestsForQueue(project, queueId, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (top == null) { + throw new TypeError('top can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - cherryPickId: cherryPickId + queueId: queueId }; let queryValues = { - continuationToken: continuationToken, '$top': top, - excludeResolved: excludeResolved, - onlyResolved: onlyResolved, - includeObsolete: includeObsolete, + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f5f81ffb-f396-498d-85b1-5ada145e648a", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); resolve(ret); } catch (err) { @@ -18099,30 +29854,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update merge conflict resolution - * - * @param {GitInterfaces.GitConflict} conflict - * @param {string} repositoryId - * @param {number} cherryPickId - * @param {number} conflictId + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request * @param {string} project - Project ID or project name + * @param {number} queueId */ - updateCherryPickConflict(conflict, repositoryId, cherryPickId, conflictId, project) { + queueAgentRequest(request, project, queueId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - cherryPickId: cherryPickId, - conflictId: conflictId + queueId: queueId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f5f81ffb-f396-498d-85b1-5ada145e648a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, conflict, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + res = yield this.rest.create(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); resolve(ret); } catch (err) { @@ -18132,28 +29881,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update multiple merge conflict resolutions + * Adds an agent to a pool. You probably don't want to call this endpoint directly. Instead, [configure an agent](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) using the agent download package. * - * @param {GitInterfaces.GitConflict[]} conflictUpdates - * @param {string} repositoryId - * @param {number} cherryPickId - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgent} agent - Details about the agent being added + * @param {number} poolId - The agent pool in which to add the agent */ - updateCherryPickConflicts(conflictUpdates, repositoryId, cherryPickId, project) { + addAgent(agent, poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - cherryPickId: cherryPickId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, conflictUpdates, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + res = yield this.rest.create(url, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); resolve(ret); } catch (err) { @@ -18163,31 +29908,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Given a commitId, returns a list of commits that are in the same cherry-pick family. + * Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization. * - * @param {string} repositoryNameOrId - * @param {string} commitId - * @param {string} project - Project ID or project name - * @param {boolean} includeLinks + * @param {number} poolId - The pool ID to remove the agent from + * @param {number} agentId - The agent ID to remove */ - getCherryPickRelationships(repositoryNameOrId, commitId, project, includeLinks) { + deleteAgent(poolId, agentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryNameOrId: repositoryNameOrId, - commitId: commitId - }; - let queryValues = { - includeLinks: includeLinks, + poolId: poolId, + agentId: agentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "8af142a4-27c2-4168-9e82-46b8629aaa0d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18197,26 +29936,35 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Cherry pick a specific commit or commits that are associated to a pull request into a new branch. + * Get information about an agent. * - * @param {GitInterfaces.GitAsyncRefOperationParameters} cherryPickToCreate - * @param {string} project - Project ID or project name - * @param {string} repositoryId - ID of the repository. + * @param {number} poolId - The agent pool containing the agent + * @param {number} agentId - The agent ID to get information about + * @param {boolean} includeCapabilities - Whether to include the agent's capabilities in the response + * @param {boolean} includeAssignedRequest - Whether to include details about the agent's current work + * @param {boolean} includeLastCompletedRequest - Whether to include details about the agents' most recent completed work + * @param {string[]} propertyFilters - Filter which custom properties will be returned */ - createCherryPick(cherryPickToCreate, project, repositoryId) { + getAgent(poolId, agentId, includeCapabilities, includeAssignedRequest, includeLastCompletedRequest, propertyFilters) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + poolId: poolId, + agentId: agentId + }; + let queryValues = { + includeCapabilities: includeCapabilities, + includeAssignedRequest: includeAssignedRequest, + includeLastCompletedRequest: includeLastCompletedRequest, + propertyFilters: propertyFilters && propertyFilters.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, cherryPickToCreate, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); resolve(ret); } catch (err) { @@ -18226,27 +29974,37 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve information about a cherry pick operation by cherry pick Id. + * Get a list of agents. * - * @param {string} project - Project ID or project name - * @param {number} cherryPickId - ID of the cherry pick. - * @param {string} repositoryId - ID of the repository. + * @param {number} poolId - The agent pool containing the agents + * @param {string} agentName - Filter on agent name + * @param {boolean} includeCapabilities - Whether to include the agents' capabilities in the response + * @param {boolean} includeAssignedRequest - Whether to include details about the agents' current work + * @param {boolean} includeLastCompletedRequest - Whether to include details about the agents' most recent completed work + * @param {string[]} propertyFilters - Filter which custom properties will be returned + * @param {string[]} demands - Filter by demands the agents can satisfy */ - getCherryPick(project, cherryPickId, repositoryId) { + getAgents(poolId, agentName, includeCapabilities, includeAssignedRequest, includeLastCompletedRequest, propertyFilters, demands) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - cherryPickId: cherryPickId, - repositoryId: repositoryId + poolId: poolId + }; + let queryValues = { + agentName: agentName, + includeCapabilities: includeCapabilities, + includeAssignedRequest: includeAssignedRequest, + includeLastCompletedRequest: includeLastCompletedRequest, + propertyFilters: propertyFilters && propertyFilters.join(","), + demands: demands && demands.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, true); resolve(ret); } catch (err) { @@ -18256,32 +30014,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations. + * Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization. * - * @param {string} project - Project ID or project name - * @param {string} repositoryId - ID of the repository. - * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. + * @param {TaskAgentInterfaces.TaskAgent} agent - Updated details about the replacing agent + * @param {number} poolId - The agent pool to use + * @param {number} agentId - The agent to replace */ - getCherryPickForRefName(project, repositoryId, refName) { + replaceAgent(agent, poolId, agentId) { return __awaiter(this, void 0, void 0, function* () { - if (refName == null) { - throw new TypeError('refName can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - refName: refName, + poolId: poolId, + agentId: agentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + res = yield this.rest.replace(url, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); resolve(ret); } catch (err) { @@ -18291,45 +30043,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits. + * Update agent details. * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} project - Project ID or project name - * @param {boolean} diffCommonCommit - If true, diff between common and target commits. If false, diff between base and target commits. - * @param {number} top - Maximum number of changes to return. Defaults to 100. - * @param {number} skip - Number of changes to skip - * @param {GitInterfaces.GitBaseVersionDescriptor} baseVersionDescriptor - Descriptor for base commit. - * @param {GitInterfaces.GitTargetVersionDescriptor} targetVersionDescriptor - Descriptor for target commit. + * @param {TaskAgentInterfaces.TaskAgent} agent - Updated details about the agent + * @param {number} poolId - The agent pool to use + * @param {number} agentId - The agent to update */ - getCommitDiffs(repositoryId, project, diffCommonCommit, top, skip, baseVersionDescriptor, targetVersionDescriptor) { + updateAgent(agent, poolId, agentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - diffCommonCommit: diffCommonCommit, - '$top': top, - '$skip': skip, + poolId: poolId, + agentId: agentId }; - if (baseVersionDescriptor) { - queryValues.baseVersionType = baseVersionDescriptor.versionType; - queryValues.baseVersion = baseVersionDescriptor.version; - queryValues.baseVersionOptions = baseVersionDescriptor.versionOptions; - } - if (targetVersionDescriptor) { - queryValues.targetVersionType = targetVersionDescriptor.versionType; - queryValues.targetVersion = targetVersionDescriptor.version; - queryValues.targetVersionOptions = targetVersionDescriptor.versionOptions; - } try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "615588d5-c0c7-4b88-88f8-e625306446e8", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitDiffs, false); + res = yield this.rest.update(url, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); resolve(ret); } catch (err) { @@ -18339,31 +30072,20 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a particular commit. + * Returns list of azure subscriptions * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} changeCount - The number of changes to include in the result. */ - getCommit(commitId, repositoryId, project, changeCount) { + getAzureManagementGroups() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - commitId: commitId, - repositoryId: repositoryId - }; - let queryValues = { - changeCount: changeCount, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "39fe3bf2-7ee0-4198-a469-4a29929afa9c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommit, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18373,36 +30095,20 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve git commits for a project + * Returns list of azure subscriptions * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top */ - getCommits(repositoryId, searchCriteria, project, skip, top) { + getAzureSubscriptions() { return __awaiter(this, void 0, void 0, function* () { - if (searchCriteria == null) { - throw new TypeError('searchCriteria can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - searchCriteria: searchCriteria, - '$skip': skip, - '$top': top, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bcd6189c-0303-471f-a8e1-acb22b74d700", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18412,38 +30118,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a list of commits associated with a particular push. + * GET a PAT token for managing (configuring, removing, tagging) deployment targets in a deployment group. * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of commits to return ("get the top x commits"). - * @param {number} skip - The number of commits to skip. - * @param {boolean} includeLinks - Set to false to avoid including REST Url links for resources. Defaults to true. + * @param {number} deploymentGroupId - ID of the deployment group in which deployment targets are managed. */ - getPushCommits(repositoryId, pushId, project, top, skip, includeLinks) { + generateDeploymentGroupAccessToken(project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { - if (pushId == null) { - throw new TypeError('pushId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId - }; - let queryValues = { - pushId: pushId, - top: top, - skip: skip, - includeLinks: includeLinks, + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "3d197ba2-c3e9-4253-882f-0ee2440f8174", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18453,34 +30146,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve git commits for a project matching the search criteria + * Create a deployment group. * - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options - * @param {string} repositoryId - The name or ID of the repository. + * @param {TaskAgentInterfaces.DeploymentGroupCreateParameter} deploymentGroup - Deployment group to create. * @param {string} project - Project ID or project name - * @param {number} skip - Number of commits to skip. - * @param {number} top - Maximum number of commits to return. - * @param {boolean} includeStatuses - True to include additional commit status information. */ - getCommitsBatch(searchCriteria, repositoryId, project, skip, top, includeStatuses) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - '$skip': skip, - '$top': top, - includeStatuses: includeStatuses, + addDeploymentGroup(deploymentGroup, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "6400dfb2-0bcb-462b-b992-5a57f8f1416c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, searchCriteria, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + res = yield this.rest.create(url, deploymentGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); resolve(ret); } catch (err) { @@ -18490,23 +30173,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve deleted git repositories. + * Delete a deployment group. * * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to be deleted. */ - getDeletedRepositories(project) { + deleteDeploymentGroup(project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2b6869c4-cb25-42b5-b7a3-0d3e6be0a11a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitDeletedRepository, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18516,26 +30201,31 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the file diffs for each of the specified files + * Get a deployment group by its ID. * - * @param {GitInterfaces.FileDiffsCriteria} fileDiffsCriteria - List of file parameters objects * @param {string} project - Project ID or project name - * @param {string} repositoryId - The name or ID of the repository + * @param {number} deploymentGroupId - ID of the deployment group. + * @param {TaskAgentInterfaces.DeploymentGroupActionFilter} actionFilter - Get the deployment group only if this action can be performed on it. + * @param {TaskAgentInterfaces.DeploymentGroupExpands} expand - Include these additional details in the returned object. */ - getFileDiffs(fileDiffsCriteria, project, repositoryId) { + getDeploymentGroup(project, deploymentGroupId, actionFilter, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + actionFilter: actionFilter, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c4c5a7e6-e9f3-4730-a92b-84baacff694b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, fileDiffsCriteria, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.FileDiff, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); resolve(ret); } catch (err) { @@ -18545,31 +30235,37 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all forks of a repository in the collection. + * Get a list of deployment groups by name or IDs. * - * @param {string} repositoryNameOrId - The name or ID of the repository. - * @param {string} collectionId - Team project collection ID. * @param {string} project - Project ID or project name - * @param {boolean} includeLinks - True to include links. + * @param {string} name - Name of the deployment group. + * @param {TaskAgentInterfaces.DeploymentGroupActionFilter} actionFilter - Get only deployment groups on which this action can be performed. + * @param {TaskAgentInterfaces.DeploymentGroupExpands} expand - Include these additional details in the returned objects. + * @param {string} continuationToken - Get deployment groups with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment groups to return. Default is **1000**. + * @param {number[]} ids - Comma separated list of IDs of the deployment groups. */ - getForks(repositoryNameOrId, collectionId, project, includeLinks) { + getDeploymentGroups(project, name, actionFilter, expand, continuationToken, top, ids) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryNameOrId: repositoryNameOrId, - collectionId: collectionId + project: project }; let queryValues = { - includeLinks: includeLinks, + name: name, + actionFilter: actionFilter, + '$expand': expand, + continuationToken: continuationToken, + '$top': top, + ids: ids && ids.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "158c0340-bf6f-489c-9625-d572a1480d57", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepositoryRef, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, true); resolve(ret); } catch (err) { @@ -18579,30 +30275,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the repositories endpoint + * Update a deployment group. * - * @param {GitInterfaces.GitForkSyncRequestParameters} syncParams - Source repository and ref mapping. - * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {TaskAgentInterfaces.DeploymentGroupUpdateParameter} deploymentGroup - Deployment group to update. * @param {string} project - Project ID or project name - * @param {boolean} includeLinks - True to include links + * @param {number} deploymentGroupId - ID of the deployment group. */ - createForkSyncRequest(syncParams, repositoryNameOrId, project, includeLinks) { + updateDeploymentGroup(deploymentGroup, project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryNameOrId: repositoryNameOrId - }; - let queryValues = { - includeLinks: includeLinks, + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, syncParams, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, false); + res = yield this.rest.update(url, deploymentGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); resolve(ret); } catch (err) { @@ -18612,31 +30304,31 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get a specific fork sync operation's details. + * Get a list of deployment group metrics. * - * @param {string} repositoryNameOrId - The name or ID of the repository. - * @param {number} forkSyncOperationId - OperationId of the sync request. * @param {string} project - Project ID or project name - * @param {boolean} includeLinks - True to include links. + * @param {string} deploymentGroupName - Name of the deployment group. + * @param {string} continuationToken - Get metrics for deployment groups with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment group metrics to return. Default is **50**. */ - getForkSyncRequest(repositoryNameOrId, forkSyncOperationId, project, includeLinks) { + getDeploymentGroupsMetrics(project, deploymentGroupName, continuationToken, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryNameOrId: repositoryNameOrId, - forkSyncOperationId: forkSyncOperationId + project: project }; let queryValues = { - includeLinks: includeLinks, + deploymentGroupName: deploymentGroupName, + continuationToken: continuationToken, + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "281c6308-427a-49e1-b83a-dac0f4862189", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroupMetrics, true); resolve(ret); } catch (err) { @@ -18646,31 +30338,32 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all requested fork sync operations on this repository. - * - * @param {string} repositoryNameOrId - The name or ID of the repository. * @param {string} project - Project ID or project name - * @param {boolean} includeAbandoned - True to include abandoned requests. - * @param {boolean} includeLinks - True to include links. + * @param {number} deploymentGroupId + * @param {number} machineId + * @param {number} completedRequestCount */ - getForkSyncRequests(repositoryNameOrId, project, includeAbandoned, includeLinks) { + getAgentRequestsForDeploymentMachine(project, deploymentGroupId, machineId, completedRequestCount) { return __awaiter(this, void 0, void 0, function* () { + if (machineId == null) { + throw new TypeError('machineId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryNameOrId: repositoryNameOrId + deploymentGroupId: deploymentGroupId }; let queryValues = { - includeAbandoned: includeAbandoned, - includeLinks: includeLinks, + machineId: machineId, + completedRequestCount: completedRequestCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a3540e5b-f0dc-4668-963b-b752459be545", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); resolve(ret); } catch (err) { @@ -18680,26 +30373,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create an import request. - * - * @param {GitInterfaces.GitImportRequest} importRequest - The import request to create. * @param {string} project - Project ID or project name - * @param {string} repositoryId - The name or ID of the repository. + * @param {number} deploymentGroupId + * @param {number[]} machineIds + * @param {number} completedRequestCount */ - createImportRequest(importRequest, project, repositoryId) { + getAgentRequestsForDeploymentMachines(project, deploymentGroupId, machineIds, completedRequestCount) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + machineIds: machineIds && machineIds.join(","), + completedRequestCount: completedRequestCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a3540e5b-f0dc-4668-963b-b752459be545", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, importRequest, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); resolve(ret); } catch (err) { @@ -18709,27 +30405,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a particular import request. - * * @param {string} project - Project ID or project name - * @param {string} repositoryId - The name or ID of the repository. - * @param {number} importRequestId - The unique identifier for the import request. + * @param {number} deploymentGroupId */ - getImportRequest(project, repositoryId, importRequestId) { + refreshDeploymentMachines(project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - importRequestId: importRequestId + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "91006ac4-0f68-4d82-a2bc-540676bd73ce", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18739,29 +30431,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve import requests for a repository. + * GET a PAT token for managing (configuring, removing, tagging) deployment agents in a deployment pool. * - * @param {string} project - Project ID or project name - * @param {string} repositoryId - The name or ID of the repository. - * @param {boolean} includeAbandoned - True to include abandoned import requests in the results. + * @param {number} poolId - ID of the deployment pool in which deployment agents are managed. */ - queryImportRequests(project, repositoryId, includeAbandoned) { + generateDeploymentPoolAccessToken(poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - includeAbandoned: includeAbandoned, + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e077ee4a-399b-420b-841f-c43fbc058e0b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, true); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18771,28 +30457,28 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retry or abandon a failed import request. + * Get a list of deployment pool summaries. * - * @param {GitInterfaces.GitImportRequest} importRequestToUpdate - The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. - * @param {string} project - Project ID or project name - * @param {string} repositoryId - The name or ID of the repository. - * @param {number} importRequestId - The unique identifier for the import request to update. + * @param {string} poolName - Name of the deployment pool. + * @param {TaskAgentInterfaces.DeploymentPoolSummaryExpands} expands - Include these additional details in the returned objects. + * @param {number[]} poolIds - List of deployment pool ids. */ - updateImportRequest(importRequestToUpdate, project, repositoryId, importRequestId) { + getDeploymentPoolsSummary(poolName, expands, poolIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - importRequestId: importRequestId + let routeValues = {}; + let queryValues = { + poolName: poolName, + expands: expands, + poolIds: poolIds && poolIds.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6525d6c6-258f-40e0-a1a9-8a24a3957625", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, importRequestToUpdate, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentPoolSummary, true); resolve(ret); } catch (err) { @@ -18802,50 +30488,34 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * Get agent requests for a deployment target. * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} path - The item path. * @param {string} project - Project ID or project name - * @param {string} scopePath - The path scope. The default is null. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. - * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. - * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. - * @param {boolean} download - Set to true to download the response as a file. Default is false. - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. - * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. - * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. - * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + * @param {number} deploymentGroupId - ID of the deployment group to which the target belongs. + * @param {number} targetId - ID of the deployment target. + * @param {number} completedRequestCount - Maximum number of completed requests to return. Default is **50** */ - getItem(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + getAgentRequestsForDeploymentTarget(project, deploymentGroupId, targetId, completedRequestCount) { return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); + if (targetId == null) { + throw new TypeError('targetId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId + deploymentGroupId: deploymentGroupId }; let queryValues = { - path: path, - scopePath: scopePath, - recursionLevel: recursionLevel, - includeContentMetadata: includeContentMetadata, - latestProcessedChange: latestProcessedChange, - download: download, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - resolveLfs: resolveLfs, - sanitize: sanitize, + targetId: targetId, + completedRequestCount: completedRequestCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2fac0be3-8c8f-4473-ab93-c1389b08a2c9", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); resolve(ret); } catch (err) { @@ -18855,49 +30525,36 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * Get agent requests for a list deployment targets. * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} path - The item path. * @param {string} project - Project ID or project name - * @param {string} scopePath - The path scope. The default is null. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. - * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. - * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. - * @param {boolean} download - Set to true to download the response as a file. Default is false. - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. - * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. - * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. - * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + * @param {number} deploymentGroupId - ID of the deployment group to which the targets belong. + * @param {number[]} targetIds - Comma separated list of IDs of the deployment targets. + * @param {number} ownerId - Id of owner of agent job request. + * @param {Date} completedOn - Datetime to return request after this time. + * @param {number} completedRequestCount - Maximum number of completed requests to return for each target. Default is **50** */ - getItemContent(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + getAgentRequestsForDeploymentTargets(project, deploymentGroupId, targetIds, ownerId, completedOn, completedRequestCount) { return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId + deploymentGroupId: deploymentGroupId }; let queryValues = { - path: path, - scopePath: scopePath, - recursionLevel: recursionLevel, - includeContentMetadata: includeContentMetadata, - latestProcessedChange: latestProcessedChange, - download: download, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - resolveLfs: resolveLfs, - sanitize: sanitize, + targetIds: targetIds && targetIds.join(","), + ownerId: ownerId, + completedOn: completedOn, + completedRequestCount: completedRequestCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2fac0be3-8c8f-4473-ab93-c1389b08a2c9", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); } catch (err) { reject(err); @@ -18906,43 +30563,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * Upgrade the deployment targets in a deployment group. * - * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name - * @param {string} scopePath - The path scope. The default is null. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. - * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. - * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. - * @param {boolean} download - Set to true to download the response as a file. Default is false. - * @param {boolean} includeLinks - Set to true to include links to items. Default is false. - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. - * @param {boolean} zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks + * @param {number} deploymentGroupId - ID of the deployment group. */ - getItems(repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor, zipForUnix) { + refreshDeploymentTargets(project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId - }; - let queryValues = { - scopePath: scopePath, - recursionLevel: recursionLevel, - includeContentMetadata: includeContentMetadata, - latestProcessedChange: latestProcessedChange, - download: download, - includeLinks: includeLinks, - versionDescriptor: versionDescriptor, - zipForUnix: zipForUnix, + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1c1a817f-f23d-41c6-bf8d-14b638f64152", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, true); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -18952,49 +30591,22 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} path - The item path. - * @param {string} project - Project ID or project name - * @param {string} scopePath - The path scope. The default is null. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. - * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. - * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. - * @param {boolean} download - Set to true to download the response as a file. Default is false. - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. - * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. - * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. - * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. */ - getItemText(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + queryEndpoint(endpoint) { return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - path: path, - scopePath: scopePath, - recursionLevel: recursionLevel, - includeContentMetadata: includeContentMetadata, - latestProcessedChange: latestProcessedChange, - download: download, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - resolveLfs: resolveLfs, - sanitize: sanitize, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f223b809-8c33-4b7d-b53f-07232569b5d6", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, endpoint, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); } catch (err) { reject(err); @@ -19003,49 +30615,32 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * Get environment deployment execution history * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} path - The item path. * @param {string} project - Project ID or project name - * @param {string} scopePath - The path scope. The default is null. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. - * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. - * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. - * @param {boolean} download - Set to true to download the response as a file. Default is false. - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. - * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. - * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. - * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + * @param {number} environmentId + * @param {string} continuationToken + * @param {number} top */ - getItemZip(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + getEnvironmentDeploymentExecutionRecords(project, environmentId, continuationToken, top) { return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId + environmentId: environmentId }; let queryValues = { - path: path, - scopePath: scopePath, - recursionLevel: recursionLevel, - includeContentMetadata: includeContentMetadata, - latestProcessedChange: latestProcessedChange, - download: download, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - resolveLfs: resolveLfs, - sanitize: sanitize, + continuationToken: continuationToken, + top: top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "51bb5d21-4305-4ea6-9dbb-b7488af73334", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentDeploymentExecutionRecord, true); + resolve(ret); } catch (err) { reject(err); @@ -19054,26 +30649,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path + * Create an environment. * - * @param {GitInterfaces.GitItemRequestData} requestData - Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references. - * @param {string} repositoryId - The name or ID of the repository + * @param {TaskAgentInterfaces.EnvironmentCreateParameter} environmentCreateParameter - Environment to create. * @param {string} project - Project ID or project name */ - getItemsBatch(requestData, repositoryId, project) { + addEnvironment(environmentCreateParameter, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "630fd2e4-fb88-4f85-ad21-13f3fd1fbca9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, requestData, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, true); + res = yield this.rest.create(url, environmentCreateParameter, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); resolve(ret); } catch (err) { @@ -19083,38 +30676,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId. + * Delete the specified environment. * - * @param {string} repositoryNameOrId - ID or name of the local repository. - * @param {string} commitId - First commit, usually the tip of the target branch of the potential merge. - * @param {string} otherCommitId - Other commit, usually the tip of the source branch of the potential merge. * @param {string} project - Project ID or project name - * @param {string} otherCollectionId - The collection ID where otherCommitId lives. - * @param {string} otherRepositoryId - The repository ID where otherCommitId lives. + * @param {number} environmentId - ID of the environment. */ - getMergeBases(repositoryNameOrId, commitId, otherCommitId, project, otherCollectionId, otherRepositoryId) { + deleteEnvironment(project, environmentId) { return __awaiter(this, void 0, void 0, function* () { - if (otherCommitId == null) { - throw new TypeError('otherCommitId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryNameOrId: repositoryNameOrId, - commitId: commitId - }; - let queryValues = { - otherCommitId: otherCommitId, - otherCollectionId: otherCollectionId, - otherRepositoryId: otherRepositoryId, + environmentId: environmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7cf2abb6-c964-4f7e-9872-f78c66e72e9c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -19124,30 +30704,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Request a git merge operation. Currently we support merging only 2 commits. + * Get an environment by its ID. * - * @param {GitInterfaces.GitMergeParameters} mergeParameters - Parents commitIds and merge commit messsage. * @param {string} project - Project ID or project name - * @param {string} repositoryNameOrId - The name or ID of the repository. - * @param {boolean} includeLinks - True to include links + * @param {number} environmentId - ID of the environment. + * @param {TaskAgentInterfaces.EnvironmentExpands} expands - Include these additional details in the returned objects. */ - createMergeRequest(mergeParameters, project, repositoryNameOrId, includeLinks) { + getEnvironmentById(project, environmentId, expands) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryNameOrId: repositoryNameOrId + environmentId: environmentId }; let queryValues = { - includeLinks: includeLinks, + expands: expands, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "985f7ae9-844f-4906-9897-7ef41516c0e2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, mergeParameters, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitMerge, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); resolve(ret); } catch (err) { @@ -19157,31 +30736,31 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get a specific merge operation's details. + * Get all environments. * * @param {string} project - Project ID or project name - * @param {string} repositoryNameOrId - The name or ID of the repository. - * @param {number} mergeOperationId - OperationId of the merge request. - * @param {boolean} includeLinks - True to include links + * @param {string} name + * @param {string} continuationToken + * @param {number} top */ - getMergeRequest(project, repositoryNameOrId, mergeOperationId, includeLinks) { + getEnvironments(project, name, continuationToken, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryNameOrId: repositoryNameOrId, - mergeOperationId: mergeOperationId + project: project }; let queryValues = { - includeLinks: includeLinks, + name: name, + continuationToken: continuationToken, + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "985f7ae9-844f-4906-9897-7ef41516c0e2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitMerge, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, true); resolve(ret); } catch (err) { @@ -19191,33 +30770,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Attach a new file to a pull request. + * Update the specified environment. * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} fileName - The name of the file. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. + * @param {TaskAgentInterfaces.EnvironmentUpdateParameter} environmentUpdateParameter - Environment data to update. * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. */ - createAttachment(customHeaders, contentStream, fileName, repositoryId, pullRequestId, project) { + updateEnvironment(environmentUpdateParameter, project, environmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - fileName: fileName, - repositoryId: repositoryId, - pullRequestId: pullRequestId + environmentId: environmentId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("POST", url, contentStream, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Attachment, false); + res = yield this.rest.update(url, environmentUpdateParameter, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); resolve(ret); } catch (err) { @@ -19227,28 +30799,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Delete a pull request attachment. - * - * @param {string} fileName - The name of the attachment to delete. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {string} hubName + * @param {boolean} includeEnterpriseUsersCount + * @param {boolean} includeHostedAgentMinutesCount */ - deleteAttachment(fileName, repositoryId, pullRequestId, project) { + getTaskHubLicenseDetails(hubName, includeEnterpriseUsersCount, includeHostedAgentMinutesCount) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - fileName: fileName, - repositoryId: repositoryId, - pullRequestId: pullRequestId + hubName: hubName + }; + let queryValues = { + includeEnterpriseUsersCount: includeEnterpriseUsersCount, + includeHostedAgentMinutesCount: includeHostedAgentMinutesCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "distributedtask", "f9f0f436-b8a1-4475-9041-1ccdbf8f0128", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -19259,28 +30829,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the file content of a pull request attachment. - * - * @param {string} fileName - The name of the attachment. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskHubLicenseDetails} taskHubLicenseDetails + * @param {string} hubName */ - getAttachmentContent(fileName, repositoryId, pullRequestId, project) { + updateTaskHubLicenseDetails(taskHubLicenseDetails, hubName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - fileName: fileName, - repositoryId: repositoryId, - pullRequestId: pullRequestId + hubName: hubName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "distributedtask", "f9f0f436-b8a1-4475-9041-1ccdbf8f0128", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, taskHubLicenseDetails, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -19289,27 +30854,19 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get a list of files attached to a given pull request. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.InputValidationRequest} inputValidationRequest */ - getAttachments(repositoryId, pullRequestId, project) { + validateInputs(inputValidationRequest) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "58475b1e-adaf-4155-9bc1-e04bf1fff4c2", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Attachment, true); + res = yield this.rest.create(url, inputValidationRequest, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -19319,28 +30876,35 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the file content of a pull request attachment. - * - * @param {string} fileName - The name of the attachment. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param {TaskAgentInterfaces.TaskResult} result + * @param {boolean} agentShuttingDown */ - getAttachmentZip(fileName, repositoryId, pullRequestId, project) { + deleteAgentRequest(poolId, requestId, lockToken, result, agentShuttingDown) { return __awaiter(this, void 0, void 0, function* () { + if (lockToken == null) { + throw new TypeError('lockToken can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - fileName: fileName, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId, + requestId: requestId + }; + let queryValues = { + lockToken: lockToken, + result: result, + agentShuttingDown: agentShuttingDown, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -19349,31 +30913,27 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Add a like on a comment. - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - The ID of the thread that contains the comment. - * @param {number} commentId - The ID of the comment. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} requestId + * @param {boolean} includeStatus */ - createLike(repositoryId, pullRequestId, threadId, commentId, project) { + getAgentRequest(poolId, requestId, includeStatus) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId, - commentId: commentId + poolId: poolId, + requestId: requestId + }; + let queryValues = { + includeStatus: includeStatus, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); resolve(ret); } catch (err) { @@ -19383,31 +30943,30 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Delete a like on a comment. - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - The ID of the thread that contains the comment. - * @param {number} commentId - The ID of the comment. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} top + * @param {string} continuationToken */ - deleteLike(repositoryId, pullRequestId, threadId, commentId, project) { + getAgentRequests(poolId, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (top == null) { + throw new TypeError('top can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId, - commentId: commentId + poolId: poolId + }; + let queryValues = { + '$top': top, + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); resolve(ret); } catch (err) { @@ -19417,31 +30976,30 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get likes for a comment. - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - The ID of the thread that contains the comment. - * @param {number} commentId - The ID of the comment. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} agentId + * @param {number} completedRequestCount */ - getLikes(repositoryId, pullRequestId, threadId, commentId, project) { + getAgentRequestsForAgent(poolId, agentId, completedRequestCount) { return __awaiter(this, void 0, void 0, function* () { + if (agentId == null) { + throw new TypeError('agentId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId, - commentId: commentId + poolId: poolId + }; + let queryValues = { + agentId: agentId, + completedRequestCount: completedRequestCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); resolve(ret); } catch (err) { @@ -19451,35 +31009,27 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the commits for the specified iteration of a pull request. - * - * @param {string} repositoryId - ID or name of the repository. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} iterationId - ID of the iteration from which to get the commits. - * @param {string} project - Project ID or project name - * @param {number} top - Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500. - * @param {number} skip - Number of commits to skip. + * @param {number} poolId + * @param {number[]} agentIds + * @param {number} completedRequestCount */ - getPullRequestIterationCommits(repositoryId, pullRequestId, iterationId, project, top, skip) { + getAgentRequestsForAgents(poolId, agentIds, completedRequestCount) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - iterationId: iterationId + poolId: poolId }; let queryValues = { - top: top, - skip: skip, + agentIds: agentIds && agentIds.join(","), + completedRequestCount: completedRequestCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "e7ea0883-095f-4926-b5fb-f24691c26fb9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); resolve(ret); } catch (err) { @@ -19489,27 +31039,30 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the commits for the specified pull request. - * - * @param {string} repositoryId - ID or name of the repository. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {string} planId + * @param {string} jobId */ - getPullRequestCommits(repositoryId, pullRequestId, project) { + getAgentRequestsForPlan(poolId, planId, jobId) { return __awaiter(this, void 0, void 0, function* () { + if (planId == null) { + throw new TypeError('planId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId + }; + let queryValues = { + planId: planId, + jobId: jobId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "52823034-34a8-4576-922c-8d8b77e9e4c4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); resolve(ret); } catch (err) { @@ -19519,29 +31072,22 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve one conflict for a pull request by ID - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {number} conflictId - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId */ - getPullRequestConflict(repositoryId, pullRequestId, conflictId, project) { + queueAgentRequestByPool(request, poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - conflictId: conflictId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + res = yield this.rest.create(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); resolve(ret); } catch (err) { @@ -19551,39 +31097,33 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all conflicts for a pull request - * - * @param {string} repositoryId - The repository of the Pull Request. - * @param {number} pullRequestId - The pull request ID. - * @param {string} project - Project ID or project name - * @param {number} skip - Conflicts to skip. - * @param {number} top - Conflicts to return after skip. - * @param {boolean} includeObsolete - Includes obsolete conflicts. - * @param {boolean} excludeResolved - Excludes conflicts already resolved. - * @param {boolean} onlyResolved - Returns only the conflicts that are resolved. + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param {TaskAgentInterfaces.TaskAgentRequestUpdateOptions} updateOptions */ - getPullRequestConflicts(repositoryId, pullRequestId, project, skip, top, includeObsolete, excludeResolved, onlyResolved) { + updateAgentRequest(request, poolId, requestId, lockToken, updateOptions) { return __awaiter(this, void 0, void 0, function* () { + if (lockToken == null) { + throw new TypeError('lockToken can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId, + requestId: requestId }; let queryValues = { - '$skip': skip, - '$top': top, - includeObsolete: includeObsolete, - excludeResolved: excludeResolved, - onlyResolved: onlyResolved, + lockToken: lockToken, + updateOptions: updateOptions, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); + res = yield this.rest.update(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); resolve(ret); } catch (err) { @@ -19593,30 +31133,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update merge conflict resolution - * - * @param {GitInterfaces.GitConflict} conflict - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {number} conflictId + * @param {TaskAgentInterfaces.KubernetesResourceCreateParameters} createParameters * @param {string} project - Project ID or project name + * @param {number} environmentId */ - updatePullRequestConflict(conflict, repositoryId, pullRequestId, conflictId, project) { + addKubernetesResource(createParameters, project, environmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - conflictId: conflictId + environmentId: environmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, conflict, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + res = yield this.rest.create(url, createParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.KubernetesResource, false); resolve(ret); } catch (err) { @@ -19626,28 +31160,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update multiple merge conflict resolutions - * - * @param {GitInterfaces.GitConflict[]} conflictUpdates - * @param {string} repositoryId - * @param {number} pullRequestId * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId */ - updatePullRequestConflicts(conflictUpdates, repositoryId, pullRequestId, project) { + deleteKubernetesResource(project, environmentId, resourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + environmentId: environmentId, + resourceId: resourceId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, conflictUpdates, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -19657,37 +31188,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve the changes made in a pull request between two iterations. - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} iterationId - ID of the pull request iteration.
Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request. * @param {string} project - Project ID or project name - * @param {number} top - Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000. - * @param {number} skip - Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100. - * @param {number} compareTo - ID of the pull request iteration to compare against. The default value is zero which indicates the comparison is made against the common commit between the source and target branches + * @param {number} environmentId + * @param {number} resourceId */ - getPullRequestIterationChanges(repositoryId, pullRequestId, iterationId, project, top, skip, compareTo) { + getKubernetesResource(project, environmentId, resourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - iterationId: iterationId - }; - let queryValues = { - '$top': top, - '$skip': skip, - '$compareTo': compareTo, + environmentId: environmentId, + resourceId: resourceId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4216bdcf-b6b1-4d59-8b82-c34cc183fc8b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIterationChanges, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.KubernetesResource, false); resolve(ret); } catch (err) { @@ -19697,29 +31216,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the specified iteration for a pull request. - * - * @param {string} repositoryId - ID or name of the repository. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} iterationId - ID of the pull request iteration to return. * @param {string} project - Project ID or project name + * @param {number} machineGroupId */ - getPullRequestIteration(repositoryId, pullRequestId, iterationId, project) { + generateDeploymentMachineGroupAccessToken(project, machineGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - iterationId: iterationId + machineGroupId: machineGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "d43911ee-6958-46b0-a42b-8445b8a0d004", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f8c7c0de-ac0d-469b-9cb1-c21f72d67693", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIteration, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -19729,31 +31242,22 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the list of iterations for the specified pull request. - * - * @param {string} repositoryId - ID or name of the repository. - * @param {number} pullRequestId - ID of the pull request. + * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup * @param {string} project - Project ID or project name - * @param {boolean} includeCommits - If true, include the commits associated with each iteration in the response. */ - getPullRequestIterations(repositoryId, pullRequestId, project, includeCommits) { + addDeploymentMachineGroup(machineGroup, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId - }; - let queryValues = { - includeCommits: includeCommits, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "d43911ee-6958-46b0-a42b-8445b8a0d004", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIteration, true); + res = yield this.rest.create(url, machineGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); resolve(ret); } catch (err) { @@ -19763,30 +31267,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body. - * - * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} iterationId - ID of the pull request iteration. * @param {string} project - Project ID or project name + * @param {number} machineGroupId */ - createPullRequestIterationStatus(status, repositoryId, pullRequestId, iterationId, project) { + deleteDeploymentMachineGroup(project, machineGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - iterationId: iterationId + machineGroupId: machineGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, status, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -19796,31 +31293,27 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Delete pull request iteration status. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} iterationId - ID of the pull request iteration. - * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter */ - deletePullRequestIterationStatus(repositoryId, pullRequestId, iterationId, statusId, project) { + getDeploymentMachineGroup(project, machineGroupId, actionFilter) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - iterationId: iterationId, - statusId: statusId + machineGroupId: machineGroupId + }; + let queryValues = { + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); resolve(ret); } catch (err) { @@ -19830,31 +31323,54 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} iterationId - ID of the pull request iteration. - * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name + * @param {string} machineGroupName + * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter + */ + getDeploymentMachineGroups(project, machineGroupName, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + machineGroupName: machineGroupName, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup + * @param {string} project - Project ID or project name + * @param {number} machineGroupId */ - getPullRequestIterationStatus(repositoryId, pullRequestId, iterationId, statusId, project) { + updateDeploymentMachineGroup(machineGroup, project, machineGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - iterationId: iterationId, - statusId: statusId + machineGroupId: machineGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + res = yield this.rest.update(url, machineGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); resolve(ret); } catch (err) { @@ -19864,29 +31380,27 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get all the statuses associated with a pull request iteration. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} iterationId - ID of the pull request iteration. * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {string[]} tagFilters */ - getPullRequestIterationStatuses(repositoryId, pullRequestId, iterationId, project) { + getDeploymentMachineGroupMachines(project, machineGroupId, tagFilters) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - iterationId: iterationId + machineGroupId: machineGroupId + }; + let queryValues = { + tagFilters: tagFilters && tagFilters.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "966c3874-c347-4b18-a90c-d509116717fd", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); resolve(ret); } catch (err) { @@ -19896,33 +31410,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update pull request iteration statuses collection. The only supported operation type is `remove`. - * - * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} iterationId - ID of the pull request iteration. + * @param {TaskAgentInterfaces.DeploymentMachine[]} deploymentMachines * @param {string} project - Project ID or project name + * @param {number} machineGroupId */ - updatePullRequestIterationStatuses(customHeaders, patchDocument, repositoryId, pullRequestId, iterationId, project) { + updateDeploymentMachineGroupMachines(deploymentMachines, project, machineGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - iterationId: iterationId + machineGroupId: machineGroupId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "966c3874-c347-4b18-a90c-d509116717fd", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.update(url, patchDocument, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, deploymentMachines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); resolve(ret); } catch (err) { @@ -19932,32 +31437,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create a label for a specified pull request. The only required field is the name of the new label. - * - * @param {TfsCoreInterfaces.WebApiCreateTagRequestData} label - Label to assign to the pull request. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. + * @param {TaskAgentInterfaces.DeploymentMachine} machine * @param {string} project - Project ID or project name - * @param {string} projectId - Project ID or project name. + * @param {number} deploymentGroupId */ - createPullRequestLabel(label, repositoryId, pullRequestId, project, projectId) { + addDeploymentMachine(machine, project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId - }; - let queryValues = { - projectId: projectId, + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, label, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); resolve(ret); } catch (err) { @@ -19967,28 +31464,20 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Removes a label from the set of those assigned to the pull request. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} labelIdOrName - The name or ID of the label requested. * @param {string} project - Project ID or project name - * @param {string} projectId - Project ID or project name. + * @param {number} deploymentGroupId + * @param {number} machineId */ - deletePullRequestLabels(repositoryId, pullRequestId, labelIdOrName, project, projectId) { + deleteDeploymentMachine(project, deploymentGroupId, machineId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - labelIdOrName: labelIdOrName - }; - let queryValues = { - projectId: projectId, + deploymentGroupId: deploymentGroupId, + machineId: machineId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -20003,33 +31492,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieves a single label that has been assigned to a pull request. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} labelIdOrName - The name or ID of the label requested. * @param {string} project - Project ID or project name - * @param {string} projectId - Project ID or project name. + * @param {number} deploymentGroupId + * @param {number} machineId + * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand */ - getPullRequestLabel(repositoryId, pullRequestId, labelIdOrName, project, projectId) { + getDeploymentMachine(project, deploymentGroupId, machineId, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - labelIdOrName: labelIdOrName + deploymentGroupId: deploymentGroupId, + machineId: machineId }; let queryValues = { - projectId: projectId, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); resolve(ret); } catch (err) { @@ -20039,31 +31524,31 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get all the labels assigned to a pull request. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {string} projectId - Project ID or project name. + * @param {number} deploymentGroupId + * @param {string[]} tags + * @param {string} name + * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand */ - getPullRequestLabels(repositoryId, pullRequestId, project, projectId) { + getDeploymentMachines(project, deploymentGroupId, tags, name, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + deploymentGroupId: deploymentGroupId }; let queryValues = { - projectId: projectId, + tags: tags && tags.join(","), + name: name, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); resolve(ret); } catch (err) { @@ -20073,27 +31558,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get external properties of the pull request. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. + * @param {TaskAgentInterfaces.DeploymentMachine} machine * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId */ - getPullRequestProperties(repositoryId, pullRequestId, project) { + replaceDeploymentMachine(machine, project, deploymentGroupId, machineId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + deploymentGroupId: deploymentGroupId, + machineId: machineId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "48a52185-5b9e-4736-9dc1-bb1e2feac80b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); resolve(ret); } catch (err) { @@ -20103,31 +31587,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed. - * - * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Properties to add, replace or remove in JSON Patch format. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. + * @param {TaskAgentInterfaces.DeploymentMachine} machine * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId */ - updatePullRequestProperties(customHeaders, patchDocument, repositoryId, pullRequestId, project) { + updateDeploymentMachine(machine, project, deploymentGroupId, machineId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + deploymentGroupId: deploymentGroupId, + machineId: machineId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "48a52185-5b9e-4736-9dc1-bb1e2feac80b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.update(url, patchDocument, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); resolve(ret); } catch (err) { @@ -20137,26 +31616,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests. - * - * @param {GitInterfaces.GitPullRequestQuery} queries - The list of queries to perform. - * @param {string} repositoryId - ID of the repository. + * @param {TaskAgentInterfaces.DeploymentMachine[]} machines * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId */ - getPullRequestQuery(queries, repositoryId, project) { + updateDeploymentMachines(machines, project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b3a6eebe-9cf0-49ea-b6cb-1a4c5f5007b0", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, queries, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestQuery, false); + res = yield this.rest.update(url, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); resolve(ret); } catch (err) { @@ -20166,30 +31643,22 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Add a reviewer to a pull request or cast a vote. - * - * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} reviewerId - ID of the reviewer. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition + * @param {number} poolId */ - createPullRequestReviewer(reviewer, repositoryId, pullRequestId, reviewerId, project) { + createAgentPoolMaintenanceDefinition(definition, poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - reviewerId: reviewerId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, reviewer, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, definition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); resolve(ret); } catch (err) { @@ -20199,28 +31668,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Add reviewers to a pull request. - * - * @param {VSSInterfaces.IdentityRef[]} reviewers - Reviewers to add to the pull request. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} definitionId */ - createPullRequestReviewers(reviewers, repositoryId, pullRequestId, project) { + deleteAgentPoolMaintenanceDefinition(poolId, definitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId, + definitionId: definitionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, reviewers, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -20230,28 +31694,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Add an unmaterialized identity to the reviewers of a pull request. - * - * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer to add to the pull request. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} definitionId */ - createUnmaterializedPullRequestReviewer(reviewer, repositoryId, pullRequestId, project) { + getAgentPoolMaintenanceDefinition(poolId, definitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId, + definitionId: definitionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, reviewer, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); resolve(ret); } catch (err) { @@ -20261,29 +31720,21 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Remove a reviewer from a pull request. - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} reviewerId - ID of the reviewer to remove. - * @param {string} project - Project ID or project name + * @param {number} poolId */ - deletePullRequestReviewer(repositoryId, pullRequestId, reviewerId, project) { + getAgentPoolMaintenanceDefinitions(poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - reviewerId: reviewerId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, true); resolve(ret); } catch (err) { @@ -20293,29 +31744,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve information about a particular reviewer on a pull request - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} reviewerId - ID of the reviewer. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition + * @param {number} poolId + * @param {number} definitionId */ - getPullRequestReviewer(repositoryId, pullRequestId, reviewerId, project) { + updateAgentPoolMaintenanceDefinition(definition, poolId, definitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - reviewerId: reviewerId + poolId: poolId, + definitionId: definitionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, definition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); resolve(ret); } catch (err) { @@ -20325,27 +31771,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve the reviewers for a pull request - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} jobId */ - getPullRequestReviewers(repositoryId, pullRequestId, project) { + deleteAgentPoolMaintenanceJob(poolId, jobId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId, + jobId: jobId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -20355,30 +31797,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined - * - * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} reviewerId - ID of the reviewer. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} jobId */ - updatePullRequestReviewer(reviewer, repositoryId, pullRequestId, reviewerId, project) { + getAgentPoolMaintenanceJob(poolId, jobId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - reviewerId: reviewerId + poolId: poolId, + jobId: jobId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, reviewer, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); resolve(ret); } catch (err) { @@ -20388,29 +31823,22 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names. - * - * @param {GitInterfaces.IdentityRefWithVote[]} patchVotes - IDs of the reviewers whose votes will be reset to zero - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} jobId */ - updatePullRequestReviewers(patchVotes, repositoryId, pullRequestId, project) { + getAgentPoolMaintenanceJobLogs(poolId, jobId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId, + jobId: jobId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, patchVotes, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -20419,25 +31847,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a pull request. - * - * @param {number} pullRequestId - The ID of the pull request to retrieve. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} definitionId */ - getPullRequestById(pullRequestId, project) { + getAgentPoolMaintenanceJobs(poolId, definitionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - pullRequestId: pullRequestId + poolId: poolId + }; + let queryValues = { + definitionId: definitionId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01a46dea-7d46-4d40-bc84-319e7c260d99", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, true); resolve(ret); } catch (err) { @@ -20447,36 +31875,22 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all pull requests matching a specified criteria. - * - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. - * @param {number} maxCommentLength - Not used. - * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. - * @param {number} top - The number of pull requests to retrieve. + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job + * @param {number} poolId */ - getPullRequestsByProject(project, searchCriteria, maxCommentLength, skip, top) { + queueAgentPoolMaintenanceJob(job, poolId) { return __awaiter(this, void 0, void 0, function* () { - if (searchCriteria == null) { - throw new TypeError('searchCriteria can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - searchCriteria: searchCriteria, - maxCommentLength: maxCommentLength, - '$skip': skip, - '$top': top, + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a5d28130-9cd2-40fa-9f08-902e7daa9efb", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, true); + res = yield this.rest.create(url, job, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); resolve(ret); } catch (err) { @@ -20486,30 +31900,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create a pull request. - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - The pull request to create. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {string} project - Project ID or project name - * @param {boolean} supportsIterations - If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed. + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job + * @param {number} poolId + * @param {number} jobId */ - createPullRequest(gitPullRequestToCreate, repositoryId, project, supportsIterations) { + updateAgentPoolMaintenanceJob(job, poolId, jobId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId - }; - let queryValues = { - supportsIterations: supportsIterations, + poolId: poolId, + jobId: jobId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, gitPullRequestToCreate, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + res = yield this.rest.update(url, job, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); resolve(ret); } catch (err) { @@ -20519,39 +31927,30 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a pull request. - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - The ID of the pull request to retrieve. - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - Not used. - * @param {number} skip - Not used. - * @param {number} top - Not used. - * @param {boolean} includeCommits - If true, the pull request will be returned with the associated commits. - * @param {boolean} includeWorkItemRefs - If true, the pull request will be returned with the associated work item references. + * @param {number} poolId + * @param {number} messageId + * @param {string} sessionId */ - getPullRequest(repositoryId, pullRequestId, project, maxCommentLength, skip, top, includeCommits, includeWorkItemRefs) { + deleteMessage(poolId, messageId, sessionId) { return __awaiter(this, void 0, void 0, function* () { + if (sessionId == null) { + throw new TypeError('sessionId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId, + messageId: messageId }; let queryValues = { - maxCommentLength: maxCommentLength, - '$skip': skip, - '$top': top, - includeCommits: includeCommits, - includeWorkItemRefs: includeWorkItemRefs, + sessionId: sessionId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -20561,38 +31960,30 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all pull requests matching a specified criteria. - * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - Not used. - * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. - * @param {number} top - The number of pull requests to retrieve. + * @param {number} poolId + * @param {string} sessionId + * @param {number} lastMessageId */ - getPullRequests(repositoryId, searchCriteria, project, maxCommentLength, skip, top) { + getMessage(poolId, sessionId, lastMessageId) { return __awaiter(this, void 0, void 0, function* () { - if (searchCriteria == null) { - throw new TypeError('searchCriteria can not be null or undefined'); + if (sessionId == null) { + throw new TypeError('sessionId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + poolId: poolId }; let queryValues = { - searchCriteria: searchCriteria, - maxCommentLength: maxCommentLength, - '$skip': skip, - '$top': top, + sessionId: sessionId, + lastMessageId: lastMessageId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -20602,28 +31993,28 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update a pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - The pull request content that should be updated. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request to update. - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {number} agentId */ - updatePullRequest(gitPullRequestToUpdate, repositoryId, pullRequestId, project) { + refreshAgent(poolId, agentId) { return __awaiter(this, void 0, void 0, function* () { + if (agentId == null) { + throw new TypeError('agentId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId + }; + let queryValues = { + agentId: agentId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, gitPullRequestToUpdate, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -20633,27 +32024,20 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Sends an e-mail notification about a specific pull request to a set of recipients - * - * @param {GitInterfaces.ShareNotificationContext} userMessage - * @param {string} repositoryId - ID of the git repository. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {number} poolId */ - sharePullRequest(userMessage, repositoryId, pullRequestId, project) { + refreshAgents(poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "696f3a82-47c9-487f-9117-b9d00972ca84", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, userMessage, options); + res = yield this.rest.create(url, null, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -20664,28 +32048,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create a pull request status. - * - * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentMessage} message + * @param {number} poolId + * @param {number} requestId */ - createPullRequestStatus(status, repositoryId, pullRequestId, project) { + sendMessage(message, poolId, requestId) { return __awaiter(this, void 0, void 0, function* () { + if (requestId == null) { + throw new TypeError('requestId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId + }; + let queryValues = { + requestId: requestId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, status, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + res = yield this.rest.create(url, message, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -20695,29 +32080,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Delete pull request status. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} statusId - ID of the pull request status. - * @param {string} project - Project ID or project name + * @param {string} packageType + * @param {string} platform + * @param {string} version */ - deletePullRequestStatus(repositoryId, pullRequestId, statusId, project) { + getPackage(packageType, platform, version) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - statusId: statusId + packageType: packageType, + platform: platform, + version: version }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "8ffcd551-079c-493a-9c02-54346299d144", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.PackageMetadata, false); resolve(ret); } catch (err) { @@ -20727,29 +32108,27 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} statusId - ID of the pull request status. - * @param {string} project - Project ID or project name + * @param {string} packageType + * @param {string} platform + * @param {number} top */ - getPullRequestStatus(repositoryId, pullRequestId, statusId, project) { + getPackages(packageType, platform, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - statusId: statusId + packageType: packageType, + platform: platform + }; + let queryValues = { + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "8ffcd551-079c-493a-9c02-54346299d144", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.PackageMetadata, true); resolve(ret); } catch (err) { @@ -20759,28 +32138,20 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get all the statuses associated with a pull request. - * - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {number} poolId */ - getPullRequestStatuses(repositoryId, pullRequestId, project) { + getAgentPoolMetadata(poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0d62f887-9f53-48b9-9161-4c35d5735b0f", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -20789,30 +32160,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update pull request statuses collection. The only supported operation type is `remove`. - * - * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. - * @param {string} repositoryId - The repository ID of the pull request’s target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {any} agentPoolMetadata + * @param {number} poolId */ - updatePullRequestStatuses(customHeaders, patchDocument, repositoryId, pullRequestId, project) { + setAgentPoolMetadata(customHeaders, agentPoolMetadata, poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId }; customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/json-patch+json"; + customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0d62f887-9f53-48b9-9161-4c35d5735b0f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); options.additionalHeaders = customHeaders; let res; - res = yield this.rest.update(url, patchDocument, options); + res = yield this.rest.replace(url, agentPoolMetadata, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -20823,30 +32188,21 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). + * Create an agent pool. * - * @param {GitInterfaces.Comment} comment - The comment to create. Comments can be up to 150,000 characters. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - ID of the thread that the desired comment is in. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentPool} pool - Details about the new agent pool */ - createComment(comment, repositoryId, pullRequestId, threadId, project) { + addAgentPool(pool) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, comment, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); + res = yield this.rest.create(url, pool, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); resolve(ret); } catch (err) { @@ -20856,26 +32212,18 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Delete a comment associated with a specific thread in a pull request. + * Delete an agent pool. * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - ID of the thread that the desired comment is in. - * @param {number} commentId - ID of the comment. - * @param {string} project - Project ID or project name + * @param {number} poolId - ID of the agent pool to delete */ - deleteComment(repositoryId, pullRequestId, threadId, commentId, project) { + deleteAgentPool(poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId, - commentId: commentId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -20890,31 +32238,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a comment associated with a specific thread in a pull request. + * Get information about an agent pool. * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - ID of the thread that the desired comment is in. - * @param {number} commentId - ID of the comment. - * @param {string} project - Project ID or project name + * @param {number} poolId - An agent pool ID + * @param {string[]} properties - Agent pool properties (comma-separated) + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - getComment(repositoryId, pullRequestId, threadId, commentId, project) { + getAgentPool(poolId, properties, actionFilter) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId, - commentId: commentId + poolId: poolId + }; + let queryValues = { + properties: properties && properties.join(","), + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); resolve(ret); } catch (err) { @@ -20924,29 +32270,30 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all comments associated with a specific thread in a pull request. + * Get a list of agent pools. * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - ID of the thread. - * @param {string} project - Project ID or project name + * @param {string} poolName - Filter by name + * @param {string[]} properties - Filter by agent pool properties (comma-separated) + * @param {TaskAgentInterfaces.TaskAgentPoolType} poolType - Filter by pool type + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - getComments(repositoryId, pullRequestId, threadId, project) { + getAgentPools(poolName, properties, poolType, actionFilter) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId + let routeValues = {}; + let queryValues = { + poolName: poolName, + properties: properties && properties.join(","), + poolType: poolType, + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, true); resolve(ret); } catch (err) { @@ -20956,32 +32303,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update a comment associated with a specific thread in a pull request. + * Get a list of agent pools. * - * @param {GitInterfaces.Comment} comment - The comment content that should be updated. Comments can be up to 150,000 characters. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - ID of the thread that the desired comment is in. - * @param {number} commentId - ID of the comment to update. - * @param {string} project - Project ID or project name + * @param {number[]} poolIds - pool Ids to fetch + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - updateComment(comment, repositoryId, pullRequestId, threadId, commentId, project) { + getAgentPoolsByIds(poolIds, actionFilter) { return __awaiter(this, void 0, void 0, function* () { + if (poolIds == null) { + throw new TypeError('poolIds can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId, - commentId: commentId + let routeValues = {}; + let queryValues = { + poolIds: poolIds && poolIds.join(","), + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, comment, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, true); resolve(ret); } catch (err) { @@ -20991,28 +32335,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create a thread in a pull request. + * Update properties on an agent pool * - * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread to create. Thread must contain at least one comment. - * @param {string} repositoryId - Repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentPool} pool - Updated agent pool details + * @param {number} poolId - The agent pool to update */ - createThread(commentThread, repositoryId, pullRequestId, project) { + updateAgentPool(pool, poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, commentThread, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + res = yield this.rest.update(url, pool, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); resolve(ret); } catch (err) { @@ -21022,35 +32362,28 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a thread in a pull request. + * Create a new agent queue to connect a project to an agent pool. * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - ID of the thread. + * @param {TaskAgentInterfaces.TaskAgentQueue} queue - Details about the queue to create * @param {string} project - Project ID or project name - * @param {number} iteration - If specified, thread position will be tracked using this iteration as the right side of the diff. - * @param {number} baseIteration - If specified, thread position will be tracked using this iteration as the left side of the diff. + * @param {boolean} authorizePipelines - Automatically authorize this queue when using YAML */ - getPullRequestThread(repositoryId, pullRequestId, threadId, project, iteration, baseIteration) { + addAgentQueue(queue, project, authorizePipelines) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId + project: project }; let queryValues = { - '$iteration': iteration, - '$baseIteration': baseIteration, + authorizePipelines: authorizePipelines, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + res = yield this.rest.create(url, queue, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, false); resolve(ret); } catch (err) { @@ -21060,33 +32393,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all threads in a pull request. + * Create a new team project. * - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name - * @param {number} iteration - If specified, thread positions will be tracked using this iteration as the right side of the diff. - * @param {number} baseIteration - If specified, thread positions will be tracked using this iteration as the left side of the diff. */ - getThreads(repositoryId, pullRequestId, project, iteration, baseIteration) { + createTeamProject(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId - }; - let queryValues = { - '$iteration': iteration, - '$baseIteration': baseIteration, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, true); + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -21096,30 +32419,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update a thread in a pull request. + * Removes an agent queue from a project. * - * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread content that should be updated. - * @param {string} repositoryId - The repository ID of the pull request's target branch. - * @param {number} pullRequestId - ID of the pull request. - * @param {number} threadId - ID of the thread to update. + * @param {number} queueId - The agent queue to remove * @param {string} project - Project ID or project name */ - updateThread(commentThread, repositoryId, pullRequestId, threadId, project) { + deleteAgentQueue(queueId, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId, - threadId: threadId + queueId: queueId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, commentThread, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -21129,27 +32447,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a list of work items associated with a pull request. + * Get information about an agent queue. * - * @param {string} repositoryId - ID or name of the repository. - * @param {number} pullRequestId - ID of the pull request. + * @param {number} queueId - The agent queue to get information about * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - getPullRequestWorkItemRefs(repositoryId, pullRequestId, project) { + getAgentQueue(queueId, project, actionFilter) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - pullRequestId: pullRequestId + queueId: queueId + }; + let queryValues = { + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "0a637fcc-5370-4ce8-b0e8-98091f5f9482", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, false); resolve(ret); } catch (err) { @@ -21159,26 +32479,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Push changes to the repository. + * Get a list of agent queues. * - * @param {GitInterfaces.GitPush} push - * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name + * @param {string} queueName - Filter on the agent queue name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - createPush(push, repositoryId, project) { + getAgentQueues(project, queueName, actionFilter) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + project: project + }; + let queryValues = { + queueName: queueName, + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, push, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); resolve(ret); } catch (err) { @@ -21188,33 +32511,32 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieves a particular push. + * Get a list of agent queues by their IDs * - * @param {string} repositoryId - The name or ID of the repository. - * @param {number} pushId - ID of the push. + * @param {number[]} queueIds - A comma-separated list of agent queue IDs to retrieve * @param {string} project - Project ID or project name - * @param {number} includeCommits - The number of commits to include in the result. - * @param {boolean} includeRefUpdates - If true, include the list of refs that were updated by the push. + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - getPush(repositoryId, pushId, project, includeCommits, includeRefUpdates) { + getAgentQueuesByIds(queueIds, project, actionFilter) { return __awaiter(this, void 0, void 0, function* () { + if (queueIds == null) { + throw new TypeError('queueIds can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - pushId: pushId + project: project }; let queryValues = { - includeCommits: includeCommits, - includeRefUpdates: includeRefUpdates, + queueIds: queueIds && queueIds.join(","), + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); resolve(ret); } catch (err) { @@ -21224,33 +32546,32 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieves pushes associated with the specified repository. + * Get a list of agent queues by their names * - * @param {string} repositoryId - The name or ID of the repository. + * @param {string[]} queueNames - A comma-separated list of agent names to retrieve * @param {string} project - Project ID or project name - * @param {number} skip - Number of pushes to skip. - * @param {number} top - Number of pushes to return. - * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references. + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - getPushes(repositoryId, project, skip, top, searchCriteria) { + getAgentQueuesByNames(queueNames, project, actionFilter) { return __awaiter(this, void 0, void 0, function* () { + if (queueNames == null) { + throw new TypeError('queueNames can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + project: project }; let queryValues = { - '$skip': skip, - '$top': top, - searchCriteria: searchCriteria, + queueNames: queueNames && queueNames.join(","), + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); resolve(ret); } catch (err) { @@ -21260,25 +32581,32 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Destroy (hard delete) a soft-deleted Git repository. + * Get a list of agent queues by pool ids * + * @param {number[]} poolIds - A comma-separated list of pool ids to get the corresponding queues for * @param {string} project - Project ID or project name - * @param {string} repositoryId - The ID of the repository. + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - deleteRepositoryFromRecycleBin(project, repositoryId) { + getAgentQueuesForPools(poolIds, project, actionFilter) { return __awaiter(this, void 0, void 0, function* () { + if (poolIds == null) { + throw new TypeError('poolIds can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + project: project + }; + let queryValues = { + poolIds: poolIds && poolIds.join(","), + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); resolve(ret); } catch (err) { @@ -21288,23 +32616,21 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve soft-deleted git repositories from the recycle bin. - * - * @param {string} project - Project ID or project name + * @param {number} agentCloudId */ - getRecycleBinRepositories(project) { + getAgentCloudRequests(agentCloudId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + agentCloudId: agentCloudId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "20189bd7-5134-49c2-b8e9-f9e856eea2b2", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitDeletedRepository, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentCloudRequest, true); resolve(ret); } catch (err) { @@ -21314,26 +32640,18 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable. - * - * @param {GitInterfaces.GitRecycleBinRepositoryDetails} repositoryDetails - * @param {string} project - Project ID or project name - * @param {string} repositoryId - The ID of the repository. */ - restoreRepositoryFromRecycleBin(repositoryDetails, project, repositoryId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; + getResourceLimits() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1f1f0557-c445-42a6-b4a0-0df605a3a0f8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, repositoryDetails, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -21343,41 +32661,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Queries the provided repository for its refs and returns them. - * - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} project - Project ID or project name - * @param {string} filter - [optional] A filter to apply to the refs (starts with). - * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. - * @param {boolean} includeStatuses - [optional] Includes up to the first 1000 commit statuses for each ref. The default value is false. - * @param {boolean} includeMyBranches - [optional] Includes only branches that the user owns, the branches the user favorites, and the default branch. The default value is false. Cannot be combined with the filter parameter. - * @param {boolean} latestStatusesOnly - [optional] True to include only the tip commit status for each ref. This option requires `includeStatuses` to be true. The default value is false. - * @param {boolean} peelTags - [optional] Annotated tags will populate the PeeledObjectId property. default is false. - * @param {string} filterContains - [optional] A filter to apply to the refs (contains). + * @param {string} parallelismTag + * @param {boolean} poolIsHosted + * @param {boolean} includeRunningRequests */ - getRefs(repositoryId, project, filter, includeLinks, includeStatuses, includeMyBranches, latestStatusesOnly, peelTags, filterContains) { + getResourceUsage(parallelismTag, poolIsHosted, includeRunningRequests) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - repositoryId: repositoryId - }; + let routeValues = {}; let queryValues = { - filter: filter, - includeLinks: includeLinks, - includeStatuses: includeStatuses, - includeMyBranches: includeMyBranches, - latestStatusesOnly: latestStatusesOnly, - peelTags: peelTags, - filterContains: filterContains, + parallelismTag: parallelismTag, + poolIsHosted: poolIsHosted, + includeRunningRequests: includeRunningRequests, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "eae1d376-a8b1-4475-9041-1dfdbe8f0143", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRef, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.ResourceUsage, false); resolve(ret); } catch (err) { @@ -21387,35 +32690,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Lock or Unlock a branch. - * - * @param {GitInterfaces.GitRefUpdate} newRefInfo - The ref update action (lock/unlock) to perform - * @param {string} repositoryId - The name or ID of the repository. - * @param {string} filter - The name of the branch to lock/unlock * @param {string} project - Project ID or project name - * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. + * @param {string} taskGroupId */ - updateRef(newRefInfo, repositoryId, filter, project, projectId) { + getTaskGroupHistory(project, taskGroupId) { return __awaiter(this, void 0, void 0, function* () { - if (filter == null) { - throw new TypeError('filter can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId - }; - let queryValues = { - filter: filter, - projectId: projectId, + taskGroupId: taskGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "100cc92a-b255-47fa-9ab3-e44a2985a3ac", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, newRefInfo, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRef, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroupRevision, true); resolve(ret); } catch (err) { @@ -21425,30 +32716,25 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Creating, updating, or deleting refs(branches). + * Delete a secure file * - * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform - * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name - * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. + * @param {string} secureFileId - The unique secure file Id */ - updateRefs(refUpdates, repositoryId, project, projectId) { + deleteSecureFile(project, secureFileId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId - }; - let queryValues = { - projectId: projectId, + secureFileId: secureFileId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, refUpdates, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefUpdateResult, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -21458,25 +32744,33 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Creates a ref favorite + * Download a secure file by Id * - * @param {GitInterfaces.GitRefFavorite} favorite - The ref favorite to create. * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + * @param {string} ticket - A valid download ticket + * @param {boolean} download - If download is true, the file is sent as attachement in the response body. If download is false, the response body contains the file stream. */ - createFavorite(favorite, project) { + downloadSecureFile(project, secureFileId, ticket, download) { return __awaiter(this, void 0, void 0, function* () { + if (ticket == null) { + throw new TypeError('ticket can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + secureFileId: secureFileId + }; + let queryValues = { + ticket: ticket, + download: download, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, favorite, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -21485,25 +32779,31 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Deletes the refs favorite specified + * Get a secure file * * @param {string} project - Project ID or project name - * @param {number} favoriteId - The Id of the ref favorite to delete. + * @param {string} secureFileId - The unique secure file Id + * @param {boolean} includeDownloadTicket - If includeDownloadTicket is true and the caller has permissions, a download ticket is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter */ - deleteRefFavorite(project, favoriteId) { + getSecureFile(project, secureFileId, includeDownloadTicket, actionFilter) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - favoriteId: favoriteId + secureFileId: secureFileId + }; + let queryValues = { + includeDownloadTicket: includeDownloadTicket, + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); resolve(ret); } catch (err) { @@ -21513,25 +32813,31 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Gets the refs favorite for a favorite Id. + * Get secure files * * @param {string} project - Project ID or project name - * @param {number} favoriteId - The Id of the requested ref favorite. + * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter - Filter by secure file permissions for View, Manage or Use action. Defaults to View. */ - getRefFavorite(project, favoriteId) { + getSecureFiles(project, namePattern, includeDownloadTickets, actionFilter) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - favoriteId: favoriteId + project: project + }; + let queryValues = { + namePattern: namePattern, + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); resolve(ret); } catch (err) { @@ -21541,29 +32847,34 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Gets the refs favorites for a repo and an identity. + * Get secure files * * @param {string} project - Project ID or project name - * @param {string} repositoryId - The id of the repository. - * @param {string} identityId - The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used. + * @param {string[]} secureFileIds - A list of secure file Ids + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter */ - getRefFavorites(project, repositoryId, identityId) { + getSecureFilesByIds(project, secureFileIds, includeDownloadTickets, actionFilter) { return __awaiter(this, void 0, void 0, function* () { + if (secureFileIds == null) { + throw new TypeError('secureFileIds can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - repositoryId: repositoryId, - identityId: identityId, + secureFileIds: secureFileIds && secureFileIds.join(","), + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); resolve(ret); } catch (err) { @@ -21573,28 +32884,34 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create a git repository in a team project. + * Get secure files * - * @param {GitInterfaces.GitRepositoryCreateOptions} gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). * @param {string} project - Project ID or project name - * @param {string} sourceRef - [optional] Specify the source refs to use while creating a fork repo + * @param {string[]} secureFileNames - A list of secure file Ids + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter */ - createRepository(gitRepositoryToCreate, project, sourceRef) { + getSecureFilesByNames(project, secureFileNames, includeDownloadTickets, actionFilter) { return __awaiter(this, void 0, void 0, function* () { + if (secureFileNames == null) { + throw new TypeError('secureFileNames can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - sourceRef: sourceRef, + secureFileNames: secureFileNames && secureFileNames.join(","), + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, gitRepositoryToCreate, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); resolve(ret); } catch (err) { @@ -21604,25 +32921,28 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Delete a git repository + * Query secure files using a name pattern and a condition on file properties. * - * @param {string} repositoryId - The ID of the repository. + * @param {string} condition - The main condition syntax is described [here](https://go.microsoft.com/fwlink/?linkid=842996). Use the *property('property-name')* function to access the value of the specified property of a secure file. It returns null if the property is not set. E.g. ``` and( eq( property('devices'), '2' ), in( property('provisioning profile type'), 'ad hoc', 'development' ) ) ``` * @param {string} project - Project ID or project name + * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. */ - deleteRepository(repositoryId, project) { + querySecureFilesByProperties(condition, project, namePattern) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + project: project + }; + let queryValues = { + namePattern: namePattern, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, condition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); resolve(ret); } catch (err) { @@ -21632,31 +32952,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve git repositories. + * Update the name or properties of an existing secure file * + * @param {TaskAgentInterfaces.SecureFile} secureFile - The secure file with updated name and/or properties * @param {string} project - Project ID or project name - * @param {boolean} includeLinks - [optional] True to include reference links. The default value is false. - * @param {boolean} includeAllUrls - [optional] True to include all remote URLs. The default value is false. - * @param {boolean} includeHidden - [optional] True to include hidden repositories. The default value is false. + * @param {string} secureFileId - The unique secure file Id */ - getRepositories(project, includeLinks, includeAllUrls, includeHidden) { + updateSecureFile(secureFile, project, secureFileId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - includeLinks: includeLinks, - includeAllUrls: includeAllUrls, - includeHidden: includeHidden, + project: project, + secureFileId: secureFileId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, true); + res = yield this.rest.update(url, secureFile, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); resolve(ret); } catch (err) { @@ -21666,25 +32981,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a git repository. + * Update properties and/or names of a set of secure files. Files are identified by their IDs. Properties provided override the existing one entirely, i.e. do not merge. * - * @param {string} repositoryId - The name or ID of the repository. + * @param {TaskAgentInterfaces.SecureFile[]} secureFiles - A list of secure file objects. Only three field must be populated Id, Name, and Properties. The rest of fields in the object are ignored. * @param {string} project - Project ID or project name */ - getRepository(repositoryId, project) { + updateSecureFiles(secureFiles, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + res = yield this.rest.update(url, secureFiles, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); resolve(ret); } catch (err) { @@ -21694,32 +33008,36 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a git repository. + * Upload a secure file, include the file stream in the request body * - * @param {string} repositoryId - The name or ID of the repository. - * @param {boolean} includeParent - True to include parent repository. Only available in authenticated calls. + * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} project - Project ID or project name + * @param {string} name - Name of the file to upload + * @param {boolean} authorizePipelines - If authorizePipelines is true, then the secure file is authorized for use by all pipelines in the project. */ - getRepositoryWithParent(repositoryId, includeParent, project) { + uploadSecureFile(customHeaders, contentStream, project, name, authorizePipelines) { return __awaiter(this, void 0, void 0, function* () { - if (includeParent == null) { - throw new TypeError('includeParent can not be null or undefined'); + if (name == null) { + throw new TypeError('name can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + project: project }; let queryValues = { - includeParent: includeParent, + name: name, + authorizePipelines: authorizePipelines, }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); resolve(ret); } catch (err) { @@ -21729,26 +33047,22 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Updates the Git repository with either a new repo name or a new default branch. - * - * @param {GitInterfaces.GitRepository} newRepositoryInfo - Specify a new repo name or a new default branch of the repository - * @param {string} repositoryId - The ID of the repository. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentSession} session + * @param {number} poolId */ - updateRepository(newRepositoryInfo, repositoryId, project) { + createAgentSession(session, poolId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId + poolId: poolId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "134e239e-2df3-4794-a6f6-24f1f19ec8dc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, newRepositoryInfo, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + res = yield this.rest.create(url, session, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentSession, false); resolve(ret); } catch (err) { @@ -21758,29 +33072,23 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve one conflict for a revert by ID - * - * @param {string} repositoryId - * @param {number} revertId - * @param {number} conflictId - * @param {string} project - Project ID or project name + * @param {number} poolId + * @param {string} sessionId */ - getRevertConflict(repositoryId, revertId, conflictId, project) { + deleteAgentSession(poolId, sessionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - repositoryId: repositoryId, - revertId: revertId, - conflictId: conflictId + poolId: poolId, + sessionId: sessionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "134e239e-2df3-4794-a6f6-24f1f19ec8dc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -21790,39 +33098,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve all conflicts for a revert + * Register a deployment target to a deployment group. Generally this is called by agent configuration tool. * - * @param {string} repositoryId - * @param {number} revertId + * @param {TaskAgentInterfaces.DeploymentMachine} machine - Deployment target to register. * @param {string} project - Project ID or project name - * @param {string} continuationToken - * @param {number} top - * @param {boolean} excludeResolved - * @param {boolean} onlyResolved - * @param {boolean} includeObsolete + * @param {number} deploymentGroupId - ID of the deployment group to which the deployment target is registered. */ - getRevertConflicts(repositoryId, revertId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) { + addDeploymentTarget(machine, project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - revertId: revertId - }; - let queryValues = { - continuationToken: continuationToken, - '$top': top, - excludeResolved: excludeResolved, - onlyResolved: onlyResolved, - includeObsolete: includeObsolete, + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); + res = yield this.rest.create(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); resolve(ret); } catch (err) { @@ -21832,30 +33127,27 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update merge conflict resolution + * Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too. * - * @param {GitInterfaces.GitConflict} conflict - * @param {string} repositoryId - * @param {number} revertId - * @param {number} conflictId * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is deleted. + * @param {number} targetId - ID of the deployment target to delete. */ - updateRevertConflict(conflict, repositoryId, revertId, conflictId, project) { + deleteDeploymentTarget(project, deploymentGroupId, targetId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - revertId: revertId, - conflictId: conflictId + deploymentGroupId: deploymentGroupId, + targetId: targetId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, conflict, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -21865,28 +33157,31 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Update multiple merge conflict resolutions + * Get a deployment target by its ID in a deployment group * - * @param {GitInterfaces.GitConflict[]} conflictUpdates - * @param {string} repositoryId - * @param {number} revertId * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which deployment target belongs. + * @param {number} targetId - ID of the deployment target to return. + * @param {TaskAgentInterfaces.DeploymentTargetExpands} expand - Include these additional details in the returned objects. */ - updateRevertConflicts(conflictUpdates, repositoryId, revertId, project) { + getDeploymentTarget(project, deploymentGroupId, targetId, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - revertId: revertId + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + let queryValues = { + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, conflictUpdates, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); resolve(ret); } catch (err) { @@ -21896,26 +33191,47 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request. + * Get a list of deployment targets in a deployment group. * - * @param {GitInterfaces.GitAsyncRefOperationParameters} revertToCreate * @param {string} project - Project ID or project name - * @param {string} repositoryId - ID of the repository. + * @param {number} deploymentGroupId - ID of the deployment group. + * @param {string[]} tags - Get only the deployment targets that contain all these comma separted list of tags. + * @param {string} name - Name pattern of the deployment targets to return. + * @param {boolean} partialNameMatch - When set to true, treats **name** as pattern. Else treats it as absolute match. Default is **false**. + * @param {TaskAgentInterfaces.DeploymentTargetExpands} expand - Include these additional details in the returned objects. + * @param {TaskAgentInterfaces.TaskAgentStatusFilter} agentStatus - Get only deployment targets that have this status. + * @param {TaskAgentInterfaces.TaskAgentJobResultFilter} agentJobResult - Get only deployment targets that have this last job result. + * @param {string} continuationToken - Get deployment targets with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment targets to return. Default is **1000**. + * @param {boolean} enabled - Get only deployment targets that are enabled or disabled. Default is 'null' which returns all the targets. + * @param {string[]} propertyFilters */ - createRevert(revertToCreate, project, repositoryId) { + getDeploymentTargets(project, deploymentGroupId, tags, name, partialNameMatch, expand, agentStatus, agentJobResult, continuationToken, top, enabled, propertyFilters) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + tags: tags && tags.join(","), + name: name, + partialNameMatch: partialNameMatch, + '$expand': expand, + agentStatus: agentStatus, + agentJobResult: agentJobResult, + continuationToken: continuationToken, + '$top': top, + enabled: enabled, + propertyFilters: propertyFilters && propertyFilters.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, revertToCreate, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); resolve(ret); } catch (err) { @@ -21925,27 +33241,28 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve information about a revert operation by revert Id. + * Replace a deployment target in a deployment group. Generally this is called by agent configuration tool. * + * @param {TaskAgentInterfaces.DeploymentMachine} machine - New deployment target. * @param {string} project - Project ID or project name - * @param {number} revertId - ID of the revert operation. - * @param {string} repositoryId - ID of the repository. + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is replaced. + * @param {number} targetId - ID of the deployment target to replace. */ - getRevert(project, revertId, repositoryId) { + replaceDeploymentTarget(machine, project, deploymentGroupId, targetId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - revertId: revertId, - repositoryId: repositoryId + deploymentGroupId: deploymentGroupId, + targetId: targetId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); + res = yield this.rest.replace(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); resolve(ret); } catch (err) { @@ -21955,32 +33272,28 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve information about a revert operation for a specific branch. + * Update a deployment target and its agent properties in a deployment group. Generally this is called by agent configuration tool. * + * @param {TaskAgentInterfaces.DeploymentMachine} machine - Deployment target to update. * @param {string} project - Project ID or project name - * @param {string} repositoryId - ID of the repository. - * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the revert operation. + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is updated. + * @param {number} targetId - ID of the deployment target to update. */ - getRevertForRefName(project, repositoryId, refName) { + updateDeploymentTarget(machine, project, deploymentGroupId, targetId) { return __awaiter(this, void 0, void 0, function* () { - if (refName == null) { - throw new TypeError('refName can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId - }; - let queryValues = { - refName: refName, + deploymentGroupId: deploymentGroupId, + targetId: targetId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); + res = yield this.rest.update(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); resolve(ret); } catch (err) { @@ -21990,28 +33303,26 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Create Git commit status. + * Update tags of a list of deployment targets in a deployment group. * - * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - Git commit status object to create. - * @param {string} commitId - ID of the Git commit. - * @param {string} repositoryId - ID of the repository. + * @param {TaskAgentInterfaces.DeploymentTargetUpdateParameter[]} machines - Deployment targets with tags to udpdate. * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment targets are updated. */ - createCommitStatus(gitCommitStatusToCreate, commitId, repositoryId, project) { + updateDeploymentTargets(machines, project, deploymentGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - commitId: commitId, - repositoryId: repositoryId + deploymentGroupId: deploymentGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "428dd4fb-fda5-4722-af02-9313b80305da", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, gitCommitStatusToCreate, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitStatus, false); + res = yield this.rest.update(url, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); resolve(ret); } catch (err) { @@ -22021,35 +33332,24 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Get statuses associated with the Git commit. + * Create a task group. * - * @param {string} commitId - ID of the Git commit. - * @param {string} repositoryId - ID of the repository. + * @param {TaskAgentInterfaces.TaskGroupCreateParameter} taskGroup - Task group object to create. * @param {string} project - Project ID or project name - * @param {number} top - Optional. The number of statuses to retrieve. Default is 1000. - * @param {number} skip - Optional. The number of statuses to ignore. Default is 0. For example, to retrieve results 101-150, set top to 50 and skip to 100. - * @param {boolean} latestOnly - The flag indicates whether to get only latest statuses grouped by `Context.Name` and `Context.Genre`. */ - getStatuses(commitId, repositoryId, project, top, skip, latestOnly) { + addTaskGroup(taskGroup, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - commitId: commitId, - repositoryId: repositoryId - }; - let queryValues = { - top: top, - skip: skip, - latestOnly: latestOnly, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "428dd4fb-fda5-4722-af02-9313b80305da", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitStatus, true); + res = yield this.rest.create(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); resolve(ret); } catch (err) { @@ -22059,25 +33359,29 @@ class GitApi extends basem.ClientApiBase { }); } /** - * Retrieve a pull request suggestion for a particular repository or team project. + * Delete a task group. * - * @param {string} repositoryId - ID of the git repository. * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group to be deleted. + * @param {string} comment - Comments to delete. */ - getSuggestions(repositoryId, project) { + deleteTaskGroup(project, taskGroupId, comment) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId + taskGroupId: taskGroupId + }; + let queryValues = { + comment: comment, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9393b4fb-4445-4919-972b-9ad16f442d83", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -22087,35 +33391,34 @@ class GitApi extends basem.ClientApiBase { }); } /** - * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + * Get task group. * - * @param {string} repositoryId - Repository Id. - * @param {string} sha1 - SHA1 hash of the tree object. * @param {string} project - Project ID or project name - * @param {string} projectId - Project Id. - * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. - * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. + * @param {string} taskGroupId - Id of the task group. + * @param {string} versionSpec - version specification of the task group. examples: 1, 1.0. + * @param {TaskAgentInterfaces.TaskGroupExpands} expand - The properties that should be expanded. example $expand=Tasks will expand nested task groups. */ - getTree(repositoryId, sha1, project, projectId, recursive, fileName) { + getTaskGroup(project, taskGroupId, versionSpec, expand) { return __awaiter(this, void 0, void 0, function* () { + if (versionSpec == null) { + throw new TypeError('versionSpec can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - sha1: sha1 + taskGroupId: taskGroupId }; let queryValues = { - projectId: projectId, - recursive: recursive, - fileName: fileName, + versionSpec: versionSpec, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "729f6437-6f92-44ec-8bee-273a7111063c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitTreeRef, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); resolve(ret); } catch (err) { @@ -22125,33 +33428,28 @@ class GitApi extends basem.ClientApiBase { }); } /** - * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. - * - * @param {string} repositoryId - Repository Id. - * @param {string} sha1 - SHA1 hash of the tree object. * @param {string} project - Project ID or project name - * @param {string} projectId - Project Id. - * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. - * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. + * @param {string} taskGroupId + * @param {number} revision */ - getTreeZip(repositoryId, sha1, project, projectId, recursive, fileName) { + getTaskGroupRevision(project, taskGroupId, revision) { return __awaiter(this, void 0, void 0, function* () { + if (revision == null) { + throw new TypeError('revision can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId, - sha1: sha1 + taskGroupId: taskGroupId }; let queryValues = { - projectId: projectId, - recursive: recursive, - fileName: fileName, + revision: revision, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "729f6437-6f92-44ec-8bee-273a7111063c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); let url = verData.requestUrl; let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); + let accept = this.createAcceptHeader("text/plain", apiVersion); resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { @@ -22160,65 +33458,40 @@ class GitApi extends basem.ClientApiBase { })); }); } -} -GitApi.RESOURCE_AREA_ID = "4e080c62-fa21-4fbc-8fef-2a10a2b38049"; -exports.GitApi = GitApi; - - -/***/ }), - -/***/ 4771: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const LocationsInterfaces = __nccwpck_require__(3215); -class LocationsApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Locations-api', options); - } /** - * This was copied and adapted from TeamFoundationConnectionService.Connect() + * List task groups. * - * @param {VSSInterfaces.ConnectOptions} connectOptions - * @param {number} lastChangeId - Obsolete 32-bit LastChangeId - * @param {number} lastChangeId64 - Non-truncated 64-bit LastChangeId + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group. + * @param {boolean} expanded - 'true' to recursively expand task groups. Default is 'false'. + * @param {string} taskIdFilter - Guid of the taskId to filter. + * @param {boolean} deleted - 'true'to include deleted task groups. Default is 'false'. + * @param {number} top - Number of task groups to get. + * @param {Date} continuationToken - Gets the task groups after the continuation token provided. + * @param {TaskAgentInterfaces.TaskGroupQueryOrder} queryOrder - Gets the results in the defined order. Default is 'CreatedOnDescending'. */ - getConnectionData(connectOptions, lastChangeId, lastChangeId64) { + getTaskGroups(project, taskGroupId, expanded, taskIdFilter, deleted, top, continuationToken, queryOrder) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; let queryValues = { - connectOptions: connectOptions, - lastChangeId: lastChangeId, - lastChangeId64: lastChangeId64, + expanded: expanded, + taskIdFilter: taskIdFilter, + deleted: deleted, + '$top': top, + continuationToken: continuationToken, + queryOrder: queryOrder, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "00d9565f-ed9c-4a06-9a50-00e7896ccab4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ConnectionData, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); resolve(ret); } catch (err) { @@ -22228,27 +33501,29 @@ class LocationsApi extends basem.ClientApiBase { }); } /** - * @param {string} areaId - * @param {string} enterpriseName - * @param {string} organizationName + * @param {TaskAgentInterfaces.PublishTaskGroupMetadata} taskGroupMetadata + * @param {string} project - Project ID or project name + * @param {string} parentTaskGroupId */ - getResourceArea(areaId, enterpriseName, organizationName) { + publishTaskGroup(taskGroupMetadata, project, parentTaskGroupId) { return __awaiter(this, void 0, void 0, function* () { + if (parentTaskGroupId == null) { + throw new TypeError('parentTaskGroupId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - areaId: areaId + project: project }; let queryValues = { - enterpriseName: enterpriseName, - organizationName: organizationName, + parentTaskGroupId: parentTaskGroupId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, taskGroupMetadata, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); resolve(ret); } catch (err) { @@ -22258,28 +33533,22 @@ class LocationsApi extends basem.ClientApiBase { }); } /** - * @param {string} areaId - * @param {string} hostId + * @param {TaskAgentInterfaces.TaskGroup} taskGroup + * @param {string} project - Project ID or project name */ - getResourceAreaByHost(areaId, hostId) { + undeleteTaskGroup(taskGroup, project) { return __awaiter(this, void 0, void 0, function* () { - if (hostId == null) { - throw new TypeError('hostId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - areaId: areaId - }; - let queryValues = { - hostId: hostId, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); resolve(ret); } catch (err) { @@ -22289,24 +33558,26 @@ class LocationsApi extends basem.ClientApiBase { }); } /** - * @param {string} enterpriseName - * @param {string} organizationName + * Update a task group. + * + * @param {TaskAgentInterfaces.TaskGroupUpdateParameter} taskGroup - Task group to update. + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group to update. */ - getResourceAreas(enterpriseName, organizationName) { + updateTaskGroup(taskGroup, project, taskGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - enterpriseName: enterpriseName, - organizationName: organizationName, + let routeValues = { + project: project, + taskGroupId: taskGroupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.replace(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); resolve(ret); } catch (err) { @@ -22316,25 +33587,28 @@ class LocationsApi extends basem.ClientApiBase { }); } /** - * @param {string} hostId + * @param {TaskAgentInterfaces.TaskGroupUpdatePropertiesBase} taskGroupUpdateProperties + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {boolean} disablePriorVersions */ - getResourceAreasByHost(hostId) { + updateTaskGroupProperties(taskGroupUpdateProperties, project, taskGroupId, disablePriorVersions) { return __awaiter(this, void 0, void 0, function* () { - if (hostId == null) { - throw new TypeError('hostId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; let queryValues = { - hostId: hostId, + disablePriorVersions: disablePriorVersions, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, taskGroupUpdateProperties, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); resolve(ret); } catch (err) { @@ -22344,18 +33618,16 @@ class LocationsApi extends basem.ClientApiBase { }); } /** - * @param {string} serviceType - * @param {string} identifier + * @param {string} taskId */ - deleteServiceDefinition(serviceType, identifier) { + deleteTaskDefinition(taskId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - serviceType: serviceType, - identifier: identifier + taskId: taskId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -22370,32 +33642,28 @@ class LocationsApi extends basem.ClientApiBase { }); } /** - * Finds a given service definition. - * - * @param {string} serviceType - * @param {string} identifier - * @param {boolean} allowFaultIn - If true, we will attempt to fault in a host instance mapping if in SPS. - * @param {boolean} previewFaultIn - If true, we will calculate and return a host instance mapping, but not persist it. + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal */ - getServiceDefinition(serviceType, identifier, allowFaultIn, previewFaultIn) { + getTaskContentZip(taskId, versionString, visibility, scopeLocal) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - serviceType: serviceType, - identifier: identifier + taskId: taskId, + versionString: versionString }; let queryValues = { - allowFaultIn: allowFaultIn, - previewFaultIn: previewFaultIn, + visibility: visibility, + scopeLocal: scopeLocal, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -22404,21 +33672,29 @@ class LocationsApi extends basem.ClientApiBase { }); } /** - * @param {string} serviceType + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal */ - getServiceDefinitions(serviceType) { + getTaskDefinition(taskId, versionString, visibility, scopeLocal) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - serviceType: serviceType + taskId: taskId, + versionString: versionString + }; + let queryValues = { + visibility: visibility, + scopeLocal: scopeLocal, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskDefinition, false); resolve(ret); } catch (err) { @@ -22428,19 +33704,29 @@ class LocationsApi extends basem.ClientApiBase { }); } /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} serviceDefinitions + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param {boolean} allVersions */ - updateServiceDefinitions(serviceDefinitions) { + getTaskDefinitions(taskId, visibility, scopeLocal, allVersions) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + taskId: taskId + }; + let queryValues = { + visibility: visibility, + scopeLocal: scopeLocal, + allVersions: allVersions, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, serviceDefinitions, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskDefinition, true); resolve(ret); } catch (err) { @@ -22449,56 +33735,31 @@ class LocationsApi extends basem.ClientApiBase { })); }); } -} -exports.LocationsApi = LocationsApi; - - -/***/ }), - -/***/ 8221: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const NotificationInterfaces = __nccwpck_require__(3044); -const VSSInterfaces = __nccwpck_require__(4498); -class NotificationApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Notification-api', options); - } /** - * @param {NotificationInterfaces.BatchNotificationOperation} operation + * @param {number} poolId + * @param {number} agentId + * @param {string} currentState */ - performBatchNotificationOperations(operation) { + updateAgentUpdateState(poolId, agentId, currentState) { return __awaiter(this, void 0, void 0, function* () { + if (currentState == null) { + throw new TypeError('currentState can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + poolId: poolId, + agentId: agentId + }; + let queryValues = { + currentState: currentState, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "8f3c6ab2-5bae-4537-b16e-f84e0955599e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8cc1b02b-ae49-4516-b5ad-4f9b29967c30", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, operation, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); resolve(ret); } catch (err) { @@ -22508,31 +33769,24 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Get a list of diagnostic logs for this service. - * - * @param {string} source - ID specifying which type of logs to check diagnostics for. - * @param {string} entryId - The ID of the specific log to query for. - * @param {Date} startTime - Start time for the time range to query in. - * @param {Date} endTime - End time for the time range to query in. + * @param {{ [key: string] : string; }} userCapabilities + * @param {number} poolId + * @param {number} agentId */ - listLogs(source, entryId, startTime, endTime) { + updateAgentUserCapabilities(userCapabilities, poolId, agentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - source: source, - entryId: entryId - }; - let queryValues = { - startTime: startTime, - endTime: endTime, + poolId: poolId, + agentId: agentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "991842f3-eb16-4aea-ac81-81353ef2b75c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "30ba3ada-fedf-4da8-bbb5-dacf2f82e176", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.INotificationDiagnosticLog, true); + res = yield this.rest.replace(url, userCapabilities, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); resolve(ret); } catch (err) { @@ -22542,23 +33796,21 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Get the diagnostics settings for a subscription. + * Add a variable group. * - * @param {string} subscriptionId - The id of the notifications subscription. + * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters */ - getSubscriptionDiagnostics(subscriptionId) { + addVariableGroup(variableGroupParameters) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - subscriptionId: subscriptionId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "20f1929d-4be7-4c2e-a74e-d47640ff3418", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false); + res = yield this.rest.create(url, variableGroupParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); resolve(ret); } catch (err) { @@ -22568,24 +33820,30 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Update the diagnostics settings for a subscription. + * Delete a variable group * - * @param {NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters} updateParameters - * @param {string} subscriptionId - The id of the notifications subscription. + * @param {number} groupId - Id of the variable group. + * @param {string[]} projectIds */ - updateSubscriptionDiagnostics(updateParameters, subscriptionId) { + deleteVariableGroup(groupId, projectIds) { return __awaiter(this, void 0, void 0, function* () { + if (projectIds == null) { + throw new TypeError('projectIds can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - subscriptionId: subscriptionId + groupId: groupId + }; + let queryValues = { + projectIds: projectIds && projectIds.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "20f1929d-4be7-4c2e-a74e-d47640ff3418", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, updateParameters, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -22595,21 +33853,28 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Publish an event. This request must be directed to the service "extmgmt". + * Add a variable group. * - * @param {VSSInterfaces.VssNotificationEvent} notificationEvent + * @param {TaskAgentInterfaces.VariableGroupProjectReference[]} variableGroupProjectReferences + * @param {number} variableGroupId */ - publishEvent(notificationEvent) { + shareVariableGroup(variableGroupProjectReferences, variableGroupId) { return __awaiter(this, void 0, void 0, function* () { + if (variableGroupId == null) { + throw new TypeError('variableGroupId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; + let queryValues = { + variableGroupId: variableGroupId, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "14c57b7a-c0e6-4555-9f51-e067188fdd8e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, notificationEvent, options); - let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false); + res = yield this.rest.update(url, variableGroupProjectReferences, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -22619,21 +33884,24 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Tranform a notification event. + * Update a variable group. * - * @param {NotificationInterfaces.EventTransformRequest} transformRequest - Object to be transformed. + * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters + * @param {number} groupId - Id of the variable group to update. */ - transformEvent(transformRequest) { + updateVariableGroup(variableGroupParameters, groupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + groupId: groupId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "9463a800-1b44-450e-9083-f948ea174b45", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, transformRequest, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, variableGroupParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); resolve(ret); } catch (err) { @@ -22643,22 +33911,25 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * @param {NotificationInterfaces.FieldValuesQuery} inputValuesQuery - * @param {string} eventType + * Get a variable group. + * + * @param {string} project - Project ID or project name + * @param {number} groupId - Id of the variable group. */ - queryEventTypes(inputValuesQuery, eventType) { + getVariableGroup(project, groupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - eventType: eventType + project: project, + groupId: groupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "b5bbdd21-c178-4398-b6db-0166d910028a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, inputValuesQuery, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventField, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); resolve(ret); } catch (err) { @@ -22668,23 +33939,35 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Get a specific event type. + * Get variable groups. * - * @param {string} eventType - The ID of the event type. + * @param {string} project - Project ID or project name + * @param {string} groupName - Name of variable group. + * @param {TaskAgentInterfaces.VariableGroupActionFilter} actionFilter - Action filter for the variable group. It specifies the action which can be performed on the variable groups. + * @param {number} top - Number of variable groups to get. + * @param {number} continuationToken - Gets the variable groups after the continuation token provided. + * @param {TaskAgentInterfaces.VariableGroupQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdDescending'. */ - getEventType(eventType) { + getVariableGroups(project, groupName, actionFilter, top, continuationToken, queryOrder) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - eventType: eventType + project: project + }; + let queryValues = { + groupName: groupName, + actionFilter: actionFilter, + '$top': top, + continuationToken: continuationToken, + queryOrder: queryOrder, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventType, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, true); resolve(ret); } catch (err) { @@ -22694,24 +33977,30 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * List available event types for this service. Optionally filter by only event types for the specified publisher. + * Get variable groups by ids. * - * @param {string} publisherId - Limit to event types for this publisher + * @param {string} project - Project ID or project name + * @param {number[]} groupIds - Comma separated list of Ids of variable groups. */ - listEventTypes(publisherId) { + getVariableGroupsById(project, groupIds) { return __awaiter(this, void 0, void 0, function* () { + if (groupIds == null) { + throw new TypeError('groupIds can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; let queryValues = { - publisherId: publisherId, + groupIds: groupIds && groupIds.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventType, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, true); resolve(ret); } catch (err) { @@ -22721,21 +34010,24 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * @param {number} notificationId + * @param {TaskAgentInterfaces.VirtualMachineGroupCreateParameters} createParameters + * @param {string} project - Project ID or project name + * @param {number} environmentId */ - getNotificationReasons(notificationId) { + addVirtualMachineGroup(createParameters, project, environmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - notificationId: notificationId + project: project, + environmentId: environmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "19824fa9-1c76-40e6-9cce-cf0b9ca1cb60", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, false); + res = yield this.rest.create(url, createParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); resolve(ret); } catch (err) { @@ -22745,22 +34037,25 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * @param {number} notificationIds + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId */ - listNotificationReasons(notificationIds) { + deleteVirtualMachineGroup(project, environmentId, resourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - notificationIds: notificationIds, + let routeValues = { + project: project, + environmentId: environmentId, + resourceId: resourceId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "19824fa9-1c76-40e6-9cce-cf0b9ca1cb60", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -22770,18 +34065,25 @@ class NotificationApi extends basem.ClientApiBase { }); } /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId */ - getSettings() { + getVirtualMachineGroup(project, environmentId, resourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cbe076d8-2803-45ff-8d8d-44653686ea2a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); resolve(ret); } catch (err) { @@ -22791,19 +34093,24 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * @param {NotificationInterfaces.NotificationAdminSettingsUpdateParameters} updateParameters + * @param {TaskAgentInterfaces.VirtualMachineGroup} resource + * @param {string} project - Project ID or project name + * @param {number} environmentId */ - updateSettings(updateParameters) { + updateVirtualMachineGroup(resource, project, environmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + environmentId: environmentId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cbe076d8-2803-45ff-8d8d-44653686ea2a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, updateParameters, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false); + res = yield this.rest.update(url, resource, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); resolve(ret); } catch (err) { @@ -22813,23 +34120,37 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Get delivery preferences of a notifications subscriber. - * - * @param {string} subscriberId - ID of the user or group. + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + * @param {string} continuationToken + * @param {string} name + * @param {boolean} partialNameMatch + * @param {string[]} tags + * @param {number} top */ - getSubscriber(subscriberId) { + getVirtualMachines(project, environmentId, resourceId, continuationToken, name, partialNameMatch, tags, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - subscriberId: subscriberId + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + let queryValues = { + continuationToken: continuationToken, + name: name, + partialNameMatch: partialNameMatch, + tags: tags && tags.join(","), + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "4d5caff1-25ba-430b-b808-7a1f352cc197", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "48700676-2ba5-4282-8ec8-083280d169c7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachine, true); resolve(ret); } catch (err) { @@ -22839,24 +34160,26 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Update delivery preferences of a notifications subscriber. - * - * @param {NotificationInterfaces.NotificationSubscriberUpdateParameters} updateParameters - * @param {string} subscriberId - ID of the user or group. + * @param {TaskAgentInterfaces.VirtualMachine[]} machines + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId */ - updateSubscriber(updateParameters, subscriberId) { + updateVirtualMachines(machines, project, environmentId, resourceId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - subscriberId: subscriberId + project: project, + environmentId: environmentId, + resourceId: resourceId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "4d5caff1-25ba-430b-b808-7a1f352cc197", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "48700676-2ba5-4282-8ec8-083280d169c7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, updateParameters, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false); + res = yield this.rest.update(url, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachine, true); resolve(ret); } catch (err) { @@ -22866,21 +34189,36 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. - * - * @param {NotificationInterfaces.SubscriptionQuery} subscriptionQuery + * @param {string} tenantId + * @param {string} redirectUri + * @param {TaskAgentInterfaces.AadLoginPromptOption} promptOption + * @param {string} completeCallbackPayload + * @param {boolean} completeCallbackByAuthCode */ - querySubscriptions(subscriptionQuery) { + createAadOAuthRequest(tenantId, redirectUri, promptOption, completeCallbackPayload, completeCallbackByAuthCode) { return __awaiter(this, void 0, void 0, function* () { + if (tenantId == null) { + throw new TypeError('tenantId can not be null or undefined'); + } + if (redirectUri == null) { + throw new TypeError('redirectUri can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; + let queryValues = { + tenantId: tenantId, + redirectUri: redirectUri, + promptOption: promptOption, + completeCallbackPayload: completeCallbackPayload, + completeCallbackByAuthCode: completeCallbackByAuthCode, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "6864db85-08c0-4006-8e8e-cc1bebe31675", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9c63205e-3a0f-42a0-ad88-095200f13607", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, subscriptionQuery, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -22890,21 +34228,18 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Create a new subscription. - * - * @param {NotificationInterfaces.NotificationSubscriptionCreateParameters} createParameters */ - createSubscription(createParameters) { + getVstsAadTenantId() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9c63205e-3a0f-42a0-ad88-095200f13607", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, createParameters, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -22914,22 +34249,23 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Delete a subscription. + * GET the Yaml schema used for Yaml file validation. * - * @param {string} subscriptionId + * @param {boolean} validateTaskNames - Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation). */ - deleteSubscription(subscriptionId) { + getYamlSchema(validateTaskNames) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - subscriptionId: subscriptionId + let routeValues = {}; + let queryValues = { + validateTaskNames: validateTaskNames, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1f9990b9-1dba-441f-9c2e-6485888c42b6", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -22939,28 +34275,64 @@ class NotificationApi extends basem.ClientApiBase { })); }); } +} +TaskAgentApiBase.RESOURCE_AREA_ID = "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd"; +exports.TaskAgentApiBase = TaskAgentApiBase; + + +/***/ }), + +/***/ 72354: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const TaskAgentInterfaces = __nccwpck_require__(69565); +class TaskApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Task-api', options); + } /** - * Get a notification subscription by its ID. - * - * @param {string} subscriptionId - * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} type */ - getSubscription(subscriptionId, queryFlags) { + getPlanAttachments(scopeIdentifier, hubName, planId, type) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - subscriptionId: subscriptionId - }; - let queryValues = { - queryFlags: queryFlags, + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + type: type }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "eb55e5d6-2f30-4295-b5ed-38da50b1fc52", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, true); resolve(ret); } catch (err) { @@ -22970,28 +34342,37 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group. - * - * @param {string} targetId - User or Group ID - * @param {string[]} ids - List of subscription IDs - * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name */ - listSubscriptions(targetId, ids, queryFlags) { + createAttachment(customHeaders, contentStream, scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - targetId: targetId, - ids: ids && ids.join(","), - queryFlags: queryFlags, + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true); + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); resolve(ret); } catch (err) { @@ -23001,24 +34382,45 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. - * - * @param {NotificationInterfaces.NotificationSubscriptionUpdateParameters} updateParameters - * @param {string} subscriptionId + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + * @param {string} artifactHash + * @param {number} length */ - updateSubscription(updateParameters, subscriptionId) { + createAttachmentFromArtifact(scopeIdentifier, hubName, planId, timelineId, recordId, type, name, artifactHash, length) { return __awaiter(this, void 0, void 0, function* () { + if (artifactHash == null) { + throw new TypeError('artifactHash can not be null or undefined'); + } + if (length == null) { + throw new TypeError('length can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - subscriptionId: subscriptionId + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + let queryValues = { + artifactHash: artifactHash, + length: length, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, updateParameters, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); resolve(ret); } catch (err) { @@ -23028,20 +34430,33 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Get available subscription templates. - * + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name */ - getSubscriptionTemplates() { + getAttachment(scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "fa5d24ba-7484-4f3d-888d-4ec6b1974082", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriptionTemplate, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); resolve(ret); } catch (err) { @@ -23051,22 +34466,32 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Publish an event. This request is only for the Token service since it's a deploy only service. - * - * @param {VSSInterfaces.VssNotificationEvent} notificationEvent + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name */ - publishTokenEvent(notificationEvent) { + getAttachmentContent(scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "31dc86a2-67e8-4452-99a4-2b301ba28291", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, notificationEvent, options); - let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -23075,26 +34500,31 @@ class NotificationApi extends basem.ClientApiBase { }); } /** - * Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. - * - * @param {NotificationInterfaces.SubscriptionUserSettings} userSettings - * @param {string} subscriptionId - * @param {string} userId - ID of the user + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type */ - updateSubscriptionUserSettings(userSettings, subscriptionId, userId) { + getAttachments(scopeIdentifier, hubName, planId, timelineId, recordId, type) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - subscriptionId: subscriptionId, - userId: userId + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "ed5a3dff-aeb5-41b1-b4f7-89e66e58b62e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, userSettings, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, true); resolve(ret); } catch (err) { @@ -23103,60 +34533,33 @@ class NotificationApi extends basem.ClientApiBase { })); }); } -} -exports.NotificationApi = NotificationApi; - - -/***/ }), - -/***/ 266: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const PolicyInterfaces = __nccwpck_require__(8555); -class PolicyApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Policy-api', options); - } /** - * Create a policy configuration of a given policy type. + * Append content to timeline record feed. * - * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to create. - * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TimelineRecordFeedLinesWrapper} lines - Content to be appended to the timeline record feed. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId - ID of the plan. + * @param {string} timelineId - ID of the task's timeline. + * @param {string} recordId - ID of the timeline record. */ - createPolicyConfiguration(configuration, project) { + appendTimelineRecordFeed(lines, scopeIdentifier, hubName, planId, timelineId, recordId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "858983e4-19bd-4c5e-864c-507b59b58b12", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, configuration, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + res = yield this.rest.create(url, lines, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -23166,24 +34569,41 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Delete a policy configuration by its ID. - * - * @param {string} project - Project ID or project name - * @param {number} configurationId - ID of the policy configuration to delete. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} stepId + * @param {number} endLine + * @param {number} takeCount + * @param {string} continuationToken */ - deletePolicyConfiguration(project, configurationId) { + getLines(scopeIdentifier, hubName, planId, timelineId, recordId, stepId, endLine, takeCount, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (stepId == null) { + throw new TypeError('stepId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - configurationId: configurationId + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId + }; + let queryValues = { + stepId: stepId, + endLine: endLine, + takeCount: takeCount, + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "858983e4-19bd-4c5e-864c-507b59b58b12", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -23194,25 +34614,25 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Get a policy configuration by its ID. - * - * @param {string} project - Project ID or project name - * @param {number} configurationId - ID of the policy configuration + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} orchestrationId */ - getPolicyConfiguration(project, configurationId) { + getJobInstance(scopeIdentifier, hubName, orchestrationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - configurationId: configurationId + scopeIdentifier: scopeIdentifier, + hubName: hubName, + orchestrationId: orchestrationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0a1efd25-abda-43bd-9629-6c7bdd2e0d60", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJob, false); resolve(ret); } catch (err) { @@ -23222,29 +34642,33 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Get a list of policy configurations in a project. + * Append a log to a task's log. The log should be sent in the body of the request as a TaskLog object stream. * - * @param {string} project - Project ID or project name - * @param {string} scope - [Provided for legacy reasons] The scope on which a subset of policies is defined. - * @param {string} policyType - Filter returned policies to only this type + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId - The ID of the plan. + * @param {number} logId - The ID of the log. */ - getPolicyConfigurations(project, scope, policyType) { + appendLogContent(customHeaders, contentStream, scopeIdentifier, hubName, planId, logId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - scope: scope, - policyType: policyType, + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true); + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); resolve(ret); } catch (err) { @@ -23254,26 +34678,39 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Update a policy configuration by its ID. - * - * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to update. - * @param {string} project - Project ID or project name - * @param {number} configurationId - ID of the existing policy configuration to be updated. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {number} logId + * @param {string} serializedBlobId + * @param {number} lineCount */ - updatePolicyConfiguration(configuration, project, configurationId) { + associateLog(scopeIdentifier, hubName, planId, logId, serializedBlobId, lineCount) { return __awaiter(this, void 0, void 0, function* () { + if (serializedBlobId == null) { + throw new TypeError('serializedBlobId can not be null or undefined'); + } + if (lineCount == null) { + throw new TypeError('lineCount can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - configurationId: configurationId + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId + }; + let queryValues = { + serializedBlobId: serializedBlobId, + lineCount: lineCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, configuration, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); resolve(ret); } catch (err) { @@ -23283,25 +34720,28 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Gets the present evaluation state of a policy. + * Create a log and connect it to a pipeline run's execution plan. * - * @param {string} project - Project ID or project name - * @param {string} evaluationId - ID of the policy evaluation to be retrieved. + * @param {TaskAgentInterfaces.TaskLog} log - An object that contains information about log's path. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId - The ID of the plan. */ - getPolicyEvaluation(project, evaluationId) { + createLog(log, scopeIdentifier, hubName, planId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - evaluationId: evaluationId + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "46aecb7a-5d2c-4647-897b-0209505a9fe4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false); + res = yield this.rest.create(url, log, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); resolve(ret); } catch (err) { @@ -23311,25 +34751,33 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Requeue the policy evaluation. - * - * @param {string} project - Project ID or project name - * @param {string} evaluationId - ID of the policy evaluation to be retrieved. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {number} logId + * @param {number} startLine + * @param {number} endLine */ - requeuePolicyEvaluation(project, evaluationId) { + getLog(scopeIdentifier, hubName, planId, logId, startLine, endLine) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - evaluationId: evaluationId + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "46aecb7a-5d2c-4647-897b-0209505a9fe4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, null, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -23339,36 +34787,25 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Retrieves a list of all the policy evaluation statuses for a specific pull request. - * - * @param {string} project - Project ID or project name - * @param {string} artifactId - A string which uniquely identifies the target of a policy evaluation. - * @param {boolean} includeNotApplicable - Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request. - * @param {number} top - The number of policy evaluation records to retrieve. - * @param {number} skip - The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId */ - getPolicyEvaluations(project, artifactId, includeNotApplicable, top, skip) { + getLogs(scopeIdentifier, hubName, planId) { return __awaiter(this, void 0, void 0, function* () { - if (artifactId == null) { - throw new TypeError('artifactId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - artifactId: artifactId, - includeNotApplicable: includeNotApplicable, - '$top': top, - '$skip': skip, + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "c23ddff5-229c-4d04-a80b-0fdce9f360c8", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, true); resolve(ret); } catch (err) { @@ -23378,27 +34815,23 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Retrieve a specific revision of a given policy by ID. - * - * @param {string} project - Project ID or project name - * @param {number} configurationId - The policy configuration ID. - * @param {number} revisionId - The revision ID. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" */ - getPolicyConfigurationRevision(project, configurationId, revisionId) { + getPlanGroupsQueueMetrics(scopeIdentifier, hubName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - configurationId: configurationId, - revisionId: revisionId + scopeIdentifier: scopeIdentifier, + hubName: hubName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "fe1e68a2-60d3-43cb-855b-85e41ae97c95", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "038fd4d5-cda7-44ca-92c0-935843fee1a7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics, true); resolve(ret); } catch (err) { @@ -23408,31 +34841,35 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Retrieve all revisions for a given policy. - * - * @param {string} project - Project ID or project name - * @param {number} configurationId - The policy configuration ID. - * @param {number} top - The number of revisions to retrieve. - * @param {number} skip - The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {{ [key: string] : string; }} claims + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} jobId + * @param {string} serviceConnectionId */ - getPolicyConfigurationRevisions(project, configurationId, top, skip) { + createOidcToken(claims, scopeIdentifier, hubName, planId, jobId, serviceConnectionId) { return __awaiter(this, void 0, void 0, function* () { + if (serviceConnectionId == null) { + throw new TypeError('serviceConnectionId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - configurationId: configurationId + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + jobId: jobId }; let queryValues = { - '$top': top, - '$skip': skip, + serviceConnectionId: serviceConnectionId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "fe1e68a2-60d3-43cb-855b-85e41ae97c95", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "69a319f4-28c1-4bfd-93e6-ea0ff5c6f1a2", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true); + res = yield this.rest.create(url, claims, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -23442,25 +34879,29 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Retrieve a specific policy type by ID. - * - * @param {string} project - Project ID or project name - * @param {string} typeId - The policy ID. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {TaskAgentInterfaces.PlanGroupStatus} statusFilter + * @param {number} count */ - getPolicyType(project, typeId) { + getQueuedPlanGroups(scopeIdentifier, hubName, statusFilter, count) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - typeId: typeId + scopeIdentifier: scopeIdentifier, + hubName: hubName + }; + let queryValues = { + statusFilter: statusFilter, + count: count, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "44096322-2d3d-466a-bb30-d1b7de69f61f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0dd73091-3e36-4f43-b443-1b76dd426d84", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, true); resolve(ret); } catch (err) { @@ -23470,23 +34911,25 @@ class PolicyApi extends basem.ClientApiBase { }); } /** - * Retrieve all available policy types. - * - * @param {string} project - Project ID or project name + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planGroup */ - getPolicyTypes(project) { + getQueuedPlanGroup(scopeIdentifier, hubName, planGroup) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planGroup: planGroup }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "44096322-2d3d-466a-bb30-d1b7de69f61f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "65fd0708-bc1e-447b-a731-0587c5464e5b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, false); resolve(ret); } catch (err) { @@ -23495,62 +34938,26 @@ class PolicyApi extends basem.ClientApiBase { })); }); } -} -PolicyApi.RESOURCE_AREA_ID = "fb13a388-40dd-4a04-b530-013a739c72ef"; -exports.PolicyApi = PolicyApi; - - -/***/ }), - -/***/ 8101: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* -* --------------------------------------------------------- -* Copyright(C) Microsoft Corporation. All rights reserved. -* --------------------------------------------------------- -* -* --------------------------------------------------------- -* Generated file, DO NOT EDIT -* --------------------------------------------------------- -*/ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const ProfileInterfaces = __nccwpck_require__(879); -class ProfileApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Profile-api', options); - } /** - * @param {string} id - * @param {string} descriptor - */ - deleteProfileAttribute(id, descriptor) { + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + */ + getPlan(scopeIdentifier, hubName, planId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id - }; - let queryValues = { - descriptor: descriptor, + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "5cecd946-d704-471e-a45f-3b4064fcfaba", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlan, false); resolve(ret); } catch (err) { @@ -23560,25 +34967,31 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {string} id - * @param {string} descriptor - */ - getProfileAttribute(id, descriptor) { + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + */ + getRecords(scopeIdentifier, hubName, planId, timelineId, changeId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId }; let queryValues = { - descriptor: descriptor, + changeId: changeId, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8893bc5b-35b2-4be7-83cb-99e683551db4", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.ProfileAttribute, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true); resolve(ret); } catch (err) { @@ -23588,33 +35001,30 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {string} id - * @param {string} partition - * @param {string} modifiedSince - * @param {string} modifiedAfterRevision - * @param {boolean} withCoreAttributes - * @param {string} coreAttributes - */ - getProfileAttributes(id, partition, modifiedSince, modifiedAfterRevision, withCoreAttributes, coreAttributes) { + * Update timeline records if they already exist, otherwise create new ones for the same timeline. + * + * @param {VSSInterfaces.VssJsonCollectionWrapperV} records - The array of timeline records to be updated. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId - The ID of the plan. + * @param {string} timelineId - The ID of the timeline. + */ + updateRecords(records, scopeIdentifier, hubName, planId, timelineId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id - }; - let queryValues = { - partition: partition, - modifiedSince: modifiedSince, - modifiedAfterRevision: modifiedAfterRevision, - withCoreAttributes: withCoreAttributes, - coreAttributes: coreAttributes, + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8893bc5b-35b2-4be7-83cb-99e683551db4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.ProfileAttribute, true); + res = yield this.rest.update(url, records, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true); resolve(ret); } catch (err) { @@ -23624,26 +35034,26 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {any} container - * @param {string} id - * @param {string} descriptor - */ - setProfileAttribute(container, id, descriptor) { + * @param {TaskAgentInterfaces.Timeline} timeline + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + */ + createTimeline(timeline, scopeIdentifier, hubName, planId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id - }; - let queryValues = { - descriptor: descriptor, + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, container, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, timeline, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false); resolve(ret); } catch (err) { @@ -23653,21 +35063,26 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV[]>} attributesCollection - * @param {string} id - */ - setProfileAttributes(attributesCollection, id) { + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + */ + deleteTimeline(scopeIdentifier, hubName, planId, timelineId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, attributesCollection, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -23678,27 +35093,33 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {string} id - * @param {string} size - * @param {string} format - */ - getAvatar(id, size, format) { + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + * @param {boolean} includeRecords + */ + getTimeline(scopeIdentifier, hubName, planId, timelineId, changeId, includeRecords) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId }; let queryValues = { - size: size, - format: format, + changeId: changeId, + includeRecords: includeRecords, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false); resolve(ret); } catch (err) { @@ -23708,30 +35129,25 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {any} container - * @param {string} id - * @param {string} size - * @param {string} format - * @param {string} displayName - */ - getAvatarPreview(container, id, size, format, displayName) { + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * @param {string} planId + */ + getTimelines(scopeIdentifier, hubName, planId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id - }; - let queryValues = { - size: size, - format: format, - displayName: displayName, + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, container, options); - let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, true); resolve(ret); } catch (err) { @@ -23740,21 +35156,72 @@ class ProfileApi extends basem.ClientApiBase { })); }); } +} +exports.TaskApi = TaskApi; + + +/***/ }), + +/***/ 45742: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const TestInterfaces = __nccwpck_require__(93047); +class TestApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Test-api', options); + } /** - * @param {string} id - */ - resetAvatar(id) { + * Attach a file to test step result + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iteration + * @param {number} iterationId - ID of the test result iteration. + * @param {string} actionPath - Hex value of test result action path. + */ + createTestIterationResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, iterationId, actionPath) { return __awaiter(this, void 0, void 0, function* () { + if (iterationId == null) { + throw new TypeError('iterationId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + iterationId: iterationId, + actionPath: actionPath, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.create(url, attachmentRequestModel, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -23765,21 +35232,27 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {any} container - * @param {string} id - */ - setAvatar(container, id) { + * Attach a file to a test result. + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result against which attachment has to be uploaded. + */ + createTestResultAttachment(attachmentRequestModel, project, runId, testCaseResultId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id + project: project, + runId: runId, + testCaseResultId: testCaseResultId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, container, options); + res = yield this.rest.create(url, attachmentRequestModel, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -23790,23 +35263,34 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * Lookup up country/region based on provided IPv4, null if using the remote IPv4 address. - * - * @param {string} ipaddress - IPv4 address to be used for reverse lookup, null if using RemoteIPAddress in request context - */ - getGeoRegion(ipaddress) { + * Attach a file to a test result + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment Request Model. + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} testSubResultId - ID of the test sub results against which attachment has to be uploaded. + */ + createTestSubResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, testSubResultId) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; let queryValues = { - ipaddress: ipaddress, + testSubResultId: testSubResultId, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "3bcda9c0-3078-48a5-a1e0-83bd05931ad0", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.create(url, attachmentRequestModel, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -23817,26 +35301,28 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * Create profile - * - * @param {ProfileInterfaces.CreateProfileContext} createProfileContext - Context for profile creation - * @param {boolean} autoCreate - Create profile automatically - */ - createProfile(createProfileContext, autoCreate) { + * Download a test result attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the testCaseResultId. + * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test result attachment to be downloaded. + */ + getTestResultAttachmentContent(project, runId, testCaseResultId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - autoCreate: autoCreate, + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, createProfileContext, options); - let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -23845,33 +35331,27 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {string} id - * @param {boolean} details - * @param {boolean} withAttributes - * @param {string} partition - * @param {string} coreAttributes - * @param {boolean} forceRefresh - */ - getProfile(id, details, withAttributes, partition, coreAttributes, forceRefresh) { + * Get list of test result attachments reference. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result. + */ + getTestResultAttachments(project, runId, testCaseResultId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id - }; - let queryValues = { - details: details, - withAttributes: withAttributes, - partition: partition, - coreAttributes: coreAttributes, - forceRefresh: forceRefresh, + project: project, + runId: runId, + testCaseResultId: testCaseResultId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); resolve(ret); } catch (err) { @@ -23881,25 +35361,28 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * Update profile - * - * @param {ProfileInterfaces.Profile} profile - Update profile - * @param {string} id - Profile ID - */ - updateProfile(profile, id) { + * Download a test result attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the testCaseResultId. + * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test result attachment to be downloaded. + */ + getTestResultAttachmentZip(project, runId, testCaseResultId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, profile, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -23908,19 +35391,35 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - */ - getRegions() { + * Download a test sub result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} attachmentId - ID of the test result attachment to be downloaded + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachmentContent(project, runId, testCaseResultId, attachmentId, testSubResultId) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "92d8d1c9-26b8-4774-a929-d640a73da524", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -23929,18 +35428,34 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - */ - getSupportedLcids() { + * Get list of test sub result attachments + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachments(project, runId, testCaseResultId, testSubResultId) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "d5bd1aa6-c269-4bcd-ad32-75fa17475584", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); resolve(ret); } catch (err) { @@ -23950,23 +35465,35 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {boolean} includeAvatar - */ - getUserDefaults(includeAvatar) { + * Download a test sub result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} attachmentId - ID of the test result attachment to be downloaded + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachmentZip(project, runId, testCaseResultId, attachmentId, testSubResultId) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; let queryValues = { - includeAvatar: includeAvatar, + testSubResultId: testSubResultId, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "b583a356-1da7-4237-9f4c-1deb2edbc7e8", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -23975,21 +35502,26 @@ class ProfileApi extends basem.ClientApiBase { }); } /** - * @param {string} id - */ - refreshUserDefaults(id) { + * Attach a file to a test run. + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run against which attachment has to be uploaded. + */ + createTestRunAttachment(attachmentRequestModel, project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id + project: project, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "b583a356-1da7-4237-9f4c-1deb2edbc7e8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, options); - let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -23998,58 +35530,27 @@ class ProfileApi extends basem.ClientApiBase { })); }); } -} -exports.ProfileApi = ProfileApi; - - -/***/ }), - -/***/ 1682: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const ProjectAnalysisInterfaces = __nccwpck_require__(4323); -class ProjectAnalysisApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-ProjectAnalysis-api', options); - } /** + * Download a test run attachment by its ID. + * * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test run attachment to be downloaded. */ - getProjectLanguageAnalytics(project) { + getTestRunAttachmentContent(project, runId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + runId: runId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "5b02a779-1867-433f-90b7-d23ed5e33e57", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectLanguageAnalytics, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -24058,33 +35559,25 @@ class ProjectAnalysisApi extends basem.ClientApiBase { }); } /** + * Get list of test run attachments reference. + * * @param {string} project - Project ID or project name - * @param {Date} fromDate - * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType + * @param {number} runId - ID of the test run. */ - getProjectActivityMetrics(project, fromDate, aggregationType) { + getTestRunAttachments(project, runId) { return __awaiter(this, void 0, void 0, function* () { - if (fromDate == null) { - throw new TypeError('fromDate can not be null or undefined'); - } - if (aggregationType == null) { - throw new TypeError('aggregationType can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - fromDate: fromDate, - aggregationType: aggregationType, + project: project, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "e40ae584-9ea6-4f06-a7c7-6284651b466b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectActivityMetrics, false); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); resolve(ret); } catch (err) { @@ -24094,46 +35587,26 @@ class ProjectAnalysisApi extends basem.ClientApiBase { }); } /** - * Retrieves git activity metrics for repositories matching a specified criteria. + * Download a test run attachment by its ID. * * @param {string} project - Project ID or project name - * @param {Date} fromDate - Date from which, the trends are to be fetched. - * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType - Bucket size on which, trends are to be aggregated. - * @param {number} skip - The number of repositories to ignore. - * @param {number} top - The number of repositories for which activity metrics are to be retrieved. + * @param {number} runId - ID of the test run whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test run attachment to be downloaded. */ - getGitRepositoriesActivityMetrics(project, fromDate, aggregationType, skip, top) { + getTestRunAttachmentZip(project, runId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { - if (fromDate == null) { - throw new TypeError('fromDate can not be null or undefined'); - } - if (aggregationType == null) { - throw new TypeError('aggregationType can not be null or undefined'); - } - if (skip == null) { - throw new TypeError('skip can not be null or undefined'); - } - if (top == null) { - throw new TypeError('top can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - fromDate: fromDate, - aggregationType: aggregationType, - '$skip': skip, - '$top': top, + project: project, + runId: runId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "df7fbbca-630a-40e3-8aa3-7a3faf66947e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -24143,34 +35616,24 @@ class ProjectAnalysisApi extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {string} repositoryId - * @param {Date} fromDate - * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType + * @param {number} runId + * @param {number} testCaseResultId */ - getRepositoryActivityMetrics(project, repositoryId, fromDate, aggregationType) { + getBugsLinkedToTestResult(project, runId, testCaseResultId) { return __awaiter(this, void 0, void 0, function* () { - if (fromDate == null) { - throw new TypeError('fromDate can not be null or undefined'); - } - if (aggregationType == null) { - throw new TypeError('aggregationType can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - repositoryId: repositoryId - }; - let queryValues = { - fromDate: fromDate, - aggregationType: aggregationType, + runId: runId, + testCaseResultId: testCaseResultId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "df7fbbca-630a-40e3-8aa3-7a3faf66947e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "6de20ca2-67de-4faf-97fa-38c5d585eb00", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -24179,62 +35642,36 @@ class ProjectAnalysisApi extends basem.ClientApiBase { })); }); } -} -ProjectAnalysisApi.RESOURCE_AREA_ID = "7658fa33-b1bf-4580-990f-fac5896773d3"; -exports.ProjectAnalysisApi = ProjectAnalysisApi; - - -/***/ }), - -/***/ 3075: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const ReleaseInterfaces = __nccwpck_require__(7421); -class ReleaseApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Release-api', options); - } /** - * Returns the artifact details that automation agent requires + * Get code coverage data for a build. * * @param {string} project - Project ID or project name - * @param {number} releaseId + * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. + * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. */ - getAgentArtifactDefinitions(project, releaseId) { + getBuildCodeCoverage(project, buildId, flags) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + if (flags == null) { + throw new TypeError('flags can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId + project: project + }; + let queryValues = { + buildId: buildId, + flags: flags, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "f2571c27-bf50-4938-b396-32d109ddef26", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AgentArtifactDefinition, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.BuildCoverage, true); resolve(ret); } catch (err) { @@ -24244,41 +35681,32 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get a list of approvals + * Get Code Coverage Summary for Build. * * @param {string} project - Project ID or project name - * @param {string} assignedToFilter - Approvals assigned to this user. - * @param {ReleaseInterfaces.ApprovalStatus} statusFilter - Approvals with this status. Default is 'pending'. - * @param {number[]} releaseIdsFilter - Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4. - * @param {ReleaseInterfaces.ApprovalType} typeFilter - Approval with this type. - * @param {number} top - Number of approvals to get. Default is 50. - * @param {number} continuationToken - Gets the approvals after the continuation token provided. - * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created approvals. Default is 'descending'. - * @param {boolean} includeMyGroupApprovals - 'true' to include my group approvals. Default is 'false'. + * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. + * @param {number} deltaBuildId - Delta Build id (optional) */ - getApprovals(project, assignedToFilter, statusFilter, releaseIdsFilter, typeFilter, top, continuationToken, queryOrder, includeMyGroupApprovals) { + getCodeCoverageSummary(project, buildId, deltaBuildId) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - assignedToFilter: assignedToFilter, - statusFilter: statusFilter, - releaseIdsFilter: releaseIdsFilter && releaseIdsFilter.join(","), - typeFilter: typeFilter, - top: top, - continuationToken: continuationToken, - queryOrder: queryOrder, - includeMyGroupApprovals: includeMyGroupApprovals, + buildId: buildId, + deltaBuildId: deltaBuildId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "b47c6458-e73b-47cb-a770-4df1e8813a91", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CodeCoverageSummary, false); resolve(ret); } catch (err) { @@ -24288,25 +35716,31 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get approval history. + * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary * + * @param {TestInterfaces.CodeCoverageData} coverageData * @param {string} project - Project ID or project name - * @param {number} approvalStepId - Id of the approval. + * @param {number} buildId */ - getApprovalHistory(project, approvalStepId) { + updateCodeCoverageSummary(coverageData, project, buildId) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - approvalStepId: approvalStepId + project: project + }; + let queryValues = { + buildId: buildId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "250c7158-852e-4130-a00f-a0cce9b72d05", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + res = yield this.rest.create(url, coverageData, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -24316,29 +35750,32 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get an approval. + * Get code coverage data for a test run * * @param {string} project - Project ID or project name - * @param {number} approvalId - Id of the approval. - * @param {boolean} includeHistory - 'true' to include history of the approval. Default is 'false'. + * @param {number} runId - ID of the test run for which code coverage data needs to be fetched. + * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. */ - getApproval(project, approvalId, includeHistory) { + getTestRunCodeCoverage(project, runId, flags) { return __awaiter(this, void 0, void 0, function* () { + if (flags == null) { + throw new TypeError('flags can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - approvalId: approvalId + runId: runId }; let queryValues = { - includeHistory: includeHistory, + flags: flags, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "9328e074-59fb-465a-89d9-b09c82ee5109", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "9629116f-3b89-4ed8-b358-d4694efda160", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -24348,26 +35785,22 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Update status of an approval - * - * @param {ReleaseInterfaces.ReleaseApproval} approval - ReleaseApproval object having status, approver and comments. + * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields * @param {string} project - Project ID or project name - * @param {number} approvalId - Id of the approval. */ - updateReleaseApproval(approval, project, approvalId) { + addCustomFields(newFields, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - approvalId: approvalId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "9328e074-59fb-465a-89d9-b09c82ee5109", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8ce1923b-f4c7-4e22-b93b-f6284e525ec2", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, approval, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + res = yield this.rest.create(url, newFields, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CustomTestFieldDefinition, true); resolve(ret); } catch (err) { @@ -24377,22 +35810,28 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {ReleaseInterfaces.ReleaseApproval[]} approvals * @param {string} project - Project ID or project name + * @param {TestInterfaces.CustomTestFieldScope} scopeFilter */ - updateReleaseApprovals(approvals, project) { + queryCustomFields(project, scopeFilter) { return __awaiter(this, void 0, void 0, function* () { + if (scopeFilter == null) { + throw new TypeError('scopeFilter can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; + let queryValues = { + scopeFilter: scopeFilter, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "c957584a-82aa-4131-8222-6d47f78bfa7a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8ce1923b-f4c7-4e22-b93b-f6284e525ec2", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, approvals, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CustomTestFieldDefinition, true); resolve(ret); } catch (err) { @@ -24402,36 +35841,23 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get a task attachment. - * + * @param {TestInterfaces.ResultsFilter} filter * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of the release environment. - * @param {number} attemptId - Attempt number of deployment. - * @param {string} timelineId - Timeline Id of the task. - * @param {string} recordId - Record Id of attachment. - * @param {string} type - Type of the attachment. - * @param {string} name - Name of the attachment. */ - getTaskAttachmentContent(project, releaseId, environmentId, attemptId, timelineId, recordId, type, name) { + queryTestResultHistory(filter, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId, - environmentId: environmentId, - attemptId: attemptId, - timelineId: timelineId, - recordId: recordId, - type: type, - name: name + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c4071f6d-3697-46ca-858e-8b10ff09e52f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "234616f5-429c-4e7b-9192-affd76731dfd", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultHistory, false); + resolve(ret); } catch (err) { reject(err); @@ -24440,38 +35866,34 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get a release task attachment. + * Get iteration for a result * * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of the release environment. - * @param {number} attemptId - Attempt number of deployment. - * @param {string} planId - Plan Id of the deploy phase. - * @param {string} timelineId - Timeline Id of the task. - * @param {string} recordId - Record Id of attachment. - * @param {string} type - Type of the attachment. - * @param {string} name - Name of the attachment. + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iterations. + * @param {number} iterationId - Id of the test results Iteration. + * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. */ - getReleaseTaskAttachmentContent(project, releaseId, environmentId, attemptId, planId, timelineId, recordId, type, name) { + getTestIteration(project, runId, testCaseResultId, iterationId, includeActionResults) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId, - attemptId: attemptId, - planId: planId, - timelineId: timelineId, - recordId: recordId, - type: type, - name: name + runId: runId, + testCaseResultId: testCaseResultId, + iterationId: iterationId + }; + let queryValues = { + includeActionResults: includeActionResults, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "60b86efb-7b8c-4853-8f9f-aa142b77b479", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "73eb9074-3446-4c44-8296-2f811950ff8d", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestIterationDetailsModel, false); + resolve(ret); } catch (err) { reject(err); @@ -24480,33 +35902,31 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get the task attachments. + * Get iterations for a result * * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of the release environment. - * @param {number} attemptId - Attempt number of deployment. - * @param {string} timelineId - Timeline Id of the task. - * @param {string} type - Type of the attachment. + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iterations. + * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. */ - getTaskAttachments(project, releaseId, environmentId, attemptId, timelineId, type) { + getTestIterations(project, runId, testCaseResultId, includeActionResults) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId, - attemptId: attemptId, - timelineId: timelineId, - type: type + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + includeActionResults: includeActionResults, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "214111ee-2415-4df2-8ed2-74417f7d61f9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "73eb9074-3446-4c44-8296-2f811950ff8d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTaskAttachment, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestIterationDetailsModel, true); resolve(ret); } catch (err) { @@ -24516,33 +35936,22 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get the release task attachments. - * + * @param {TestInterfaces.LinkedWorkItemsQuery} workItemQuery * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of the release environment. - * @param {number} attemptId - Attempt number of deployment. - * @param {string} planId - Plan Id of the deploy phase. - * @param {string} type - Type of the attachment. */ - getReleaseTaskAttachments(project, releaseId, environmentId, attemptId, planId, type) { + getLinkedWorkItemsByQuery(workItemQuery, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId, - environmentId: environmentId, - attemptId: attemptId, - planId: planId, - type: type + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "a4d06688-0dfa-4895-82a5-f43ec9452306", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a4dcb25b-9878-49ea-abfd-e440bd9b1dcd", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTaskAttachment, true); + res = yield this.rest.create(url, workItemQuery, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -24552,38 +35961,25 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {string} artifactType - * @param {string} sourceId - * @param {string} artifactVersionId + * Get test run message logs + * * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. */ - getAutoTriggerIssues(artifactType, sourceId, artifactVersionId, project) { + getTestRunLogs(project, runId) { return __awaiter(this, void 0, void 0, function* () { - if (artifactType == null) { - throw new TypeError('artifactType can not be null or undefined'); - } - if (sourceId == null) { - throw new TypeError('sourceId can not be null or undefined'); - } - if (artifactVersionId == null) { - throw new TypeError('artifactVersionId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - artifactType: artifactType, - sourceId: sourceId, - artifactVersionId: artifactVersionId, + project: project, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c1a68497-69da-40fb-9423-cab19cfeeca9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a1e55200-637e-42e9-a7c0-7e5bfdedb1b3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AutoTriggerIssue, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestMessageLogDetails, true); resolve(ret); } catch (err) { @@ -24593,29 +35989,33 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets a badge that indicates the status of the most recent deployment for an environment. + * Get a test point. * - * @param {string} projectId - The ID of the Project. - * @param {number} releaseDefinitionId - The ID of the Release Definition. - * @param {number} environmentId - The ID of the Environment. - * @param {string} branchName - The name of the branch. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the point. + * @param {number} pointIds - ID of the test point to get. + * @param {string} witFields - Comma-separated list of work item field names. */ - getDeploymentBadge(projectId, releaseDefinitionId, environmentId, branchName) { + getPoint(project, planId, suiteId, pointIds, witFields) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - projectId: projectId, - releaseDefinitionId: releaseDefinitionId, - environmentId: environmentId, - branchName: branchName + project: project, + planId: planId, + suiteId: suiteId, + pointIds: pointIds + }; + let queryValues = { + witFields: witFields, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "1a60a35d-b8c9-45fb-bf67-da0829711147", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, false); resolve(ret); } catch (err) { @@ -24625,31 +36025,43 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Get a list of test points. + * * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - * @param {string} artifactAlias + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the points. + * @param {string} witFields - Comma-separated list of work item field names. + * @param {string} configurationId - Get test points for specific configuration. + * @param {string} testCaseId - Get test points for a specific test case, valid when configurationId is not set. + * @param {string} testPointIds - Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set. + * @param {boolean} includePointDetails - Include all properties for the test point. + * @param {number} skip - Number of test points to skip.. + * @param {number} top - Number of test points to return. */ - getReleaseChanges(project, releaseId, baseReleaseId, top, artifactAlias) { + getPoints(project, planId, suiteId, witFields, configurationId, testCaseId, testPointIds, includePointDetails, skip, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + planId: planId, + suiteId: suiteId }; let queryValues = { - baseReleaseId: baseReleaseId, + witFields: witFields, + configurationId: configurationId, + testCaseId: testCaseId, + testPointIds: testPointIds, + includePointDetails: includePointDetails, + '$skip': skip, '$top': top, - artifactAlias: artifactAlias, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "8dcf9fe9-ca37-4113-8ee1-37928e98407c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Change, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, true); resolve(ret); } catch (err) { @@ -24659,27 +36071,30 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Update test points. + * + * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - Data to update. * @param {string} project - Project ID or project name - * @param {string} taskGroupId - * @param {string[]} propertyFilters + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the points. + * @param {string} pointIds - ID of the test point to get. Use a comma-separated list of IDs to update multiple test points. */ - getDefinitionEnvironments(project, taskGroupId, propertyFilters) { + updateTestPoints(pointUpdateModel, project, planId, suiteId, pointIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - taskGroupId: taskGroupId, - propertyFilters: propertyFilters && propertyFilters.join(","), + project: project, + planId: planId, + suiteId: suiteId, + pointIds: pointIds }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "12b5d21a-f54c-430e-a8c1-7515d196890e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, pointUpdateModel, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, true); resolve(ret); } catch (err) { @@ -24689,24 +36104,30 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Create a release definition + * Get test points using query. * - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - release definition object to create. + * @param {TestInterfaces.TestPointsQuery} query - TestPointsQuery to get test points. * @param {string} project - Project ID or project name + * @param {number} skip - Number of test points to skip.. + * @param {number} top - Number of test points to return. */ - createReleaseDefinition(releaseDefinition, project) { + getPointsByQuery(query, project, skip, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; + let queryValues = { + '$skip': skip, + '$top': top, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "b4264fd0-a5d1-43e2-82a5-b9c46b7da9ce", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, releaseDefinition, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPointsQuery, false); resolve(ret); } catch (err) { @@ -24716,31 +36137,40 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Delete a release definition. - * * @param {string} project - Project ID or project name - * @param {number} definitionId - Id of the release definition. - * @param {string} comment - Comment for deleting a release definition. - * @param {boolean} forceDelete - 'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'. + * @param {number} buildId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param {string} orderby + * @param {boolean} shouldIncludeResults + * @param {boolean} queryRunSummaryForInProgress */ - deleteReleaseDefinition(project, definitionId, comment, forceDelete) { + getTestResultDetailsForBuild(project, buildId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - definitionId: definitionId + project: project }; let queryValues = { - comment: comment, - forceDelete: forceDelete, + buildId: buildId, + publishContext: publishContext, + groupBy: groupBy, + '$filter': filter, + '$orderby': orderby, + shouldIncludeResults: shouldIncludeResults, + queryRunSummaryForInProgress: queryRunSummaryForInProgress, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "efb387b0-10d5-42e7-be40-95e06ee9430f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsDetails, false); resolve(ret); } catch (err) { @@ -24750,29 +36180,45 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get a release definition. - * * @param {string} project - Project ID or project name - * @param {number} definitionId - Id of the release definition. - * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included. + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param {string} orderby + * @param {boolean} shouldIncludeResults + * @param {boolean} queryRunSummaryForInProgress */ - getReleaseDefinition(project, definitionId, propertyFilters) { + getTestResultDetailsForRelease(project, releaseId, releaseEnvId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (releaseEnvId == null) { + throw new TypeError('releaseEnvId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - definitionId: definitionId + project: project }; let queryValues = { - propertyFilters: propertyFilters && propertyFilters.join(","), + releaseId: releaseId, + releaseEnvId: releaseEnvId, + publishContext: publishContext, + groupBy: groupBy, + '$filter': filter, + '$orderby': orderby, + shouldIncludeResults: shouldIncludeResults, + queryRunSummaryForInProgress: queryRunSummaryForInProgress, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "b834ec7e-35bb-450f-a3c8-802e70ca40dd", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsDetails, false); resolve(ret); } catch (err) { @@ -24782,31 +36228,25 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get release definition of a given revision. - * + * @param {TestInterfaces.TestResultDocument} document * @param {string} project - Project ID or project name - * @param {number} definitionId - Id of the release definition. - * @param {number} revision - Revision number of the release definition. + * @param {number} runId */ - getReleaseDefinitionRevision(project, definitionId, revision) { + publishTestResultDocument(document, project, runId) { return __awaiter(this, void 0, void 0, function* () { - if (revision == null) { - throw new TypeError('revision can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId - }; - let queryValues = { - revision: revision, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "370ca04b-8eec-4ca8-8ba3-d24dca228791", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -24815,53 +36255,37 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get a list of release definitions. - * * @param {string} project - Project ID or project name - * @param {string} searchText - Get release definitions with names containing searchText. - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - The properties that should be expanded in the list of Release definitions. - * @param {string} artifactType - Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. - * @param {string} artifactSourceId - Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. - * @param {number} top - Number of release definitions to get. - * @param {string} continuationToken - Gets the release definitions after the continuation token provided. - * @param {ReleaseInterfaces.ReleaseDefinitionQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdAscending'. - * @param {string} path - Gets the release definitions under the specified path. - * @param {boolean} isExactNameMatch - 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'. - * @param {string[]} tagFilter - A comma-delimited list of tags. Only release definitions with these tags will be returned. - * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not. - * @param {string[]} definitionIdFilter - A comma-delimited list of release definitions to retrieve. - * @param {boolean} isDeleted - 'true' to get release definitions that has been deleted. Default is 'false' - * @param {boolean} searchTextContainsFolderName - 'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'. + * @param {number} buildId + * @param {string} publishContext + * @param {string[]} fields + * @param {string} continuationToken */ - getReleaseDefinitions(project, searchText, expand, artifactType, artifactSourceId, top, continuationToken, queryOrder, path, isExactNameMatch, tagFilter, propertyFilters, definitionIdFilter, isDeleted, searchTextContainsFolderName) { + getResultGroupsByBuild(project, buildId, publishContext, fields, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + if (publishContext == null) { + throw new TypeError('publishContext can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - searchText: searchText, - '$expand': expand, - artifactType: artifactType, - artifactSourceId: artifactSourceId, - '$top': top, + buildId: buildId, + publishContext: publishContext, + fields: fields && fields.join(","), continuationToken: continuationToken, - queryOrder: queryOrder, - path: path, - isExactNameMatch: isExactNameMatch, - tagFilter: tagFilter && tagFilter.join(","), - propertyFilters: propertyFilters && propertyFilters.join(","), - definitionIdFilter: definitionIdFilter && definitionIdFilter.join(","), - isDeleted: isDeleted, - searchTextContainsFolderName: searchTextContainsFolderName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "d279d052-c55a-4204-b913-42f733b52958", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -24871,26 +36295,39 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Undelete a release definition. - * - * @param {ReleaseInterfaces.ReleaseDefinitionUndeleteParameter} releaseDefinitionUndeleteParameter - Object for undelete release definition. * @param {string} project - Project ID or project name - * @param {number} definitionId - Id of the release definition to be undeleted + * @param {number} releaseId + * @param {string} publishContext + * @param {number} releaseEnvId + * @param {string[]} fields + * @param {string} continuationToken */ - undeleteReleaseDefinition(releaseDefinitionUndeleteParameter, project, definitionId) { + getResultGroupsByRelease(project, releaseId, publishContext, releaseEnvId, fields, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (publishContext == null) { + throw new TypeError('publishContext can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - definitionId: definitionId + project: project + }; + let queryValues = { + releaseId: releaseId, + publishContext: publishContext, + releaseEnvId: releaseEnvId, + fields: fields && fields.join(","), + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "ef5ce5d4-a4e5-47ee-804c-354518f8d03f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, releaseDefinitionUndeleteParameter, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -24900,24 +36337,24 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Update a release definition. + * Get list of test Result meta data details for corresponding testcasereferenceId * - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - Release definition object to update. + * @param {string[]} testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). * @param {string} project - Project ID or project name */ - updateReleaseDefinition(releaseDefinition, project) { + queryTestResultsMetaData(testReferenceIds, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "afa7830e-67a7-4336-8090-2b448ca80295", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, releaseDefinition, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + res = yield this.rest.create(url, testReferenceIds, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -24927,53 +36364,23 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Get test result retention settings + * * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} definitionEnvironmentId - * @param {string} createdBy - * @param {Date} minModifiedTime - * @param {Date} maxModifiedTime - * @param {ReleaseInterfaces.DeploymentStatus} deploymentStatus - * @param {ReleaseInterfaces.DeploymentOperationStatus} operationStatus - * @param {boolean} latestAttemptsOnly - * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - * @param {number} top - * @param {number} continuationToken - * @param {string} createdFor - * @param {Date} minStartedTime - * @param {Date} maxStartedTime - * @param {string} sourceBranch */ - getDeployments(project, definitionId, definitionEnvironmentId, createdBy, minModifiedTime, maxModifiedTime, deploymentStatus, operationStatus, latestAttemptsOnly, queryOrder, top, continuationToken, createdFor, minStartedTime, maxStartedTime, sourceBranch) { + getResultRetentionSettings(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - definitionId: definitionId, - definitionEnvironmentId: definitionEnvironmentId, - createdBy: createdBy, - minModifiedTime: minModifiedTime, - maxModifiedTime: maxModifiedTime, - deploymentStatus: deploymentStatus, - operationStatus: operationStatus, - latestAttemptsOnly: latestAttemptsOnly, - queryOrder: queryOrder, - '$top': top, - continuationToken: continuationToken, - createdFor: createdFor, - minStartedTime: minStartedTime, - maxStartedTime: maxStartedTime, - sourceBranch: sourceBranch, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "b005ef73-cddc-448e-9ba2-5193bf36b19f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a3206d9e-fa8d-42d3-88cb-f75c51e69cde", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Deployment, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.ResultRetentionSettings, false); resolve(ret); } catch (err) { @@ -24983,22 +36390,24 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {ReleaseInterfaces.DeploymentQueryParameters} queryParameters + * Update test result retention settings + * + * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - Test result retention settings details to be updated * @param {string} project - Project ID or project name */ - getDeploymentsForMultipleEnvironments(queryParameters, project) { + updateResultRetentionSettings(retentionSettings, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "b005ef73-cddc-448e-9ba2-5193bf36b19f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a3206d9e-fa8d-42d3-88cb-f75c51e69cde", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, queryParameters, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Deployment, true); + res = yield this.rest.update(url, retentionSettings, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.ResultRetentionSettings, false); resolve(ret); } catch (err) { @@ -25008,31 +36417,26 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get a release environment. + * Add test results to a test run. * + * @param {TestInterfaces.TestCaseResult[]} results - List of test results to add. * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of the release environment. - * @param {ReleaseInterfaces.ReleaseEnvironmentExpands} expand - A property that should be expanded in the environment. + * @param {number} runId - Test run ID into which test results to add. */ - getReleaseEnvironment(project, releaseId, environmentId, expand) { + addTestResultsToTestRun(results, project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId - }; - let queryValues = { - '$expand': expand, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "Release", "a7e426b1-03dc-48af-9dfe-c98bac612dcb", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseEnvironment, false); + res = yield this.rest.create(url, results, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); resolve(ret); } catch (err) { @@ -25042,28 +36446,31 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Update the status of a release environment + * Get a test result for a test run. * - * @param {ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata} environmentUpdateData - Environment update meta data. * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of release environment. + * @param {number} runId - Test run ID of a test result to fetch. + * @param {number} testCaseResultId - Test result ID. + * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults. */ - updateReleaseEnvironment(environmentUpdateData, project, releaseId, environmentId) { + getTestResultById(project, runId, testCaseResultId, detailsToInclude) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + detailsToInclude: detailsToInclude, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "Release", "a7e426b1-03dc-48af-9dfe-c98bac612dcb", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, environmentUpdateData, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseEnvironment, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, false); resolve(ret); } catch (err) { @@ -25073,24 +36480,35 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Creates a definition environment template + * Get test results for a test run. * - * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - Definition environment template to create * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID of test results to fetch. + * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations and WorkItems. + * @param {number} skip - Number of test results to skip from beginning. + * @param {number} top - Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise. + * @param {TestInterfaces.TestOutcome[]} outcomes - Comma separated list of test outcomes to filter test results. */ - createDefinitionEnvironmentTemplate(template, project) { + getTestResults(project, runId, detailsToInclude, skip, top, outcomes) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + runId: runId + }; + let queryValues = { + detailsToInclude: detailsToInclude, + '$skip': skip, + '$top': top, + outcomes: outcomes && outcomes.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, template, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); resolve(ret); } catch (err) { @@ -25100,30 +36518,26 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Delete a definition environment template + * Update test results in a test run. * + * @param {TestInterfaces.TestCaseResult[]} results - List of test results to update. * @param {string} project - Project ID or project name - * @param {string} templateId - Id of the definition environment template + * @param {number} runId - Test run ID whose test results to update. */ - deleteDefinitionEnvironmentTemplate(project, templateId) { + updateTestResults(results, project, runId) { return __awaiter(this, void 0, void 0, function* () { - if (templateId == null) { - throw new TypeError('templateId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - templateId: templateId, + project: project, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, results, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); resolve(ret); } catch (err) { @@ -25133,30 +36547,24 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets a definition environment template + * This API will return results by Ids with fields specified/trend for particular automated test method. We are still improving this API and have not finalized proper signature and contract. * + * @param {TestInterfaces.TestResultsQuery} query * @param {string} project - Project ID or project name - * @param {string} templateId - Id of the definition environment template */ - getDefinitionEnvironmentTemplate(project, templateId) { + getTestResultsByQuery(query, project) { return __awaiter(this, void 0, void 0, function* () { - if (templateId == null) { - throw new TypeError('templateId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - templateId: templateId, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "6711da49-8e6f-4d35-9f73-cef7a3c81a5b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsQuery, false); resolve(ret); } catch (err) { @@ -25166,27 +36574,36 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets a list of definition environment templates - * * @param {string} project - Project ID or project name - * @param {boolean} isDeleted - 'true' to get definition environment templates that have been deleted. Default is 'false' + * @param {number} buildId + * @param {string} publishContext + * @param {TestInterfaces.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken */ - listDefinitionEnvironmentTemplates(project, isDeleted) { + getTestResultsByBuild(project, buildId, publishContext, outcomes, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - isDeleted: isDeleted, + buildId: buildId, + publishContext: publishContext, + outcomes: outcomes && outcomes.join(","), + '$top': top, + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "3c191b88-615b-4be2-b7d9-5ff9141e91d4", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -25196,30 +36613,38 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Undelete a release definition environment template. - * * @param {string} project - Project ID or project name - * @param {string} templateId - Id of the definition environment template to be undeleted + * @param {number} releaseId + * @param {number} releaseEnvid + * @param {string} publishContext + * @param {TestInterfaces.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken */ - undeleteReleaseDefinitionEnvironmentTemplate(project, templateId) { + getTestResultsByRelease(project, releaseId, releaseEnvid, publishContext, outcomes, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { - if (templateId == null) { - throw new TypeError('templateId can not be null or undefined'); + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - templateId: templateId, + releaseId: releaseId, + releaseEnvid: releaseEnvid, + publishContext: publishContext, + outcomes: outcomes && outcomes.join(","), + '$top': top, + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "ce01820b-83f3-4c15-a583-697a43292c4e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, null, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -25229,28 +36654,34 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {ReleaseInterfaces.FavoriteItem[]} favoriteItems * @param {string} project - Project ID or project name - * @param {string} scope - * @param {string} identityId + * @param {number} buildId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.BuildReference} buildToCompare */ - createFavorites(favoriteItems, project, scope, identityId) { + queryTestResultsReportForBuild(project, buildId, publishContext, includeFailureDetails, buildToCompare) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - scope: scope + project: project }; let queryValues = { - identityId: identityId, + buildId: buildId, + publishContext: publishContext, + includeFailureDetails: includeFailureDetails, + buildToCompare: buildToCompare, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "000ef77b-fea2-498d-a10d-ad1a037f559f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, favoriteItems, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, false); resolve(ret); } catch (err) { @@ -25261,28 +36692,38 @@ class ReleaseApi extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {string} scope - * @param {string} identityId - * @param {string} favoriteItemIds + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.ReleaseReference} releaseToCompare */ - deleteFavorites(project, scope, identityId, favoriteItemIds) { + queryTestResultsReportForRelease(project, releaseId, releaseEnvId, publishContext, includeFailureDetails, releaseToCompare) { return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (releaseEnvId == null) { + throw new TypeError('releaseEnvId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - scope: scope + project: project }; let queryValues = { - identityId: identityId, - favoriteItemIds: favoriteItemIds, + releaseId: releaseId, + releaseEnvId: releaseEnvId, + publishContext: publishContext, + includeFailureDetails: includeFailureDetails, + releaseToCompare: releaseToCompare, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "85765790-ac68-494e-b268-af36c3929744", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, false); resolve(ret); } catch (err) { @@ -25292,27 +36733,22 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * @param {TestInterfaces.ReleaseReference[]} releases * @param {string} project - Project ID or project name - * @param {string} scope - * @param {string} identityId */ - getFavorites(project, scope, identityId) { + queryTestResultsSummaryForReleases(releases, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - scope: scope - }; - let queryValues = { - identityId: identityId, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "85765790-ac68-494e-b268-af36c3929744", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, releases, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, true); resolve(ret); } catch (err) { @@ -25322,22 +36758,26 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {string} flightName + * @param {TestInterfaces.TestResultsContext} resultsContext + * @param {string} project - Project ID or project name + * @param {number[]} workItemIds */ - getFlightAssignments(flightName) { + queryTestSummaryByRequirement(resultsContext, project, workItemIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; let queryValues = { - flightName: flightName, + workItemIds: workItemIds && workItemIds.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "409d301f-3046-46f3-beb9-4357fbce0a8c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "cd08294e-308d-4460-a46e-4cfdefba0b4b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, resultsContext, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSummaryForWorkItem, true); resolve(ret); } catch (err) { @@ -25347,26 +36787,22 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Creates a new folder. - * - * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {TestInterfaces.TestResultTrendFilter} filter * @param {string} project - Project ID or project name - * @param {string} path - Path of the folder. */ - createFolder(folder, project, path) { + queryResultTrendForBuild(filter, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - path: path + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "fbc82a85-0786-4442-88bb-eb0fda6b01b0", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, folder, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, false); + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.AggregatedDataForResultTrend, true); resolve(ret); } catch (err) { @@ -25376,25 +36812,22 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Deletes a definition folder for given folder name and path and all it's existing definitions. - * + * @param {TestInterfaces.TestResultTrendFilter} filter * @param {string} project - Project ID or project name - * @param {string} path - Path of the folder to delete. */ - deleteFolder(project, path) { + queryResultTrendForRelease(filter, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - path: path + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "dd178e93-d8dd-4887-9635-d6b9560b7b6e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.AggregatedDataForResultTrend, true); resolve(ret); } catch (err) { @@ -25404,29 +36837,25 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets folders. + * Get test run statistics , used when we want to get summary of a run by outcome. * * @param {string} project - Project ID or project name - * @param {string} path - Path of the folder. - * @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder - Gets the results in the defined order. Default is 'None'. + * @param {number} runId - ID of the run to get. */ - getFolders(project, path, queryOrder) { + getTestRunStatistics(project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - path: path - }; - let queryValues = { - queryOrder: queryOrder, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "0a42c424-d764-4a16-a2d5-5c85f87d0ae8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRunStatistic, false); resolve(ret); } catch (err) { @@ -25436,26 +36865,24 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Updates an existing folder at given existing path. + * Create new test run. * - * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {TestInterfaces.RunCreateModel} testRun - Run details RunCreateModel * @param {string} project - Project ID or project name - * @param {string} path - Path of the folder to update. */ - updateFolder(folder, project, path) { + createTestRun(testRun, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - path: path + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, folder, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, false); + res = yield this.rest.create(url, testRun, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); resolve(ret); } catch (err) { @@ -25465,26 +36892,25 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Updates the gate for a deployment. + * Delete a test run by its ID. * - * @param {ReleaseInterfaces.GateUpdateMetadata} gateUpdateMetadata - Metadata to patch the Release Gates. * @param {string} project - Project ID or project name - * @param {number} gateStepId - Gate step Id. + * @param {number} runId - ID of the run to delete. */ - updateGates(gateUpdateMetadata, project, gateStepId) { + deleteTestRun(project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - gateStepId: gateStepId + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "2666a539-2001-4f80-bcc7-0379956749d4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, gateUpdateMetadata, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseGates, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -25494,23 +36920,29 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Get a test run by its ID. + * * @param {string} project - Project ID or project name - * @param {number} releaseId + * @param {number} runId - ID of the run to get. + * @param {boolean} includeDetails - Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more. */ - getReleaseHistory(project, releaseId) { + getTestRunById(project, runId, includeDetails) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + runId: runId + }; + let queryValues = { + includeDetails: includeDetails, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "23f461c8-629a-4144-a076-3054fa5f268a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseRevision, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); resolve(ret); } catch (err) { @@ -25520,22 +36952,41 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {FormInputInterfaces.InputValuesQuery} query + * Get a list of test runs. + * * @param {string} project - Project ID or project name + * @param {string} buildUri - URI of the build that the runs used. + * @param {string} owner - Team foundation ID of the owner of the runs. + * @param {string} tmiRunId + * @param {number} planId - ID of the test plan that the runs are a part of. + * @param {boolean} includeRunDetails - If true, include all the properties of the runs. + * @param {boolean} automated - If true, only returns automated runs. + * @param {number} skip - Number of test runs to skip. + * @param {number} top - Number of test runs to return. */ - getInputValues(query, project) { + getTestRuns(project, buildUri, owner, tmiRunId, planId, includeRunDetails, automated, skip, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; + let queryValues = { + buildUri: buildUri, + owner: owner, + tmiRunId: tmiRunId, + planId: planId, + includeRunDetails: includeRunDetails, + automated: automated, + '$skip': skip, + '$top': top, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "71dd499b-317d-45ea-9134-140ea1932b5e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, query, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, true); resolve(ret); } catch (err) { @@ -25545,27 +36996,63 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. + * * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} sourceId + * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory). + * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). + * @param {TestInterfaces.TestRunState} state - Current state of the Runs to be queried. + * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {boolean} isAutomated - Automation type of the Runs to be queried. + * @param {TestInterfaces.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried. + * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {string} branchName - Source Branch name of the Runs to be queried. + * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {string} runTitle - Run Title of the Runs to be queried. + * @param {number} top - Number of runs to be queried. Limit is 100 + * @param {string} continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. */ - getIssues(project, buildId, sourceId) { + queryTestRuns(project, minLastUpdatedDate, maxLastUpdatedDate, state, planIds, isAutomated, publishContext, buildIds, buildDefIds, branchName, releaseIds, releaseDefIds, releaseEnvIds, releaseEnvDefIds, runTitle, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (minLastUpdatedDate == null) { + throw new TypeError('minLastUpdatedDate can not be null or undefined'); + } + if (maxLastUpdatedDate == null) { + throw new TypeError('maxLastUpdatedDate can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - buildId: buildId + project: project }; let queryValues = { - sourceId: sourceId, + minLastUpdatedDate: minLastUpdatedDate, + maxLastUpdatedDate: maxLastUpdatedDate, + state: state, + planIds: planIds && planIds.join(","), + isAutomated: isAutomated, + publishContext: publishContext, + buildIds: buildIds && buildIds.join(","), + buildDefIds: buildDefIds && buildDefIds.join(","), + branchName: branchName, + releaseIds: releaseIds && releaseIds.join(","), + releaseDefIds: releaseDefIds && releaseDefIds.join(","), + releaseEnvIds: releaseEnvIds && releaseEnvIds.join(","), + releaseEnvDefIds: releaseEnvDefIds && releaseEnvDefIds.join(","), + runTitle: runTitle, + '$top': top, + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "cd42261a-f5c6-41c8-9259-f078989b9f25", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AutoTriggerIssue, true); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, true); resolve(ret); } catch (err) { @@ -25575,30 +37062,27 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets gate logs + * Update test run by its ID. * + * @param {TestInterfaces.RunUpdateModel} runUpdateModel - Run details RunUpdateModel * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of release environment. - * @param {number} gateId - Id of the gate. - * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} runId - ID of the run to update. */ - getGateLog(project, releaseId, environmentId, gateId, taskId) { + updateTestRun(runUpdateModel, project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId, - gateId: gateId, - taskId: taskId + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "dec7ca5a-7f7f-4797-8bf1-8efc0dc93b28", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, runUpdateModel, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + resolve(ret); } catch (err) { reject(err); @@ -25607,24 +37091,32 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get logs for a release Id. + * Create a test session * - * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. + * @param {TestInterfaces.TestSession} testSession - Test session details for creation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getLogs(project, releaseId) { + createTestSession(testSession, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - releaseId: releaseId + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "c37fbab5-214b-48e4-a55b-cb6b4f6e4038", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testSession, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, false); + resolve(ret); } catch (err) { reject(err); @@ -25633,32 +37125,43 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets logs + * Get a list of test sessions * - * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of release environment. - * @param {number} taskId - ReleaseTask Id for the log. - * @param {number} attemptId - Id of the attempt. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {number} period - Period in days from now, for which test sessions are fetched. + * @param {boolean} allSessions - If false, returns test sessions for current user. Otherwise, it returns test sessions for all users + * @param {boolean} includeAllProperties - If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version. + * @param {TestInterfaces.TestSessionSource} source - Source of the test session. + * @param {boolean} includeOnlyCompletedSessions - If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states */ - getLog(project, releaseId, environmentId, taskId, attemptId) { + getTestSessions(teamContext, period, allSessions, includeAllProperties, source, includeOnlyCompletedSessions) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId, - taskId: taskId + team: team }; let queryValues = { - attemptId: attemptId, + period: period, + allSessions: allSessions, + includeAllProperties: includeAllProperties, + source: source, + includeOnlyCompletedSessions: includeOnlyCompletedSessions, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "e71ba1ed-c0a4-4a28-a61f-2dd5f68cf3fd", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, true); + resolve(ret); } catch (err) { reject(err); @@ -25667,38 +37170,32 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets the task log of a release as a plain text file. + * Update a test session * - * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of release environment. - * @param {number} attemptId - * @param {string} timelineId - * @param {number} taskId - ReleaseTask Id for the log. - * @param {number} startLine - Starting line number for logs - * @param {number} endLine - Ending line number for logs + * @param {TestInterfaces.TestSession} testSession - Test session details for update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getTaskLog2(project, releaseId, environmentId, attemptId, timelineId, taskId, startLine, endLine) { + updateTestSession(testSession, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId, - attemptId: attemptId, - timelineId: timelineId, - taskId: taskId - }; - let queryValues = { - startLine: startLine, - endLine: endLine, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "2577e6c3-6999-4400-bc69-fe1d837755fe", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testSession, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, false); + resolve(ret); } catch (err) { reject(err); @@ -25707,36 +37204,24 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets the task log of a release as a plain text file. - * * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} environmentId - Id of release environment. - * @param {number} releaseDeployPhaseId - Release deploy phase Id. - * @param {number} taskId - ReleaseTask Id for the log. - * @param {number} startLine - Starting line number for logs - * @param {number} endLine - Ending line number for logs + * @param {number} sharedParameterId */ - getTaskLog(project, releaseId, environmentId, releaseDeployPhaseId, taskId, startLine, endLine) { + deleteSharedParameter(project, sharedParameterId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId, - releaseDeployPhaseId: releaseDeployPhaseId, - taskId: taskId - }; - let queryValues = { - startLine: startLine, - endLine: endLine, + sharedParameterId: sharedParameterId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "17c91af7-09fd-4256-bff1-c24ee4f73bc0", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8300eeca-0f8c-4eff-a089-d2dda409c41f", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -25745,27 +37230,23 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get manual intervention for a given release and manual intervention id. - * * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} manualInterventionId - Id of the manual intervention. + * @param {number} sharedStepId */ - getManualIntervention(project, releaseId, manualInterventionId) { + deleteSharedStep(project, sharedStepId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - manualInterventionId: manualInterventionId + sharedStepId: sharedStepId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "fabb3cc9-e3f8-40b7-8b62-24cc4b73fccf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -25775,25 +37256,30 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * List all manual interventions for a given release. + * Add test cases to suite. * * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the test suite to which the test cases must be added. + * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. */ - getManualInterventions(project, releaseId) { + addTestCasesToSuite(project, planId, suiteId, testCaseIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { + action: "TestCases", project: project, - releaseId: releaseId + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, true); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -25803,28 +37289,30 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Update manual intervention. + * Get a specific test case in a test suite with test case id. * - * @param {ReleaseInterfaces.ManualInterventionUpdateMetadata} manualInterventionUpdateMetadata - Meta data to update manual intervention. * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} manualInterventionId - Id of the manual intervention. + * @param {number} planId - ID of the test plan that contains the suites. + * @param {number} suiteId - ID of the suite that contains the test case. + * @param {number} testCaseIds - ID of the test case to get. */ - updateManualIntervention(manualInterventionUpdateMetadata, project, releaseId, manualInterventionId) { + getTestCaseById(project, planId, suiteId, testCaseIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { + action: "TestCases", project: project, - releaseId: releaseId, - manualInterventionId: manualInterventionId + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, manualInterventionUpdateMetadata, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -25834,20 +37322,23 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Get all test cases in a suite. + * * @param {string} project - Project ID or project name - * @param {Date} minMetricsTime + * @param {number} planId - ID of the test plan that contains the suites. + * @param {number} suiteId - ID of the suite to get. */ - getMetrics(project, minMetricsTime) { + getTestCases(project, planId, suiteId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - minMetricsTime: minMetricsTime, + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "cd1502bb-3c73-4e11-80a6-d11308dceae5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -25862,19 +37353,29 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets Org pipeline release settings + * The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently. * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the suite to get. + * @param {string} testCaseIds - IDs of the test cases to remove from the suite. */ - getOrgPipelineReleaseSettings() { + removeTestCasesFromSuiteUrl(project, planId, suiteId, testCaseIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "d156c759-ca4e-492b-90d4-db03971796ea", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -25885,21 +37386,31 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Updates Org pipeline release settings + * Updates the properties of the test case association in a suite. * - * @param {ReleaseInterfaces.OrgPipelineReleaseSettingsUpdateParameters} newSettings + * @param {TestInterfaces.SuiteTestCaseUpdateModel} suiteTestCaseUpdateModel - Model for updation of the properties of test case suite association. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the test suite to which the test cases must be added. + * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. */ - updateOrgPipelineReleaseSettings(newSettings) { + updateSuiteTestCases(suiteTestCaseUpdateModel, project, planId, suiteId, testCaseIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "d156c759-ca4e-492b-90d4-db03971796ea", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, newSettings, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, suiteTestCaseUpdateModel, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -25909,22 +37420,24 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets pipeline release settings + * Delete a test case. * * @param {string} project - Project ID or project name + * @param {number} testCaseId - Id of test case to delete. */ - getPipelineReleaseSettings(project) { + deleteTestCase(project, testCaseId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + testCaseId: testCaseId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "e816b9f4-f9fe-46ba-bdcc-a9af6abf3144", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4d472e0f-e32c-4ef8-adf4-a4078772889c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -25935,24 +37448,24 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Updates pipeline release settings + * Get history of a test method using TestHistoryQuery * - * @param {ReleaseInterfaces.ProjectPipelineReleaseSettingsUpdateParameters} newSettings + * @param {TestInterfaces.TestHistoryQuery} filter - TestHistoryQuery to get history * @param {string} project - Project ID or project name */ - updatePipelineReleaseSettings(newSettings, project) { + queryTestHistory(filter, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "e816b9f4-f9fe-46ba-bdcc-a9af6abf3144", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "929fd86c-3e38-4d8c-b4b6-90df256e5971", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, newSettings, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestHistoryQuery, false); resolve(ret); } catch (err) { @@ -25962,30 +37475,22 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {string} artifactType - * @param {string} artifactSourceId + * @param {TestInterfaces.TestSettings} testSettings + * @param {string} project - Project ID or project name */ - getReleaseProjects(artifactType, artifactSourceId) { + createTestSettings(testSettings, project) { return __awaiter(this, void 0, void 0, function* () { - if (artifactType == null) { - throw new TypeError('artifactType can not be null or undefined'); - } - if (artifactSourceId == null) { - throw new TypeError('artifactSourceId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - artifactType: artifactType, - artifactSourceId: artifactSourceId, + let routeValues = { + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "917ace4a-79d1-45a7-987c-7be4db4268fa", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, testSettings, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -25995,67 +37500,23 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get a list of releases - * * @param {string} project - Project ID or project name - * @param {number} definitionId - Releases from this release definition Id. - * @param {number} definitionEnvironmentId - * @param {string} searchText - Releases with names containing searchText. - * @param {string} createdBy - Releases created by this user. - * @param {ReleaseInterfaces.ReleaseStatus} statusFilter - Releases that have this status. - * @param {number} environmentStatusFilter - * @param {Date} minCreatedTime - Releases that were created after this time. - * @param {Date} maxCreatedTime - Releases that were created before this time. - * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created date for releases. Default is descending. - * @param {number} top - Number of releases to get. Default is 50. - * @param {number} continuationToken - Gets the releases after the continuation token provided. - * @param {ReleaseInterfaces.ReleaseExpands} expand - The property that should be expanded in the list of releases. - * @param {string} artifactTypeId - Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. - * @param {string} sourceId - Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. - * @param {string} artifactVersionId - Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId. - * @param {string} sourceBranchFilter - Releases with given sourceBranchFilter will be returned. - * @param {boolean} isDeleted - Gets the soft deleted releases, if true. - * @param {string[]} tagFilter - A comma-delimited list of tags. Only releases with these tags will be returned. - * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not. - * @param {number[]} releaseIdFilter - A comma-delimited list of releases Ids. Only releases with these Ids will be returned. - * @param {string} path - Releases under this folder path will be returned + * @param {number} testSettingsId */ - getReleases(project, definitionId, definitionEnvironmentId, searchText, createdBy, statusFilter, environmentStatusFilter, minCreatedTime, maxCreatedTime, queryOrder, top, continuationToken, expand, artifactTypeId, sourceId, artifactVersionId, sourceBranchFilter, isDeleted, tagFilter, propertyFilters, releaseIdFilter, path) { + deleteTestSettings(project, testSettingsId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - definitionId: definitionId, - definitionEnvironmentId: definitionEnvironmentId, - searchText: searchText, - createdBy: createdBy, - statusFilter: statusFilter, - environmentStatusFilter: environmentStatusFilter, - minCreatedTime: minCreatedTime, - maxCreatedTime: maxCreatedTime, - queryOrder: queryOrder, - '$top': top, - continuationToken: continuationToken, - '$expand': expand, - artifactTypeId: artifactTypeId, - sourceId: sourceId, - artifactVersionId: artifactVersionId, - sourceBranchFilter: sourceBranchFilter, - isDeleted: isDeleted, - tagFilter: tagFilter && tagFilter.join(","), - propertyFilters: propertyFilters && propertyFilters.join(","), - releaseIdFilter: releaseIdFilter && releaseIdFilter.join(","), - path: path, + project: project, + testSettingsId: testSettingsId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26065,24 +37526,23 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Create a release. - * - * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - Metadata to create a release. * @param {string} project - Project ID or project name + * @param {number} testSettingsId */ - createRelease(releaseStartMetadata, project) { + getTestSettingsById(project, testSettingsId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + testSettingsId: testSettingsId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, releaseStartMetadata, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26092,29 +37552,22 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Soft delete a release - * + * @param {TestInterfaces.WorkItemToTestLinks} workItemToTestLinks * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {string} comment - Comment for deleting a release. */ - deleteRelease(project, releaseId, comment) { + addWorkItemToTestLinks(workItemToTestLinks, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId - }; - let queryValues = { - comment: comment, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "371b1655-ce05-412e-a113-64cc77bb78d2", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, workItemToTestLinks, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.WorkItemToTestLinks, false); resolve(ret); } catch (err) { @@ -26124,35 +37577,33 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get a Release - * * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {ReleaseInterfaces.ApprovalFilters} approvalFilters - A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default - * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included. - * @param {ReleaseInterfaces.SingleReleaseExpands} expand - A property that should be expanded in the release. - * @param {number} topGateRecords - Number of release gate records to get. Default is 5. + * @param {string} testName + * @param {number} workItemId */ - getRelease(project, releaseId, approvalFilters, propertyFilters, expand, topGateRecords) { + deleteTestMethodToWorkItemLink(project, testName, workItemId) { return __awaiter(this, void 0, void 0, function* () { + if (testName == null) { + throw new TypeError('testName can not be null or undefined'); + } + if (workItemId == null) { + throw new TypeError('workItemId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId + project: project }; let queryValues = { - approvalFilters: approvalFilters, - propertyFilters: propertyFilters && propertyFilters.join(","), - '$expand': expand, - '$topGateRecords': topGateRecords, + testName: testName, + workItemId: workItemId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "7b0bdee3-a354-47f9-a42c-89018d7808d5", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26162,39 +37613,28 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get release summary of a given definition Id. - * * @param {string} project - Project ID or project name - * @param {number} definitionId - Id of the definition to get release summary. - * @param {number} releaseCount - Count of releases to be included in summary. - * @param {boolean} includeArtifact - Include artifact details.Default is 'false'. - * @param {number[]} definitionEnvironmentIdsFilter + * @param {string} testName */ - getReleaseDefinitionSummary(project, definitionId, releaseCount, includeArtifact, definitionEnvironmentIdsFilter) { + queryTestMethodLinkedWorkItems(project, testName) { return __awaiter(this, void 0, void 0, function* () { - if (definitionId == null) { - throw new TypeError('definitionId can not be null or undefined'); - } - if (releaseCount == null) { - throw new TypeError('releaseCount can not be null or undefined'); + if (testName == null) { + throw new TypeError('testName can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - definitionId: definitionId, - releaseCount: releaseCount, - includeArtifact: includeArtifact, - definitionEnvironmentIdsFilter: definitionEnvironmentIdsFilter && definitionEnvironmentIdsFilter.join(","), + testName: testName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "7b0bdee3-a354-47f9-a42c-89018d7808d5", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionSummary, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26204,31 +37644,39 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get release for a given revision number. - * * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release. - * @param {number} definitionSnapshotRevision - Definition snapshot revision number. + * @param {string} workItemCategory + * @param {string} automatedTestName + * @param {number} testCaseId + * @param {Date} maxCompleteDate + * @param {number} days + * @param {number} workItemCount */ - getReleaseRevision(project, releaseId, definitionSnapshotRevision) { + queryTestResultWorkItems(project, workItemCategory, automatedTestName, testCaseId, maxCompleteDate, days, workItemCount) { return __awaiter(this, void 0, void 0, function* () { - if (definitionSnapshotRevision == null) { - throw new TypeError('definitionSnapshotRevision can not be null or undefined'); + if (workItemCategory == null) { + throw new TypeError('workItemCategory can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId + project: project }; let queryValues = { - definitionSnapshotRevision: definitionSnapshotRevision, + workItemCategory: workItemCategory, + automatedTestName: automatedTestName, + testCaseId: testCaseId, + maxCompleteDate: maxCompleteDate, + days: days, + '$workItemCount': workItemCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "926ff5dc-137f-45f0-bd51-9412fa9810ce", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); } catch (err) { reject(err); @@ -26236,32 +37684,71 @@ class ReleaseApi extends basem.ClientApiBase { })); }); } +} +TestApi.RESOURCE_AREA_ID = "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e"; +exports.TestApi = TestApi; + + +/***/ }), + +/***/ 61819: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const Contracts = __nccwpck_require__(93047); +class TestResultsApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-testResults-api', options); + } /** - * Undelete a soft deleted release. - * + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of release to be undeleted. - * @param {string} comment - Any comment for undeleting. + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} iterationId + * @param {string} actionPath */ - undeleteRelease(project, releaseId, comment) { + createTestIterationResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, iterationId, actionPath) { return __awaiter(this, void 0, void 0, function* () { - if (comment == null) { - throw new TypeError('comment can not be null or undefined'); + if (iterationId == null) { + throw new TypeError('iterationId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + runId: runId, + testCaseResultId: testCaseResultId }; let queryValues = { - comment: comment, + iterationId: iterationId, + actionPath: actionPath, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, null, options); + res = yield this.rest.create(url, attachmentRequestModel, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -26272,26 +37759,26 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Update a complete release object. - * - * @param {ReleaseInterfaces.Release} release - Release object for update. + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release to update. + * @param {number} runId + * @param {number} testCaseResultId */ - updateRelease(release, project, releaseId) { + createTestResultAttachment(attachmentRequestModel, project, runId, testCaseResultId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + runId: runId, + testCaseResultId: testCaseResultId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, release, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26301,26 +37788,33 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Update few properties of a release. - * - * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - Properties of release to update. + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel * @param {string} project - Project ID or project name - * @param {number} releaseId - Id of the release to update. + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} testSubResultId */ - updateReleaseResource(releaseUpdateMetadata, project, releaseId) { + createTestSubResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, testSubResultId) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, releaseUpdateMetadata, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26330,22 +37824,26 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets the release settings - * * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId */ - getReleaseSettings(project) { + deleteTestResultAttachment(project, runId, testCaseResultId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c63c3718-7cfd-41e0-b89b-81c1ca143437", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -26356,25 +37854,35 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Updates the release settings + * Returns a test iteration attachment * - * @param {ReleaseInterfaces.ReleaseSettings} releaseSettings * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param {number} iterationId */ - updateReleaseSettings(releaseSettings, project) { + getTestIterationAttachmentContent(project, runId, testCaseResultId, attachmentId, iterationId) { return __awaiter(this, void 0, void 0, function* () { + if (iterationId == null) { + throw new TypeError('iterationId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + iterationId: iterationId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c63c3718-7cfd-41e0-b89b-81c1ca143437", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, releaseSettings, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -26383,25 +37891,34 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get release definition for a given definitionId and revision + * Returns a test iteration attachment * * @param {string} project - Project ID or project name - * @param {number} definitionId - Id of the definition. - * @param {number} revision - Id of the revision. + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param {number} iterationId */ - getDefinitionRevision(project, definitionId, revision) { + getTestIterationAttachmentZip(project, runId, testCaseResultId, attachmentId, iterationId) { return __awaiter(this, void 0, void 0, function* () { + if (iterationId == null) { + throw new TypeError('iterationId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId, - revision: revision + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + iterationId: iterationId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "258b82e0-9d41-43f3-86d6-fef14ddd44bc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); let url = verData.requestUrl; let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); + let accept = this.createAcceptHeader("application/zip", apiVersion); resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { @@ -26411,26 +37928,28 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Get revision history for a release definition + * Returns a test result attachment * * @param {string} project - Project ID or project name - * @param {number} definitionId - Id of the definition. + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId */ - getReleaseDefinitionHistory(project, definitionId) { + getTestResultAttachmentContent(project, runId, testCaseResultId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "258b82e0-9d41-43f3-86d6-fef14ddd44bc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionRevision, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -26440,22 +37959,24 @@ class ReleaseApi extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {number} releaseId + * @param {number} runId + * @param {number} testCaseResultId */ - getSummaryMailSections(project, releaseId) { + getTestResultAttachments(project, runId, testCaseResultId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + runId: runId, + testCaseResultId: testCaseResultId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "224e92b2-8d13-4c14-b120-13d877c516f8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.SummaryMailSection, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestAttachment, true); resolve(ret); } catch (err) { @@ -26465,25 +37986,28 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {ReleaseInterfaces.MailMessage} mailMessage + * Returns a test result attachment + * * @param {string} project - Project ID or project name - * @param {number} releaseId + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId */ - sendSummaryMail(mailMessage, project, releaseId) { + getTestResultAttachmentZip(project, runId, testCaseResultId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "224e92b2-8d13-4c14-b120-13d877c516f8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, mailMessage, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -26492,24 +38016,35 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Returns a test sub result attachment + * * @param {string} project - Project ID or project name - * @param {number} definitionId + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param {number} testSubResultId */ - getSourceBranches(project, definitionId) { + getTestSubResultAttachmentContent(project, runId, testCaseResultId, attachmentId, testSubResultId) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - definitionId: definitionId + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "0e5def23-78b3-461f-8198-1558f25041c8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -26518,27 +38053,34 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Adds a tag to a definition + * Returns attachment references for test sub result. * * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId - * @param {string} tag + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} testSubResultId */ - addDefinitionTag(project, releaseDefinitionId, tag) { + getTestSubResultAttachments(project, runId, testCaseResultId, testSubResultId) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseDefinitionId: releaseDefinitionId, - tag: tag + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, null, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestAttachment, true); resolve(ret); } catch (err) { @@ -26548,27 +38090,35 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Adds multiple tags to a definition + * Returns a test sub result attachment * - * @param {string[]} tags * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param {number} testSubResultId */ - addDefinitionTags(tags, project, releaseDefinitionId) { + getTestSubResultAttachmentZip(project, runId, testCaseResultId, attachmentId, testSubResultId) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseDefinitionId: releaseDefinitionId + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, tags, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -26577,27 +38127,24 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Deletes a tag from a definition - * + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId - * @param {string} tag + * @param {number} runId */ - deleteDefinitionTag(project, releaseDefinitionId, tag) { + createTestRunAttachment(attachmentRequestModel, project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseDefinitionId: releaseDefinitionId, - tag: tag + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26607,25 +38154,25 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets the tags for a definition - * * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId + * @param {number} runId + * @param {number} attachmentId */ - getDefinitionTags(project, releaseDefinitionId) { + deleteTestRunAttachment(project, runId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseDefinitionId: releaseDefinitionId + runId: runId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26635,28 +38182,26 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Adds a tag to a releaseId + * Returns a test run attachment * * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {string} tag + * @param {number} runId + * @param {number} attachmentId */ - addReleaseTag(project, releaseId, tag) { + getTestRunAttachmentContent(project, runId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - tag: tag + runId: runId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, null, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -26665,26 +38210,23 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Adds tag to a release - * - * @param {string[]} tags * @param {string} project - Project ID or project name - * @param {number} releaseId + * @param {number} runId */ - addReleaseTags(tags, project, releaseId) { + getTestRunAttachments(project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, tags, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestAttachment, true); resolve(ret); } catch (err) { @@ -26694,28 +38236,26 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Deletes a tag from a release + * Returns a test run attachment * * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {string} tag + * @param {number} runId + * @param {number} attachmentId */ - deleteReleaseTag(project, releaseId, tag) { + getTestRunAttachmentZip(project, runId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - tag: tag + runId: runId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -26724,20 +38264,20 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * Gets the tags for a release - * * @param {string} project - Project ID or project name - * @param {number} releaseId + * @param {number} runId + * @param {number} testCaseResultId */ - getReleaseTags(project, releaseId) { + getBugsLinkedToTestResult(project, runId, testCaseResultId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId + runId: runId, + testCaseResultId: testCaseResultId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "d8dbf98f-eb34-4f8d-8365-47972af34f29", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -26753,20 +38293,32 @@ class ReleaseApi extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} flags */ - getTags(project) { + getBuildCodeCoverage(project, buildId, flags) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + if (flags == null) { + throw new TypeError('flags can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; + let queryValues = { + buildId: buildId, + flags: flags, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "86cee25a-68ba-4ba3-9171-8ad6ffc6df93", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "9b3e1ece-c6ab-4fbb-8167-8a32a0c92216", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.BuildCoverage, true); resolve(ret); } catch (err) { @@ -26777,26 +38329,29 @@ class ReleaseApi extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} releaseDeployPhaseId + * @param {number} buildId + * @param {number} deltaBuildId */ - getTasksForTaskGroup(project, releaseId, environmentId, releaseDeployPhaseId) { + getCodeCoverageSummary(project, buildId, deltaBuildId) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId, - environmentId: environmentId, - releaseDeployPhaseId: releaseDeployPhaseId + project: project + }; + let queryValues = { + buildId: buildId, + deltaBuildId: deltaBuildId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "4259191d-4b0a-4409-9fb3-09f22ab9bc47", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "9b3e1ece-c6ab-4fbb-8167-8a32a0c92216", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.CodeCoverageSummary, false); resolve(ret); } catch (err) { @@ -26806,29 +38361,31 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + * * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} attemptId - * @param {string} timelineId + * @param {number} buildId + * @param {Contracts.CodeCoverageData} coverageData */ - getTasks2(project, releaseId, environmentId, attemptId, timelineId) { + updateCodeCoverageSummary(project, buildId, coverageData) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId, - environmentId: environmentId, - attemptId: attemptId, - timelineId: timelineId + project: project + }; + let queryValues = { + buildId: buildId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "4259291d-4b0a-4409-9fb3-04f22ab9bc47", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "9b3e1ece-c6ab-4fbb-8167-8a32a0c92216", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + res = yield this.rest.create(url, coverageData, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -26839,28 +38396,29 @@ class ReleaseApi extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} attemptId + * @param {number} runId + * @param {number} flags */ - getTasks(project, releaseId, environmentId, attemptId) { + getTestRunCodeCoverage(project, runId, flags) { return __awaiter(this, void 0, void 0, function* () { + if (flags == null) { + throw new TypeError('flags can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - releaseId: releaseId, - environmentId: environmentId + runId: runId }; let queryValues = { - attemptId: attemptId, + flags: flags, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "36b276e0-3c70-4320-a63c-1a2e1466a0d1", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "5641efbc-6f9b-401a-baeb-d3da22489e5e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -26870,22 +38428,23 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Get file coverage for the specified file + * + * @param {Contracts.FileCoverageRequest} fileCoverageRequest - File details with pull request iteration context * @param {string} project - Project ID or project name */ - getArtifactTypeDefinitions(project) { + getFileLevelCodeCoverage(fileCoverageRequest, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "8efc2a3c-1fc8-4f6d-9822-75e98cecb48f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "4a6d0c46-51ca-45aa-9163-249cee3289b7", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactTypeDefinition, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -26894,28 +38453,22 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * @param {Contracts.ResultsFilter} filter * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId */ - getArtifactVersions(project, releaseDefinitionId) { + queryTestResultHistory(filter, project) { return __awaiter(this, void 0, void 0, function* () { - if (releaseDefinitionId == null) { - throw new TypeError('releaseDefinitionId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - releaseDefinitionId: releaseDefinitionId, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "30fc787e-a9e0-4a07-9fbc-3e903aa051d2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "bdf7a97b-0395-4da8-9d5d-f957619327d1", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactVersionQueryResult, false); + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultHistory, false); resolve(ret); } catch (err) { @@ -26925,22 +38478,25 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** - * @param {ReleaseInterfaces.Artifact[]} artifacts + * Get test run message logs + * * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. */ - getArtifactVersionsForSources(artifacts, project) { + getTestRunMessageLogs(project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "30fc787e-a9e0-4a07-9fbc-3e903aa051d2", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "e9ab0c6a-1984-418b-87c0-ee4202318ba3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, artifacts, options); - let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactVersionQueryResult, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestMessageLogDetails, true); resolve(ret); } catch (err) { @@ -26950,31 +38506,40 @@ class ReleaseApi extends basem.ClientApiBase { }); } /** + * Get summary of test results. + * * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - * @param {string} artifactAlias + * @param {number} pipelineId - Pipeline Id. This is same as build Id. + * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character. + * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character. + * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + * @param {Contracts.Metrics[]} metricNames + * @param {boolean} groupByNode - Group summary for each node of the pipleine heirarchy */ - getReleaseWorkItemsRefs(project, releaseId, baseReleaseId, top, artifactAlias) { + getTestPipelineMetrics(project, pipelineId, stageName, phaseName, jobName, metricNames, groupByNode) { return __awaiter(this, void 0, void 0, function* () { + if (pipelineId == null) { + throw new TypeError('pipelineId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - releaseId: releaseId + project: project }; let queryValues = { - baseReleaseId: baseReleaseId, - '$top': top, - artifactAlias: artifactAlias, + pipelineId: pipelineId, + stageName: stageName, + phaseName: phaseName, + jobName: jobName, + metricNames: metricNames && metricNames.join(","), + groupByNode: groupByNode, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "4f165cc0-875c-4768-b148-f12f78769fab", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "65f35817-86a1-4131-b38b-3ec2d4744e53", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.PipelineTestMetrics, false); resolve(ret); } catch (err) { @@ -26983,60 +38548,41 @@ class ReleaseApi extends basem.ClientApiBase { })); }); } -} -ReleaseApi.RESOURCE_AREA_ID = "efc2f575-36ef-48e9-b672-0c6fb4a48ac5"; -exports.ReleaseApi = ReleaseApi; - - -/***/ }), - -/***/ 806: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const SecurityRolesInterfaces = __nccwpck_require__(6573); -class SecurityRolesApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-SecurityRoles-api', options); - } /** - * @param {string} scopeId - * @param {string} resourceId + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param {string} orderby + * @param {boolean} shouldIncludeResults + * @param {boolean} queryRunSummaryForInProgress */ - getRoleAssignments(scopeId, resourceId) { + getTestResultDetailsForBuild(project, buildId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeId: scopeId, - resourceId: resourceId + project: project + }; + let queryValues = { + buildId: buildId, + publishContext: publishContext, + groupBy: groupBy, + '$filter': filter, + '$orderby': orderby, + shouldIncludeResults: shouldIncludeResults, + queryRunSummaryForInProgress: queryRunSummaryForInProgress, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "a518c749-4524-45b2-a7ef-1ac009b312cd", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsDetails, false); resolve(ret); } catch (err) { @@ -27046,25 +38592,45 @@ class SecurityRolesApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeId - * @param {string} resourceId - * @param {string} identityId + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param {string} orderby + * @param {boolean} shouldIncludeResults + * @param {boolean} queryRunSummaryForInProgress */ - removeRoleAssignment(scopeId, resourceId, identityId) { + getTestResultDetailsForRelease(project, releaseId, releaseEnvId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (releaseEnvId == null) { + throw new TypeError('releaseEnvId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeId: scopeId, - resourceId: resourceId, - identityId: identityId + project: project + }; + let queryValues = { + releaseId: releaseId, + releaseEnvId: releaseEnvId, + publishContext: publishContext, + groupBy: groupBy, + '$filter': filter, + '$orderby': orderby, + shouldIncludeResults: shouldIncludeResults, + queryRunSummaryForInProgress: queryRunSummaryForInProgress, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "19a8183a-69fb-47d7-bfbf-1b6b0d921294", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsDetails, false); resolve(ret); } catch (err) { @@ -27074,23 +38640,23 @@ class SecurityRolesApi extends basem.ClientApiBase { }); } /** - * @param {string[]} identityIds - * @param {string} scopeId - * @param {string} resourceId + * @param {Contracts.TestResultDocument} document + * @param {string} project - Project ID or project name + * @param {number} runId */ - removeRoleAssignments(identityIds, scopeId, resourceId) { + publishTestResultDocument(document, project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeId: scopeId, - resourceId: resourceId + project: project, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "74838649-b038-42f1-a0e7-6deb3973bf14", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, identityIds, options); + res = yield this.rest.create(url, document, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -27101,26 +38667,37 @@ class SecurityRolesApi extends basem.ClientApiBase { }); } /** - * @param {SecurityRolesInterfaces.UserRoleAssignmentRef} roleAssignment - * @param {string} scopeId - * @param {string} resourceId - * @param {string} identityId + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string[]} fields + * @param {string} continuationToken */ - setRoleAssignment(roleAssignment, scopeId, resourceId, identityId) { + getResultGroupsByBuild(project, buildId, publishContext, fields, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + if (publishContext == null) { + throw new TypeError('publishContext can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeId: scopeId, - resourceId: resourceId, - identityId: identityId + project: project + }; + let queryValues = { + buildId: buildId, + publishContext: publishContext, + fields: fields && fields.join(","), + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "e49244d1-c49f-49ad-a717-3bbaefe6a201", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, roleAssignment, options); - let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -27130,24 +38707,39 @@ class SecurityRolesApi extends basem.ClientApiBase { }); } /** - * @param {SecurityRolesInterfaces.UserRoleAssignmentRef[]} roleAssignments - * @param {string} scopeId - * @param {string} resourceId + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} publishContext + * @param {number} releaseEnvId + * @param {string[]} fields + * @param {string} continuationToken */ - setRoleAssignments(roleAssignments, scopeId, resourceId) { + getResultGroupsByRelease(project, releaseId, publishContext, releaseEnvId, fields, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (publishContext == null) { + throw new TypeError('publishContext can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeId: scopeId, - resourceId: resourceId + project: project + }; + let queryValues = { + releaseId: releaseId, + publishContext: publishContext, + releaseEnvId: releaseEnvId, + fields: fields && fields.join(","), + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "3c2b6bb0-0620-434a-a5c3-26aa0fcfda15", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, roleAssignments, options); - let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -27157,474 +38749,177 @@ class SecurityRolesApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeId + * Get list of test Result meta data details for corresponding testcasereferenceId + * + * @param {string[]} testCaseReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). + * @param {string} project - Project ID or project name + * @param {Contracts.ResultMetaDataDetails} detailsToInclude - Details to include with test results metadata. Default is None. Other values are FlakyIdentifiers. */ - getRoleDefinitions(scopeId) { + queryTestResultsMetaData(testCaseReferenceIds, project, detailsToInclude) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeId: scopeId + project: project + }; + let queryValues = { + detailsToInclude: detailsToInclude, }; try { - let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "f4cc9a86-453c-48d2-b44d-d3bd5c105f4f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "testresults", "b72ff4c0-4341-4213-ba27-f517cf341c95", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.create(url, testCaseReferenceIds, options); let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { - reject(err); - } - })); - }); - } -} -exports.SecurityRolesApi = SecurityRolesApi; - - -/***/ }), - -/***/ 5817: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** -* Module for handling serialization and deserialization of data contracts -* (contracts sent from the server using the VSO default REST api serialization settings) -*/ -var ContractSerializer; -(function (ContractSerializer) { - var _legacyDateRegExp; - /** - * Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and - * return a pure JSON object that can be posted to REST endpoint. - * - * @param data The object to serialize - * @param contractMetadata The type info/metadata for the contract type being serialized - * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). - */ - function serialize(data, contractMetadata, preserveOriginal) { - if (data && contractMetadata) { - if (Array.isArray(data)) { - return _getTranslatedArray(data, contractMetadata, true, preserveOriginal); - } - else { - return _getTranslatedObject(data, contractMetadata, true, preserveOriginal); - } - } - else { - return data; - } - } - ContractSerializer.serialize = serialize; - /** - * Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object - * where date strings are converted to Date objects and enum values are converted from strings into - * their numerical value. - * - * @param data The object to deserialize - * @param contractMetadata The type info/metadata for the contract type being deserialize - * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). - * @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object. - */ - function deserialize(data, contractMetadata, preserveOriginal, unwrapWrappedCollections) { - if (data) { - if (unwrapWrappedCollections && Array.isArray(data.value)) { - // Wrapped json array - unwrap it and send the array as the result - data = data.value; - } - if (contractMetadata) { - if (Array.isArray(data)) { - data = _getTranslatedArray(data, contractMetadata, false, preserveOriginal); - } - else { - data = _getTranslatedObject(data, contractMetadata, false, preserveOriginal); - } - } - } - return data; - } - ContractSerializer.deserialize = deserialize; - function _getTranslatedArray(array, typeMetadata, serialize, preserveOriginal) { - var resultArray = array; - var arrayCopy = []; - var i; - for (i = 0; i < array.length; i++) { - var item = array[i]; - var processedItem; - // handle arrays of arrays - if (Array.isArray(item)) { - processedItem = _getTranslatedArray(item, typeMetadata, serialize, preserveOriginal); - } - else { - processedItem = _getTranslatedObject(item, typeMetadata, serialize, preserveOriginal); - } - if (preserveOriginal) { - arrayCopy.push(processedItem); - if (processedItem !== item) { - resultArray = arrayCopy; - } - } - else { - array[i] = processedItem; - } - } - return resultArray; - } - function _getTranslatedObject(typeObject, typeMetadata, serialize, preserveOriginal) { - var processedItem = typeObject, copiedItem = false; - if (typeObject && typeMetadata.fields) { - for (var fieldName in typeMetadata.fields) { - var fieldMetadata = typeMetadata.fields[fieldName]; - var fieldValue = typeObject[fieldName]; - var translatedValue = _getTranslatedField(fieldValue, fieldMetadata, serialize, preserveOriginal); - if (fieldValue !== translatedValue) { - if (preserveOriginal && !copiedItem) { - processedItem = this._extend({}, typeObject); - copiedItem = true; - } - processedItem[fieldName] = translatedValue; - } - } - } - return processedItem; - } - function _getTranslatedField(fieldValue, fieldMetadata, serialize, preserveOriginal) { - if (!fieldValue) { - return fieldValue; - } - if (fieldMetadata.isArray) { - if (Array.isArray(fieldValue)) { - var newArray = [], processedArray = fieldValue; - for (var index = 0; index < fieldValue.length; index++) { - var arrayValue = fieldValue[index]; - var processedValue = arrayValue; - if (fieldMetadata.isDate) { - processedValue = _getTranslatedDateValue(arrayValue, serialize); - } - else if (fieldMetadata.enumType) { - processedValue = _getTranslatedEnumValue(fieldMetadata.enumType, arrayValue, serialize); - } - else if (fieldMetadata.typeInfo) { - if (Array.isArray(arrayValue)) { - processedValue = _getTranslatedArray(arrayValue, fieldMetadata.typeInfo, serialize, preserveOriginal); - } - else { - processedValue = _getTranslatedObject(arrayValue, fieldMetadata.typeInfo, serialize, preserveOriginal); - } - } - if (preserveOriginal) { - newArray.push(processedValue); - if (processedValue !== arrayValue) { - processedArray = newArray; - } - } - else { - fieldValue[index] = processedValue; - } - } - return processedArray; - } - else { - return fieldValue; - } - } - else if (fieldMetadata.isDictionary) { - var dictionaryModified = false; - var newDictionary = {}; - for (var key in fieldValue) { - var dictionaryValue = fieldValue[key]; - var newKey = key, newValue = dictionaryValue; - if (fieldMetadata.dictionaryKeyIsDate) { - newKey = _getTranslatedDateValue(key, serialize); - } - else if (fieldMetadata.dictionaryKeyEnumType) { - newKey = _getTranslatedEnumValue(fieldMetadata.dictionaryKeyEnumType, key, serialize); - } - if (fieldMetadata.dictionaryValueIsDate) { - newValue = _getTranslatedDateValue(dictionaryValue, serialize); - } - else if (fieldMetadata.dictionaryValueEnumType) { - newValue = _getTranslatedEnumValue(fieldMetadata.dictionaryValueEnumType, dictionaryValue, serialize); - } - else if (fieldMetadata.dictionaryValueTypeInfo) { - newValue = _getTranslatedObject(newValue, fieldMetadata.dictionaryValueTypeInfo, serialize, preserveOriginal); - } - else if (fieldMetadata.dictionaryValueFieldInfo) { - newValue = _getTranslatedField(dictionaryValue, fieldMetadata.dictionaryValueFieldInfo, serialize, preserveOriginal); - } - newDictionary[newKey] = newValue; - if (key !== newKey || dictionaryValue !== newValue) { - dictionaryModified = true; - } - } - return dictionaryModified ? newDictionary : fieldValue; - } - else { - if (fieldMetadata.isDate) { - return _getTranslatedDateValue(fieldValue, serialize); - } - else if (fieldMetadata.enumType) { - return _getTranslatedEnumValue(fieldMetadata.enumType, fieldValue, serialize); - } - else if (fieldMetadata.typeInfo) { - return _getTranslatedObject(fieldValue, fieldMetadata.typeInfo, serialize, preserveOriginal); - } - else { - return fieldValue; - } - } - } - function _getTranslatedEnumValue(enumType, valueToConvert, serialize) { - if (serialize && typeof valueToConvert === "number") { - // Serialize: number --> String - // Because webapi handles the numerical value for enums, there is no need to convert to string. - // Let this fall through to return the numerical value. - } - else if (!serialize && typeof valueToConvert === "string") { - // Deserialize: String --> number - var result = 0; - if (valueToConvert) { - var splitValue = valueToConvert.split(","); - for (var i = 0; i < splitValue.length; i++) { - var valuePart = splitValue[i]; - //equivalent to jquery trim - //copied from https://github.com/HubSpot/youmightnotneedjquery/blob/ef987223c20e480fcbfb5924d96c11cd928e1226/comparisons/utils/trim/ie8.js - var enumName = valuePart.replace(/^\s+|\s+$/g, '') || ""; - if (enumName) { - var resultPart = enumType.enumValues[enumName]; - if (!resultPart) { - // No matching enum value. Try again but case insensitive - var lowerCaseEnumName = enumName.toLowerCase(); - if (lowerCaseEnumName !== enumName) { - for (var name in enumType.enumValues) { - var value = enumType.enumValues[name]; - if (name.toLowerCase() === lowerCaseEnumName) { - resultPart = value; - break; - } - } - } - } - if (resultPart) { - result |= resultPart; - } - } - } - } - return result; - } - return valueToConvert; - } - function _getTranslatedDateValue(valueToConvert, serialize) { - if (!serialize && typeof valueToConvert === "string") { - // Deserialize: String --> Date - var dateValue = new Date(valueToConvert); - if (isNaN(dateValue) && navigator.userAgent && /msie/i.test(navigator.userAgent)) { - dateValue = _convertLegacyIEDate(valueToConvert); - } - return dateValue; - } - return valueToConvert; - } - function _convertLegacyIEDate(dateStringValue) { - // IE 8/9 does not handle parsing dates in ISO form like: - // 2013-05-13T14:26:54.397Z - var match; - if (!_legacyDateRegExp) { - _legacyDateRegExp = new RegExp("(\\d+)-(\\d+)-(\\d+)T(\\d+):(\\d+):(\\d+).(\\d+)Z"); - } - match = _legacyDateRegExp.exec(dateStringValue); - if (match) { - return new Date(Date.UTC(parseInt(match[1]), parseInt(match[2]) - 1, parseInt(match[3]), parseInt(match[4]), parseInt(match[5]), parseInt(match[6]), parseInt(match[7]))); - } - else { - return null; - } - } - // jquery extend method in native javascript (used to clone objects) - // copied from https://github.com/HubSpot/youmightnotneedjquery/blob/ef987223c20e480fcbfb5924d96c11cd928e1226/comparisons/utils/extend/ie8.js - var _extend = function (out) { - out = out || {}; - for (var i = 1; i < arguments.length; i++) { - if (!arguments[i]) - continue; - for (var key in arguments[i]) { - if (arguments[i].hasOwnProperty(key)) - out[key] = arguments[i][key]; - } - } - return out; - }; -})(ContractSerializer = exports.ContractSerializer || (exports.ContractSerializer = {})); - - -/***/ }), - -/***/ 2496: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const taskagentbasem = __nccwpck_require__(3390); -const url = __nccwpck_require__(7310); -class TaskAgentApi extends taskagentbasem.TaskAgentApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, options); - // hang on to the handlers in case we need to fall back to an account-level client - this._handlers = handlers; - this._options = options; + reject(err); + } + })); + }); } /** - * @param {string} taskId - * @param onResult callback function + * Update properties of test result meta data + * + * @param {Contracts.TestResultMetaDataUpdateInput} testResultMetaDataUpdateInput - TestResultMetaData update input TestResultMetaDataUpdateInput + * @param {string} project - Project ID or project name + * @param {number} testCaseReferenceId - TestCaseReference Id of Test Result to be updated. */ - deleteTaskDefinition(taskId) { - let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") - .then((location) => { - if (location) { - // the resource exists at the url we were given. go! - return super.deleteTaskDefinition(taskId); - } - else { - // this is the case when the server doesn't support collection-level task definitions - var fallbackClient = this._getFallbackClient(this.baseUrl); - if (!fallbackClient) { - // couldn't convert - throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); + updateTestResultsMetaData(testResultMetaDataUpdateInput, project, testCaseReferenceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + testCaseReferenceId: testCaseReferenceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "testresults", "b72ff4c0-4341-4213-ba27-f517cf341c95", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testResultMetaDataUpdateInput, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } - else { - // use the fallback client - return fallbackClient.deleteTaskDefinition(taskId); + catch (err) { + reject(err); } - } + })); }); - return promise; } /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting ArrayBuffer + * @param {Contracts.TestResultsQuery} query + * @param {string} project - Project ID or project name */ - getTaskContentZip(taskId, versionString, visibility, scopeLocal) { - let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") - .then((location) => { - if (location) { - // the resource exists at the url we were given. go! - return super.getTaskContentZip(taskId, versionString, visibility, scopeLocal); - } - else { - // this is the case when the server doesn't support collection-level task definitions - var fallbackClient = this._getFallbackClient(this.baseUrl); - if (!fallbackClient) { - // couldn't convert - throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); + getTestResultsByQuery(query, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "14033a2c-af25-4af1-9e39-8ef6900482e3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsQuery, false); + resolve(ret); } - else { - // use the fallback client - return fallbackClient.getTaskContentZip(taskId, versionString, visibility, scopeLocal); + catch (err) { + reject(err); } - } + })); }); - return promise; } /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition + * @param {Contracts.QueryModel} queryModel + * @param {string} project - Project ID or project name + * @param {boolean} includeResultDetails + * @param {boolean} includeIterationDetails + * @param {number} skip + * @param {number} top */ - getTaskDefinition(taskId, versionString, visibility, scopeLocal) { - let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") - .then((location) => { - if (location) { - // the resource exists at the url we were given. go! - return super.getTaskDefinition(taskId, versionString, visibility, scopeLocal); - } - else { - // this is the case when the server doesn't support collection-level task definitions - var fallbackClient = this._getFallbackClient(this.baseUrl); - if (!fallbackClient) { - // couldn't convert - throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); + getTestResultsByQueryWiql(queryModel, project, includeResultDetails, includeIterationDetails, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + includeResultDetails: includeResultDetails, + includeIterationDetails: includeIterationDetails, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "5ea78be3-2f5a-4110-8034-c27f24c62db1", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, queryModel, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + resolve(ret); } - else { - // use the fallback client - return fallbackClient.getTaskDefinition(taskId, versionString, visibility, scopeLocal); + catch (err) { + reject(err); } - } + })); }); - return promise; } /** - * @param {string} taskId - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] + * @param {Contracts.TestCaseResult[]} results + * @param {string} project - Project ID or project name + * @param {number} runId */ - getTaskDefinitions(taskId, visibility, scopeLocal) { - let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") - .then((location) => { - if (location) { - // the resource exists at the url we were given. go! - return super.getTaskDefinitions(taskId, visibility, scopeLocal); - } - else { - // this is the case when the server doesn't support collection-level task definitions - var fallbackClient = this._getFallbackClient(this.baseUrl); - if (!fallbackClient) { - // couldn't convert - throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); + addTestResultsToTestRun(results, project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "02afa165-e79a-4d70-8f0c-2af0f35b4e07", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, results, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + resolve(ret); } - else { - // use the fallback client - return fallbackClient.getTaskDefinitions(taskId, visibility, scopeLocal); + catch (err) { + reject(err); } - } + })); }); - return promise; } /** - * @param {NodeJS.ReadableStream} contentStream - * @param {string} taskId - * @param {boolean} overwrite - * @param onResult callback function + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testResultId + * @param {Contracts.ResultDetails} detailsToInclude */ - uploadTaskDefinition(customHeaders, contentStream, taskId, overwrite) { + getTestResultById(project, runId, testResultId, detailsToInclude) { return __awaiter(this, void 0, void 0, function* () { - let routeValues = { - taskId: taskId - }; - let queryValues = { - overwrite: overwrite, - }; return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; + let routeValues = { + project: project, + runId: runId, + testResultId: testResultId + }; + let queryValues = { + detailsToInclude: detailsToInclude, + }; try { - let verData = yield this.vsoClient.getVersioningData("3.0-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "02afa165-e79a-4d70-8f0c-2af0f35b4e07", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("PUT", url, contentStream, options); - resolve(res.result); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, false); + resolve(ret); } catch (err) { reject(err); @@ -27632,91 +38927,63 @@ class TaskAgentApi extends taskagentbasem.TaskAgentApiBase { })); }); } - _getFallbackClient(baseUrl) { - if (!this._fallbackClient) { - var accountUrl = this._getAccountUrl(baseUrl); - if (accountUrl) { - this._fallbackClient = new TaskAgentApi(accountUrl, this._handlers, this._options); - } - } - return this._fallbackClient; - } - _getAccountUrl(collectionUrl) { - // converts a collection URL to an account URL - // returns null if the conversion can't be made - var purl = url.parse(collectionUrl); - if (!purl.protocol || !purl.host) { - return null; - } - var accountUrl = purl.protocol + '//' + purl.host; - // purl.path is something like /DefaultCollection or /tfs/DefaultCollection or /DefaultCollection/ - var splitPath = purl.path.split('/').slice(1); - if (splitPath.length === 0 || (splitPath.length === 1 && splitPath[0] === '')) { - return null; - } - // if the first segment of the path is tfs, the second is the collection. if the url ends in / there will be a third, empty entry - if (splitPath[0] === 'tfs' && (splitPath.length === 2 || (splitPath.length === 3 && splitPath[2].length === 0))) { - //on prem - accountUrl += '/' + 'tfs'; - } - else if (splitPath.length === 2 && splitPath[0] === '') { - // /DefaultCollection/ - return accountUrl; - } - else if (splitPath.length > 1) { - return null; - } - return accountUrl; - } -} -exports.TaskAgentApi = TaskAgentApi; - - -/***/ }), - -/***/ 3390: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const TaskAgentInterfaces = __nccwpck_require__(9565); -class TaskAgentApiBase extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-TaskAgent-api', options); + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {Contracts.ResultDetails} detailsToInclude + * @param {number} skip + * @param {number} top + * @param {Contracts.TestOutcome[]} outcomes + * @param {boolean} newTestsOnly + */ + getTestResults(project, runId, detailsToInclude, skip, top, outcomes, newTestsOnly) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + let queryValues = { + detailsToInclude: detailsToInclude, + '$skip': skip, + '$top': top, + outcomes: outcomes && outcomes.join(","), + '$newTestsOnly': newTestsOnly, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "02afa165-e79a-4d70-8f0c-2af0f35b4e07", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); } /** - * @param {TaskAgentInterfaces.TaskAgentCloud} agentCloud + * @param {Contracts.TestCaseResult[]} results + * @param {string} project - Project ID or project name + * @param {number} runId */ - addAgentCloud(agentCloud) { + updateTestResults(results, project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + runId: runId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "02afa165-e79a-4d70-8f0c-2af0f35b4e07", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, agentCloud, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, results, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); resolve(ret); } catch (err) { @@ -27726,21 +38993,36 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} agentCloudId + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {Contracts.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken */ - deleteAgentCloud(agentCloudId) { + getTestResultsByBuild(project, buildId, publishContext, outcomes, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - agentCloudId: agentCloudId + project: project + }; + let queryValues = { + buildId: buildId, + publishContext: publishContext, + outcomes: outcomes && outcomes.join(","), + '$top': top, + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "f48cc885-dbc4-4efc-ab19-ae8c19d1e02a", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -27750,21 +39032,44 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} agentCloudId + * Get a list of results. + * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - Pipeline Id. This is same as build Id. + * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character. + * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character. + * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + * @param {Contracts.TestOutcome[]} outcomes - List of outcome of results + * @param {number} top - Maximum number of results to return + * @param {String} continuationToken - Header to pass the continuationToken */ - getAgentCloud(agentCloudId) { + getTestResultsByPipeline(customHeaders, project, pipelineId, stageName, phaseName, jobName, outcomes, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (pipelineId == null) { + throw new TypeError('pipelineId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - agentCloudId: agentCloudId + project: project }; + let queryValues = { + pipelineId: pipelineId, + stageName: stageName, + phaseName: phaseName, + jobName: jobName, + outcomes: outcomes && outcomes.join(","), + '$top': top, + }; + customHeaders = customHeaders || {}; + customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "80169dc2-30c3-4c25-84b2-dd67d7ff1f52", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -27774,13 +39079,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvid + * @param {string} publishContext + * @param {Contracts.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken */ - getAgentClouds() { + getTestResultsByRelease(project, releaseId, releaseEnvid, publishContext, outcomes, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; + let queryValues = { + releaseId: releaseId, + releaseEnvid: releaseEnvid, + publishContext: publishContext, + outcomes: outcomes && outcomes.join(","), + '$top': top, + continuationToken: continuationToken, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "3994b949-77e5-495d-8034-edf80d95b84e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -27795,22 +39120,40 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskAgentCloud} updatedCloud - * @param {number} agentCloudId + * Get all the available groups details and for these groups get failed and aborted results. + * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - Pipeline Id. This is same as build Id. + * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character. + * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character. + * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + * @param {boolean} shouldIncludeFailedAndAbortedResults - If true, it will return Ids of failed and aborted results for each test group + * @param {boolean} queryGroupSummaryForInProgress - If true, it will calculate summary for InProgress runs as well. */ - updateAgentCloud(updatedCloud, agentCloudId) { + testResultsGroupDetails(project, pipelineId, stageName, phaseName, jobName, shouldIncludeFailedAndAbortedResults, queryGroupSummaryForInProgress) { return __awaiter(this, void 0, void 0, function* () { + if (pipelineId == null) { + throw new TypeError('pipelineId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - agentCloudId: agentCloudId + project: project + }; + let queryValues = { + pipelineId: pipelineId, + stageName: stageName, + phaseName: phaseName, + jobName: jobName, + shouldIncludeFailedAndAbortedResults: shouldIncludeFailedAndAbortedResults, + queryGroupSummaryForInProgress: queryGroupSummaryForInProgress, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "f903b850-06af-4b50-a344-d7bbfb19e93b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, updatedCloud, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsDetails, false); resolve(ret); } catch (err) { @@ -27820,20 +39163,75 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get agent cloud types. + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {Contracts.BuildReference} buildToCompare + */ + queryTestResultsReportForBuild(project, buildId, publishContext, includeFailureDetails, buildToCompare) { + return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildId: buildId, + publishContext: publishContext, + includeFailureDetails: includeFailureDetails, + buildToCompare: buildToCompare, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "e009fa95-95a5-4ad4-9681-590043ce2423", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get summary of test results. * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - Pipeline Id. This is same as build Id. + * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character. + * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character. + * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + * @param {boolean} includeFailureDetails - If true returns failure insights */ - getAgentCloudTypes() { + queryTestResultsReportForPipeline(project, pipelineId, stageName, phaseName, jobName, includeFailureDetails) { return __awaiter(this, void 0, void 0, function* () { + if (pipelineId == null) { + throw new TypeError('pipelineId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; + let queryValues = { + pipelineId: pipelineId, + stageName: stageName, + phaseName: phaseName, + jobName: jobName, + includeFailureDetails: includeFailureDetails, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "5932e193-f376-469d-9c3e-e5588ce12cb5", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "71f746a1-7d68-40fe-b705-9d821a73dff2", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentCloudType, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, false); resolve(ret); } catch (err) { @@ -27844,31 +39242,38 @@ class TaskAgentApiBase extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {number} queueId - * @param {number} top - * @param {string} continuationToken + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {Contracts.ReleaseReference} releaseToCompare */ - getAgentRequestsForQueue(project, queueId, top, continuationToken) { + queryTestResultsReportForRelease(project, releaseId, releaseEnvId, publishContext, includeFailureDetails, releaseToCompare) { return __awaiter(this, void 0, void 0, function* () { - if (top == null) { - throw new TypeError('top can not be null or undefined'); + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (releaseEnvId == null) { + throw new TypeError('releaseEnvId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - queueId: queueId + project: project }; let queryValues = { - '$top': top, - continuationToken: continuationToken, + releaseId: releaseId, + releaseEnvId: releaseEnvId, + publishContext: publishContext, + includeFailureDetails: includeFailureDetails, + releaseToCompare: releaseToCompare, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f5f81ffb-f396-498d-85b1-5ada145e648a", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "f10f9577-2c04-45ab-8c99-b26567a7cd55", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, false); resolve(ret); } catch (err) { @@ -27878,24 +39283,22 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {Contracts.ReleaseReference[]} releases * @param {string} project - Project ID or project name - * @param {number} queueId */ - queueAgentRequest(request, project, queueId) { + queryTestResultsSummaryForReleases(releases, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - queueId: queueId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f5f81ffb-f396-498d-85b1-5ada145e648a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "f10f9577-2c04-45ab-8c99-b26567a7cd55", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, request, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + res = yield this.rest.create(url, releases, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, true); resolve(ret); } catch (err) { @@ -27905,24 +39308,26 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Adds an agent to a pool. You probably don't want to call this endpoint directly. Instead, [configure an agent](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) using the agent download package. - * - * @param {TaskAgentInterfaces.TaskAgent} agent - Details about the agent being added - * @param {number} poolId - The agent pool in which to add the agent + * @param {Contracts.TestResultsContext} resultsContext + * @param {string} project - Project ID or project name + * @param {number[]} workItemIds */ - addAgent(agent, poolId) { + queryTestSummaryByRequirement(resultsContext, project, workItemIds) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project + }; + let queryValues = { + workItemIds: workItemIds && workItemIds.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "3b7fd26f-c335-4e55-afc1-a588f5e2af3c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, agent, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + res = yield this.rest.create(url, resultsContext, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestSummaryForWorkItem, true); resolve(ret); } catch (err) { @@ -27932,20 +39337,93 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization. - * - * @param {number} poolId - The pool ID to remove the agent from - * @param {number} agentId - The agent ID to remove + * @param {Contracts.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name */ - deleteAgent(poolId, agentId) { + queryResultTrendForBuild(filter, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - agentId: agentId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "0886a7ae-315a-4dba-9122-bcce93301f3a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.AggregatedDataForResultTrend, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + */ + queryResultTrendForRelease(filter, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "107f23c3-359a-460a-a70c-63ee739f9f9a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.AggregatedDataForResultTrend, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.RunCreateModel} testRun + * @param {string} project - Project ID or project name + */ + createTestRun(testRun, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testRun, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + */ + deleteTestRun(project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -27960,35 +39438,29 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get information about an agent. - * - * @param {number} poolId - The agent pool containing the agent - * @param {number} agentId - The agent ID to get information about - * @param {boolean} includeCapabilities - Whether to include the agent's capabilities in the response - * @param {boolean} includeAssignedRequest - Whether to include details about the agent's current work - * @param {boolean} includeLastCompletedRequest - Whether to include details about the agents' most recent completed work - * @param {string[]} propertyFilters - Filter which custom properties will be returned + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {boolean} includeDetails + * @param {boolean} includeTags */ - getAgent(poolId, agentId, includeCapabilities, includeAssignedRequest, includeLastCompletedRequest, propertyFilters) { + getTestRunById(project, runId, includeDetails, includeTags) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - agentId: agentId + project: project, + runId: runId }; let queryValues = { - includeCapabilities: includeCapabilities, - includeAssignedRequest: includeAssignedRequest, - includeLastCompletedRequest: includeLastCompletedRequest, - propertyFilters: propertyFilters && propertyFilters.join(","), + includeDetails: includeDetails, + includeTags: includeTags, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, false); resolve(ret); } catch (err) { @@ -27998,37 +39470,39 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of agents. - * - * @param {number} poolId - The agent pool containing the agents - * @param {string} agentName - Filter on agent name - * @param {boolean} includeCapabilities - Whether to include the agents' capabilities in the response - * @param {boolean} includeAssignedRequest - Whether to include details about the agents' current work - * @param {boolean} includeLastCompletedRequest - Whether to include details about the agents' most recent completed work - * @param {string[]} propertyFilters - Filter which custom properties will be returned - * @param {string[]} demands - Filter by demands the agents can satisfy + * @param {string} project - Project ID or project name + * @param {string} buildUri + * @param {string} owner + * @param {string} tmiRunId + * @param {number} planId + * @param {boolean} includeRunDetails + * @param {boolean} automated + * @param {number} skip + * @param {number} top */ - getAgents(poolId, agentName, includeCapabilities, includeAssignedRequest, includeLastCompletedRequest, propertyFilters, demands) { + getTestRuns(project, buildUri, owner, tmiRunId, planId, includeRunDetails, automated, skip, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project }; let queryValues = { - agentName: agentName, - includeCapabilities: includeCapabilities, - includeAssignedRequest: includeAssignedRequest, - includeLastCompletedRequest: includeLastCompletedRequest, - propertyFilters: propertyFilters && propertyFilters.join(","), - demands: demands && demands.join(","), + buildUri: buildUri, + owner: owner, + tmiRunId: tmiRunId, + planId: planId, + includeRunDetails: includeRunDetails, + automated: automated, + '$skip': skip, + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, true); resolve(ret); } catch (err) { @@ -28038,26 +39512,63 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization. + * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. * - * @param {TaskAgentInterfaces.TaskAgent} agent - Updated details about the replacing agent - * @param {number} poolId - The agent pool to use - * @param {number} agentId - The agent to replace + * @param {string} project - Project ID or project name + * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory). + * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). + * @param {Contracts.TestRunState} state - Current state of the Runs to be queried. + * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids. + * @param {boolean} isAutomated - Automation type of the Runs to be queried. + * @param {Contracts.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried. + * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids. + * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids. + * @param {string} branchName - Source Branch name of the Runs to be queried. + * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids. + * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids. + * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids. + * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids. + * @param {string} runTitle - Run Title of the Runs to be queried. + * @param {number} top - Number of runs to be queried. Limit is 100 + * @param {string} continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. */ - replaceAgent(agent, poolId, agentId) { + queryTestRuns(project, minLastUpdatedDate, maxLastUpdatedDate, state, planIds, isAutomated, publishContext, buildIds, buildDefIds, branchName, releaseIds, releaseDefIds, releaseEnvIds, releaseEnvDefIds, runTitle, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (minLastUpdatedDate == null) { + throw new TypeError('minLastUpdatedDate can not be null or undefined'); + } + if (maxLastUpdatedDate == null) { + throw new TypeError('maxLastUpdatedDate can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - agentId: agentId + project: project + }; + let queryValues = { + minLastUpdatedDate: minLastUpdatedDate, + maxLastUpdatedDate: maxLastUpdatedDate, + state: state, + planIds: planIds && planIds.join(","), + isAutomated: isAutomated, + publishContext: publishContext, + buildIds: buildIds && buildIds.join(","), + buildDefIds: buildDefIds && buildDefIds.join(","), + branchName: branchName, + releaseIds: releaseIds && releaseIds.join(","), + releaseDefIds: releaseDefIds && releaseDefIds.join(","), + releaseEnvIds: releaseEnvIds && releaseEnvIds.join(","), + releaseEnvDefIds: releaseEnvDefIds && releaseEnvDefIds.join(","), + runTitle: runTitle, + '$top': top, + continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, agent, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, true); resolve(ret); } catch (err) { @@ -28067,26 +39578,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update agent details. - * - * @param {TaskAgentInterfaces.TaskAgent} agent - Updated details about the agent - * @param {number} poolId - The agent pool to use - * @param {number} agentId - The agent to update + * @param {Contracts.RunUpdateModel} runUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId */ - updateAgent(agent, poolId, agentId) { + updateTestRun(runUpdateModel, project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - agentId: agentId + project: project, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, agent, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + res = yield this.rest.update(url, runUpdateModel, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, false); resolve(ret); } catch (err) { @@ -28096,20 +39605,25 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Returns list of azure subscriptions + * Get test run summary, used when we want to get summary of a run by outcome. Test run should be in completed state. * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. */ - getAzureManagementGroups() { + getTestRunSummaryByOutcome(project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + runId: runId + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "39fe3bf2-7ee0-4198-a469-4a29929afa9c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "5c6a250c-53b7-4851-990c-42a7a00c8b39", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRunStatistic, false); resolve(ret); } catch (err) { @@ -28119,20 +39633,27 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Returns list of azure subscriptions + * Get TestResultsSettings data * + * @param {string} project - Project ID or project name + * @param {Contracts.TestResultsSettingsType} settingsType */ - getAzureSubscriptions() { + getTestResultsSettings(project, settingsType) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; + let queryValues = { + settingsType: settingsType, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bcd6189c-0303-471f-a8e1-acb22b74d700", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "testresults", "7319952e-e5a9-4e19-a006-84f3be8b7c68", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsSettings, false); resolve(ret); } catch (err) { @@ -28142,25 +39663,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * GET a PAT token for managing (configuring, removing, tagging) deployment targets in a deployment group. + * Update project settings of test results * + * @param {Contracts.TestResultsUpdateSettings} testResultsUpdateSettings * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group in which deployment targets are managed. */ - generateDeploymentGroupAccessToken(project, deploymentGroupId) { + updatePipelinesTestSettings(testResultsUpdateSettings, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "3d197ba2-c3e9-4253-882f-0ee2440f8174", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "testresults", "7319952e-e5a9-4e19-a006-84f3be8b7c68", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, testResultsUpdateSettings, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsSettings, false); resolve(ret); } catch (err) { @@ -28170,24 +39690,40 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Create a deployment group. + * Gets the list of results whose failure matches with the provided one. * - * @param {TaskAgentInterfaces.DeploymentGroupCreateParameter} deploymentGroup - Deployment group to create. * @param {string} project - Project ID or project name + * @param {number} runId - id of test run + * @param {number} testResultId - id of test result inside a test run + * @param {number} testSubResultId - id of subresult inside a test result + * @param {number} top - Maximum number of results to return + * @param {String} continuationToken - Header to pass the continuationToken */ - addDeploymentGroup(deploymentGroup, project) { + getSimilarTestResults(customHeaders, project, runId, testResultId, testSubResultId, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + runId: runId, + testResultId: testResultId + }; + let queryValues = { + testSubResultId: testSubResultId, + '$top': top, }; + customHeaders = customHeaders || {}; + customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "67d0a074-b255-4902-a639-e3e6de7a3de6", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.create(url, deploymentGroup, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); resolve(ret); } catch (err) { @@ -28197,25 +39733,25 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Delete a deployment group. + * Get test run statistics , used when we want to get summary of a run by outcome. * * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group to be deleted. + * @param {number} runId - ID of the run to get. */ - deleteDeploymentGroup(project, deploymentGroupId) { + getTestRunStatistics(project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - deploymentGroupId: deploymentGroupId + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "82b986e8-ca9e-4a89-b39e-f65c69bc104a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRunStatistic, false); resolve(ret); } catch (err) { @@ -28225,31 +39761,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a deployment group by its ID. + *

Gets the coverage status for the last successful build of a definition, optionally scoped to a specific branch

* * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group. - * @param {TaskAgentInterfaces.DeploymentGroupActionFilter} actionFilter - Get the deployment group only if this action can be performed on it. - * @param {TaskAgentInterfaces.DeploymentGroupExpands} expand - Include these additional details in the returned object. + * @param {string} definition - The ID or name of the definition. + * @param {string} branchName - The branch name. + * @param {string} label - The String to replace the default text on the left side of the badge. */ - getDeploymentGroup(project, deploymentGroupId, actionFilter, expand) { + getCoverageStatusBadge(project, definition, branchName, label) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - deploymentGroupId: deploymentGroupId + definition: definition }; let queryValues = { - actionFilter: actionFilter, - '$expand': expand, + branchName: branchName, + label: label, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "73b7c9d8-defb-4b60-b3d6-2162d60d6b13", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -28259,37 +39795,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of deployment groups by name or IDs. - * * @param {string} project - Project ID or project name - * @param {string} name - Name of the deployment group. - * @param {TaskAgentInterfaces.DeploymentGroupActionFilter} actionFilter - Get only deployment groups on which this action can be performed. - * @param {TaskAgentInterfaces.DeploymentGroupExpands} expand - Include these additional details in the returned objects. - * @param {string} continuationToken - Get deployment groups with names greater than this continuationToken lexicographically. - * @param {number} top - Maximum number of deployment groups to return. Default is **1000**. - * @param {number[]} ids - Comma separated list of IDs of the deployment groups. + * @param {number} buildId */ - getDeploymentGroups(project, name, actionFilter, expand, continuationToken, top, ids) { + getTestTagsForBuild(project, buildId) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - name: name, - actionFilter: actionFilter, - '$expand': expand, - continuationToken: continuationToken, - '$top': top, - ids: ids && ids.join(","), + buildId: buildId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "52ee2057-4b54-41a6-a18c-ed4375a00f8d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -28299,26 +39826,91 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update a deployment group. - * - * @param {TaskAgentInterfaces.DeploymentGroupUpdateParameter} deploymentGroup - Deployment group to update. * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group. + * @param {number} releaseId + * @param {number} releaseEnvId + */ + getTestTagsForRelease(project, releaseId, releaseEnvId) { + return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (releaseEnvId == null) { + throw new TypeError('releaseEnvId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + releaseId: releaseId, + releaseEnvId: releaseEnvId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "52ee2057-4b54-41a6-a18c-ed4375a00f8d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestTagsUpdateModel} testTagsUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId + */ + updateTestRunTags(testTagsUpdateModel, project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "a5e2f411-2b43-45f3-989c-05b71339f5b8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testTagsUpdateModel, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId */ - updateDeploymentGroup(deploymentGroup, project, deploymentGroupId) { + getTestTagSummaryForBuild(project, buildId) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId + project: project + }; + let queryValues = { + buildId: buildId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "655a8f6b-fec7-4b46-b672-68b44141b498", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, deploymentGroup, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -28328,31 +39920,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of deployment group metrics. - * * @param {string} project - Project ID or project name - * @param {string} deploymentGroupName - Name of the deployment group. - * @param {string} continuationToken - Get metrics for deployment groups with names greater than this continuationToken lexicographically. - * @param {number} top - Maximum number of deployment group metrics to return. Default is **50**. + * @param {number} releaseId + * @param {number} releaseEnvId */ - getDeploymentGroupsMetrics(project, deploymentGroupName, continuationToken, top) { + getTestTagSummaryForRelease(project, releaseId, releaseEnvId) { return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (releaseEnvId == null) { + throw new TypeError('releaseEnvId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - deploymentGroupName: deploymentGroupName, - continuationToken: continuationToken, - '$top': top, + releaseId: releaseId, + releaseEnvId: releaseEnvId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "281c6308-427a-49e1-b83a-dac0f4862189", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "655a8f6b-fec7-4b46-b672-68b44141b498", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroupMetrics, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -28362,32 +39956,26 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Creates an attachment in the LogStore for the specified buildId. + * + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - Contains attachment info like stream, filename, comment, attachmentType * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - * @param {number} machineId - * @param {number} completedRequestCount + * @param {number} buildId - BuildId */ - getAgentRequestsForDeploymentMachine(project, deploymentGroupId, machineId, completedRequestCount) { + createBuildAttachmentInLogStore(attachmentRequestModel, project, buildId) { return __awaiter(this, void 0, void 0, function* () { - if (machineId == null) { - throw new TypeError('machineId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - deploymentGroupId: deploymentGroupId - }; - let queryValues = { - machineId: machineId, - completedRequestCount: completedRequestCount, + buildId: buildId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a3540e5b-f0dc-4668-963b-b752459be545", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "6f747e16-18c2-435a-b4fb-fa05d6845fee", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -28397,29 +39985,26 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Creates an attachment in the LogStore for the specified runId. + * + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - Contains attachment info like stream, filename, comment, attachmentType * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - * @param {number[]} machineIds - * @param {number} completedRequestCount + * @param {number} runId - Test RunId */ - getAgentRequestsForDeploymentMachines(project, deploymentGroupId, machineIds, completedRequestCount) { + createTestRunLogStoreAttachment(attachmentRequestModel, project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - deploymentGroupId: deploymentGroupId - }; - let queryValues = { - machineIds: machineIds && machineIds.join(","), - completedRequestCount: completedRequestCount, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a3540e5b-f0dc-4668-963b-b752459be545", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -28429,22 +40014,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Deletes the attachment with the specified filename for the specified runId from the LogStore. + * * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId + * @param {number} runId - Test RunId + * @param {string} filename - Attachment FileName */ - refreshDeploymentMachines(project, deploymentGroupId) { + deleteTestRunLogStoreAttachment(project, runId, filename) { return __awaiter(this, void 0, void 0, function* () { + if (filename == null) { + throw new TypeError('filename can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - deploymentGroupId: deploymentGroupId + runId: runId + }; + let queryValues = { + filename: filename, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "91006ac4-0f68-4d82-a2bc-540676bd73ce", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -28455,24 +40049,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * GET a PAT token for managing (configuring, removing, tagging) deployment agents in a deployment pool. + * Returns the attachment with the specified filename for the specified runId from the LogStore. * - * @param {number} poolId - ID of the deployment pool in which deployment agents are managed. + * @param {string} project - Project ID or project name + * @param {number} runId - Test RunId + * @param {string} filename - Attachment FileName */ - generateDeploymentPoolAccessToken(poolId) { + getTestRunLogStoreAttachmentContent(project, runId, filename) { return __awaiter(this, void 0, void 0, function* () { + if (filename == null) { + throw new TypeError('filename can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project, + runId: runId + }; + let queryValues = { + filename: filename, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e077ee4a-399b-420b-841f-c43fbc058e0b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -28481,28 +40082,25 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of deployment pool summaries. + * Returns a list of attachments for the specified runId from the LogStore. * - * @param {string} poolName - Name of the deployment pool. - * @param {TaskAgentInterfaces.DeploymentPoolSummaryExpands} expands - Include these additional details in the returned objects. - * @param {number[]} poolIds - List of deployment pool ids. + * @param {string} project - Project ID or project name + * @param {number} runId - Test RunId */ - getDeploymentPoolsSummary(poolName, expands, poolIds) { + getTestRunLogStoreAttachments(project, runId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - poolName: poolName, - expands: expands, - poolIds: poolIds && poolIds.join(","), + let routeValues = { + project: project, + runId: runId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6525d6c6-258f-40e0-a1a9-8a24a3957625", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentPoolSummary, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreAttachment, true); resolve(ret); } catch (err) { @@ -28512,35 +40110,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get agent requests for a deployment target. + * Returns the attachment with the specified filename for the specified runId from the LogStore. * * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group to which the target belongs. - * @param {number} targetId - ID of the deployment target. - * @param {number} completedRequestCount - Maximum number of completed requests to return. Default is **50** + * @param {number} runId - Test RunId + * @param {string} filename - Attachment FileName */ - getAgentRequestsForDeploymentTarget(project, deploymentGroupId, targetId, completedRequestCount) { + getTestRunLogStoreAttachmentZip(project, runId, filename) { return __awaiter(this, void 0, void 0, function* () { - if (targetId == null) { - throw new TypeError('targetId can not be null or undefined'); + if (filename == null) { + throw new TypeError('filename can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - deploymentGroupId: deploymentGroupId + runId: runId }; let queryValues = { - targetId: targetId, - completedRequestCount: completedRequestCount, + filename: filename, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2fac0be3-8c8f-4473-ab93-c1389b08a2c9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -28549,35 +40143,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get agent requests for a list deployment targets. + * Creates a new test failure type * + * @param {Contracts.TestResultFailureTypeRequestModel} testResultFailureType * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group to which the targets belong. - * @param {number[]} targetIds - Comma separated list of IDs of the deployment targets. - * @param {number} ownerId - Id of owner of agent job request. - * @param {Date} completedOn - Datetime to return request after this time. - * @param {number} completedRequestCount - Maximum number of completed requests to return for each target. Default is **50** */ - getAgentRequestsForDeploymentTargets(project, deploymentGroupId, targetIds, ownerId, completedOn, completedRequestCount) { + createFailureType(testResultFailureType, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId - }; - let queryValues = { - targetIds: targetIds && targetIds.join(","), - ownerId: ownerId, - completedOn: completedOn, - completedRequestCount: completedRequestCount, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2fac0be3-8c8f-4473-ab93-c1389b08a2c9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "c4ac0486-830c-4a2a-9ef9-e8a1791a70fd", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + res = yield this.rest.create(url, testResultFailureType, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -28587,24 +40170,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Upgrade the deployment targets in a deployment group. + * Deletes a test failure type with specified failureTypeId * * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group. + * @param {number} failureTypeId */ - refreshDeploymentTargets(project, deploymentGroupId) { + deleteFailureType(project, failureTypeId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - deploymentGroupId: deploymentGroupId + failureTypeId: failureTypeId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1c1a817f-f23d-41c6-bf8d-14b638f64152", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "c4ac0486-830c-4a2a-9ef9-e8a1791a70fd", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -28615,20 +40198,22 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. + * Returns the list of test failure types. * - * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. + * @param {string} project - Project ID or project name */ - queryEndpoint(endpoint) { + getFailureTypes(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f223b809-8c33-4b7d-b53f-07232569b5d6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "c4ac0486-830c-4a2a-9ef9-e8a1791a70fd", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, endpoint, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, true); resolve(ret); } @@ -28639,31 +40224,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get environment deployment execution history + * Get history of a test method using TestHistoryQuery * + * @param {Contracts.TestHistoryQuery} filter - TestHistoryQuery to get history * @param {string} project - Project ID or project name - * @param {number} environmentId - * @param {string} continuationToken - * @param {number} top */ - getEnvironmentDeploymentExecutionRecords(project, environmentId, continuationToken, top) { + queryTestHistory(filter, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - environmentId: environmentId - }; - let queryValues = { - continuationToken: continuationToken, - top: top, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "51bb5d21-4305-4ea6-9dbb-b7488af73334", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "2a41bd6a-8118-4403-b74e-5ba7492aed9d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentDeploymentExecutionRecord, true); + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestHistoryQuery, false); resolve(ret); } catch (err) { @@ -28673,24 +40251,47 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Create an environment. + * Get list of build attachments reference * - * @param {TaskAgentInterfaces.EnvironmentCreateParameter} environmentCreateParameter - Environment to create. * @param {string} project - Project ID or project name + * @param {number} buildId - Id of the build to get + * @param {Contracts.TestLogType} type - type of the attachment to get + * @param {string} directoryPath - directory path for which attachments are needed + * @param {string} fileNamePrefix - file name prefix to filter the list of attachment + * @param {boolean} fetchMetaData - Default is false, set if metadata is needed + * @param {number} top - Number of test attachments reference to return + * @param {String} continuationToken - Header to pass the continuationToken */ - addEnvironment(environmentCreateParameter, project) { + getTestLogsForBuild(customHeaders, project, buildId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + if (type == null) { + throw new TypeError('type can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; + let queryValues = { + buildId: buildId, + type: type, + directoryPath: directoryPath, + fileNamePrefix: fileNamePrefix, + fetchMetaData: fetchMetaData, + top: top, + }; + customHeaders = customHeaders || {}; + customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "dff8ce3a-e539-4817-a405-d968491a88f1", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.create(url, environmentCreateParameter, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); resolve(ret); } catch (err) { @@ -28700,25 +40301,46 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Delete the specified environment. + * Get list of test result attachments reference * * @param {string} project - Project ID or project name - * @param {number} environmentId - ID of the environment. + * @param {number} runId - Id of the test run that contains the result + * @param {number} resultId - Id of the test result + * @param {Contracts.TestLogType} type - type of attachments to get + * @param {string} directoryPath - directory path of attachments to get + * @param {string} fileNamePrefix - file name prefix to filter the list of attachment + * @param {boolean} fetchMetaData - Default is false, set if metadata is needed + * @param {number} top - Numbe of attachments reference to return + * @param {String} continuationToken - Header to pass the continuationToken */ - deleteEnvironment(project, environmentId) { + getTestResultLogs(customHeaders, project, runId, resultId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (type == null) { + throw new TypeError('type can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - environmentId: environmentId + runId: runId, + resultId: resultId + }; + let queryValues = { + type: type, + directoryPath: directoryPath, + fileNamePrefix: fileNamePrefix, + fetchMetaData: fetchMetaData, + top: top, }; + customHeaders = customHeaders || {}; + customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "714caaac-ae1e-4869-8323-9bc0f5120dbf", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); resolve(ret); } catch (err) { @@ -28728,29 +40350,51 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get an environment by its ID. + * Get list of test subresult attachments reference * * @param {string} project - Project ID or project name - * @param {number} environmentId - ID of the environment. - * @param {TaskAgentInterfaces.EnvironmentExpands} expands - Include these additional details in the returned objects. + * @param {number} runId - Id of the test run that contains the results + * @param {number} resultId - Id of the test result that contains subresult + * @param {number} subResultId - Id of the test subresult + * @param {Contracts.TestLogType} type - type of the attachments to get + * @param {string} directoryPath - directory path of the attachment to get + * @param {string} fileNamePrefix - file name prefix to filter the list of attachments + * @param {boolean} fetchMetaData - Default is false, set if metadata is needed + * @param {number} top - Number of attachments reference to return + * @param {String} continuationToken - Header to pass the continuationToken */ - getEnvironmentById(project, environmentId, expands) { + getTestSubResultLogs(customHeaders, project, runId, resultId, subResultId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (subResultId == null) { + throw new TypeError('subResultId can not be null or undefined'); + } + if (type == null) { + throw new TypeError('type can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - environmentId: environmentId + runId: runId, + resultId: resultId }; let queryValues = { - expands: expands, + subResultId: subResultId, + type: type, + directoryPath: directoryPath, + fileNamePrefix: fileNamePrefix, + fetchMetaData: fetchMetaData, + top: top, }; + customHeaders = customHeaders || {}; + customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "714caaac-ae1e-4869-8323-9bc0f5120dbf", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); resolve(ret); } catch (err) { @@ -28760,31 +40404,44 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get all environments. + * Get list of test run attachments reference * * @param {string} project - Project ID or project name - * @param {string} name - * @param {string} continuationToken - * @param {number} top + * @param {number} runId - Id of the test run + * @param {Contracts.TestLogType} type - type of the attachments to get + * @param {string} directoryPath - directory path for which attachments are needed + * @param {string} fileNamePrefix - file name prefix to filter the list of attachment + * @param {boolean} fetchMetaData - Default is false, set if metadata is needed + * @param {number} top - Number of attachments reference to return + * @param {String} continuationToken - Header to pass the continuationToken */ - getEnvironments(project, name, continuationToken, top) { + getTestRunLogs(customHeaders, project, runId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) { return __awaiter(this, void 0, void 0, function* () { + if (type == null) { + throw new TypeError('type can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + runId: runId }; let queryValues = { - name: name, - continuationToken: continuationToken, - '$top': top, + type: type, + directoryPath: directoryPath, + fileNamePrefix: fileNamePrefix, + fetchMetaData: fetchMetaData, + top: top, }; + customHeaders = customHeaders || {}; + customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "5b47b946-e875-4c9a-acdc-2a20996caebe", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, true); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); resolve(ret); } catch (err) { @@ -28794,26 +40451,40 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update the specified environment. + * Get SAS Uri of a build attachment * - * @param {TaskAgentInterfaces.EnvironmentUpdateParameter} environmentUpdateParameter - Environment data to update. * @param {string} project - Project ID or project name - * @param {number} environmentId - ID of the environment. + * @param {number} build - Id of the build to get + * @param {Contracts.TestLogType} type - type of the file + * @param {string} filePath - filePath for which sas uri is needed */ - updateEnvironment(environmentUpdateParameter, project, environmentId) { + getTestLogStoreEndpointDetailsForBuildLog(project, build, type, filePath) { return __awaiter(this, void 0, void 0, function* () { + if (build == null) { + throw new TypeError('build can not be null or undefined'); + } + if (type == null) { + throw new TypeError('type can not be null or undefined'); + } + if (filePath == null) { + throw new TypeError('filePath can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - environmentId: environmentId + project: project + }; + let queryValues = { + build: build, + type: type, + filePath: filePath, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "39b09be7-f0c9-4a83-a513-9ae31b45c56f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, environmentUpdateParameter, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); resolve(ret); } catch (err) { @@ -28823,27 +40494,35 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} hubName - * @param {boolean} includeEnterpriseUsersCount - * @param {boolean} includeHostedAgentMinutesCount + * Create and Get sas uri of the build container + * + * @param {string} project - Project ID or project name + * @param {number} buildId - Id of the build to get + * @param {Contracts.TestLogStoreOperationType} testLogStoreOperationType - Type of operation to perform using sas uri */ - getTaskHubLicenseDetails(hubName, includeEnterpriseUsersCount, includeHostedAgentMinutesCount) { + testLogStoreEndpointDetailsForBuild(project, buildId, testLogStoreOperationType) { return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + if (testLogStoreOperationType == null) { + throw new TypeError('testLogStoreOperationType can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - hubName: hubName + project: project }; let queryValues = { - includeEnterpriseUsersCount: includeEnterpriseUsersCount, - includeHostedAgentMinutesCount: includeHostedAgentMinutesCount, + buildId: buildId, + testLogStoreOperationType: testLogStoreOperationType, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "distributedtask", "f9f0f436-b8a1-4475-9041-1ccdbf8f0128", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "39b09be7-f0c9-4a83-a513-9ae31b45c56f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); resolve(ret); } catch (err) { @@ -28853,22 +40532,39 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskHubLicenseDetails} taskHubLicenseDetails - * @param {string} hubName + * Get SAS Uri of a test results attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - Id of the test run that contains result + * @param {number} resultId - Id of the test result whose files need to be downloaded + * @param {Contracts.TestLogType} type - type of the file + * @param {string} filePath - filePath for which sas uri is needed */ - updateTaskHubLicenseDetails(taskHubLicenseDetails, hubName) { + getTestLogStoreEndpointDetailsForResultLog(project, runId, resultId, type, filePath) { return __awaiter(this, void 0, void 0, function* () { + if (type == null) { + throw new TypeError('type can not be null or undefined'); + } + if (filePath == null) { + throw new TypeError('filePath can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - hubName: hubName + project: project, + runId: runId, + resultId: resultId + }; + let queryValues = { + type: type, + filePath: filePath, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "distributedtask", "f9f0f436-b8a1-4475-9041-1ccdbf8f0128", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "da630b37-1236-45b5-945e-1d7bdb673850", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, taskHubLicenseDetails, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); resolve(ret); } catch (err) { @@ -28878,19 +40574,44 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.InputValidationRequest} inputValidationRequest + * Get SAS Uri of a test subresults attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - Id of the test run that contains result + * @param {number} resultId - Id of the test result that contains subresult + * @param {number} subResultId - Id of the test subresult whose file sas uri is needed + * @param {Contracts.TestLogType} type - type of the file + * @param {string} filePath - filePath for which sas uri is needed */ - validateInputs(inputValidationRequest) { + getTestLogStoreEndpointDetailsForSubResultLog(project, runId, resultId, subResultId, type, filePath) { return __awaiter(this, void 0, void 0, function* () { + if (subResultId == null) { + throw new TypeError('subResultId can not be null or undefined'); + } + if (type == null) { + throw new TypeError('type can not be null or undefined'); + } + if (filePath == null) { + throw new TypeError('filePath can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let routeValues = { + project: project, + runId: runId, + resultId: resultId + }; + let queryValues = { + subResultId: subResultId, + type: type, + filePath: filePath, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "58475b1e-adaf-4155-9bc1-e04bf1fff4c2", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "da630b37-1236-45b5-945e-1d7bdb673850", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, inputValidationRequest, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); resolve(ret); } catch (err) { @@ -28900,34 +40621,44 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - * @param {TaskAgentInterfaces.TaskResult} result - * @param {boolean} agentShuttingDown + * Create empty file for a result and Get Sas uri for the file + * + * @param {string} project - Project ID or project name + * @param {number} runId - Id of the test run that contains the result + * @param {number} resultId - Id of the test results that contains sub result + * @param {number} subResultId - Id of the test sub result whose file sas uri is needed + * @param {string} filePath - file path inside the sub result for which sas uri is needed + * @param {Contracts.TestLogType} type - Type of the file for download */ - deleteAgentRequest(poolId, requestId, lockToken, result, agentShuttingDown) { + testLogStoreEndpointDetailsForResult(project, runId, resultId, subResultId, filePath, type) { return __awaiter(this, void 0, void 0, function* () { - if (lockToken == null) { - throw new TypeError('lockToken can not be null or undefined'); + if (subResultId == null) { + throw new TypeError('subResultId can not be null or undefined'); + } + if (filePath == null) { + throw new TypeError('filePath can not be null or undefined'); + } + if (type == null) { + throw new TypeError('type can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - requestId: requestId + project: project, + runId: runId, + resultId: resultId }; let queryValues = { - lockToken: lockToken, - result: result, - agentShuttingDown: agentShuttingDown, + subResultId: subResultId, + filePath: filePath, + type: type, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "da630b37-1236-45b5-945e-1d7bdb673850", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); resolve(ret); } catch (err) { @@ -28937,27 +40668,37 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} requestId - * @param {boolean} includeStatus + * Get SAS Uri of a test run attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - Id of the test run whose file has to be downloaded + * @param {Contracts.TestLogType} type - type of the file + * @param {string} filePath - filePath for which sas uri is needed */ - getAgentRequest(poolId, requestId, includeStatus) { + getTestLogStoreEndpointDetailsForRunLog(project, runId, type, filePath) { return __awaiter(this, void 0, void 0, function* () { + if (type == null) { + throw new TypeError('type can not be null or undefined'); + } + if (filePath == null) { + throw new TypeError('filePath can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - requestId: requestId + project: project, + runId: runId }; let queryValues = { - includeStatus: includeStatus, + type: type, + filePath: filePath, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "67eb3f92-6c97-4fd9-8b63-6cbdc7e526ea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); resolve(ret); } catch (err) { @@ -28967,30 +40708,36 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} top - * @param {string} continuationToken + * Create empty file for a run and Get Sas uri for the file + * + * @param {string} project - Project ID or project name + * @param {number} runId - Id of the run to get endpoint details + * @param {Contracts.TestLogStoreOperationType} testLogStoreOperationType - Type of operation to perform using sas uri + * @param {string} filePath - file path to create an empty file + * @param {Contracts.TestLogType} type - Default is GeneralAttachment, type of empty file to be created */ - getAgentRequests(poolId, top, continuationToken) { + testLogStoreEndpointDetailsForRun(project, runId, testLogStoreOperationType, filePath, type) { return __awaiter(this, void 0, void 0, function* () { - if (top == null) { - throw new TypeError('top can not be null or undefined'); + if (testLogStoreOperationType == null) { + throw new TypeError('testLogStoreOperationType can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project, + runId: runId }; let queryValues = { - '$top': top, - continuationToken: continuationToken, + testLogStoreOperationType: testLogStoreOperationType, + filePath: filePath, + type: type, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "67eb3f92-6c97-4fd9-8b63-6cbdc7e526ea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); resolve(ret); } catch (err) { @@ -29000,30 +40747,22 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} agentId - * @param {number} completedRequestCount + * @param {Contracts.TestSettings} testSettings + * @param {string} project - Project ID or project name */ - getAgentRequestsForAgent(poolId, agentId, completedRequestCount) { + createTestSettings(testSettings, project) { return __awaiter(this, void 0, void 0, function* () { - if (agentId == null) { - throw new TypeError('agentId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId - }; - let queryValues = { - agentId: agentId, - completedRequestCount: completedRequestCount, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "930bad47-f826-4099-9597-f44d0a9c735c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + res = yield this.rest.create(url, testSettings, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -29033,27 +40772,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number[]} agentIds - * @param {number} completedRequestCount + * @param {string} project - Project ID or project name + * @param {number} testSettingsId */ - getAgentRequestsForAgents(poolId, agentIds, completedRequestCount) { + deleteTestSettings(project, testSettingsId) { return __awaiter(this, void 0, void 0, function* () { + if (testSettingsId == null) { + throw new TypeError('testSettingsId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project }; let queryValues = { - agentIds: agentIds && agentIds.join(","), - completedRequestCount: completedRequestCount, + testSettingsId: testSettingsId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "930bad47-f826-4099-9597-f44d0a9c735c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -29063,30 +40803,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {string} planId - * @param {string} jobId + * @param {string} project - Project ID or project name + * @param {number} testSettingsId */ - getAgentRequestsForPlan(poolId, planId, jobId) { + getTestSettingsById(project, testSettingsId) { return __awaiter(this, void 0, void 0, function* () { - if (planId == null) { - throw new TypeError('planId can not be null or undefined'); + if (testSettingsId == null) { + throw new TypeError('testSettingsId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project }; let queryValues = { - planId: planId, - jobId: jobId, + testSettingsId: testSettingsId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "930bad47-f826-4099-9597-f44d0a9c735c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -29096,22 +40834,22 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId + * @param {Contracts.WorkItemToTestLinks} workItemToTestLinks + * @param {string} project - Project ID or project name */ - queueAgentRequestByPool(request, poolId) { + addWorkItemToTestLinks(workItemToTestLinks, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "4e3abe63-ca46-4fe0-98b2-363f7ec7aa5f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, request, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + res = yield this.rest.create(url, workItemToTestLinks, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.WorkItemToTestLinks, false); resolve(ret); } catch (err) { @@ -29121,33 +40859,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - * @param {TaskAgentInterfaces.TaskAgentRequestUpdateOptions} updateOptions + * @param {string} project - Project ID or project name + * @param {string} testName + * @param {number} workItemId */ - updateAgentRequest(request, poolId, requestId, lockToken, updateOptions) { + deleteTestMethodToWorkItemLink(project, testName, workItemId) { return __awaiter(this, void 0, void 0, function* () { - if (lockToken == null) { - throw new TypeError('lockToken can not be null or undefined'); + if (testName == null) { + throw new TypeError('testName can not be null or undefined'); + } + if (workItemId == null) { + throw new TypeError('workItemId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - requestId: requestId + project: project }; let queryValues = { - lockToken: lockToken, - updateOptions: updateOptions, + testName: testName, + workItemId: workItemId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "cbd50bd7-f7ed-4e35-b127-4408ae6bfa2c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, request, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -29157,24 +40895,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.KubernetesResourceCreateParameters} createParameters * @param {string} project - Project ID or project name - * @param {number} environmentId + * @param {string} testName */ - addKubernetesResource(createParameters, project, environmentId) { + queryTestMethodLinkedWorkItems(project, testName) { return __awaiter(this, void 0, void 0, function* () { + if (testName == null) { + throw new TypeError('testName can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - environmentId: environmentId + project: project + }; + let queryValues = { + testName: testName, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "cbd50bd7-f7ed-4e35-b127-4408ae6bfa2c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, createParameters, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.KubernetesResource, false); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -29185,24 +40927,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {number} environmentId - * @param {number} resourceId + * @param {number} runId + * @param {number} testCaseResultId */ - deleteKubernetesResource(project, environmentId, resourceId) { + getTestResultWorkItemsById(project, runId, testCaseResultId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - environmentId: environmentId, - resourceId: resourceId + runId: runId, + testCaseResultId: testCaseResultId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "3d032fd6-e7a0-468b-b105-75d206f99aad", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -29212,25 +40954,40 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Query Test Result WorkItems based on filter + * * @param {string} project - Project ID or project name - * @param {number} environmentId - * @param {number} resourceId + * @param {string} workItemCategory - can take values Microsoft.BugCategory or all(for getting all workitems) + * @param {string} automatedTestName + * @param {number} testCaseId + * @param {Date} maxCompleteDate + * @param {number} days + * @param {number} workItemCount */ - getKubernetesResource(project, environmentId, resourceId) { + queryTestResultWorkItems(project, workItemCategory, automatedTestName, testCaseId, maxCompleteDate, days, workItemCount) { return __awaiter(this, void 0, void 0, function* () { + if (workItemCategory == null) { + throw new TypeError('workItemCategory can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - environmentId: environmentId, - resourceId: resourceId + project: project + }; + let queryValues = { + workItemCategory: workItemCategory, + automatedTestName: automatedTestName, + testCaseId: testCaseId, + maxCompleteDate: maxCompleteDate, + days: days, + '$workItemCount': workItemCount, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "f7401a26-331b-44fe-a470-f7ed35138e4a", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.KubernetesResource, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -29239,24 +40996,71 @@ class TaskAgentApiBase extends basem.ClientApiBase { })); }); } +} +TestResultsApi.RESOURCE_AREA_ID = "c83eaf52-edf3-4034-ae11-17d38f25404c"; +exports.TestResultsApi = TestResultsApi; + + +/***/ }), + +/***/ 75417: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const TfvcInterfaces = __nccwpck_require__(99003); +class TfvcApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Tfvc-api', options); + } /** + * Get a single branch hierarchy at the given path with parents or children as specified. + * + * @param {string} path - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. * @param {string} project - Project ID or project name - * @param {number} machineGroupId + * @param {boolean} includeParent - Return the parent branch, if there is one. Default: False + * @param {boolean} includeChildren - Return child branches, if there are any. Default: False */ - generateDeploymentMachineGroupAccessToken(project, machineGroupId) { + getBranch(path, project, includeParent, includeChildren) { return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - machineGroupId: machineGroupId + project: project + }; + let queryValues = { + path: path, + includeParent: includeParent, + includeChildren: includeChildren, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f8c7c0de-ac0d-469b-9cb1-c21f72d67693", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, false); resolve(ret); } catch (err) { @@ -29266,22 +41070,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup + * Get a collection of branch roots -- first-level children, branches with no parents. + * * @param {string} project - Project ID or project name + * @param {boolean} includeParent - Return the parent branch, if there is one. Default: False + * @param {boolean} includeChildren - Return the child branches for each root branch. Default: False + * @param {boolean} includeDeleted - Return deleted branches. Default: False + * @param {boolean} includeLinks - Return links. Default: False */ - addDeploymentMachineGroup(machineGroup, project) { + getBranches(project, includeParent, includeChildren, includeDeleted, includeLinks) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; + let queryValues = { + includeParent: includeParent, + includeChildren: includeChildren, + includeDeleted: includeDeleted, + includeLinks: includeLinks, + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, machineGroup, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, true); resolve(ret); } catch (err) { @@ -29291,23 +41106,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Get branch hierarchies below the specified scopePath + * + * @param {string} scopePath - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. * @param {string} project - Project ID or project name - * @param {number} machineGroupId + * @param {boolean} includeDeleted - Return deleted branches. Default: False + * @param {boolean} includeLinks - Return links. Default: False */ - deleteDeploymentMachineGroup(project, machineGroupId) { + getBranchRefs(scopePath, project, includeDeleted, includeLinks) { return __awaiter(this, void 0, void 0, function* () { + if (scopePath == null) { + throw new TypeError('scopePath can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - machineGroupId: machineGroupId + project: project + }; + let queryValues = { + scopePath: scopePath, + includeDeleted: includeDeleted, + includeLinks: includeLinks, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranchRef, true); resolve(ret); } catch (err) { @@ -29317,27 +41143,29 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} machineGroupId - * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter + * Retrieve Tfvc changes for a given changeset. + * + * @param {number} id - ID of the changeset. Default: null + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null */ - getDeploymentMachineGroup(project, machineGroupId, actionFilter) { + getChangesetChanges(id, skip, top) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - machineGroupId: machineGroupId + id: id }; let queryValues = { - actionFilter: actionFilter, + '$skip': skip, + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "f32b86f2-15b9-4fe6-81b1-6f8938617ee5", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChange, true); resolve(ret); } catch (err) { @@ -29347,27 +41175,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Create a new changeset. + * + * @param {TfvcInterfaces.TfvcChangeset} changeset * @param {string} project - Project ID or project name - * @param {string} machineGroupName - * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter */ - getDeploymentMachineGroups(project, machineGroupName, actionFilter) { + createChangeset(changeset, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - machineGroupName: machineGroupName, - actionFilter: actionFilter, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, true); + res = yield this.rest.create(url, changeset, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, false); resolve(ret); } catch (err) { @@ -29377,24 +41202,45 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup + * Retrieve a Tfvc Changeset + * + * @param {number} id - Changeset Id to retrieve. * @param {string} project - Project ID or project name - * @param {number} machineGroupId + * @param {number} maxChangeCount - Number of changes to return (maximum 100 changes) Default: 0 + * @param {boolean} includeDetails - Include policy details and check-in notes in the response. Default: false + * @param {boolean} includeWorkItems - Include workitems. Default: false + * @param {number} maxCommentLength - Include details about associated work items in the response. Default: null + * @param {boolean} includeSourceRename - Include renames. Default: false + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null + * @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null */ - updateDeploymentMachineGroup(machineGroup, project, machineGroupId) { + getChangeset(id, project, maxChangeCount, includeDetails, includeWorkItems, maxCommentLength, includeSourceRename, skip, top, orderby, searchCriteria) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - machineGroupId: machineGroupId + id: id + }; + let queryValues = { + maxChangeCount: maxChangeCount, + includeDetails: includeDetails, + includeWorkItems: includeWorkItems, + maxCommentLength: maxCommentLength, + includeSourceRename: includeSourceRename, + '$skip': skip, + '$top': top, + '$orderby': orderby, + searchCriteria: searchCriteria, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, machineGroup, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangeset, false); resolve(ret); } catch (err) { @@ -29404,27 +41250,35 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Retrieve Tfvc Changesets + * * @param {string} project - Project ID or project name - * @param {number} machineGroupId - * @param {string[]} tagFilters + * @param {number} maxCommentLength - Include details about associated work items in the response. Default: null + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null + * @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null */ - getDeploymentMachineGroupMachines(project, machineGroupId, tagFilters) { + getChangesets(project, maxCommentLength, skip, top, orderby, searchCriteria) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - machineGroupId: machineGroupId + project: project }; let queryValues = { - tagFilters: tagFilters && tagFilters.join(","), + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + '$orderby': orderby, + searchCriteria: searchCriteria, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "966c3874-c347-4b18-a90c-d509116717fd", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, true); resolve(ret); } catch (err) { @@ -29434,24 +41288,21 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.DeploymentMachine[]} deploymentMachines - * @param {string} project - Project ID or project name - * @param {number} machineGroupId + * Returns changesets for a given list of changeset Ids. + * + * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - List of changeset IDs. */ - updateDeploymentMachineGroupMachines(deploymentMachines, project, machineGroupId) { + getBatchedChangesets(changesetsRequestData) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - machineGroupId: machineGroupId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "966c3874-c347-4b18-a90c-d509116717fd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "b7e7c173-803c-4fea-9ec8-31ee35c5502a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, deploymentMachines, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + res = yield this.rest.create(url, changesetsRequestData, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, true); resolve(ret); } catch (err) { @@ -29461,24 +41312,23 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.DeploymentMachine} machine - * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId + * Retrieves the work items associated with a particular changeset. + * + * @param {number} id - ID of the changeset. */ - addDeploymentMachine(machine, project, deploymentGroupId) { + getChangesetWorkItems(id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, machine, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -29488,25 +41338,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - * @param {number} machineId */ - deleteDeploymentMachine(project, deploymentGroupId, machineId) { + getItemsBatch(itemRequestData, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId, - machineId: machineId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "fe6f827b-5f64-480f-b8af-1eca3b80e833", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, itemRequestData, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); resolve(ret); } catch (err) { @@ -29516,30 +41365,23 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - * @param {number} machineId - * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand */ - getDeploymentMachine(project, deploymentGroupId, machineId, expand) { + getItemsBatchZip(itemRequestData, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId, - machineId: machineId - }; - let queryValues = { - '$expand': expand, + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "fe6f827b-5f64-480f-b8af-1eca3b80e833", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -29548,31 +41390,42 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - * @param {string[]} tags - * @param {string} name - * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. */ - getDeploymentMachines(project, deploymentGroupId, tags, name, expand) { + getItem(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId + project: project }; let queryValues = { - tags: tags && tags.join(","), - name: name, - '$expand': expand, + path: path, + fileName: fileName, + download: download, + scopePath: scopePath, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, false); resolve(ret); } catch (err) { @@ -29582,27 +41435,41 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.DeploymentMachine} machine + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - * @param {number} machineId + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. */ - replaceDeploymentMachine(machine, project, deploymentGroupId, machineId) { + getItemContent(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId, - machineId: machineId + project: project + }; + let queryValues = { + path: path, + fileName: fileName, + download: download, + scopePath: scopePath, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, machine, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -29611,26 +41478,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.DeploymentMachine} machine + * Get a list of Tfvc items + * * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - * @param {number} machineId + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {boolean} includeLinks - True to include links. + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor */ - updateDeploymentMachine(machine, project, deploymentGroupId, machineId) { + getItems(project, scopePath, recursionLevel, includeLinks, versionDescriptor) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId, - machineId: machineId + project: project + }; + let queryValues = { + scopePath: scopePath, + recursionLevel: recursionLevel, + includeLinks: includeLinks, + versionDescriptor: versionDescriptor, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, machine, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); resolve(ret); } catch (err) { @@ -29640,25 +41514,41 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.DeploymentMachine[]} machines + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. */ - updateDeploymentMachines(machines, project, deploymentGroupId) { + getItemText(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - deploymentGroupId: deploymentGroupId + project: project + }; + let queryValues = { + path: path, + fileName: fileName, + download: download, + scopePath: scopePath, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, machines, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -29667,23 +41557,41 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition - * @param {number} poolId + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. */ - createAgentPoolMaintenanceDefinition(definition, poolId) { + getItemZip(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project + }; + let queryValues = { + path: path, + fileName: fileName, + download: download, + scopePath: scopePath, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, definition, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -29692,23 +41600,29 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} definitionId + * Get items under a label. + * + * @param {string} labelId - Unique identifier of label + * @param {number} top - Max number of items to return + * @param {number} skip - Number of items to skip */ - deleteAgentPoolMaintenanceDefinition(poolId, definitionId) { + getLabelItems(labelId, top, skip) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - definitionId: definitionId + labelId: labelId + }; + let queryValues = { + '$top': top, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "06166e34-de17-4b60-8cd1-23182a346fda", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); resolve(ret); } catch (err) { @@ -29718,23 +41632,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} definitionId + * Get a single deep label. + * + * @param {string} labelId - Unique identifier of label + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount + * @param {string} project - Project ID or project name */ - getAgentPoolMaintenanceDefinition(poolId, definitionId) { + getLabel(labelId, requestData, project) { return __awaiter(this, void 0, void 0, function* () { + if (requestData == null) { + throw new TypeError('requestData can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - definitionId: definitionId + project: project, + labelId: labelId + }; + let queryValues = { + requestData: requestData, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a5d9bd7f-b661-4d0e-b9be-d9c16affae54", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcLabel, false); resolve(ret); } catch (err) { @@ -29744,21 +41667,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId + * Get a collection of shallow label references. + * + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter + * @param {string} project - Project ID or project name + * @param {number} top - Max number of labels to return, defaults to 100 when undefined + * @param {number} skip - Number of labels to skip */ - getAgentPoolMaintenanceDefinitions(poolId) { + getLabels(requestData, project, top, skip) { return __awaiter(this, void 0, void 0, function* () { + if (requestData == null) { + throw new TypeError('requestData can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project + }; + let queryValues = { + requestData: requestData, + '$top': top, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a5d9bd7f-b661-4d0e-b9be-d9c16affae54", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, true); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcLabelRef, true); resolve(ret); } catch (err) { @@ -29768,24 +41704,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition - * @param {number} poolId - * @param {number} definitionId + * Get changes included in a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {number} top - Max number of changes to return + * @param {number} skip - Number of changes to skip */ - updateAgentPoolMaintenanceDefinition(definition, poolId, definitionId) { + getShelvesetChanges(shelvesetId, top, skip) { return __awaiter(this, void 0, void 0, function* () { + if (shelvesetId == null) { + throw new TypeError('shelvesetId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId, - definitionId: definitionId + let routeValues = {}; + let queryValues = { + shelvesetId: shelvesetId, + '$top': top, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "dbaf075b-0445-4c34-9e5b-82292f856522", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, definition, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChange, true); resolve(ret); } catch (err) { @@ -29795,23 +41738,29 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} jobId + * Get a single deep shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength */ - deleteAgentPoolMaintenanceJob(poolId, jobId) { + getShelveset(shelvesetId, requestData) { return __awaiter(this, void 0, void 0, function* () { + if (shelvesetId == null) { + throw new TypeError('shelvesetId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId, - jobId: jobId + let routeValues = {}; + let queryValues = { + shelvesetId: shelvesetId, + requestData: requestData, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e36d44fb-e907-4b0a-b194-f83f1ed32ad3", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcShelveset, false); resolve(ret); } catch (err) { @@ -29821,23 +41770,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} jobId + * Return a collection of shallow shelveset references. + * + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength + * @param {number} top - Max number of shelvesets to return + * @param {number} skip - Number of shelvesets to skip */ - getAgentPoolMaintenanceJob(poolId, jobId) { + getShelvesets(requestData, top, skip) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId, - jobId: jobId + let routeValues = {}; + let queryValues = { + requestData: requestData, + '$top': top, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e36d44fb-e907-4b0a-b194-f83f1ed32ad3", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcShelvesetRef, true); resolve(ret); } catch (err) { @@ -29847,22 +41801,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} jobId + * Get work items associated with a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID */ - getAgentPoolMaintenanceJobLogs(poolId, jobId) { + getShelvesetWorkItems(shelvesetId) { return __awaiter(this, void 0, void 0, function* () { + if (shelvesetId == null) { + throw new TypeError('shelvesetId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId, - jobId: jobId + let routeValues = {}; + let queryValues = { + shelvesetId: shelvesetId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a7a0c1c1-373e-425a-b031-a519474d743d", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); } catch (err) { reject(err); @@ -29871,25 +41831,27 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} definitionId + * Provides File Count and Uncompressed Bytes for a Collection/Project at a particular scope for TFVC. + * + * @param {string} project - Project ID or project name + * @param {string} scopePath - '$/' for collection, '$/project' for specific project */ - getAgentPoolMaintenanceJobs(poolId, definitionId) { + getTfvcStatistics(project, scopePath) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project }; let queryValues = { - definitionId: definitionId, + scopePath: scopePath, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e15c74c0-3605-40e0-aed4-4cc61e549ed8", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -29898,24 +41860,459 @@ class TaskAgentApiBase extends basem.ClientApiBase { })); }); } +} +TfvcApi.RESOURCE_AREA_ID = "8aa40520-446d-40e6-89f6-9c9f9ce44c48"; +exports.TfvcApi = TfvcApi; + + +/***/ }), + +/***/ 29686: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +//******************************************************************************************************* +// significant portions of this file copied from: VSO\src\Vssf\WebPlatform\Platform\Scripts\VSS\WebApi\RestClient.ts +//******************************************************************************************************* +Object.defineProperty(exports, "__esModule", ({ value: true })); +/// Imports of 3rd Party /// +const url = __nccwpck_require__(57310); +const path = __nccwpck_require__(71017); +class InvalidApiResourceVersionError { + constructor(message) { + this.name = "Invalid resource version"; + this.message = message; + } +} +exports.InvalidApiResourceVersionError = InvalidApiResourceVersionError; +/** + * Base class that should be used (derived from) to make requests to VSS REST apis + */ +class VsoClient { + constructor(baseUrl, restClient) { + this.baseUrl = baseUrl; + this.basePath = url.parse(baseUrl).pathname; + this.restClient = restClient; + this._locationsByAreaPromises = {}; + this._initializationPromise = Promise.resolve(true); + } + autoNegotiateApiVersion(location, requestedVersion) { + let negotiatedVersion; + let apiVersion; + let apiVersionString; + if (requestedVersion) { + let apiVersionRegEx = new RegExp('(\\d+(\\.\\d+)?)(-preview(\\.(\\d+))?)?'); + // Need to handle 3 types of api versions + invalid apiversion + // '2.1-preview.1' = ["2.1-preview.1", "2.1", ".1", -preview.1", ".1", "1"] + // '2.1-preview' = ["2.1-preview", "2.1", ".1", "-preview", undefined, undefined] + // '2.1' = ["2.1", "2.1", ".1", undefined, undefined, undefined] + let isPreview = false; + let resourceVersion; + let regExExecArray = apiVersionRegEx.exec(requestedVersion); + if (regExExecArray) { + if (regExExecArray[1]) { + // we have an api version + apiVersion = +regExExecArray[1]; + apiVersionString = regExExecArray[1]; + if (regExExecArray[3]) { + // requesting preview + isPreview = true; + if (regExExecArray[5]) { + // we have a resource version + resourceVersion = +regExExecArray[5]; + } + } + // compare the location version and requestedversion + if (apiVersion <= +location.releasedVersion + || (!resourceVersion && apiVersion <= +location.maxVersion && isPreview) + || (resourceVersion && apiVersion <= +location.maxVersion && resourceVersion <= +location.resourceVersion)) { + negotiatedVersion = requestedVersion; + } + // else fall back to latest version of the resource from location + } + } + } + if (!negotiatedVersion) { + // Use the latest version of the resource if the api version was not specified in the request or if the requested version is higher then the location's supported version + if (apiVersion < +location.maxVersion) { + negotiatedVersion = apiVersionString + "-preview"; + } + else if (location.maxVersion === location.releasedVersion) { + negotiatedVersion = location.maxVersion; + } + else { + negotiatedVersion = location.maxVersion + "-preview." + location.resourceVersion; + } + } + return negotiatedVersion; + } /** - * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job - * @param {number} poolId + * Gets the route template for a resource based on its location ID and negotiates the api version */ - queueAgentPoolMaintenanceJob(job, poolId) { + getVersioningData(apiVersion, area, locationId, routeValues, queryParams) { + let requestUrl; + return this.beginGetLocation(area, locationId) + .then((location) => { + if (!location) { + throw new Error("Failed to find api location for area: " + area + " id: " + locationId); + } + apiVersion = this.autoNegotiateApiVersion(location, apiVersion); + requestUrl = this.getRequestUrl(location.routeTemplate, location.area, location.resourceName, routeValues, queryParams); + return { + apiVersion: apiVersion, + requestUrl: requestUrl + }; + }); + } + /** + * Sets a promise that is waited on before any requests are issued. Can be used to asynchronously + * set the request url and auth token manager. + */ + _setInitializationPromise(promise) { + if (promise) { + this._initializationPromise = promise; + } + } + /** + * Gets information about an API resource location (route template, supported versions, etc.) + * + * @param area resource area name + * @param locationId Guid of the location to get + */ + beginGetLocation(area, locationId) { + return this._initializationPromise.then(() => { + return this.beginGetAreaLocations(area); + }).then((areaLocations) => { + return areaLocations[(locationId || "").toLowerCase()]; + }); + } + beginGetAreaLocations(area) { + let areaLocationsPromise = this._locationsByAreaPromises[area]; + if (!areaLocationsPromise) { + let requestUrl = this.resolveUrl(VsoClient.APIS_RELATIVE_PATH + "/" + area); + areaLocationsPromise = this.restClient.options(requestUrl) + .then((res) => { + let locationsLookup = {}; + let resourceLocations = res.result.value; + let i; + for (i = 0; i < resourceLocations.length; i++) { + let resourceLocation = resourceLocations[i]; + locationsLookup[resourceLocation.id.toLowerCase()] = resourceLocation; + } + // If we have completed successfully, cache the response. + this._locationsByAreaPromises[area] = areaLocationsPromise; + return locationsLookup; + }); + } + return areaLocationsPromise; + } + resolveUrl(relativeUrl) { + return url.resolve(this.baseUrl, path.join(this.basePath, relativeUrl)); + } + queryParamsToStringHelper(queryParams, prefix) { + if (queryParams == null || queryParams.length === 0) { + return ''; + } + let queryString = ''; + if (typeof (queryParams) !== 'string') { + for (let property in queryParams) { + if (queryParams.hasOwnProperty(property)) { + const prop = queryParams[property]; + const newPrefix = prefix + encodeURIComponent(property.toString()) + '.'; + queryString += this.queryParamsToStringHelper(prop, newPrefix); + } + } + } + if (queryString === '' && prefix.length > 0) { + // Date.prototype.toString() returns a string that is not valid for the REST API. + // Need to specially call `toUTCString()` instead for such cases + const queryValue = typeof queryParams === 'object' && 'toUTCString' in queryParams ? queryParams.toUTCString() : queryParams.toString(); + // Will always need to chop period off of end of prefix + queryString = prefix.slice(0, -1) + '=' + encodeURIComponent(queryValue) + '&'; + } + return queryString; + } + queryParamsToString(queryParams) { + const queryString = '?' + this.queryParamsToStringHelper(queryParams, ''); + // Will always need to slice either a ? or & off of the end + return queryString.slice(0, -1); + } + getRequestUrl(routeTemplate, area, resource, routeValues, queryParams) { + // Add area/resource route values (based on the location) + routeValues = routeValues || {}; + if (!routeValues.area) { + routeValues.area = area; + } + if (!routeValues.resource) { + routeValues.resource = resource; + } + // Replace templated route values + let relativeUrl = this.replaceRouteValues(routeTemplate, routeValues); + // Append query parameters to the end + if (queryParams) { + relativeUrl += this.queryParamsToString(queryParams); + } + // Resolve the relative url with the base + return url.resolve(this.baseUrl, path.join(this.basePath, relativeUrl)); + } + // helper method copied directly from VSS\WebAPI\restclient.ts + replaceRouteValues(routeTemplate, routeValues) { + let result = "", currentPathPart = "", paramName = "", insideParam = false, charIndex, routeTemplateLength = routeTemplate.length, c; + for (charIndex = 0; charIndex < routeTemplateLength; charIndex++) { + c = routeTemplate[charIndex]; + if (insideParam) { + if (c == "}") { + insideParam = false; + if (routeValues[paramName]) { + currentPathPart += encodeURIComponent(routeValues[paramName]); + } + else { + // Normalize param name in order to capture wild-card routes + let strippedParamName = paramName.replace(/[^a-z0-9]/ig, ''); + if (routeValues[strippedParamName]) { + currentPathPart += encodeURIComponent(routeValues[strippedParamName]); + } + } + paramName = ""; + } + else { + paramName += c; + } + } + else { + if (c == "/") { + if (currentPathPart) { + if (result) { + result += "/"; + } + result += currentPathPart; + currentPathPart = ""; + } + } + else if (c == "{") { + if ((charIndex + 1) < routeTemplateLength && routeTemplate[charIndex + 1] == "{") { + // Escaped '{' + currentPathPart += c; + charIndex++; + } + else { + insideParam = true; + } + } + else if (c == '}') { + currentPathPart += c; + if ((charIndex + 1) < routeTemplateLength && routeTemplate[charIndex + 1] == "}") { + // Escaped '}' + charIndex++; + } + } + else { + currentPathPart += c; + } + } + } + if (currentPathPart) { + if (result) { + result += "/"; + } + result += currentPathPart; + } + return result; + } +} +VsoClient.APIS_RELATIVE_PATH = "_apis"; +VsoClient.PREVIEW_INDICATOR = "-preview."; +exports.VsoClient = VsoClient; + + +/***/ }), + +/***/ 67967: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const buildm = __nccwpck_require__(29893); +const corem = __nccwpck_require__(54020); +const dashboardm = __nccwpck_require__(17539); +const extmgmtm = __nccwpck_require__(94605); +const featuremgmtm = __nccwpck_require__(33193); +const filecontainerm = __nccwpck_require__(87558); +const gallerym = __nccwpck_require__(81939); +const gitm = __nccwpck_require__(64996); +const locationsm = __nccwpck_require__(44771); +const notificationm = __nccwpck_require__(18221); +const policym = __nccwpck_require__(40266); +const profilem = __nccwpck_require__(98101); +const projectm = __nccwpck_require__(21682); +const releasem = __nccwpck_require__(63075); +const securityrolesm = __nccwpck_require__(10806); +const taskagentm = __nccwpck_require__(55899); +const taskm = __nccwpck_require__(72354); +const testm = __nccwpck_require__(45742); +const testresultsm = __nccwpck_require__(61819); +const tfvcm = __nccwpck_require__(75417); +const wikim = __nccwpck_require__(36391); +const workm = __nccwpck_require__(28186); +const workitemtrackingm = __nccwpck_require__(88409); +const workitemtrackingprocessm = __nccwpck_require__(21178); +const workitemtrackingprocessdefinitionm = __nccwpck_require__(53333); +const basicm = __nccwpck_require__(26456); +const bearm = __nccwpck_require__(91141); +const ntlmm = __nccwpck_require__(33450); +const patm = __nccwpck_require__(266); +const rm = __nccwpck_require__(87405); +const vsom = __nccwpck_require__(29686); +const crypto = __nccwpck_require__(6113); +const fs = __nccwpck_require__(57147); +const os = __nccwpck_require__(22037); +const url = __nccwpck_require__(57310); +const path = __nccwpck_require__(71017); +const isBrowser = typeof window !== 'undefined'; +/** + * Methods to return handler objects (see handlers folder) + */ +function getBasicHandler(username, password, allowCrossOriginAuthentication) { + return new basicm.BasicCredentialHandler(username, password, allowCrossOriginAuthentication); +} +exports.getBasicHandler = getBasicHandler; +function getNtlmHandler(username, password, workstation, domain) { + return new ntlmm.NtlmCredentialHandler(username, password, workstation, domain); +} +exports.getNtlmHandler = getNtlmHandler; +function getBearerHandler(token, allowCrossOriginAuthentication) { + return new bearm.BearerCredentialHandler(token, allowCrossOriginAuthentication); +} +exports.getBearerHandler = getBearerHandler; +function getPersonalAccessTokenHandler(token, allowCrossOriginAuthentication) { + return new patm.PersonalAccessTokenCredentialHandler(token, allowCrossOriginAuthentication); +} +exports.getPersonalAccessTokenHandler = getPersonalAccessTokenHandler; +function getHandlerFromToken(token, allowCrossOriginAuthentication) { + if (token.length === 52) { + return getPersonalAccessTokenHandler(token, allowCrossOriginAuthentication); + } + else { + return getBearerHandler(token, allowCrossOriginAuthentication); + } +} +exports.getHandlerFromToken = getHandlerFromToken; +; +// --------------------------------------------------------------------------- +// Factory to return client apis +// When new APIs are added, a method must be added here to instantiate the API +//---------------------------------------------------------------------------- +class WebApi { + /* + * Factory to return client apis and handlers + * @param defaultUrl default server url to use when creating new apis from factory methods + * @param authHandler default authentication credentials to use when creating new apis from factory methods + */ + constructor(defaultUrl, authHandler, options, requestSettings) { + /** + * Determines if the domain is exluded for proxy via the no_proxy env var + * @param url: the server url + */ + this.isNoProxyHost = function (_url) { + if (!process.env.no_proxy) { + return false; + } + const noProxyDomains = (process.env.no_proxy || '') + .split(',') + .map(v => v.toLowerCase()); + const serverUrl = url.parse(_url).host.toLowerCase(); + // return true if the no_proxy includes the host + return noProxyDomains.indexOf(serverUrl) !== -1; + }; + this.serverUrl = defaultUrl; + this.authHandler = authHandler; + this.options = options || {}; + if (!this.isNoProxyHost(this.serverUrl)) { + // try to get proxy setting from environment variable set by VSTS-Task-Lib if there is no proxy setting in the options + if (!this.options.proxy || !this.options.proxy.proxyUrl) { + if (global['_vsts_task_lib_proxy']) { + let proxyFromEnv = { + proxyUrl: global['_vsts_task_lib_proxy_url'], + proxyUsername: global['_vsts_task_lib_proxy_username'], + proxyPassword: this._readTaskLibSecrets(global['_vsts_task_lib_proxy_password']), + proxyBypassHosts: JSON.parse(global['_vsts_task_lib_proxy_bypass'] || "[]"), + }; + this.options.proxy = proxyFromEnv; + } + } + } + // try get cert setting from environment variable set by VSTS-Task-Lib if there is no cert setting in the options + if (!this.options.cert) { + if (global['_vsts_task_lib_cert']) { + let certFromEnv = { + caFile: global['_vsts_task_lib_cert_ca'], + certFile: global['_vsts_task_lib_cert_clientcert'], + keyFile: global['_vsts_task_lib_cert_key'], + passphrase: this._readTaskLibSecrets(global['_vsts_task_lib_cert_passphrase']), + }; + this.options.cert = certFromEnv; + } + } + // try get ignore SSL error setting from environment variable set by VSTS-Task-Lib if there is no ignore SSL error setting in the options + if (!this.options.ignoreSslError) { + this.options.ignoreSslError = !!global['_vsts_task_lib_skip_cert_validation']; + } + let userAgent; + const nodeApiName = 'azure-devops-node-api'; + if (isBrowser) { + if (requestSettings) { + userAgent = `${requestSettings.productName}/${requestSettings.productVersion} (${nodeApiName}; ${window.navigator.userAgent})`; + } + else { + userAgent = `${nodeApiName} (${window.navigator.userAgent})`; + } + } + else { + let nodeApiVersion = 'unknown'; + const packageJsonPath = __nccwpck_require__.ab + "package.json"; + if (fs.existsSync(__nccwpck_require__.ab + "package.json")) { + nodeApiVersion = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')).version; + } + const osName = os.platform(); + const osVersion = os.release(); + if (requestSettings) { + userAgent = `${requestSettings.productName}/${requestSettings.productVersion} (${nodeApiName} ${nodeApiVersion}; ${osName} ${osVersion})`; + } + else { + userAgent = `${nodeApiName}/${nodeApiVersion} (${osName} ${osVersion})`; + } + } + this.rest = new rm.RestClient(userAgent, null, [this.authHandler], this.options); + this.vsoClient = new vsom.VsoClient(defaultUrl, this.rest); + } + /** + * Convenience factory to create with a bearer token. + * @param defaultServerUrl default server url to use when creating new apis from factory methods + * @param defaultAuthHandler default authentication credentials to use when creating new apis from factory methods + */ + static createWithBearerToken(defaultUrl, token, options) { + let bearerHandler = getBearerHandler(token); + return new this(defaultUrl, bearerHandler, options); + } + connect() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, job, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); - resolve(ret); + res = yield this.rest.get(this.vsoClient.resolveUrl('/_apis/connectionData')); + resolve(res.result); } catch (err) { reject(err); @@ -29923,122 +42320,324 @@ class TaskAgentApiBase extends basem.ClientApiBase { })); }); } - /** - * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job - * @param {number} poolId - * @param {number} jobId - */ - updateAgentPoolMaintenanceJob(job, poolId, jobId) { + /** + * Each factory method can take a serverUrl and a list of handlers + * if these aren't provided, the default url and auth handler given to the constructor for this class will be used + */ + getBuildApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, buildm.BuildApi.RESOURCE_AREA_ID); + handlers = handlers || [this.authHandler]; + return new buildm.BuildApi(serverUrl, handlers, this.options); + }); + } + getCoreApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "79134c72-4a58-4b42-976c-04e7115f32bf"); + handlers = handlers || [this.authHandler]; + return new corem.CoreApi(serverUrl, handlers, this.options); + }); + } + getDashboardApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "31c84e0a-3ece-48fd-a29d-100849af99ba"); + handlers = handlers || [this.authHandler]; + return new dashboardm.DashboardApi(serverUrl, handlers, this.options); + }); + } + getExtensionManagementApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "6c2b0933-3600-42ae-bf8b-93d4f7e83594"); + handlers = handlers || [this.authHandler]; + return new extmgmtm.ExtensionManagementApi(serverUrl, handlers, this.options); + }); + } + getFeatureManagementApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new featuremgmtm.FeatureManagementApi(serverUrl, handlers, this.options); + }); + } + getFileContainerApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new filecontainerm.FileContainerApi(serverUrl, handlers, this.options); + }); + } + getGalleryApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, gallerym.GalleryApi.RESOURCE_AREA_ID); + handlers = handlers || [this.authHandler]; + return new gallerym.GalleryApi(serverUrl, handlers, this.options); + }); + } + getGitApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, gitm.GitApi.RESOURCE_AREA_ID); + handlers = handlers || [this.authHandler]; + return new gitm.GitApi(serverUrl, handlers, this.options); + }); + } + // TODO: Don't call resource area here? Will cause infinite loop? + getLocationsApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + let optionsClone = Object.assign({}, this.options); + optionsClone.allowRetries = true; + optionsClone.maxRetries = 5; + serverUrl = (yield serverUrl) || this.serverUrl; + handlers = handlers || [this.authHandler]; + return new locationsm.LocationsApi(serverUrl, handlers, optionsClone); + }); + } + getNotificationApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new notificationm.NotificationApi(serverUrl, handlers, this.options); + }); + } + getPolicyApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "fb13a388-40dd-4a04-b530-013a739c72ef"); + handlers = handlers || [this.authHandler]; + return new policym.PolicyApi(serverUrl, handlers, this.options); + }); + } + getProfileApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "8ccfef3d-2b87-4e99-8ccb-66e343d2daa8"); + handlers = handlers || [this.authHandler]; + return new profilem.ProfileApi(serverUrl, handlers, this.options); + }); + } + getProjectAnalysisApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "7658fa33-b1bf-4580-990f-fac5896773d3"); + handlers = handlers || [this.authHandler]; + return new projectm.ProjectAnalysisApi(serverUrl, handlers, this.options); + }); + } + getSecurityRolesApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new securityrolesm.SecurityRolesApi(serverUrl, handlers, this.options); + }); + } + getReleaseApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "efc2f575-36ef-48e9-b672-0c6fb4a48ac5"); + handlers = handlers || [this.authHandler]; + return new releasem.ReleaseApi(serverUrl, handlers, this.options); + }); + } + getTaskApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new taskm.TaskApi(serverUrl, handlers, this.options); + }); + } + getTaskAgentApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd"); + handlers = handlers || [this.authHandler]; + return new taskagentm.TaskAgentApi(serverUrl, handlers, this.options); + }); + } + getTestApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e"); + handlers = handlers || [this.authHandler]; + return new testm.TestApi(serverUrl, handlers, this.options); + }); + } + getTestResultsApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "c83eaf52-edf3-4034-ae11-17d38f25404c"); + handlers = handlers || [this.authHandler]; + return new testresultsm.TestResultsApi(serverUrl, handlers, this.options); + }); + } + getTfvcApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "8aa40520-446d-40e6-89f6-9c9f9ce44c48"); + handlers = handlers || [this.authHandler]; + return new tfvcm.TfvcApi(serverUrl, handlers, this.options); + }); + } + getWikiApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3"); + handlers = handlers || [this.authHandler]; + return new wikim.WikiApi(serverUrl, handlers, this.options); + }); + } + getWorkApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"); + handlers = handlers || [this.authHandler]; + return new workm.WorkApi(serverUrl, handlers, this.options); + }); + } + getWorkItemTrackingApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, workitemtrackingm.WorkItemTrackingApi.RESOURCE_AREA_ID); + handlers = handlers || [this.authHandler]; + return new workitemtrackingm.WorkItemTrackingApi(serverUrl, handlers, this.options); + }); + } + getWorkItemTrackingProcessApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "5264459e-e5e0-4bd8-b118-0985e68a4ec5"); + handlers = handlers || [this.authHandler]; + return new workitemtrackingprocessm.WorkItemTrackingProcessApi(serverUrl, handlers, this.options); + }); + } + getWorkItemTrackingProcessDefinitionApi(serverUrl, handlers) { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId, - jobId: jobId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, job, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "5264459e-e5e0-4bd8-b118-0985e68a4ec5"); + handlers = handlers || [this.authHandler]; + return new workitemtrackingprocessdefinitionm.WorkItemTrackingProcessDefinitionsApi(serverUrl, handlers, this.options); }); } - /** - * @param {number} poolId - * @param {number} messageId - * @param {string} sessionId - */ - deleteMessage(poolId, messageId, sessionId) { + _getResourceAreaUrl(serverUrl, resourceId) { return __awaiter(this, void 0, void 0, function* () { - if (sessionId == null) { - throw new TypeError('sessionId can not be null or undefined'); + if (!resourceId) { + return serverUrl; } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId, - messageId: messageId - }; - let queryValues = { - sessionId: sessionId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); + // This must be of type any, see comment just below. + const resourceAreas = yield this._getResourceAreas(); + if (resourceAreas === undefined) { + throw new Error((`Failed to retrieve resource areas ' + 'from server: ${serverUrl}`)); + } + // The response type differs based on whether or not there are resource areas. When we are on prem we get: + // {"count":0,"value":null} and when we are on VSTS we get an array of resource areas. + // Due to this strangeness the type of resourceAreas needs to be any and we need to check .count + // When going against vsts count will be undefined. On prem it will be 0 + if (!resourceAreas || resourceAreas.length === 0 || resourceAreas.count === 0) { + // For on prem environments we get an empty list + return serverUrl; + } + for (var resourceArea of resourceAreas) { + if (resourceArea.id.toLowerCase() === resourceId.toLowerCase()) { + return resourceArea.locationUrl; } - })); + } + throw new Error((`Could not find information for resource area ${resourceId} ' + 'from server: ${serverUrl}`)); }); } - /** - * @param {number} poolId - * @param {string} sessionId - * @param {number} lastMessageId - */ - getMessage(poolId, sessionId, lastMessageId) { + _getResourceAreas() { return __awaiter(this, void 0, void 0, function* () { - if (sessionId == null) { - throw new TypeError('sessionId can not be null or undefined'); + if (!this._resourceAreas) { + const locationClient = yield this.getLocationsApi(); + this._resourceAreas = yield locationClient.getResourceAreas(); } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId - }; - let queryValues = { - sessionId: sessionId, - lastMessageId: lastMessageId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); + return this._resourceAreas; }); } + _readTaskLibSecrets(lookupKey) { + if (isBrowser) { + throw new Error("Browsers can't securely keep secrets"); + } + // the lookupKey should has following format + // base64encoded:base64encoded + if (lookupKey && lookupKey.indexOf(':') > 0) { + let lookupInfo = lookupKey.split(':', 2); + // file contains encryption key + let keyFile = new Buffer(lookupInfo[0], 'base64').toString('utf8'); + let encryptKey = new Buffer(fs.readFileSync(keyFile, 'utf8'), 'base64'); + let encryptedContent = new Buffer(lookupInfo[1], 'base64').toString('utf8'); + let decipher = crypto.createDecipher("aes-256-ctr", encryptKey); + let decryptedContent = decipher.update(encryptedContent, 'hex', 'utf8'); + decryptedContent += decipher.final('utf8'); + return decryptedContent; + } + } +} +exports.WebApi = WebApi; + + +/***/ }), + +/***/ 36391: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const Comments_Contracts = __nccwpck_require__(74743); +const WikiInterfaces = __nccwpck_require__(75787); +class WikiApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Wiki-api', options); + } /** - * @param {number} poolId - * @param {number} agentId + * Uploads an attachment on a comment on a wiki page. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. */ - refreshAgent(poolId, agentId) { + createCommentAttachment(customHeaders, contentStream, project, wikiIdentifier, pageId) { return __awaiter(this, void 0, void 0, function* () { - if (agentId == null) { - throw new TypeError('agentId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId - }; - let queryValues = { - agentId: agentId, + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "5100d976-363d-42e7-a19d-4171ecb44782", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentAttachment, false); resolve(ret); } catch (err) { @@ -30048,22 +42647,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId + * Downloads an attachment on a comment on a wiki page. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {string} attachmentId - Attachment ID. */ - refreshAgents(poolId) { + getAttachmentContent(project, wikiIdentifier, pageId, attachmentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + attachmentId: attachmentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "5100d976-363d-42e7-a19d-4171ecb44782", routeValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -30072,29 +42677,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskAgentMessage} message - * @param {number} poolId - * @param {number} requestId + * Add a reaction on a wiki page comment. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name + * @param {number} pageId - Wiki page ID + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction being added */ - sendMessage(message, poolId, requestId) { + addCommentReaction(project, wikiIdentifier, pageId, commentId, type) { return __awaiter(this, void 0, void 0, function* () { - if (requestId == null) { - throw new TypeError('requestId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId - }; - let queryValues = { - requestId: requestId, + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + commentId: commentId, + type: type }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "7a5bc693-aab7-4d48-8f34-36f373022063", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, message, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentReaction, false); resolve(ret); } catch (err) { @@ -30104,25 +42711,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} packageType - * @param {string} platform - * @param {string} version + * Delete a reaction on a wiki page comment. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or name + * @param {number} pageId - Wiki page ID + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction being deleted */ - getPackage(packageType, platform, version) { + deleteCommentReaction(project, wikiIdentifier, pageId, commentId, type) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - packageType: packageType, - platform: platform, - version: version + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + commentId: commentId, + type: type }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "8ffcd551-079c-493a-9c02-54346299d144", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "7a5bc693-aab7-4d48-8f34-36f373022063", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.PackageMetadata, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentReaction, false); resolve(ret); } catch (err) { @@ -30132,27 +42745,37 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} packageType - * @param {string} platform - * @param {number} top + * Gets a list of users who have reacted for the given wiki comment with a given reaction type. Supports paging, with a default page size of 100 users at a time. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction for which the engaged users are being requested + * @param {number} top - Number of enagaged users to be returned in a given page. Optional, defaults to 100 + * @param {number} skip - Number of engaged users to be skipped to page the next set of engaged users, defaults to 0 */ - getPackages(packageType, platform, top) { + getEngagedUsers(project, wikiIdentifier, pageId, commentId, type, top, skip) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - packageType: packageType, - platform: platform + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + commentId: commentId, + type: type }; let queryValues = { '$top': top, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "8ffcd551-079c-493a-9c02-54346299d144", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "598a5268-41a7-4162-b7dc-344131e4d1fa", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.PackageMetadata, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -30162,71 +42785,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - */ - getAgentPoolMetadata(poolId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - poolId: poolId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0d62f887-9f53-48b9-9161-4c35d5735b0f", routeValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * @param {any} agentPoolMetadata - * @param {number} poolId + * Add a comment on a wiki page. + * + * @param {Comments_Contracts.CommentCreateParameters} request - Comment create request. + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. */ - setAgentPoolMetadata(customHeaders, agentPoolMetadata, poolId) { + addComment(request, project, wikiIdentifier, pageId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0d62f887-9f53-48b9-9161-4c35d5735b0f", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; - let res; - res = yield this.rest.replace(url, agentPoolMetadata, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Create an agent pool. - * - * @param {TaskAgentInterfaces.TaskAgentPool} pool - Details about the new agent pool - */ - addAgentPool(pool) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, pool, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); + res = yield this.rest.create(url, request, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); resolve(ret); } catch (err) { @@ -30236,18 +42816,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Delete an agent pool. + * Delete a comment on a wiki page. * - * @param {number} poolId - ID of the agent pool to delete + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - Comment ID. */ - deleteAgentPool(poolId) { + deleteComment(project, wikiIdentifier, pageId, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -30262,29 +42848,35 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get information about an agent pool. + * Returns a comment associated with the Wiki Page. * - * @param {number} poolId - An agent pool ID - * @param {string[]} properties - Agent pool properties (comma-separated) - * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - ID of the comment to return. + * @param {boolean} excludeDeleted - Specify if the deleted comment should be skipped. + * @param {Comments_Contracts.CommentExpandOptions} expand - Specifies the additional data retrieval options for comments. */ - getAgentPool(poolId, properties, actionFilter) { + getComment(project, wikiIdentifier, pageId, id, excludeDeleted, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + id: id }; let queryValues = { - properties: properties && properties.join(","), - actionFilter: actionFilter, + excludeDeleted: excludeDeleted, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); resolve(ret); } catch (err) { @@ -30294,62 +42886,41 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of agent pools. + * Returns a pageable list of comments. * - * @param {string} poolName - Filter by name - * @param {string[]} properties - Filter by agent pool properties (comma-separated) - * @param {TaskAgentInterfaces.TaskAgentPoolType} poolType - Filter by pool type - * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} top - Max number of comments to return. + * @param {string} continuationToken - Used to query for the next page of comments. + * @param {boolean} excludeDeleted - Specify if the deleted comments should be skipped. + * @param {Comments_Contracts.CommentExpandOptions} expand - Specifies the additional data retrieval options for comments. + * @param {Comments_Contracts.CommentSortOrder} order - Order in which the comments should be returned. + * @param {number} parentId - CommentId of the parent comment. */ - getAgentPools(poolName, properties, poolType, actionFilter) { + listComments(project, wikiIdentifier, pageId, top, continuationToken, excludeDeleted, expand, order, parentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - poolName: poolName, - properties: properties && properties.join(","), - poolType: poolType, - actionFilter: actionFilter, + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Get a list of agent pools. - * - * @param {number[]} poolIds - pool Ids to fetch - * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions - */ - getAgentPoolsByIds(poolIds, actionFilter) { - return __awaiter(this, void 0, void 0, function* () { - if (poolIds == null) { - throw new TypeError('poolIds can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; let queryValues = { - poolIds: poolIds && poolIds.join(","), - actionFilter: actionFilter, + '$top': top, + continuationToken: continuationToken, + excludeDeleted: excludeDeleted, + '$expand': expand, + order: order, + parentId: parentId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, true); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentList, false); resolve(ret); } catch (err) { @@ -30359,24 +42930,30 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update properties on an agent pool + * Update a comment on a wiki page. * - * @param {TaskAgentInterfaces.TaskAgentPool} pool - Updated agent pool details - * @param {number} poolId - The agent pool to update + * @param {Comments_Contracts.CommentUpdateParameters} comment - Comment update request. + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - Comment ID. */ - updateAgentPool(pool, poolId) { + updateComment(comment, project, wikiIdentifier, pageId, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, pool, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); + res = yield this.rest.update(url, comment, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); resolve(ret); } catch (err) { @@ -30386,29 +42963,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Create a new agent queue to connect a project to an agent pool. + * 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. * - * @param {TaskAgentInterfaces.TaskAgentQueue} queue - Details about the queue to create * @param {string} project - Project ID or project name - * @param {boolean} authorizePipelines - Automatically authorize this queue when using YAML + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} path - Wiki page path. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) */ - addAgentQueue(queue, project, authorizePipelines) { + getPageText(project, wikiIdentifier, path, recursionLevel, versionDescriptor, includeContent) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + wikiIdentifier: wikiIdentifier }; let queryValues = { - authorizePipelines: authorizePipelines, + path: path, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, queue, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -30417,24 +42999,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Create a new team project. + * 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. * * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} path - Wiki page path. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) */ - createTeamProject(project) { + getPageZip(project, wikiIdentifier, path, recursionLevel, versionDescriptor, includeContent) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + wikiIdentifier: wikiIdentifier + }; + let queryValues = { + path: path, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -30443,26 +43035,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Removes an agent queue from a project. + * Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. * - * @param {number} queueId - The agent queue to remove * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name.. + * @param {number} id - Wiki page ID. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) */ - deleteAgentQueue(queueId, project) { + getPageByIdText(project, wikiIdentifier, id, recursionLevel, includeContent) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - queueId: queueId + wikiIdentifier: wikiIdentifier, + id: id + }; + let queryValues = { + recursionLevel: recursionLevel, + includeContent: includeContent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "ceddcf75-1068-452d-8b13-2d4d76e1f970", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -30471,30 +43069,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get information about an agent queue. + * Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. * - * @param {number} queueId - The agent queue to get information about * @param {string} project - Project ID or project name - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + * @param {string} wikiIdentifier - Wiki ID or wiki name.. + * @param {number} id - Wiki page ID. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) */ - getAgentQueue(queueId, project, actionFilter) { + getPageByIdZip(project, wikiIdentifier, id, recursionLevel, includeContent) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - queueId: queueId + wikiIdentifier: wikiIdentifier, + id: id }; let queryValues = { - actionFilter: actionFilter, + recursionLevel: recursionLevel, + includeContent: includeContent, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "ceddcf75-1068-452d-8b13-2d4d76e1f970", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -30503,29 +43103,30 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of agent queues. + * Returns pageable list of Wiki Pages * + * @param {WikiInterfaces.WikiPagesBatchRequest} pagesBatchRequest - Wiki batch page request. * @param {string} project - Project ID or project name - * @param {string} queueName - Filter on the agent queue name - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. (Optional in case of ProjectWiki). */ - getAgentQueues(project, queueName, actionFilter) { + getPagesBatch(pagesBatchRequest, project, wikiIdentifier, versionDescriptor) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + wikiIdentifier: wikiIdentifier }; let queryValues = { - queueName: queueName, - actionFilter: actionFilter, + versionDescriptor: versionDescriptor, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "71323c46-2592-4398-8771-ced73dd87207", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + res = yield this.rest.create(url, pagesBatchRequest, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageDetail, true); resolve(ret); } catch (err) { @@ -30535,32 +43136,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of agent queues by their IDs + * Returns page detail corresponding to Page ID. * - * @param {number[]} queueIds - A comma-separated list of agent queue IDs to retrieve * @param {string} project - Project ID or project name - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} pageViewsForDays - last N days from the current day for which page views is to be returned. It's inclusive of current day. */ - getAgentQueuesByIds(queueIds, project, actionFilter) { + getPageData(project, wikiIdentifier, pageId, pageViewsForDays) { return __awaiter(this, void 0, void 0, function* () { - if (queueIds == null) { - throw new TypeError('queueIds can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId }; let queryValues = { - queueIds: queueIds && queueIds.join(","), - actionFilter: actionFilter, + pageViewsForDays: pageViewsForDays, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "81c4e0fe-7663-4d62-ad46-6ab78459f274", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageDetail, false); resolve(ret); } catch (err) { @@ -30570,32 +43170,39 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of agent queues by their names + * Creates a new page view stats resource or updates an existing page view stats resource. * - * @param {string[]} queueNames - A comma-separated list of agent names to retrieve * @param {string} project - Project ID or project name - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {GitInterfaces.GitVersionDescriptor} wikiVersion - Wiki version. + * @param {string} path - Wiki page path. + * @param {string} oldPath - Old page path. This is optional and required to rename path in existing page view stats. */ - getAgentQueuesByNames(queueNames, project, actionFilter) { + createOrUpdatePageViewStats(project, wikiIdentifier, wikiVersion, path, oldPath) { return __awaiter(this, void 0, void 0, function* () { - if (queueNames == null) { - throw new TypeError('queueNames can not be null or undefined'); + if (wikiVersion == null) { + throw new TypeError('wikiVersion can not be null or undefined'); + } + if (path == null) { + throw new TypeError('path can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + wikiIdentifier: wikiIdentifier }; let queryValues = { - queueNames: queueNames && queueNames.join(","), - actionFilter: actionFilter, + wikiVersion: wikiVersion, + path: path, + oldPath: oldPath, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "1087b746-5d15-41b9-bea6-14e325e7f880", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageViewStats, false); resolve(ret); } catch (err) { @@ -30605,32 +43212,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of agent queues by pool ids + * Creates the wiki resource. * - * @param {number[]} poolIds - A comma-separated list of pool ids to get the corresponding queues for + * @param {WikiInterfaces.WikiCreateParametersV2} wikiCreateParams - Parameters for the wiki creation. * @param {string} project - Project ID or project name - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions */ - getAgentQueuesForPools(poolIds, project, actionFilter) { + createWiki(wikiCreateParams, project) { return __awaiter(this, void 0, void 0, function* () { - if (poolIds == null) { - throw new TypeError('poolIds can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - poolIds: poolIds && poolIds.join(","), - actionFilter: actionFilter, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + res = yield this.rest.create(url, wikiCreateParams, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); resolve(ret); } catch (err) { @@ -30640,42 +43239,25 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} agentCloudId + * Deletes the wiki corresponding to the wiki ID or wiki name provided. + * + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} project - Project ID or project name */ - getAgentCloudRequests(agentCloudId) { + deleteWiki(wikiIdentifier, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - agentCloudId: agentCloudId + project: project, + wikiIdentifier: wikiIdentifier }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "20189bd7-5134-49c2-b8e9-f9e856eea2b2", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentCloudRequest, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - */ - getResourceLimits() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1f1f0557-c445-42a6-b4a0-0df605a3a0f8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); resolve(ret); } catch (err) { @@ -30685,26 +43267,23 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} parallelismTag - * @param {boolean} poolIsHosted - * @param {boolean} includeRunningRequests + * Gets all wikis in a project or collection. + * + * @param {string} project - Project ID or project name */ - getResourceUsage(parallelismTag, poolIsHosted, includeRunningRequests) { + getAllWikis(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - parallelismTag: parallelismTag, - poolIsHosted: poolIsHosted, - includeRunningRequests: includeRunningRequests, + let routeValues = { + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "eae1d376-a8b1-4475-9041-1dfdbe8f0143", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.ResourceUsage, false); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, true); resolve(ret); } catch (err) { @@ -30714,23 +43293,25 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Gets the wiki corresponding to the wiki ID or wiki name provided. + * + * @param {string} wikiIdentifier - Wiki ID or wiki name. * @param {string} project - Project ID or project name - * @param {string} taskGroupId */ - getTaskGroupHistory(project, taskGroupId) { + getWiki(wikiIdentifier, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - taskGroupId: taskGroupId + wikiIdentifier: wikiIdentifier }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "100cc92a-b255-47fa-9ab3-e44a2985a3ac", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroupRevision, true); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); resolve(ret); } catch (err) { @@ -30740,25 +43321,26 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Delete a secure file + * Updates the wiki corresponding to the wiki ID or wiki name provided using the update parameters. * + * @param {WikiInterfaces.WikiUpdateParameters} updateParameters - Update parameters. + * @param {string} wikiIdentifier - Wiki ID or wiki name. * @param {string} project - Project ID or project name - * @param {string} secureFileId - The unique secure file Id */ - deleteSecureFile(project, secureFileId) { + updateWiki(updateParameters, wikiIdentifier, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - secureFileId: secureFileId + wikiIdentifier: wikiIdentifier }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); resolve(ret); } catch (err) { @@ -30767,67 +43349,67 @@ class TaskAgentApiBase extends basem.ClientApiBase { })); }); } - /** - * Download a secure file by Id - * - * @param {string} project - Project ID or project name - * @param {string} secureFileId - The unique secure file Id - * @param {string} ticket - A valid download ticket - * @param {boolean} download - If download is true, the file is sent as attachement in the response body. If download is false, the response body contains the file stream. - */ - downloadSecureFile(project, secureFileId, ticket, download) { - return __awaiter(this, void 0, void 0, function* () { - if (ticket == null) { - throw new TypeError('ticket can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - secureFileId: secureFileId - }; - let queryValues = { - ticket: ticket, - download: download, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); +} +WikiApi.RESOURCE_AREA_ID = "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3"; +exports.WikiApi = WikiApi; + + +/***/ }), + +/***/ 28186: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const WorkInterfaces = __nccwpck_require__(7480); +class WorkApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Work-api', options); } /** - * Get a secure file + * Gets backlog configuration for a team * - * @param {string} project - Project ID or project name - * @param {string} secureFileId - The unique secure file Id - * @param {boolean} includeDownloadTicket - If includeDownloadTicket is true and the caller has permissions, a download ticket is included in the response. - * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getSecureFile(project, secureFileId, includeDownloadTicket, actionFilter) { + getBacklogConfigurations(teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - secureFileId: secureFileId - }; - let queryValues = { - includeDownloadTicket: includeDownloadTicket, - actionFilter: actionFilter, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "7799f497-3cb5-4f16-ad4f-5cd06012db64", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogConfiguration, false); resolve(ret); } catch (err) { @@ -30837,31 +43419,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get secure files + * Get a list of work items within a backlog level * - * @param {string} project - Project ID or project name - * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. - * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. - * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter - Filter by secure file permissions for View, Manage or Use action. Defaults to View. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} backlogId */ - getSecureFiles(project, namePattern, includeDownloadTickets, actionFilter) { + getBacklogLevelWorkItems(teamContext, backlogId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project - }; - let queryValues = { - namePattern: namePattern, - includeDownloadTickets: includeDownloadTickets, - actionFilter: actionFilter, + project: project, + team: team, + backlogId: backlogId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "7c468d96-ab1d-4294-a360-92f07e9ccd98", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -30871,34 +43454,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get secure files + * Get a backlog level * - * @param {string} project - Project ID or project name - * @param {string[]} secureFileIds - A list of secure file Ids - * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. - * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the backlog level */ - getSecureFilesByIds(project, secureFileIds, includeDownloadTickets, actionFilter) { + getBacklog(teamContext, id) { return __awaiter(this, void 0, void 0, function* () { - if (secureFileIds == null) { - throw new TypeError('secureFileIds can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project - }; - let queryValues = { - secureFileIds: secureFileIds && secureFileIds.join(","), - includeDownloadTickets: includeDownloadTickets, - actionFilter: actionFilter, + project: project, + team: team, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "a93726f9-7867-4e38-b4f2-0bfafc2f6a94", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogLevelConfiguration, false); resolve(ret); } catch (err) { @@ -30908,34 +43489,30 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get secure files + * List all backlog levels * - * @param {string} project - Project ID or project name - * @param {string[]} secureFileNames - A list of secure file Ids - * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. - * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getSecureFilesByNames(project, secureFileNames, includeDownloadTickets, actionFilter) { + getBacklogs(teamContext) { return __awaiter(this, void 0, void 0, function* () { - if (secureFileNames == null) { - throw new TypeError('secureFileNames can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project - }; - let queryValues = { - secureFileNames: secureFileNames && secureFileNames.join(","), - includeDownloadTickets: includeDownloadTickets, - actionFilter: actionFilter, + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "a93726f9-7867-4e38-b4f2-0bfafc2f6a94", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogLevelConfiguration, true); resolve(ret); } catch (err) { @@ -30945,28 +43522,38 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Query secure files using a name pattern and a condition on file properties. + * Gets a badge that displays the status of columns on the board. * - * @param {string} condition - The main condition syntax is described [here](https://go.microsoft.com/fwlink/?linkid=842996). Use the *property('property-name')* function to access the value of the specified property of a secure file. It returns null if the property is not set. E.g. ``` and( eq( property('devices'), '2' ), in( property('provisioning profile type'), 'ad hoc', 'development' ) ) ``` - * @param {string} project - Project ID or project name - * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the board. + * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. + * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. */ - querySecureFilesByProperties(condition, project, namePattern) { + getBoardBadge(teamContext, id, columnOptions, columns) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project + project: project, + team: team, + id: id }; let queryValues = { - namePattern: namePattern, + columnOptions: columnOptions, + columns: columns && columns.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0120b002-ab6c-4ca0-98cf-a8d7492f865c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, condition, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -30976,26 +43563,38 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update the name or properties of an existing secure file + * Gets a badge that displays the status of columns on the board. * - * @param {TaskAgentInterfaces.SecureFile} secureFile - The secure file with updated name and/or properties - * @param {string} project - Project ID or project name - * @param {string} secureFileId - The unique secure file Id + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the board. + * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. + * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. */ - updateSecureFile(secureFile, project, secureFileId) { + getBoardBadgeData(teamContext, id, columnOptions, columns) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - secureFileId: secureFileId + team: team, + id: id + }; + let queryValues = { + columnOptions: columnOptions, + columns: columns && columns.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0120b002-ab6c-4ca0-98cf-a8d7492f865c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, secureFile, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31005,24 +43604,23 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update properties and/or names of a set of secure files. Files are identified by their IDs. Properties provided override the existing one entirely, i.e. do not merge. + * Get available board columns in a project * - * @param {TaskAgentInterfaces.SecureFile[]} secureFiles - A list of secure file objects. Only three field must be populated Id, Name, and Properties. The rest of fields in the object are ignored. * @param {string} project - Project ID or project name */ - updateSecureFiles(secureFiles, project) { + getColumnSuggestedValues(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "eb7ec5a3-1ba3-4fd1-b834-49a5a387e57d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, secureFiles, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -31032,36 +43630,42 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Upload a secure file, include the file stream in the request body + * Returns the list of parent field filter model for the given list of workitem ids * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} project - Project ID or project name - * @param {string} name - Name of the file to upload - * @param {boolean} authorizePipelines - If authorizePipelines is true, then the secure file is authorized for use by all pipelines in the project. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} childBacklogContextCategoryRefName + * @param {number[]} workitemIds */ - uploadSecureFile(customHeaders, contentStream, project, name, authorizePipelines) { + getBoardMappingParentItems(teamContext, childBacklogContextCategoryRefName, workitemIds) { return __awaiter(this, void 0, void 0, function* () { - if (name == null) { - throw new TypeError('name can not be null or undefined'); + if (childBacklogContextCategoryRefName == null) { + throw new TypeError('childBacklogContextCategoryRefName can not be null or undefined'); + } + if (workitemIds == null) { + throw new TypeError('workitemIds can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project + project: project, + team: team }; let queryValues = { - name: name, - authorizePipelines: authorizePipelines, + childBacklogContextCategoryRefName: childBacklogContextCategoryRefName, + workitemIds: workitemIds && workitemIds.join(","), }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "186abea3-5c35-432f-9e28-7a15b4312a0e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("POST", url, contentStream, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -31071,22 +43675,23 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskAgentSession} session - * @param {number} poolId + * Get available board rows in a project + * + * @param {string} project - Project ID or project name */ - createAgentSession(session, poolId) { + getRowSuggestedValues(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "134e239e-2df3-4794-a6f6-24f1f19ec8dc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, session, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentSession, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -31096,23 +43701,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {string} sessionId + * Get board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - identifier for board, either board's backlog level name (Eg:"Stories") or Id */ - deleteAgentSession(poolId, sessionId) { + getBoard(teamContext, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - poolId: poolId, - sessionId: sessionId + project: project, + team: team, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "134e239e-2df3-4794-a6f6-24f1f19ec8dc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Board, false); resolve(ret); } catch (err) { @@ -31122,26 +43736,30 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Register a deployment target to a deployment group. Generally this is called by agent configuration tool. + * Get boards * - * @param {TaskAgentInterfaces.DeploymentMachine} machine - Deployment target to register. - * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group to which the deployment target is registered. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - addDeploymentTarget(machine, project, deploymentGroupId) { + getBoards(teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - deploymentGroupId: deploymentGroupId + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, machine, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -31151,27 +43769,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too. + * Update board options * - * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is deleted. - * @param {number} targetId - ID of the deployment target to delete. + * @param {{ [key: string] : string; }} options - options to updated + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - identifier for board, either category plural name (Eg:"Stories") or guid */ - deleteDeploymentTarget(project, deploymentGroupId, targetId) { + setBoardOptions(options, teamContext, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - deploymentGroupId: deploymentGroupId, - targetId: targetId + team: team, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.replace(url, options, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -31181,31 +43805,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a deployment target by its ID in a deployment group + * Get board user settings for a board id * - * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group to which deployment target belongs. - * @param {number} targetId - ID of the deployment target to return. - * @param {TaskAgentInterfaces.DeploymentTargetExpands} expand - Include these additional details in the returned objects. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Board ID or Name */ - getDeploymentTarget(project, deploymentGroupId, targetId, expand) { + getBoardUserSettings(teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - deploymentGroupId: deploymentGroupId, - targetId: targetId - }; - let queryValues = { - '$expand': expand, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "b30d9f58-1891-4b0a-b168-c46408f919b0", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31215,47 +43840,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a list of deployment targets in a deployment group. + * Update board user settings for the board id * - * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group. - * @param {string[]} tags - Get only the deployment targets that contain all these comma separted list of tags. - * @param {string} name - Name pattern of the deployment targets to return. - * @param {boolean} partialNameMatch - When set to true, treats **name** as pattern. Else treats it as absolute match. Default is **false**. - * @param {TaskAgentInterfaces.DeploymentTargetExpands} expand - Include these additional details in the returned objects. - * @param {TaskAgentInterfaces.TaskAgentStatusFilter} agentStatus - Get only deployment targets that have this status. - * @param {TaskAgentInterfaces.TaskAgentJobResultFilter} agentJobResult - Get only deployment targets that have this last job result. - * @param {string} continuationToken - Get deployment targets with names greater than this continuationToken lexicographically. - * @param {number} top - Maximum number of deployment targets to return. Default is **1000**. - * @param {boolean} enabled - Get only deployment targets that are enabled or disabled. Default is 'null' which returns all the targets. - * @param {string[]} propertyFilters + * @param {{ [key: string] : string; }} boardUserSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board */ - getDeploymentTargets(project, deploymentGroupId, tags, name, partialNameMatch, expand, agentStatus, agentJobResult, continuationToken, top, enabled, propertyFilters) { + updateBoardUserSettings(boardUserSettings, teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - deploymentGroupId: deploymentGroupId - }; - let queryValues = { - tags: tags && tags.join(","), - name: name, - partialNameMatch: partialNameMatch, - '$expand': expand, - agentStatus: agentStatus, - agentJobResult: agentJobResult, - continuationToken: continuationToken, - '$top': top, - enabled: enabled, - propertyFilters: propertyFilters && propertyFilters.join(","), + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "b30d9f58-1891-4b0a-b168-c46408f919b0", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + res = yield this.rest.update(url, boardUserSettings, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31265,28 +43876,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Replace a deployment target in a deployment group. Generally this is called by agent configuration tool. + * Get a team's capacity including total capacity and days off * - * @param {TaskAgentInterfaces.DeploymentMachine} machine - New deployment target. - * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is replaced. - * @param {number} targetId - ID of the deployment target to replace. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration */ - replaceDeploymentTarget(machine, project, deploymentGroupId, targetId) { + getCapacitiesWithIdentityRefAndTotals(teamContext, iterationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - deploymentGroupId: deploymentGroupId, - targetId: targetId + team: team, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, machine, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamCapacity, false); resolve(ret); } catch (err) { @@ -31296,28 +43911,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update a deployment target and its agent properties in a deployment group. Generally this is called by agent configuration tool. + * Get a team member's capacity * - * @param {TaskAgentInterfaces.DeploymentMachine} machine - Deployment target to update. - * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is updated. - * @param {number} targetId - ID of the deployment target to update. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + * @param {string} teamMemberId - ID of the team member */ - updateDeploymentTarget(machine, project, deploymentGroupId, targetId) { + getCapacityWithIdentityRef(teamContext, iterationId, teamMemberId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - deploymentGroupId: deploymentGroupId, - targetId: targetId + team: team, + iterationId: iterationId, + teamMemberId: teamMemberId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, machine, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, false); resolve(ret); } catch (err) { @@ -31327,26 +43948,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update tags of a list of deployment targets in a deployment group. + * Replace a team's capacity * - * @param {TaskAgentInterfaces.DeploymentTargetUpdateParameter[]} machines - Deployment targets with tags to udpdate. - * @param {string} project - Project ID or project name - * @param {number} deploymentGroupId - ID of the deployment group in which deployment targets are updated. + * @param {WorkInterfaces.TeamMemberCapacityIdentityRef[]} capacities - Team capacity to replace + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration */ - updateDeploymentTargets(machines, project, deploymentGroupId) { + replaceCapacitiesWithIdentityRef(capacities, teamContext, iterationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - deploymentGroupId: deploymentGroupId + team: team, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, machines, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + res = yield this.rest.replace(url, capacities, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, true); resolve(ret); } catch (err) { @@ -31356,24 +43984,35 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Create a task group. + * Update a team member's capacity * - * @param {TaskAgentInterfaces.TaskGroupCreateParameter} taskGroup - Task group object to create. - * @param {string} project - Project ID or project name + * @param {WorkInterfaces.CapacityPatch} patch - Updated capacity + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + * @param {string} teamMemberId - ID of the team member */ - addTaskGroup(taskGroup, project) { + updateCapacityWithIdentityRef(patch, teamContext, iterationId, teamMemberId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project + project: project, + team: team, + iterationId: iterationId, + teamMemberId: teamMemberId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, taskGroup, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + res = yield this.rest.update(url, patch, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, false); resolve(ret); } catch (err) { @@ -31383,28 +44022,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Delete a task group. + * Get board card Rule settings for the board id or board by name * - * @param {string} project - Project ID or project name - * @param {string} taskGroupId - Id of the task group to be deleted. - * @param {string} comment - Comments to delete. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board */ - deleteTaskGroup(project, taskGroupId, comment) { + getBoardCardRuleSettings(teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - taskGroupId: taskGroupId - }; - let queryValues = { - comment: comment, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "b044a3d9-02ea-49c7-91a1-b730949cc896", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -31415,34 +44057,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get task group. + * Update board card Rule settings for the board id or board by name * - * @param {string} project - Project ID or project name - * @param {string} taskGroupId - Id of the task group. - * @param {string} versionSpec - version specification of the task group. examples: 1, 1.0. - * @param {TaskAgentInterfaces.TaskGroupExpands} expand - The properties that should be expanded. example $expand=Tasks will expand nested task groups. + * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board */ - getTaskGroup(project, taskGroupId, versionSpec, expand) { + updateBoardCardRuleSettings(boardCardRuleSettings, teamContext, board) { return __awaiter(this, void 0, void 0, function* () { - if (versionSpec == null) { - throw new TypeError('versionSpec can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - taskGroupId: taskGroupId - }; - let queryValues = { - versionSpec: versionSpec, - '$expand': expand, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "b044a3d9-02ea-49c7-91a1-b730949cc896", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + res = yield this.rest.update(url, boardCardRuleSettings, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31452,29 +44093,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {string} taskGroupId - * @param {number} revision + * Update taskboard card Rule settings + * + * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getTaskGroupRevision(project, taskGroupId, revision) { + updateTaskboardCardRuleSettings(boardCardRuleSettings, teamContext) { return __awaiter(this, void 0, void 0, function* () { - if (revision == null) { - throw new TypeError('revision can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - taskGroupId: taskGroupId - }; - let queryValues = { - revision: revision, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "3f84a8d1-1aab-423e-a94b-6dcbdcca511f", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, boardCardRuleSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -31483,39 +44127,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * List task groups. + * Get board card settings for the board id or board by name * - * @param {string} project - Project ID or project name - * @param {string} taskGroupId - Id of the task group. - * @param {boolean} expanded - 'true' to recursively expand task groups. Default is 'false'. - * @param {string} taskIdFilter - Guid of the taskId to filter. - * @param {boolean} deleted - 'true'to include deleted task groups. Default is 'false'. - * @param {number} top - Number of task groups to get. - * @param {Date} continuationToken - Gets the task groups after the continuation token provided. - * @param {TaskAgentInterfaces.TaskGroupQueryOrder} queryOrder - Gets the results in the defined order. Default is 'CreatedOnDescending'. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board */ - getTaskGroups(project, taskGroupId, expanded, taskIdFilter, deleted, top, continuationToken, queryOrder) { + getBoardCardSettings(teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - taskGroupId: taskGroupId - }; - let queryValues = { - expanded: expanded, - taskIdFilter: taskIdFilter, - deleted: deleted, - '$top': top, - continuationToken: continuationToken, - queryOrder: queryOrder, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "07c3b467-bc60-4f05-8e34-599ce288fafc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31525,29 +44162,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.PublishTaskGroupMetadata} taskGroupMetadata - * @param {string} project - Project ID or project name - * @param {string} parentTaskGroupId + * Update board card settings for the board id or board by name + * + * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board */ - publishTaskGroup(taskGroupMetadata, project, parentTaskGroupId) { + updateBoardCardSettings(boardCardSettingsToSave, teamContext, board) { return __awaiter(this, void 0, void 0, function* () { - if (parentTaskGroupId == null) { - throw new TypeError('parentTaskGroupId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project - }; - let queryValues = { - parentTaskGroupId: parentTaskGroupId, + project: project, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "07c3b467-bc60-4f05-8e34-599ce288fafc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, taskGroupMetadata, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + res = yield this.rest.replace(url, boardCardSettingsToSave, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31557,22 +44198,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskGroup} taskGroup - * @param {string} project - Project ID or project name + * Update taskboard card settings + * + * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - undeleteTaskGroup(taskGroup, project) { + updateTaskboardCardSettings(boardCardSettingsToSave, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "0d63745f-31f3-4cf3-9056-2a064e567637", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, taskGroup, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + res = yield this.rest.replace(url, boardCardSettingsToSave, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31582,26 +44232,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update a task group. + * Get a board chart * - * @param {TaskAgentInterfaces.TaskGroupUpdateParameter} taskGroup - Task group to update. - * @param {string} project - Project ID or project name - * @param {string} taskGroupId - Id of the task group to update. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id + * @param {string} name - The chart name */ - updateTaskGroup(taskGroup, project, taskGroupId) { + getBoardChart(teamContext, board, name) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - taskGroupId: taskGroupId + team: team, + board: board, + name: name }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, taskGroup, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31611,28 +44269,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.TaskGroupUpdatePropertiesBase} taskGroupUpdateProperties - * @param {string} project - Project ID or project name - * @param {string} taskGroupId - * @param {boolean} disablePriorVersions + * Get board charts + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id */ - updateTaskGroupProperties(taskGroupUpdateProperties, project, taskGroupId, disablePriorVersions) { + getBoardCharts(teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - taskGroupId: taskGroupId - }; - let queryValues = { - disablePriorVersions: disablePriorVersions, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, taskGroupUpdateProperties, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -31642,20 +44304,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} taskId + * Update a board chart + * + * @param {WorkInterfaces.BoardChart} chart + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id + * @param {string} name - The chart name */ - deleteTaskDefinition(taskId) { + updateBoardChart(chart, teamContext, board, name) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - taskId: taskId + project: project, + team: team, + board: board, + name: name }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.update(url, chart, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -31666,59 +44342,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal + * Get columns on a board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board */ - getTaskContentZip(taskId, versionString, visibility, scopeLocal) { + getBoardColumns(teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - taskId: taskId, - versionString: versionString - }; - let queryValues = { - visibility: visibility, - scopeLocal: scopeLocal, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; } - })); - }); - } - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - */ - getTaskDefinition(taskId, versionString, visibility, scopeLocal) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - taskId: taskId, - versionString: versionString - }; - let queryValues = { - visibility: visibility, - scopeLocal: scopeLocal, + project: project, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c555d7ff-84e1-47df-9923-a3fe0cd8751b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskDefinition, false); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BoardColumn, true); resolve(ret); } catch (err) { @@ -31728,29 +44377,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} taskId - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param {boolean} allVersions + * Update columns on a board + * + * @param {WorkInterfaces.BoardColumn[]} boardColumns - List of board columns to update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board */ - getTaskDefinitions(taskId, visibility, scopeLocal, allVersions) { + updateBoardColumns(boardColumns, teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - taskId: taskId - }; - let queryValues = { - visibility: visibility, - scopeLocal: scopeLocal, - allVersions: allVersions, + project: project, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c555d7ff-84e1-47df-9923-a3fe0cd8751b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskDefinition, true); + res = yield this.rest.replace(url, boardColumns, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BoardColumn, true); resolve(ret); } catch (err) { @@ -31760,30 +44413,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {number} poolId - * @param {number} agentId - * @param {string} currentState + * Get Delivery View Data + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier for delivery view + * @param {number} revision - Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. + * @param {Date} startDate - The start date of timeline + * @param {Date} endDate - The end date of timeline */ - updateAgentUpdateState(poolId, agentId, currentState) { + getDeliveryTimelineData(project, id, revision, startDate, endDate) { return __awaiter(this, void 0, void 0, function* () { - if (currentState == null) { - throw new TypeError('currentState can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - agentId: agentId + project: project, + id: id }; let queryValues = { - currentState: currentState, + revision: revision, + startDate: startDate, + endDate: endDate, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8cc1b02b-ae49-4516-b5ad-4f9b29967c30", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "bdd0834e-101f-49f0-a6ae-509f384a12b4", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.DeliveryViewData, false); resolve(ret); } catch (err) { @@ -31793,24 +44449,25 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {{ [key: string] : string; }} userCapabilities - * @param {number} poolId - * @param {number} agentId + * Get an iteration's capacity for all teams in iteration + * + * @param {string} project - Project ID or project name + * @param {string} iterationId - ID of the iteration */ - updateAgentUserCapabilities(userCapabilities, poolId, agentId) { + getTotalIterationCapacities(project, iterationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - poolId: poolId, - agentId: agentId + project: project, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "30ba3ada-fedf-4da8-bbb5-dacf2f82e176", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1e385ce0-396b-4273-8171-d64562c18d37", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, userCapabilities, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -31820,49 +44477,27 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Add a variable group. + * Delete a team's iteration by iterationId * - * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - ID of the iteration */ - addVariableGroup(variableGroupParameters) { + deleteTeamIteration(teamContext, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, variableGroupParameters, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); - resolve(ret); - } - catch (err) { - reject(err); + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; } - })); - }); - } - /** - * Delete a variable group - * - * @param {number} groupId - Id of the variable group. - * @param {string[]} projectIds - */ - deleteVariableGroup(groupId, projectIds) { - return __awaiter(this, void 0, void 0, function* () { - if (projectIds == null) { - throw new TypeError('projectIds can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - groupId: groupId - }; - let queryValues = { - projectIds: projectIds && projectIds.join(","), + project: project, + team: team, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -31877,28 +44512,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Add a variable group. + * Get team's iteration by iterationId * - * @param {TaskAgentInterfaces.VariableGroupProjectReference[]} variableGroupProjectReferences - * @param {number} variableGroupId + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - ID of the iteration */ - shareVariableGroup(variableGroupProjectReferences, variableGroupId) { + getTeamIteration(teamContext, id) { return __awaiter(this, void 0, void 0, function* () { - if (variableGroupId == null) { - throw new TypeError('variableGroupId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - variableGroupId: variableGroupId, + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, variableGroupProjectReferences, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, false); resolve(ret); } catch (err) { @@ -31908,24 +44547,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Update a variable group. + * Get a team's iterations using timeframe filter * - * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters - * @param {number} groupId - Id of the variable group to update. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} timeframe - A filter for which iterations are returned based on relative time. Only Current is supported currently. */ - updateVariableGroup(variableGroupParameters, groupId) { + getTeamIterations(teamContext, timeframe) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - groupId: groupId + project: project, + team: team + }; + let queryValues = { + '$timeframe': timeframe, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, variableGroupParameters, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, true); resolve(ret); } catch (err) { @@ -31935,25 +44584,31 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get a variable group. + * Add an iteration to the team * - * @param {string} project - Project ID or project name - * @param {number} groupId - Id of the variable group. + * @param {WorkInterfaces.TeamSettingsIteration} iteration - Iteration to add + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getVariableGroup(project, groupId) { + postTeamIteration(iteration, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - groupId: groupId + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); + res = yield this.rest.create(url, iteration, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, false); resolve(ret); } catch (err) { @@ -31963,35 +44618,24 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get variable groups. + * Add a new plan for the team * + * @param {WorkInterfaces.CreatePlan} postedPlan - Plan definition * @param {string} project - Project ID or project name - * @param {string} groupName - Name of variable group. - * @param {TaskAgentInterfaces.VariableGroupActionFilter} actionFilter - Action filter for the variable group. It specifies the action which can be performed on the variable groups. - * @param {number} top - Number of variable groups to get. - * @param {number} continuationToken - Gets the variable groups after the continuation token provided. - * @param {TaskAgentInterfaces.VariableGroupQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdDescending'. */ - getVariableGroups(project, groupName, actionFilter, top, continuationToken, queryOrder) { + createPlan(postedPlan, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - groupName: groupName, - actionFilter: actionFilter, - '$top': top, - continuationToken: continuationToken, - queryOrder: queryOrder, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, true); + res = yield this.rest.create(url, postedPlan, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); resolve(ret); } catch (err) { @@ -32001,30 +44645,25 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * Get variable groups by ids. + * Delete the specified plan * * @param {string} project - Project ID or project name - * @param {number[]} groupIds - Comma separated list of Ids of variable groups. + * @param {string} id - Identifier of the plan */ - getVariableGroupsById(project, groupIds) { + deletePlan(project, id) { return __awaiter(this, void 0, void 0, function* () { - if (groupIds == null) { - throw new TypeError('groupIds can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - groupIds: groupIds && groupIds.join(","), + project: project, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -32034,24 +44673,25 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.VirtualMachineGroupCreateParameters} createParameters + * Get the information for the specified plan + * * @param {string} project - Project ID or project name - * @param {number} environmentId + * @param {string} id - Identifier of the plan */ - addVirtualMachineGroup(createParameters, project, environmentId) { + getPlan(project, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - environmentId: environmentId + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, createParameters, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); resolve(ret); } catch (err) { @@ -32061,25 +44701,23 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Get the information for all the plans configured for the given team + * * @param {string} project - Project ID or project name - * @param {number} environmentId - * @param {number} resourceId */ - deleteVirtualMachineGroup(project, environmentId, resourceId) { + getPlans(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - environmentId: environmentId, - resourceId: resourceId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, true); resolve(ret); } catch (err) { @@ -32089,25 +44727,26 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * Update the information for the specified plan + * + * @param {WorkInterfaces.UpdatePlan} updatedPlan - Plan definition to be updated * @param {string} project - Project ID or project name - * @param {number} environmentId - * @param {number} resourceId + * @param {string} id - Identifier of the plan */ - getVirtualMachineGroup(project, environmentId, resourceId) { + updatePlan(updatedPlan, project, id) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - environmentId: environmentId, - resourceId: resourceId + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + res = yield this.rest.replace(url, updatedPlan, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); resolve(ret); } catch (err) { @@ -32117,24 +44756,23 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.VirtualMachineGroup} resource + * Get process configuration + * * @param {string} project - Project ID or project name - * @param {number} environmentId */ - updateVirtualMachineGroup(resource, project, environmentId) { + getProcessConfiguration(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - environmentId: environmentId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "f901ba42-86d2-4b0c-89c1-3f86d06daa84", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, resource, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -32144,37 +44782,32 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} environmentId - * @param {number} resourceId - * @param {string} continuationToken - * @param {string} name - * @param {boolean} partialNameMatch - * @param {string[]} tags - * @param {number} top + * Get rows on a board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board */ - getVirtualMachines(project, environmentId, resourceId, continuationToken, name, partialNameMatch, tags, top) { + getBoardRows(teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - environmentId: environmentId, - resourceId: resourceId - }; - let queryValues = { - continuationToken: continuationToken, - name: name, - partialNameMatch: partialNameMatch, - tags: tags && tags.join(","), - '$top': top, + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "48700676-2ba5-4282-8ec8-083280d169c7", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0863355d-aefd-4d63-8669-984c9b7b0e78", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachine, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -32184,26 +44817,33 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.VirtualMachine[]} machines - * @param {string} project - Project ID or project name - * @param {number} environmentId - * @param {number} resourceId + * Update rows on a board + * + * @param {WorkInterfaces.BoardRow[]} boardRows - List of board rows to update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board */ - updateVirtualMachines(machines, project, environmentId, resourceId) { + updateBoardRows(boardRows, teamContext, board) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - environmentId: environmentId, - resourceId: resourceId + team: team, + board: board }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "48700676-2ba5-4282-8ec8-083280d169c7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0863355d-aefd-4d63-8669-984c9b7b0e78", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, machines, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachine, true); + res = yield this.rest.replace(url, boardRows, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -32213,35 +44853,27 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * @param {string} tenantId - * @param {string} redirectUri - * @param {TaskAgentInterfaces.AadLoginPromptOption} promptOption - * @param {string} completeCallbackPayload - * @param {boolean} completeCallbackByAuthCode + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - createAadOAuthRequest(tenantId, redirectUri, promptOption, completeCallbackPayload, completeCallbackByAuthCode) { + getColumns(teamContext) { return __awaiter(this, void 0, void 0, function* () { - if (tenantId == null) { - throw new TypeError('tenantId can not be null or undefined'); - } - if (redirectUri == null) { - throw new TypeError('redirectUri can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - tenantId: tenantId, - redirectUri: redirectUri, - promptOption: promptOption, - completeCallbackPayload: completeCallbackPayload, - completeCallbackByAuthCode: completeCallbackByAuthCode, + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9c63205e-3a0f-42a0-ad88-095200f13607", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c6815dbe-8e7e-4ffe-9a79-e83ee712aa92", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -32252,17 +44884,28 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** + * @param {WorkInterfaces.UpdateTaskboardColumn[]} updateColumns + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getVstsAadTenantId() { + updateColumns(updateColumns, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9c63205e-3a0f-42a0-ad88-095200f13607", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c6815dbe-8e7e-4ffe-9a79-e83ee712aa92", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.replace(url, updateColumns, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -32273,24 +44916,30 @@ class TaskAgentApiBase extends basem.ClientApiBase { }); } /** - * GET the Yaml schema used for Yaml file validation. - * - * @param {boolean} validateTaskNames - Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation). + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId */ - getYamlSchema(validateTaskNames) { + getWorkItemColumns(teamContext, iterationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - validateTaskNames: validateTaskNames, + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1f9990b9-1dba-441f-9c2e-6485888c42b6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1be23c36-8872-4abc-b57d-402cd6c669d9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -32299,64 +44948,34 @@ class TaskAgentApiBase extends basem.ClientApiBase { })); }); } -} -TaskAgentApiBase.RESOURCE_AREA_ID = "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd"; -exports.TaskAgentApiBase = TaskAgentApiBase; - - -/***/ }), - -/***/ 2354: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const TaskAgentInterfaces = __nccwpck_require__(9565); -class TaskApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Task-api', options); - } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} type + * @param {WorkInterfaces.UpdateTaskboardWorkItemColumn} updateColumn + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId + * @param {number} workItemId */ - getPlanAttachments(scopeIdentifier, hubName, planId, type) { + updateWorkItemColumn(updateColumn, teamContext, iterationId, workItemId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - type: type + project: project, + team: team, + iterationId: iterationId, + workItemId: workItemId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "eb55e5d6-2f30-4295-b5ed-38da50b1fc52", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1be23c36-8872-4abc-b57d-402cd6c669d9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, true); + res = yield this.rest.update(url, updateColumn, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -32366,37 +44985,32 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name + * Get team's days off for an iteration + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration */ - createAttachment(customHeaders, contentStream, scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { + getTeamDaysOff(teamContext, iterationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId, - recordId: recordId, - type: type, - name: name + project: project, + team: team, + iterationId: iterationId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "2d4faa2e-9150-4cbf-a47a-932b1b4a0773", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("PUT", url, contentStream, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsDaysOff, false); resolve(ret); } catch (err) { @@ -32406,45 +45020,33 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - * @param {string} artifactHash - * @param {number} length + * Set a team's days off for an iteration + * + * @param {WorkInterfaces.TeamSettingsDaysOffPatch} daysOffPatch - Team's days off patch containing a list of start and end dates + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration */ - createAttachmentFromArtifact(scopeIdentifier, hubName, planId, timelineId, recordId, type, name, artifactHash, length) { + updateTeamDaysOff(daysOffPatch, teamContext, iterationId) { return __awaiter(this, void 0, void 0, function* () { - if (artifactHash == null) { - throw new TypeError('artifactHash can not be null or undefined'); - } - if (length == null) { - throw new TypeError('length can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId, - recordId: recordId, - type: type, - name: name - }; - let queryValues = { - artifactHash: artifactHash, - length: length, + project: project, + team: team, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "2d4faa2e-9150-4cbf-a47a-932b1b4a0773", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + res = yield this.rest.update(url, daysOffPatch, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsDaysOff, false); resolve(ret); } catch (err) { @@ -32454,33 +45056,30 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name + * Get a collection of team field values + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getAttachment(scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { + getTeamFieldValues(teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId, - recordId: recordId, - type: type, - name: name + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "07ced576-58ed-49e6-9c1e-5cb53ab8bf2a", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -32490,32 +45089,32 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name + * Update team field values + * + * @param {WorkInterfaces.TeamFieldValuesPatch} patch + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getAttachmentContent(scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { + updateTeamFieldValues(patch, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId, - recordId: recordId, - type: type, - name: name + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "07ced576-58ed-49e6-9c1e-5cb53ab8bf2a", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, patch, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -32524,31 +45123,30 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type + * Get a team's settings + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getAttachments(scopeIdentifier, hubName, planId, timelineId, recordId, type) { + getTeamSettings(teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId, - recordId: recordId, - type: type + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c3c1012b-bea7-49d7-b45e-1664e566f84c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, true); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSetting, false); resolve(ret); } catch (err) { @@ -32558,32 +45156,31 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * Append content to timeline record feed. + * Update a team's settings * - * @param {TaskAgentInterfaces.TimelineRecordFeedLinesWrapper} lines - Content to be appended to the timeline record feed. - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - ID of the plan. - * @param {string} timelineId - ID of the task's timeline. - * @param {string} recordId - ID of the timeline record. + * @param {WorkInterfaces.TeamSettingsPatch} teamSettingsPatch - TeamSettings changes + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - appendTimelineRecordFeed(lines, scopeIdentifier, hubName, planId, timelineId, recordId) { + updateTeamSettings(teamSettingsPatch, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId, - recordId: recordId + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "858983e4-19bd-4c5e-864c-507b59b58b12", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c3c1012b-bea7-49d7-b45e-1664e566f84c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, lines, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, teamSettingsPatch, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSetting, false); resolve(ret); } catch (err) { @@ -32593,37 +45190,27 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} stepId - * @param {number} endLine - * @param {number} takeCount - * @param {string} continuationToken + * Get work items for iteration + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration */ - getLines(scopeIdentifier, hubName, planId, timelineId, recordId, stepId, endLine, takeCount, continuationToken) { + getIterationWorkItems(teamContext, iterationId) { return __awaiter(this, void 0, void 0, function* () { - if (stepId == null) { - throw new TypeError('stepId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId, - recordId: recordId - }; - let queryValues = { - stepId: stepId, - endLine: endLine, - takeCount: takeCount, - continuationToken: continuationToken, + project: project, + team: team, + iterationId: iterationId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "858983e4-19bd-4c5e-864c-507b59b58b12", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "5b3ef1a6-d3ab-44cd-bafd-c7f45db850fa", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -32638,25 +45225,31 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} orchestrationId + * Reorder Product Backlog/Boards Work Items + * + * @param {WorkInterfaces.ReorderOperation} operation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - getJobInstance(scopeIdentifier, hubName, orchestrationId) { + reorderBacklogWorkItems(operation, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - orchestrationId: orchestrationId + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0a1efd25-abda-43bd-9629-6c7bdd2e0d60", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1c22b714-e7e4-41b9-85e0-56ee13ef55ed", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJob, false); + res = yield this.rest.update(url, operation, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -32666,33 +45259,33 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * Append a log to a task's log. The log should be sent in the body of the request as a TaskLog object stream. + * Reorder Sprint Backlog/Taskboard Work Items * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - The ID of the plan. - * @param {number} logId - The ID of the log. + * @param {WorkInterfaces.ReorderOperation} operation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - The id of the iteration */ - appendLogContent(customHeaders, contentStream, scopeIdentifier, hubName, planId, logId) { + reorderIterationWorkItems(operation, teamContext, iterationId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - logId: logId + project: project, + team: team, + iterationId: iterationId }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "47755db2-d7eb-405a-8c25-675401525fc9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.uploadStream("POST", url, contentStream, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + res = yield this.rest.update(url, operation, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -32701,40 +45294,61 @@ class TaskApi extends basem.ClientApiBase { })); }); } +} +WorkApi.RESOURCE_AREA_ID = "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"; +exports.WorkApi = WorkApi; + + +/***/ }), + +/***/ 88409: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const WorkItemTrackingInterfaces = __nccwpck_require__(26938); +class WorkItemTrackingApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-WorkItemTracking-api', options); + } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {number} logId - * @param {string} serializedBlobId - * @param {number} lineCount + * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details. + * + * @param {WorkItemTrackingInterfaces.QueryOption} queryOption */ - associateLog(scopeIdentifier, hubName, planId, logId, serializedBlobId, lineCount) { + getAccountMyWorkData(queryOption) { return __awaiter(this, void 0, void 0, function* () { - if (serializedBlobId == null) { - throw new TypeError('serializedBlobId can not be null or undefined'); - } - if (lineCount == null) { - throw new TypeError('lineCount can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - logId: logId - }; + let routeValues = {}; let queryValues = { - serializedBlobId: serializedBlobId, - lineCount: lineCount, + '$queryOption': queryOption, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "def3d688-ddf5-4096-9024-69beea15cdbd", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountMyWorkResult, false); resolve(ret); } catch (err) { @@ -32744,28 +45358,20 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * Create a log and connect it to a pipeline run's execution plan. + * Gets recent work item activities * - * @param {TaskAgentInterfaces.TaskLog} log - An object that contains information about log's path. - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - The ID of the plan. */ - createLog(log, scopeIdentifier, hubName, planId) { + getRecentActivityData() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "1bc988f4-c15f-4072-ad35-497c87e3a909", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, log, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountRecentActivityWorkItemModel2, true); resolve(ret); } catch (err) { @@ -32775,33 +45381,20 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine + * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. + * */ - getLog(scopeIdentifier, hubName, planId, logId, startLine, endLine) { + getRecentMentions() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - logId: logId - }; - let queryValues = { - startLine: startLine, - endLine: endLine, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "d60eeb6e-e18c-4478-9e94-a0094e28f41c", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountRecentMentionWorkItemModel, true); resolve(ret); } catch (err) { @@ -32811,25 +45404,20 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId + * Get the list of work item tracking outbound artifact link types. + * */ - getLogs(scopeIdentifier, hubName, planId) { + getWorkArtifactLinkTypes() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "1a31de40-e318-41cd-a6c6-881077df52e3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -32839,23 +45427,24 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + * Queries work items linked to a given list of artifact URI. + * + * @param {WorkItemTrackingInterfaces.ArtifactUriQuery} artifactUriQuery - Defines a list of artifact URI for querying work items. + * @param {string} project - Project ID or project name */ - getPlanGroupsQueueMetrics(scopeIdentifier, hubName) { + queryWorkItemsForArtifactUris(artifactUriQuery, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "038fd4d5-cda7-44ca-92c0-935843fee1a7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "a9a9aa7a-8c09-44d3-ad1b-46e855c1e3d3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics, true); + res = yield this.rest.create(url, artifactUriQuery, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -32865,34 +45454,34 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {{ [key: string] : string; }} claims - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} jobId - * @param {string} serviceConnectionId + * Uploads an attachment. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} fileName - The name of the file + * @param {string} uploadType - Attachment upload type: Simple or Chunked + * @param {string} project - Project ID or project name + * @param {string} areaPath - Target project Area Path */ - createOidcToken(claims, scopeIdentifier, hubName, planId, jobId, serviceConnectionId) { + createAttachment(customHeaders, contentStream, fileName, uploadType, project, areaPath) { return __awaiter(this, void 0, void 0, function* () { - if (serviceConnectionId == null) { - throw new TypeError('serviceConnectionId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - jobId: jobId + project: project }; let queryValues = { - serviceConnectionId: serviceConnectionId, + fileName: fileName, + uploadType: uploadType, + areaPath: areaPath, }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "69a319f4-28c1-4bfd-93e6-ea0ff5c6f1a2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.create(url, claims, options); + res = yield this.rest.uploadStream("POST", url, contentStream, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -32903,30 +45492,30 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {TaskAgentInterfaces.PlanGroupStatus} statusFilter - * @param {number} count + * Downloads an attachment. + * + * @param {string} id - Attachment ID + * @param {string} fileName - Name of the file + * @param {string} project - Project ID or project name + * @param {boolean} download - If set to true always download attachment */ - getQueuedPlanGroups(scopeIdentifier, hubName, statusFilter, count) { + getAttachmentContent(id, fileName, project, download) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName + project: project, + id: id }; let queryValues = { - statusFilter: statusFilter, - count: count, + fileName: fileName, + download: download, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0dd73091-3e36-4f43-b443-1b76dd426d84", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -32935,26 +45524,30 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planGroup + * Downloads an attachment. + * + * @param {string} id - Attachment ID + * @param {string} fileName - Name of the file + * @param {string} project - Project ID or project name + * @param {boolean} download - If set to true always download attachment */ - getQueuedPlanGroup(scopeIdentifier, hubName, planGroup) { + getAttachmentZip(id, fileName, project, download) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planGroup: planGroup + project: project, + id: id + }; + let queryValues = { + fileName: fileName, + download: download, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "65fd0708-bc1e-447b-a731-0587c5464e5b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, false); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -32963,25 +45556,34 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId + * Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project. + * + * @param {string} project - Project ID or project name + * @param {number[]} ids - Comma separated integer classification nodes ids. It's not required, if you want root nodes. + * @param {number} depth - Depth of children to fetch. + * @param {WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy} errorPolicy - Flag to handle errors in getting some nodes. Possible options are Fail and Omit. */ - getPlan(scopeIdentifier, hubName, planId) { + getClassificationNodes(project, ids, depth, errorPolicy) { return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId + project: project + }; + let queryValues = { + ids: ids && ids.join(","), + '$depth': depth, + errorPolicy: errorPolicy, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "5cecd946-d704-471e-a45f-3b4064fcfaba", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a70579d1-f53a-48ee-a5be-7be8659023b9", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlan, false); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, true); resolve(ret); } catch (err) { @@ -32991,31 +45593,27 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId + * Gets root classification nodes under the project. + * + * @param {string} project - Project ID or project name + * @param {number} depth - Depth of children to fetch. */ - getRecords(scopeIdentifier, hubName, planId, timelineId, changeId) { + getRootNodes(project, depth) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId + project: project }; let queryValues = { - changeId: changeId, + '$depth': depth, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8893bc5b-35b2-4be7-83cb-99e683551db4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a70579d1-f53a-48ee-a5be-7be8659023b9", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, true); resolve(ret); } catch (err) { @@ -33025,30 +45623,28 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * Update timeline records if they already exist, otherwise create new ones for the same timeline. + * Create new or update an existing classification node. * - * @param {VSSInterfaces.VssJsonCollectionWrapperV} records - The array of timeline records to be updated. - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - The ID of the plan. - * @param {string} timelineId - The ID of the timeline. + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update. + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. */ - updateRecords(records, scopeIdentifier, hubName, planId, timelineId) { + createOrUpdateClassificationNode(postedNode, project, structureGroup, path) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId + project: project, + structureGroup: structureGroup, + path: path }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8893bc5b-35b2-4be7-83cb-99e683551db4", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, records, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true); + res = yield this.rest.create(url, postedNode, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); resolve(ret); } catch (err) { @@ -33058,26 +45654,31 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {TaskAgentInterfaces.Timeline} timeline - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId + * Delete an existing classification node. + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + * @param {number} reclassifyId - Id of the target classification node for reclassification. */ - createTimeline(timeline, scopeIdentifier, hubName, planId) { + deleteClassificationNode(project, structureGroup, path, reclassifyId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId + project: project, + structureGroup: structureGroup, + path: path + }; + let queryValues = { + '$reclassifyId': reclassifyId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, timeline, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -33087,27 +45688,31 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId + * Gets the classification node for a given node path. + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + * @param {number} depth - Depth of children to fetch. */ - deleteTimeline(scopeIdentifier, hubName, planId, timelineId) { + getClassificationNode(project, structureGroup, path, depth) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId + project: project, + structureGroup: structureGroup, + path: path + }; + let queryValues = { + '$depth': depth, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); resolve(ret); } catch (err) { @@ -33117,33 +45722,28 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - * @param {boolean} includeRecords + * Update an existing classification node. + * + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update. + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. */ - getTimeline(scopeIdentifier, hubName, planId, timelineId, changeId, includeRecords) { + updateClassificationNode(postedNode, project, structureGroup, path) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId, - timelineId: timelineId - }; - let queryValues = { - changeId: changeId, - includeRecords: includeRecords, + project: project, + structureGroup: structureGroup, + path: path }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false); + res = yield this.rest.update(url, postedNode, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); resolve(ret); } catch (err) { @@ -33153,25 +45753,35 @@ class TaskApi extends basem.ClientApiBase { }); } /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" - * @param {string} planId + * Get users who reacted on the comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID. + * @param {number} commentId - Comment ID. + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction. + * @param {number} top + * @param {number} skip */ - getTimelines(scopeIdentifier, hubName, planId) { + getEngagedUsers(project, workItemId, commentId, reactionType, top, skip) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - scopeIdentifier: scopeIdentifier, - hubName: hubName, - planId: planId + project: project, + workItemId: workItemId, + commentId: commentId, + reactionType: reactionType + }; + let queryValues = { + '$top': top, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "e33ca5e0-2349-4285-af3d-d72d86781c35", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -33180,73 +45790,27 @@ class TaskApi extends basem.ClientApiBase { })); }); } -} -exports.TaskApi = TaskApi; - - -/***/ }), - -/***/ 5742: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const TestInterfaces = __nccwpck_require__(3047); -class TestApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Test-api', options); - } /** - * Attach a file to test step result + * Add a comment on a work item. * - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {WorkItemTrackingInterfaces.CommentCreate} request - Comment create request. * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test result that contains the iteration - * @param {number} iterationId - ID of the test result iteration. - * @param {string} actionPath - Hex value of test result action path. + * @param {number} workItemId - Id of a work item. */ - createTestIterationResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, iterationId, actionPath) { + addComment(request, project, workItemId) { return __awaiter(this, void 0, void 0, function* () { - if (iterationId == null) { - throw new TypeError('iterationId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId - }; - let queryValues = { - iterationId: iterationId, - actionPath: actionPath, + workItemId: workItemId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, request, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); resolve(ret); } catch (err) { @@ -33256,27 +45820,26 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Attach a file to a test result. + * Delete a comment on a work item. * - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test result against which attachment has to be uploaded. + * @param {number} workItemId - Id of a work item. + * @param {number} commentId */ - createTestResultAttachment(attachmentRequestModel, project, runId, testCaseResultId) { + deleteComment(project, workItemId, commentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId + workItemId: workItemId, + commentId: commentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -33287,35 +45850,33 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Attach a file to a test result + * Returns a work item comment. * - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment Request Model. * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test results that contains sub result. - * @param {number} testSubResultId - ID of the test sub results against which attachment has to be uploaded. + * @param {number} workItemId - Id of a work item to get the comment. + * @param {number} commentId - Id of the comment to return. + * @param {boolean} includeDeleted - Specify if the deleted comment should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. */ - createTestSubResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, testSubResultId) { + getComment(project, workItemId, commentId, includeDeleted, expand) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId + workItemId: workItemId, + commentId: commentId }; let queryValues = { - testSubResultId: testSubResultId, + includeDeleted: includeDeleted, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); resolve(ret); } catch (err) { @@ -33325,28 +45886,38 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Download a test result attachment by its ID. + * Returns a list of work item comments, pageable. * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the testCaseResultId. - * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. - * @param {number} attachmentId - ID of the test result attachment to be downloaded. + * @param {number} workItemId - Id of a work item to get comments for. + * @param {number} top - Max number of comments to return. + * @param {string} continuationToken - Used to query for the next page of comments. + * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + * @param {WorkItemTrackingInterfaces.CommentSortOrder} order - Order in which the comments should be returned. */ - getTestResultAttachmentContent(project, runId, testCaseResultId, attachmentId) { + getComments(project, workItemId, top, continuationToken, includeDeleted, expand, order) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId + workItemId: workItemId + }; + let queryValues = { + '$top': top, + continuationToken: continuationToken, + includeDeleted: includeDeleted, + '$expand': expand, + order: order, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentList, false); + resolve(ret); } catch (err) { reject(err); @@ -33355,27 +45926,36 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get list of test result attachments reference. + * Returns a list of work item comments by ids. * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test result. + * @param {number} workItemId - Id of a work item to get comments for. + * @param {number[]} ids - Comma-separated list of comment ids to return. + * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. */ - getTestResultAttachments(project, runId, testCaseResultId) { + getCommentsBatch(project, workItemId, ids, includeDeleted, expand) { return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId + workItemId: workItemId + }; + let queryValues = { + ids: ids && ids.join(","), + includeDeleted: includeDeleted, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentList, false); resolve(ret); } catch (err) { @@ -33385,28 +45965,29 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Download a test result attachment by its ID. + * Update a comment on a work item. * + * @param {WorkItemTrackingInterfaces.CommentUpdate} request - Comment update request. * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the testCaseResultId. - * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. - * @param {number} attachmentId - ID of the test result attachment to be downloaded. + * @param {number} workItemId - Id of a work item. + * @param {number} commentId */ - getTestResultAttachmentZip(project, runId, testCaseResultId, attachmentId) { + updateComment(request, project, workItemId, commentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId + workItemId: workItemId, + commentId: commentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, request, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); + resolve(ret); } catch (err) { reject(err); @@ -33415,35 +45996,30 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Download a test sub result attachment + * Adds a new reaction to a comment. * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test results that contains sub result. - * @param {number} attachmentId - ID of the test result attachment to be downloaded - * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction */ - getTestSubResultAttachmentContent(project, runId, testCaseResultId, attachmentId, testSubResultId) { + createCommentReaction(project, workItemId, commentId, reactionType) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId - }; - let queryValues = { - testSubResultId: testSubResultId, + workItemId: workItemId, + commentId: commentId, + reactionType: reactionType }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, false); + resolve(ret); } catch (err) { reject(err); @@ -33452,34 +46028,29 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get list of test sub result attachments + * Deletes an existing reaction on a comment. * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test results that contains sub result. - * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction */ - getTestSubResultAttachments(project, runId, testCaseResultId, testSubResultId) { + deleteCommentReaction(project, workItemId, commentId, reactionType) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId - }; - let queryValues = { - testSubResultId: testSubResultId, + workItemId: workItemId, + commentId: commentId, + reactionType: reactionType }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, false); resolve(ret); } catch (err) { @@ -33489,35 +46060,28 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Download a test sub result attachment + * Gets reactions of a comment. * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test results that contains sub result. - * @param {number} attachmentId - ID of the test result attachment to be downloaded - * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID */ - getTestSubResultAttachmentZip(project, runId, testCaseResultId, attachmentId, testSubResultId) { + getCommentReactions(project, workItemId, commentId) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId - }; - let queryValues = { - testSubResultId: testSubResultId, + workItemId: workItemId, + commentId: commentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, true); + resolve(ret); } catch (err) { reject(err); @@ -33526,26 +46090,27 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Attach a file to a test run. - * - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run against which attachment has to be uploaded. + * @param {number} workItemId + * @param {number} commentId + * @param {number} version */ - createTestRunAttachment(attachmentRequestModel, project, runId) { + getCommentVersion(project, workItemId, commentId, version) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId + workItemId: workItemId, + commentId: commentId, + version: version }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "49e03b34-3be0-42e3-8a5d-e8dfb88ac954", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentVersion, false); resolve(ret); } catch (err) { @@ -33555,26 +46120,26 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Download a test run attachment by its ID. - * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run whose attachment has to be downloaded. - * @param {number} attachmentId - ID of the test run attachment to be downloaded. + * @param {number} workItemId + * @param {number} commentId */ - getTestRunAttachmentContent(project, runId, attachmentId) { + getCommentVersions(project, workItemId, commentId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - attachmentId: attachmentId + workItemId: workItemId, + commentId: commentId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "49e03b34-3be0-42e3-8a5d-e8dfb88ac954", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentVersion, true); + resolve(ret); } catch (err) { reject(err); @@ -33583,25 +46148,24 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get list of test run attachments reference. + * Create a new field. * + * @param {WorkItemTrackingInterfaces.WorkItemField} workItemField - New field definition * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run. */ - getTestRunAttachments(project, runId) { + createField(workItemField, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); + res = yield this.rest.create(url, workItemField, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); resolve(ret); } catch (err) { @@ -33611,26 +46175,26 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Download a test run attachment by its ID. + * Deletes the field. To undelete a filed, see "Update Field" API. * + * @param {string} fieldNameOrRefName - Field simple name or reference name * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run whose attachment has to be downloaded. - * @param {number} attachmentId - ID of the test run attachment to be downloaded. */ - getTestRunAttachmentZip(project, runId, attachmentId) { + deleteField(fieldNameOrRefName, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - attachmentId: attachmentId + fieldNameOrRefName: fieldNameOrRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -33639,25 +46203,25 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Gets information on a specific field. + * + * @param {string} fieldNameOrRefName - Field simple name or reference name * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId */ - getBugsLinkedToTestResult(project, runId, testCaseResultId) { + getField(fieldNameOrRefName, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId + fieldNameOrRefName: fieldNameOrRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "6de20ca2-67de-4faf-97fa-38c5d585eb00", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); resolve(ret); } catch (err) { @@ -33667,35 +46231,27 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get code coverage data for a build. + * Returns information for all fields. The project ID/name parameter is optional. * * @param {string} project - Project ID or project name - * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. - * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. + * @param {WorkItemTrackingInterfaces.GetFieldsExpand} expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. */ - getBuildCodeCoverage(project, buildId, flags) { + getFields(project, expand) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } - if (flags == null) { - throw new TypeError('flags can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - buildId: buildId, - flags: flags, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.BuildCoverage, true); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, true); resolve(ret); } catch (err) { @@ -33705,32 +46261,26 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get Code Coverage Summary for Build. + * Update a field. * + * @param {WorkItemTrackingInterfaces.UpdateWorkItemField} payload - Payload contains desired value of the field's properties + * @param {string} fieldNameOrRefName - Name/reference name of the field to be updated * @param {string} project - Project ID or project name - * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. - * @param {number} deltaBuildId - Delta Build id (optional) */ - getCodeCoverageSummary(project, buildId, deltaBuildId) { + updateField(payload, fieldNameOrRefName, project) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - deltaBuildId: deltaBuildId, + project: project, + fieldNameOrRefName: fieldNameOrRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CodeCoverageSummary, false); + res = yield this.rest.update(url, payload, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); resolve(ret); } catch (err) { @@ -33740,30 +46290,23 @@ class TestApi extends basem.ClientApiBase { }); } /** - * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + * Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile. * - * @param {TestInterfaces.CodeCoverageData} coverageData + * @param {WorkItemTrackingInterfaces.ProcessIdModel} newProcess * @param {string} project - Project ID or project name - * @param {number} buildId */ - updateCodeCoverageSummary(coverageData, project, buildId) { + migrateProjectsProcess(newProcess, project) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - buildId: buildId, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "19801631-d4e5-47e9-8166-0330de0ff1e6", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, coverageData, options); + res = yield this.rest.create(url, newProcess, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -33774,32 +46317,30 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get code coverage data for a test run + * Creates a query, or moves a query. * + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run for which code coverage data needs to be fetched. - * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. + * @param {string} query - The parent id or path under which the query is to be created. + * @param {boolean} validateWiqlOnly - If you only want to validate your WIQL query without actually creating one, set it to true. Default is false. */ - getTestRunCodeCoverage(project, runId, flags) { + createQuery(postedQuery, project, query, validateWiqlOnly) { return __awaiter(this, void 0, void 0, function* () { - if (flags == null) { - throw new TypeError('flags can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId + query: query }; let queryValues = { - flags: flags, + validateWiqlOnly: validateWiqlOnly, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "9629116f-3b89-4ed8-b358-d4694efda160", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, postedQuery, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); resolve(ret); } catch (err) { @@ -33809,22 +46350,25 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields + * Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder. + * * @param {string} project - Project ID or project name + * @param {string} query - ID or path of the query or folder to delete. */ - addCustomFields(newFields, project) { + deleteQuery(project, query) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + query: query }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8ce1923b-f4c7-4e22-b93b-f6284e525ec2", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, newFields, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CustomTestFieldDefinition, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -33834,28 +46378,31 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Gets the root queries and their children + * * @param {string} project - Project ID or project name - * @param {TestInterfaces.CustomTestFieldScope} scopeFilter + * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results. + * @param {number} depth - In the folder of queries, return child queries and folders to this depth. + * @param {boolean} includeDeleted - Include deleted queries and folders */ - queryCustomFields(project, scopeFilter) { + getQueries(project, expand, depth, includeDeleted) { return __awaiter(this, void 0, void 0, function* () { - if (scopeFilter == null) { - throw new TypeError('scopeFilter can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - scopeFilter: scopeFilter, + '$expand': expand, + '$depth': depth, + '$includeDeleted': includeDeleted, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8ce1923b-f4c7-4e22-b93b-f6284e525ec2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CustomTestFieldDefinition, true); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, true); resolve(ret); } catch (err) { @@ -33865,22 +46412,35 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.ResultsFilter} filter + * Retrieves an individual query and its children + * * @param {string} project - Project ID or project name + * @param {string} query - ID or path of the query. + * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results. + * @param {number} depth - In the folder of queries, return child queries and folders to this depth. + * @param {boolean} includeDeleted - Include deleted queries and folders + * @param {boolean} useIsoDateFormat - DateTime query clauses will be formatted using a ISO 8601 compliant format */ - queryTestResultHistory(filter, project) { + getQuery(project, query, expand, depth, includeDeleted, useIsoDateFormat) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + query: query + }; + let queryValues = { + '$expand': expand, + '$depth': depth, + '$includeDeleted': includeDeleted, + '$useIsoDateFormat': useIsoDateFormat, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "234616f5-429c-4e7b-9192-affd76731dfd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultHistory, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); resolve(ret); } catch (err) { @@ -33890,33 +46450,36 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get iteration for a result + * Searches all queries the user has access to in the current project * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test result that contains the iterations. - * @param {number} iterationId - Id of the test results Iteration. - * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. + * @param {string} filter - The text to filter the queries with. + * @param {number} top - The number of queries to return (Default is 50 and maximum is 200). + * @param {WorkItemTrackingInterfaces.QueryExpand} expand + * @param {boolean} includeDeleted - Include deleted queries and folders */ - getTestIteration(project, runId, testCaseResultId, iterationId, includeActionResults) { + searchQueries(project, filter, top, expand, includeDeleted) { return __awaiter(this, void 0, void 0, function* () { + if (filter == null) { + throw new TypeError('filter can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId, - iterationId: iterationId + project: project }; let queryValues = { - includeActionResults: includeActionResults, + '$filter': filter, + '$top': top, + '$expand': expand, + '$includeDeleted': includeDeleted, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "73eb9074-3446-4c44-8296-2f811950ff8d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestIterationDetailsModel, false); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItemsResult, false); resolve(ret); } catch (err) { @@ -33926,31 +46489,30 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get iterations for a result + * Update a query or a folder. This allows you to update, rename and move queries and folders. * + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - The query to update. * @param {string} project - Project ID or project name - * @param {number} runId - ID of the test run that contains the result. - * @param {number} testCaseResultId - ID of the test result that contains the iterations. - * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. + * @param {string} query - The ID or path for the query to update. + * @param {boolean} undeleteDescendants - Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants. */ - getTestIterations(project, runId, testCaseResultId, includeActionResults) { + updateQuery(queryUpdate, project, query, undeleteDescendants) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId + query: query }; let queryValues = { - includeActionResults: includeActionResults, + '$undeleteDescendants': undeleteDescendants, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "73eb9074-3446-4c44-8296-2f811950ff8d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestIterationDetailsModel, true); + res = yield this.rest.update(url, queryUpdate, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); resolve(ret); } catch (err) { @@ -33960,22 +46522,24 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.LinkedWorkItemsQuery} workItemQuery + * Gets a list of queries by ids (Maximum 1000) + * + * @param {WorkItemTrackingInterfaces.QueryBatchGetRequest} queryGetRequest * @param {string} project - Project ID or project name */ - getLinkedWorkItemsByQuery(workItemQuery, project) { + getQueriesBatch(queryGetRequest, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a4dcb25b-9878-49ea-abfd-e440bd9b1dcd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "549816f9-09b0-4e75-9e81-01fbfcd07426", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, workItemQuery, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, queryGetRequest, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, true); resolve(ret); } catch (err) { @@ -33985,25 +46549,25 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get test run message logs + * Destroys the specified work item permanently from the Recycle Bin. This action can not be undone. * + * @param {number} id - ID of the work item to be destroyed permanently * @param {string} project - Project ID or project name - * @param {number} runId - ID of the run to get. */ - getTestRunLogs(project, runId) { + destroyWorkItem(id, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a1e55200-637e-42e9-a7c0-7e5bfdedb1b3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestMessageLogDetails, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34013,33 +46577,25 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get a test point. + * Gets a deleted work item from Recycle Bin. * + * @param {number} id - ID of the work item to be returned * @param {string} project - Project ID or project name - * @param {number} planId - ID of the test plan. - * @param {number} suiteId - ID of the suite that contains the point. - * @param {number} pointIds - ID of the test point to get. - * @param {string} witFields - Comma-separated list of work item field names. */ - getPoint(project, planId, suiteId, pointIds, witFields) { + getDeletedWorkItem(id, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - planId: planId, - suiteId: suiteId, - pointIds: pointIds - }; - let queryValues = { - witFields: witFields, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34049,43 +46605,30 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get a list of test points. + * Gets the work items from the recycle bin, whose IDs have been specified in the parameters * + * @param {number[]} ids - Comma separated list of IDs of the deleted work items to be returned * @param {string} project - Project ID or project name - * @param {number} planId - ID of the test plan. - * @param {number} suiteId - ID of the suite that contains the points. - * @param {string} witFields - Comma-separated list of work item field names. - * @param {string} configurationId - Get test points for specific configuration. - * @param {string} testCaseId - Get test points for a specific test case, valid when configurationId is not set. - * @param {string} testPointIds - Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set. - * @param {boolean} includePointDetails - Include all properties for the test point. - * @param {number} skip - Number of test points to skip.. - * @param {number} top - Number of test points to return. */ - getPoints(project, planId, suiteId, witFields, configurationId, testCaseId, testPointIds, includePointDetails, skip, top) { + getDeletedWorkItems(ids, project) { return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - planId: planId, - suiteId: suiteId + project: project }; let queryValues = { - witFields: witFields, - configurationId: configurationId, - testCaseId: testCaseId, - testPointIds: testPointIds, - includePointDetails: includePointDetails, - '$skip': skip, - '$top': top, + ids: ids && ids.join(","), }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -34095,30 +46638,23 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Update test points. + * Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. * - * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - Data to update. * @param {string} project - Project ID or project name - * @param {number} planId - ID of the test plan. - * @param {number} suiteId - ID of the suite that contains the points. - * @param {string} pointIds - ID of the test point to get. Use a comma-separated list of IDs to update multiple test points. */ - updateTestPoints(pointUpdateModel, project, planId, suiteId, pointIds) { + getDeletedWorkItemShallowReferences(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - planId: planId, - suiteId: suiteId, - pointIds: pointIds + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, pointUpdateModel, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -34128,30 +46664,26 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get test points using query. + * Restores the deleted work item from Recycle Bin. * - * @param {TestInterfaces.TestPointsQuery} query - TestPointsQuery to get test points. + * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - Paylod with instructions to update the IsDeleted flag to false + * @param {number} id - ID of the work item to be restored * @param {string} project - Project ID or project name - * @param {number} skip - Number of test points to skip.. - * @param {number} top - Number of test points to return. */ - getPointsByQuery(query, project, skip, top) { + restoreWorkItem(payload, id, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - '$skip': skip, - '$top': top, + project: project, + id: id }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "b4264fd0-a5d1-43e2-82a5-b9c46b7da9ce", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, query, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPointsQuery, false); + res = yield this.rest.update(url, payload, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34161,40 +46693,31 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Returns a fully hydrated work item for the requested revision + * + * @param {number} id + * @param {number} revisionNumber + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - * @param {string} orderby - * @param {boolean} shouldIncludeResults - * @param {boolean} queryRunSummaryForInProgress */ - getTestResultDetailsForBuild(project, buildId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { + getRevision(id, revisionNumber, expand, project) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + id: id, + revisionNumber: revisionNumber }; let queryValues = { - buildId: buildId, - publishContext: publishContext, - groupBy: groupBy, - '$filter': filter, - '$orderby': orderby, - shouldIncludeResults: shouldIncludeResults, - queryRunSummaryForInProgress: queryRunSummaryForInProgress, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "efb387b0-10d5-42e7-be40-95e06ee9430f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "a00c85a5-80fa-4565-99c3-bcd2181434bb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsDetails, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34204,45 +46727,33 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Returns the list of fully hydrated work item revisions, paged. + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - * @param {string} orderby - * @param {boolean} shouldIncludeResults - * @param {boolean} queryRunSummaryForInProgress */ - getTestResultDetailsForRelease(project, releaseId, releaseEnvId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { + getRevisions(id, top, skip, expand, project) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } - if (releaseEnvId == null) { - throw new TypeError('releaseEnvId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + id: id }; let queryValues = { - releaseId: releaseId, - releaseEnvId: releaseEnvId, - publishContext: publishContext, - groupBy: groupBy, - '$filter': filter, - '$orderby': orderby, - shouldIncludeResults: shouldIncludeResults, - queryRunSummaryForInProgress: queryRunSummaryForInProgress, + '$top': top, + '$skip': skip, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "b834ec7e-35bb-450f-a3c8-802e70ca40dd", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "a00c85a5-80fa-4565-99c3-bcd2181434bb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsDetails, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -34252,23 +46763,23 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.TestResultDocument} document + * RESTful method to send mail for selected/queried work items. + * + * @param {WorkItemTrackingInterfaces.SendMailBody} body * @param {string} project - Project ID or project name - * @param {number} runId */ - publishTestResultDocument(document, project, runId) { + sendMail(body, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "370ca04b-8eec-4ca8-8ba3-d24dca228791", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "12438500-2f84-4fa7-9f1a-c31871b4959d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, document, options); + res = yield this.rest.create(url, body, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -34280,36 +46791,22 @@ class TestApi extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {string[]} fields - * @param {string} continuationToken + * @param {string} tagIdOrName */ - getResultGroupsByBuild(project, buildId, publishContext, fields, continuationToken) { + deleteTag(project, tagIdOrName) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } - if (publishContext == null) { - throw new TypeError('publishContext can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - publishContext: publishContext, - fields: fields && fields.join(","), - continuationToken: continuationToken, + project: project, + tagIdOrName: tagIdOrName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "d279d052-c55a-4204-b913-42f733b52958", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34320,38 +46817,22 @@ class TestApi extends basem.ClientApiBase { } /** * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {string} publishContext - * @param {number} releaseEnvId - * @param {string[]} fields - * @param {string} continuationToken + * @param {string} tagIdOrName */ - getResultGroupsByRelease(project, releaseId, publishContext, releaseEnvId, fields, continuationToken) { + getTag(project, tagIdOrName) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } - if (publishContext == null) { - throw new TypeError('publishContext can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - releaseId: releaseId, - publishContext: publishContext, - releaseEnvId: releaseEnvId, - fields: fields && fields.join(","), - continuationToken: continuationToken, + project: project, + tagIdOrName: tagIdOrName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "ef5ce5d4-a4e5-47ee-804c-354518f8d03f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34361,23 +46842,20 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get list of test Result meta data details for corresponding testcasereferenceId - * - * @param {string[]} testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). * @param {string} project - Project ID or project name */ - queryTestResultsMetaData(testReferenceIds, project) { + getTags(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "afa7830e-67a7-4336-8090-2b448ca80295", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, testReferenceIds, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, true); resolve(ret); } @@ -34388,23 +46866,24 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get test result retention settings - * + * @param {WorkItemTrackingInterfaces.WorkItemTagDefinition} tagData * @param {string} project - Project ID or project name + * @param {string} tagIdOrName */ - getResultRetentionSettings(project) { + updateTag(tagData, project, tagIdOrName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + tagIdOrName: tagIdOrName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a3206d9e-fa8d-42d3-88cb-f75c51e69cde", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.ResultRetentionSettings, false); + res = yield this.rest.update(url, tagData, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34414,24 +46893,31 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Update test result retention settings + * Creates a template * - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - Test result retention settings details to be updated - * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.WorkItemTemplate} template - Template contents + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation */ - updateResultRetentionSettings(retentionSettings, project) { + createTemplate(template, teamContext) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project + project: project, + team: team }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a3206d9e-fa8d-42d3-88cb-f75c51e69cde", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "6a90345f-a676-4969-afce-8e163e1d5642", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, retentionSettings, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.ResultRetentionSettings, false); + res = yield this.rest.create(url, template, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34441,26 +46927,34 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Add test results to a test run. + * Gets template * - * @param {TestInterfaces.TestCaseResult[]} results - List of test results to add. - * @param {string} project - Project ID or project name - * @param {number} runId - Test run ID into which test results to add. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} workitemtypename - Optional, When specified returns templates for given Work item type. */ - addTestResultsToTestRun(results, project, runId) { + getTemplates(teamContext, workitemtypename) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - runId: runId + team: team + }; + let queryValues = { + workitemtypename: workitemtypename, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "6a90345f-a676-4969-afce-8e163e1d5642", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, results, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -34470,31 +46964,32 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get a test result for a test run. + * Deletes the template with given id * - * @param {string} project - Project ID or project name - * @param {number} runId - Test run ID of a test result to fetch. - * @param {number} testCaseResultId - Test result ID. - * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template id */ - getTestResultById(project, runId, testCaseResultId, detailsToInclude) { + deleteTemplate(teamContext, templateId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - runId: runId, - testCaseResultId: testCaseResultId - }; - let queryValues = { - detailsToInclude: detailsToInclude, + team: team, + templateId: templateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34504,35 +46999,32 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get test results for a test run. + * Gets the template with specified id * - * @param {string} project - Project ID or project name - * @param {number} runId - Test run ID of test results to fetch. - * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations and WorkItems. - * @param {number} skip - Number of test results to skip from beginning. - * @param {number} top - Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise. - * @param {TestInterfaces.TestOutcome[]} outcomes - Comma separated list of test outcomes to filter test results. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template Id */ - getTestResults(project, runId, detailsToInclude, skip, top, outcomes) { + getTemplate(teamContext, templateId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - runId: runId - }; - let queryValues = { - detailsToInclude: detailsToInclude, - '$skip': skip, - '$top': top, - outcomes: outcomes && outcomes.join(","), + team: team, + templateId: templateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34542,26 +47034,33 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Update test results in a test run. + * Replace template contents * - * @param {TestInterfaces.TestCaseResult[]} results - List of test results to update. - * @param {string} project - Project ID or project name - * @param {number} runId - Test run ID whose test results to update. + * @param {WorkItemTrackingInterfaces.WorkItemTemplate} templateContent - Template contents to replace with + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template id */ - updateTestResults(results, project, runId) { + replaceTemplate(templateContent, teamContext, templateId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { project: project, - runId: runId + team: team, + templateId: templateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, results, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + res = yield this.rest.replace(url, templateContent, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34571,24 +47070,27 @@ class TestApi extends basem.ClientApiBase { }); } /** - * This API will return results by Ids with fields specified/trend for particular automated test method. We are still improving this API and have not finalized proper signature and contract. + * Returns a single update for a work item * - * @param {TestInterfaces.TestResultsQuery} query + * @param {number} id + * @param {number} updateNumber * @param {string} project - Project ID or project name */ - getTestResultsByQuery(query, project) { + getUpdate(id, updateNumber, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + id: id, + updateNumber: updateNumber }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "6711da49-8e6f-4d35-9f73-cef7a3c81a5b", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "6570bf97-d02c-4a91-8d93-3abe9895b1a9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, query, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsQuery, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemUpdate, false); resolve(ret); } catch (err) { @@ -34598,36 +47100,31 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {TestInterfaces.TestOutcome[]} outcomes + * Returns a the deltas between work item revisions + * + * @param {number} id * @param {number} top - * @param {string} continuationToken + * @param {number} skip + * @param {string} project - Project ID or project name */ - getTestResultsByBuild(project, buildId, publishContext, outcomes, top, continuationToken) { + getUpdates(id, top, skip, project) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + id: id }; let queryValues = { - buildId: buildId, - publishContext: publishContext, - outcomes: outcomes && outcomes.join(","), '$top': top, - continuationToken: continuationToken, + '$skip': skip, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "3c191b88-615b-4be2-b7d9-5ff9141e91d4", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "6570bf97-d02c-4a91-8d93-3abe9895b1a9", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemUpdate, true); resolve(ret); } catch (err) { @@ -34637,38 +47134,37 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvid - * @param {string} publishContext - * @param {TestInterfaces.TestOutcome[]} outcomes - * @param {number} top - * @param {string} continuationToken + * Gets the results of the query given its WIQL. + * + * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the WIQL. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision - Whether or not to use time precision. + * @param {number} top - The max number of results to return. */ - getTestResultsByRelease(project, releaseId, releaseEnvid, publishContext, outcomes, top, continuationToken) { + queryByWiql(wiql, teamContext, timePrecision, top) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project + project: project, + team: team }; let queryValues = { - releaseId: releaseId, - releaseEnvid: releaseEnvid, - publishContext: publishContext, - outcomes: outcomes && outcomes.join(","), + timePrecision: timePrecision, '$top': top, - continuationToken: continuationToken, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "ce01820b-83f3-4c15-a583-697a43292c4e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "1a9c53f7-f243-4447-b110-35ef023636e4", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, wiql, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemQueryResult, false); resolve(ret); } catch (err) { @@ -34678,34 +47174,38 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.BuildReference} buildToCompare + * Gets the results of the query given the query ID. + * + * @param {string} id - The query ID. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision - Whether or not to use time precision. + * @param {number} top - The max number of results to return. */ - queryTestResultsReportForBuild(project, buildId, publishContext, includeFailureDetails, buildToCompare) { + queryById(id, teamContext, timePrecision, top) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } let routeValues = { - project: project + project: project, + team: team, + id: id }; let queryValues = { - buildId: buildId, - publishContext: publishContext, - includeFailureDetails: includeFailureDetails, - buildToCompare: buildToCompare, + timePrecision: timePrecision, + '$top': top, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "000ef77b-fea2-498d-a10d-ad1a037f559f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a02355f5-5f8a-4671-8e32-369d23aac83d", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, false); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemQueryResult, false); resolve(ret); } catch (err) { @@ -34715,64 +47215,29 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.ReleaseReference} releaseToCompare + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) */ - queryTestResultsReportForRelease(project, releaseId, releaseEnvId, publishContext, includeFailureDetails, releaseToCompare) { + getWorkItemIconJson(icon, color, v) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } - if (releaseEnvId == null) { - throw new TypeError('releaseEnvId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + icon: icon }; let queryValues = { - releaseId: releaseId, - releaseEnvId: releaseEnvId, - publishContext: publishContext, - includeFailureDetails: includeFailureDetails, - releaseToCompare: releaseToCompare, + color: color, + v: v, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "85765790-ac68-494e-b268-af36c3929744", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * @param {TestInterfaces.ReleaseReference[]} releases - * @param {string} project - Project ID or project name - */ - queryTestResultsSummaryForReleases(releases, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "85765790-ac68-494e-b268-af36c3929744", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, releases, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34782,26 +47247,20 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.TestResultsContext} resultsContext - * @param {string} project - Project ID or project name - * @param {number[]} workItemIds + * Get a list of all work item icons. + * */ - queryTestSummaryByRequirement(resultsContext, project, workItemIds) { + getWorkItemIcons() { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - workItemIds: workItemIds && workItemIds.join(","), - }; + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "cd08294e-308d-4460-a46e-4cfdefba0b4b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, resultsContext, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSummaryForWorkItem, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -34811,23 +47270,28 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.TestResultTrendFilter} filter - * @param {string} project - Project ID or project name + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) */ - queryResultTrendForBuild(filter, project) { + getWorkItemIconSvg(icon, color, v) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + icon: icon + }; + let queryValues = { + color: color, + v: v, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "fbc82a85-0786-4442-88bb-eb0fda6b01b0", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.AggregatedDataForResultTrend, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("image/svg+xml", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -34836,23 +47300,28 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.TestResultTrendFilter} filter - * @param {string} project - Project ID or project name + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) */ - queryResultTrendForRelease(filter, project) { + getWorkItemIconXaml(icon, color, v) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + icon: icon + }; + let queryValues = { + color: color, + v: v, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "dd178e93-d8dd-4887-9635-d6b9560b7b6e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.AggregatedDataForResultTrend, true); - resolve(ret); + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("image/xaml+xml", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); } catch (err) { reject(err); @@ -34861,25 +47330,33 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get test run statistics , used when we want to get summary of a run by outcome. + * Get a batch of work item links * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the run to get. + * @param {string[]} linkTypes - A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types. + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. + * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. + * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. */ - getTestRunStatistics(project, runId) { + getReportingLinksByLinkType(project, linkTypes, types, continuationToken, startDateTime) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + project: project + }; + let queryValues = { + linkTypes: linkTypes && linkTypes.join(","), + types: types && types.join(","), + continuationToken: continuationToken, + startDateTime: startDateTime, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "0a42c424-d764-4a16-a2d5-5c85f87d0ae8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "b5b5b6d0-0308-40a1-b3f4-b9bb3c66878f", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRunStatistic, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34889,24 +47366,23 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Create new test run. + * Gets the work item relation type definition. * - * @param {TestInterfaces.RunCreateModel} testRun - Run details RunCreateModel - * @param {string} project - Project ID or project name + * @param {string} relation - The relation name */ - createTestRun(testRun, project) { + getRelationType(relation) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + relation: relation }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, testRun, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34916,25 +47392,20 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Delete a test run by its ID. + * Gets the work item relation types. * - * @param {string} project - Project ID or project name - * @param {number} runId - ID of the run to delete. */ - deleteTestRun(project, runId) { + getRelationTypes() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - runId: runId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -34944,29 +47415,47 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get a test run by its ID. + * Get a batch of work item revisions with the option of including deleted items * * @param {string} project - Project ID or project name - * @param {number} runId - ID of the run to get. - * @param {boolean} includeDetails - Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more. + * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. + * @param {boolean} includeDeleted - Specify if the deleted item should be returned. + * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. + * @param {boolean} includeLatestOnly - Return only the latest revisions of work items, skipping all historical revisions + * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand - Return all the fields in work item revisions, including long text fields which are not returned by default + * @param {boolean} includeDiscussionChangesOnly - Return only the those revisions of work items, where only history field was changed + * @param {number} maxPageSize - The maximum number of results to return in this batch */ - getTestRunById(project, runId, includeDetails) { + readReportingRevisionsGet(project, fields, types, continuationToken, startDateTime, includeIdentityRef, includeDeleted, includeTagRef, includeLatestOnly, expand, includeDiscussionChangesOnly, maxPageSize) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + project: project }; let queryValues = { - includeDetails: includeDetails, + fields: fields && fields.join(","), + types: types && types.join(","), + continuationToken: continuationToken, + startDateTime: startDateTime, + includeIdentityRef: includeIdentityRef, + includeDeleted: includeDeleted, + includeTagRef: includeTagRef, + includeLatestOnly: includeLatestOnly, + '$expand': expand, + includeDiscussionChangesOnly: includeDiscussionChangesOnly, + '$maxPageSize': maxPageSize, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f828fe59-dd87-495d-a17c-7a8d6211ca6c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -34976,41 +47465,32 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get a list of test runs. + * Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit. * + * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format * @param {string} project - Project ID or project name - * @param {string} buildUri - URI of the build that the runs used. - * @param {string} owner - Team foundation ID of the owner of the runs. - * @param {string} tmiRunId - * @param {number} planId - ID of the test plan that the runs are a part of. - * @param {boolean} includeRunDetails - If true, include all the properties of the runs. - * @param {boolean} automated - If true, only returns automated runs. - * @param {number} skip - Number of test runs to skip. - * @param {number} top - Number of test runs to return. + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand */ - getTestRuns(project, buildUri, owner, tmiRunId, planId, includeRunDetails, automated, skip, top) { + readReportingRevisionsPost(filter, project, continuationToken, startDateTime, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - buildUri: buildUri, - owner: owner, - tmiRunId: tmiRunId, - planId: planId, - includeRunDetails: includeRunDetails, - automated: automated, - '$skip': skip, - '$top': top, + continuationToken: continuationToken, + startDateTime: startDateTime, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f828fe59-dd87-495d-a17c-7a8d6211ca6c", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, true); + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35020,63 +47500,27 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. - * * @param {string} project - Project ID or project name - * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory). - * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). - * @param {TestInterfaces.TestRunState} state - Current state of the Runs to be queried. - * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). - * @param {boolean} isAutomated - Automation type of the Runs to be queried. - * @param {TestInterfaces.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried. - * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). - * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). - * @param {string} branchName - Source Branch name of the Runs to be queried. - * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). - * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). - * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). - * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). - * @param {string} runTitle - Run Title of the Runs to be queried. - * @param {number} top - Number of runs to be queried. Limit is 100 - * @param {string} continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. + * @param {string} continuationToken + * @param {number} maxPageSize */ - queryTestRuns(project, minLastUpdatedDate, maxLastUpdatedDate, state, planIds, isAutomated, publishContext, buildIds, buildDefIds, branchName, releaseIds, releaseDefIds, releaseEnvIds, releaseEnvDefIds, runTitle, top, continuationToken) { + readReportingDiscussions(project, continuationToken, maxPageSize) { return __awaiter(this, void 0, void 0, function* () { - if (minLastUpdatedDate == null) { - throw new TypeError('minLastUpdatedDate can not be null or undefined'); - } - if (maxLastUpdatedDate == null) { - throw new TypeError('maxLastUpdatedDate can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; let queryValues = { - minLastUpdatedDate: minLastUpdatedDate, - maxLastUpdatedDate: maxLastUpdatedDate, - state: state, - planIds: planIds && planIds.join(","), - isAutomated: isAutomated, - publishContext: publishContext, - buildIds: buildIds && buildIds.join(","), - buildDefIds: buildDefIds && buildDefIds.join(","), - branchName: branchName, - releaseIds: releaseIds && releaseIds.join(","), - releaseDefIds: releaseDefIds && releaseDefIds.join(","), - releaseEnvIds: releaseEnvIds && releaseEnvIds.join(","), - releaseEnvDefIds: releaseEnvDefIds && releaseEnvDefIds.join(","), - runTitle: runTitle, - '$top': top, continuationToken: continuationToken, + '$maxPageSize': maxPageSize, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4a644469-90c5-4fcc-9a9f-be0827d369ec", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35086,26 +47530,39 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Update test run by its ID. + * Creates a single work item. * - * @param {TestInterfaces.RunUpdateModel} runUpdateModel - Run details RunUpdateModel + * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the work item * @param {string} project - Project ID or project name - * @param {number} runId - ID of the run to update. + * @param {string} type - The work item type of the work item to create + * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item + * @param {boolean} bypassRules - Do not enforce the work item type rules on this update + * @param {boolean} suppressNotifications - Do not fire any notifications for this change + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. */ - updateTestRun(runUpdateModel, project, runId) { + createWorkItem(customHeaders, document, project, type, validateOnly, bypassRules, suppressNotifications, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - runId: runId + type: type + }; + let queryValues = { + validateOnly: validateOnly, + bypassRules: bypassRules, + suppressNotifications: suppressNotifications, + '$expand': expand, }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "62d3d110-0047-428c-ad3c-4fe872c91c74", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.update(url, runUpdateModel, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + res = yield this.rest.create(url, document, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35115,31 +47572,33 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Create a test session + * Returns a single work item from a template. * - * @param {TestInterfaces.TestSession} testSession - Test session details for creation - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} project - Project ID or project name + * @param {string} type - The work item type name + * @param {string} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. */ - createTestSession(testSession, teamContext) { + getWorkItemTemplate(project, type, fields, asOf, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team + type: type + }; + let queryValues = { + fields: fields, + asOf: asOf, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "62d3d110-0047-428c-ad3c-4fe872c91c74", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, testSession, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35149,42 +47608,29 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get a list of test sessions + * Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution. * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {number} period - Period in days from now, for which test sessions are fetched. - * @param {boolean} allSessions - If false, returns test sessions for current user. Otherwise, it returns test sessions for all users - * @param {boolean} includeAllProperties - If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version. - * @param {TestInterfaces.TestSessionSource} source - Source of the test session. - * @param {boolean} includeOnlyCompletedSessions - If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states + * @param {number} id - ID of the work item to be deleted + * @param {string} project - Project ID or project name + * @param {boolean} destroy - Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone. */ - getTestSessions(teamContext, period, allSessions, includeAllProperties, source, includeOnlyCompletedSessions) { + deleteWorkItem(id, project, destroy) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team + id: id }; let queryValues = { - period: period, - allSessions: allSessions, - includeAllProperties: includeAllProperties, - source: source, - includeOnlyCompletedSessions: includeOnlyCompletedSessions, + destroy: destroy, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35194,31 +47640,33 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Update a test session + * Returns a single work item. * - * @param {TestInterfaces.TestSession} testSession - Test session details for update - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {number} id - The work item id + * @param {string[]} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * @param {string} project - Project ID or project name */ - updateTestSession(testSession, teamContext) { + getWorkItem(id, fields, asOf, expand, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } let routeValues = { project: project, - team: team + id: id + }; + let queryValues = { + fields: fields && fields.join(","), + asOf: asOf, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, testSession, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35228,23 +47676,38 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Returns a list of work items (Maximum 200) + * + * @param {number[]} ids - The comma-separated list of requested work item ids. (Maximum 200 ids allowed). + * @param {string[]} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * @param {WorkItemTrackingInterfaces.WorkItemErrorPolicy} errorPolicy - The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}. * @param {string} project - Project ID or project name - * @param {number} sharedParameterId */ - deleteSharedParameter(project, sharedParameterId) { + getWorkItems(ids, fields, asOf, expand, errorPolicy, project) { return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - sharedParameterId: sharedParameterId + project: project + }; + let queryValues = { + ids: ids && ids.join(","), + fields: fields && fields.join(","), + asOf: asOf, + '$expand': expand, + errorPolicy: errorPolicy, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8300eeca-0f8c-4eff-a089-d2dda409c41f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -35254,22 +47717,38 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Updates a single work item. + * + * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the update + * @param {number} id - The id of the work item to update * @param {string} project - Project ID or project name - * @param {number} sharedStepId + * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item + * @param {boolean} bypassRules - Do not enforce the work item type rules on this update + * @param {boolean} suppressNotifications - Do not fire any notifications for this change + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. */ - deleteSharedStep(project, sharedStepId) { + updateWorkItem(customHeaders, document, id, project, validateOnly, bypassRules, suppressNotifications, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - sharedStepId: sharedStepId + id: id + }; + let queryValues = { + validateOnly: validateOnly, + bypassRules: bypassRules, + suppressNotifications: suppressNotifications, + '$expand': expand, }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "fabb3cc9-e3f8-40b7-8b62-24cc4b73fccf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; let res; - res = yield this.rest.del(url, options); + res = yield this.rest.update(url, document, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -35280,29 +47759,23 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Add test cases to suite. + * Gets work items for a list of work item ids (Maximum 200) * + * @param {WorkItemTrackingInterfaces.WorkItemBatchGetRequest} workItemGetRequest * @param {string} project - Project ID or project name - * @param {number} planId - ID of the test plan that contains the suite. - * @param {number} suiteId - ID of the test suite to which the test cases must be added. - * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. */ - addTestCasesToSuite(project, planId, suiteId, testCaseIds) { + getWorkItemsBatch(workItemGetRequest, project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - action: "TestCases", - project: project, - planId: planId, - suiteId: suiteId, - testCaseIds: testCaseIds + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "908509b6-4248-4475-a1cd-829139ba419f", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); + res = yield this.rest.create(url, workItemGetRequest, options); let ret = this.formatResponse(res.result, null, true); resolve(ret); } @@ -35313,30 +47786,21 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get a specific test case in a test suite with test case id. + * INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects * - * @param {string} project - Project ID or project name - * @param {number} planId - ID of the test plan that contains the suites. - * @param {number} suiteId - ID of the suite that contains the test case. - * @param {number} testCaseIds - ID of the test case to get. + * @param {string[]} projectNames */ - getTestCaseById(project, planId, suiteId, testCaseIds) { + getWorkItemStateColors(projectNames) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - action: "TestCases", - project: project, - planId: planId, - suiteId: suiteId, - testCaseIds: testCaseIds - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "0b83df8a-3496-4ddb-ba44-63634f4cda61", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, projectNames, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -35346,23 +47810,24 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get all test cases in a suite. + * Returns the next state on the given work item IDs. * - * @param {string} project - Project ID or project name - * @param {number} planId - ID of the test plan that contains the suites. - * @param {number} suiteId - ID of the suite to get. + * @param {number[]} ids - list of work item ids + * @param {string} action - possible actions. Currently only supports checkin */ - getTestCases(project, planId, suiteId) { + getWorkItemNextStatesOnCheckinAction(ids, action) { return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - action: "TestCases", - project: project, - planId: planId, - suiteId: suiteId + let routeValues = {}; + let queryValues = { + ids: ids && ids.join(","), + action: action, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "afae844b-e2f6-44c2-8053-17b3bb936a40", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -35377,30 +47842,23 @@ class TestApi extends basem.ClientApiBase { }); } /** - * The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently. + * Get all work item type categories. * * @param {string} project - Project ID or project name - * @param {number} planId - ID of the test plan that contains the suite. - * @param {number} suiteId - ID of the suite to get. - * @param {string} testCaseIds - IDs of the test cases to remove from the suite. */ - removeTestCasesFromSuiteUrl(project, planId, suiteId, testCaseIds) { + getWorkItemTypeCategories(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - action: "TestCases", - project: project, - planId: planId, - suiteId: suiteId, - testCaseIds: testCaseIds + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "9b9f5734-36c8-415e-ba67-f83b45c31408", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -35410,31 +47868,25 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Updates the properties of the test case association in a suite. + * Get specific work item type category by name. * - * @param {TestInterfaces.SuiteTestCaseUpdateModel} suiteTestCaseUpdateModel - Model for updation of the properties of test case suite association. * @param {string} project - Project ID or project name - * @param {number} planId - ID of the test plan that contains the suite. - * @param {number} suiteId - ID of the test suite to which the test cases must be added. - * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. + * @param {string} category - The category name */ - updateSuiteTestCases(suiteTestCaseUpdateModel, project, planId, suiteId, testCaseIds) { + getWorkItemTypeCategory(project, category) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - action: "TestCases", project: project, - planId: planId, - suiteId: suiteId, - testCaseIds: testCaseIds + category: category }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "9b9f5734-36c8-415e-ba67-f83b45c31408", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, suiteTestCaseUpdateModel, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35444,25 +47896,21 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Delete a test case. + * INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects * - * @param {string} project - Project ID or project name - * @param {number} testCaseId - Id of test case to delete. + * @param {string[]} projectNames */ - deleteTestCase(project, testCaseId) { + getWorkItemTypeColors(projectNames) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - testCaseId: testCaseId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4d472e0f-e32c-4ef8-adf4-a4078772889c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "958fde80-115e-43fb-bd65-749c48057faf", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, projectNames, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -35472,24 +47920,21 @@ class TestApi extends basem.ClientApiBase { }); } /** - * Get history of a test method using TestHistoryQuery + * INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects * - * @param {TestInterfaces.TestHistoryQuery} filter - TestHistoryQuery to get history - * @param {string} project - Project ID or project name + * @param {string[]} projectNames */ - queryTestHistory(filter, project) { + getWorkItemTypeColorAndIcons(projectNames) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "929fd86c-3e38-4d8c-b4b6-90df256e5971", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f0f8dc62-3975-48ce-8051-f636b68b52e3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestHistoryQuery, false); + res = yield this.rest.create(url, projectNames, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -35499,21 +47944,24 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.TestSettings} testSettings + * Returns a work item type definition. + * * @param {string} project - Project ID or project name + * @param {string} type - Work item type name */ - createTestSettings(testSettings, project) { + getWorkItemType(project, type) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + type: type }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, testSettings, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -35524,23 +47972,23 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Returns the list of work item types + * * @param {string} project - Project ID or project name - * @param {number} testSettingsId */ - deleteTestSettings(project, testSettingsId) { + getWorkItemTypes(project) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - testSettingsId: testSettingsId + project: project }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -35550,23 +47998,29 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Get a list of fields for a work item type with detailed references. + * * @param {string} project - Project ID or project name - * @param {number} testSettingsId + * @param {string} type - Work item type. + * @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. */ - getTestSettingsById(project, testSettingsId) { + getWorkItemTypeFieldsWithReferences(project, type, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project, - testSettingsId: testSettingsId + type: type + }; + let queryValues = { + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "bd293ce5-3d25-4192-8e67-e8092e879efb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -35576,22 +48030,31 @@ class TestApi extends basem.ClientApiBase { }); } /** - * @param {TestInterfaces.WorkItemToTestLinks} workItemToTestLinks + * Get a field for a work item type with detailed references. + * * @param {string} project - Project ID or project name + * @param {string} type - Work item type. + * @param {string} field + * @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. */ - addWorkItemToTestLinks(workItemToTestLinks, project) { + getWorkItemTypeFieldWithReferences(project, type, field, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + type: type, + field: field + }; + let queryValues = { + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "371b1655-ce05-412e-a113-64cc77bb78d2", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "bd293ce5-3d25-4192-8e67-e8092e879efb", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, workItemToTestLinks, options); - let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.WorkItemToTestLinks, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35601,33 +48064,25 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Returns the state names and colors for a work item type. + * * @param {string} project - Project ID or project name - * @param {string} testName - * @param {number} workItemId + * @param {string} type - The state name */ - deleteTestMethodToWorkItemLink(project, testName, workItemId) { + getWorkItemTypeStates(project, type) { return __awaiter(this, void 0, void 0, function* () { - if (testName == null) { - throw new TypeError('testName can not be null or undefined'); - } - if (workItemId == null) { - throw new TypeError('workItemId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - testName: testName, - workItemId: workItemId, + project: project, + type: type }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "7b0bdee3-a354-47f9-a42c-89018d7808d5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "7c9d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -35637,27 +48092,28 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Export work item type + * * @param {string} project - Project ID or project name - * @param {string} testName + * @param {string} type + * @param {boolean} exportGlobalLists */ - queryTestMethodLinkedWorkItems(project, testName) { + exportWorkItemTypeDefinition(project, type, exportGlobalLists) { return __awaiter(this, void 0, void 0, function* () { - if (testName == null) { - throw new TypeError('testName can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + project: project, + type: type }; let queryValues = { - testName: testName, + exportGlobalLists: exportGlobalLists, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "7b0bdee3-a354-47f9-a42c-89018d7808d5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "8637ac8b-5eb6-4f90-b3f7-4f2ff576a459", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -35668,38 +48124,24 @@ class TestApi extends basem.ClientApiBase { }); } /** + * Add/updates a work item type + * + * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel * @param {string} project - Project ID or project name - * @param {string} workItemCategory - * @param {string} automatedTestName - * @param {number} testCaseId - * @param {Date} maxCompleteDate - * @param {number} days - * @param {number} workItemCount */ - queryTestResultWorkItems(project, workItemCategory, automatedTestName, testCaseId, maxCompleteDate, days, workItemCount) { + updateWorkItemTypeDefinition(updateModel, project) { return __awaiter(this, void 0, void 0, function* () { - if (workItemCategory == null) { - throw new TypeError('workItemCategory can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { project: project }; - let queryValues = { - workItemCategory: workItemCategory, - automatedTestName: automatedTestName, - testCaseId: testCaseId, - maxCompleteDate: maxCompleteDate, - days: days, - '$workItemCount': workItemCount, - }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "926ff5dc-137f-45f0-bd51-9412fa9810ce", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "8637ac8b-5eb6-4f90-b3f7-4f2ff576a459", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.create(url, updateModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -35709,13 +48151,13 @@ class TestApi extends basem.ClientApiBase { }); } } -TestApi.RESOURCE_AREA_ID = "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e"; -exports.TestApi = TestApi; +WorkItemTrackingApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; +exports.WorkItemTrackingApi = WorkItemTrackingApi; /***/ }), -/***/ 1819: +/***/ 21178: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -35738,42 +48180,31 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const Contracts = __nccwpck_require__(3047); -class TestResultsApi extends basem.ClientApiBase { +const basem = __nccwpck_require__(80273); +const WorkItemTrackingProcessInterfaces = __nccwpck_require__(44524); +class WorkItemTrackingProcessApi extends basem.ClientApiBase { constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-testResults-api', options); + super(baseUrl, handlers, 'node-WorkItemTracking-api', options); } /** - * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} actionPath + * Creates a single behavior in the given process. + * + * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest} behavior + * @param {string} processId - The ID of the process */ - createTestIterationResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, iterationId, actionPath) { + createProcessBehavior(behavior, processId) { return __awaiter(this, void 0, void 0, function* () { - if (iterationId == null) { - throw new TypeError('iterationId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId - }; - let queryValues = { - iterationId: iterationId, - actionPath: actionPath, + processId: processId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, behavior, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); resolve(ret); } catch (err) { @@ -35783,25 +48214,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId + * Removes a behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior */ - createTestResultAttachment(attachmentRequestModel, project, runId, testCaseResultId) { + deleteProcessBehavior(processId, behaviorRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId + processId: processId, + behaviorRefName: behaviorRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -35812,33 +48242,29 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} testSubResultId + * Returns a behavior of the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior + * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand */ - createTestSubResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, testSubResultId) { + getProcessBehavior(processId, behaviorRefName, expand) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId + processId: processId, + behaviorRefName: behaviorRefName }; let queryValues = { - testSubResultId: testSubResultId, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); resolve(ret); } catch (err) { @@ -35848,27 +48274,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId + * Returns a list of all behaviors in the process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand */ - deleteTestResultAttachment(project, runId, testCaseResultId, attachmentId) { + getProcessBehaviors(processId, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId + processId: processId + }; + let queryValues = { + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, true); resolve(ret); } catch (err) { @@ -35878,35 +48304,58 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a test iteration attachment + * Replaces a behavior in the process. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - * @param {number} iterationId + * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest} behaviorData + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior */ - getTestIterationAttachmentContent(project, runId, testCaseResultId, attachmentId, iterationId) { + updateProcessBehavior(behaviorData, processId, behaviorRefName) { return __awaiter(this, void 0, void 0, function* () { - if (iterationId == null) { - throw new TypeError('iterationId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId + processId: processId, + behaviorRefName: behaviorRefName }; - let queryValues = { - iterationId: iterationId, + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, behaviorData, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a control in a group. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control - The control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group to add the control to. + */ + createControlInGroup(control, processId, witRefName, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -35915,35 +48364,35 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a test iteration attachment + * Moves a control to a specified group. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - * @param {number} iterationId + * @param {WorkItemTrackingProcessInterfaces.Control} control - The control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group to move the control to. + * @param {string} controlId - The ID of the control. + * @param {string} removeFromGroupId - The group ID to remove the control from. */ - getTestIterationAttachmentZip(project, runId, testCaseResultId, attachmentId, iterationId) { + moveControlToGroup(control, processId, witRefName, groupId, controlId, removeFromGroupId) { return __awaiter(this, void 0, void 0, function* () { - if (iterationId == null) { - throw new TypeError('iterationId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId }; let queryValues = { - iterationId: iterationId, + removeFromGroupId: removeFromGroupId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -35952,28 +48401,30 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a test result attachment + * Removes a control from the work item form. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group. + * @param {string} controlId - The ID of the control to remove. */ - getTestResultAttachmentContent(project, runId, testCaseResultId, attachmentId) { + removeControlFromGroup(processId, witRefName, groupId, controlId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -35982,25 +48433,30 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId + * Updates a control on the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control - The updated control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group. + * @param {string} controlId - The ID of the control. */ - getTestResultAttachments(project, runId, testCaseResultId) { + updateControl(control, processId, witRefName, groupId, controlId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestAttachment, true); + res = yield this.rest.update(url, control, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -36010,28 +48466,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a test result attachment + * Adds a field to a work item type. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId + * @param {WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest} field + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. */ - getTestResultAttachmentZip(project, runId, testCaseResultId, attachmentId) { + addFieldToWorkItemType(field, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); + resolve(ret); } catch (err) { reject(err); @@ -36040,35 +48495,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a test sub result attachment + * Returns a list of all fields in a work item type. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - * @param {number} testSubResultId + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. */ - getTestSubResultAttachmentContent(project, runId, testCaseResultId, attachmentId, testSubResultId) { + getAllWorkItemTypeFields(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId - }; - let queryValues = { - testSubResultId: testSubResultId, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, true); + resolve(ret); } catch (err) { reject(err); @@ -36077,34 +48523,31 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns attachment references for test sub result. + * Returns a field in a work item type. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} testSubResultId + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. + * @param {WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeFieldsExpandLevel} expand */ - getTestSubResultAttachments(project, runId, testCaseResultId, testSubResultId) { + getWorkItemTypeField(processId, witRefName, fieldRefName, expand) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId + processId: processId, + witRefName: witRefName, + fieldRefName: fieldRefName }; let queryValues = { - testSubResultId: testSubResultId, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestAttachment, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); resolve(ret); } catch (err) { @@ -36114,35 +48557,28 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a test sub result attachment + * Removes a field from a work item type. Does not permanently delete the field. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - * @param {number} testSubResultId + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. */ - getTestSubResultAttachmentZip(project, runId, testCaseResultId, attachmentId, testSubResultId) { + removeWorkItemTypeField(processId, witRefName, fieldRefName) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId, - attachmentId: attachmentId - }; - let queryValues = { - testSubResultId: testSubResultId, + processId: processId, + witRefName: witRefName, + fieldRefName: fieldRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -36151,24 +48587,28 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId + * Updates a field in a work item type. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest} field + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. */ - createTestRunAttachment(attachmentRequestModel, project, runId) { + updateWorkItemTypeField(field, processId, witRefName, fieldRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName, + fieldRefName: fieldRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); resolve(ret); } catch (err) { @@ -36178,24 +48618,29 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId + * Adds a group to the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page to add the group to. + * @param {string} sectionId - The ID of the section to add the group to. */ - deleteTestRunAttachment(project, runId, attachmentId) { + addGroup(group, processId, witRefName, pageId, sectionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - attachmentId: attachmentId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.create(url, group, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -36206,26 +48651,45 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a test run attachment + * Moves a group to a different page and section. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is i.n + * @param {string} groupId - The ID of the group. + * @param {string} removeFromPageId - ID of the page to remove the group from. + * @param {string} removeFromSectionId - ID of the section to remove the group from. */ - getTestRunAttachmentContent(project, runId, attachmentId) { + moveGroupToPage(group, processId, witRefName, pageId, sectionId, groupId, removeFromPageId, removeFromSectionId) { return __awaiter(this, void 0, void 0, function* () { + if (removeFromPageId == null) { + throw new TypeError('removeFromPageId can not be null or undefined'); + } + if (removeFromSectionId == null) { + throw new TypeError('removeFromSectionId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - attachmentId: attachmentId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + let queryValues = { + removeFromPageId: removeFromPageId, + removeFromSectionId: removeFromSectionId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -36234,23 +48698,39 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId + * Moves a group to a different section. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is in. + * @param {string} groupId - The ID of the group. + * @param {string} removeFromSectionId - ID of the section to remove the group from. */ - getTestRunAttachments(project, runId) { + moveGroupToSection(group, processId, witRefName, pageId, sectionId, groupId, removeFromSectionId) { return __awaiter(this, void 0, void 0, function* () { + if (removeFromSectionId == null) { + throw new TypeError('removeFromSectionId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + let queryValues = { + removeFromSectionId: removeFromSectionId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestAttachment, true); + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -36260,26 +48740,32 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a test run attachment + * Removes a group from the work item form. * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section to the group is in + * @param {string} groupId - The ID of the group */ - getTestRunAttachmentZip(project, runId, attachmentId) { + removeGroup(processId, witRefName, pageId, sectionId, groupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - attachmentId: attachmentId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -36288,25 +48774,32 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId + * Updates a group in the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is in. + * @param {string} groupId - The ID of the group. */ - getBugsLinkedToTestResult(project, runId, testCaseResultId) { + updateGroup(group, processId, witRefName, pageId, sectionId, groupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "d8dbf98f-eb34-4f8d-8365-47972af34f29", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, group, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -36316,33 +48809,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} flags + * Gets the form layout. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. */ - getBuildCodeCoverage(project, buildId, flags) { + getFormLayout(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } - if (flags == null) { - throw new TypeError('flags can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - flags: flags, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "9b3e1ece-c6ab-4fbb-8167-8a32a0c92216", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "fa8646eb-43cd-4b71-9564-40106fd63e40", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.BuildCoverage, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.FormLayout, false); resolve(ret); } catch (err) { @@ -36352,30 +48837,21 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} deltaBuildId + * Creates a picklist. + * + * @param {WorkItemTrackingProcessInterfaces.PickList} picklist - Picklist */ - getCodeCoverageSummary(project, buildId, deltaBuildId) { + createList(picklist) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - deltaBuildId: deltaBuildId, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "9b3e1ece-c6ab-4fbb-8167-8a32a0c92216", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.CodeCoverageSummary, false); + res = yield this.rest.create(url, picklist, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -36385,30 +48861,22 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + * Removes a picklist. * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {Contracts.CodeCoverageData} coverageData + * @param {string} listId - The ID of the list */ - updateCodeCoverageSummary(project, buildId, coverageData) { + deleteList(listId) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, + listId: listId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "9b3e1ece-c6ab-4fbb-8167-8a32a0c92216", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, coverageData, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -36419,30 +48887,23 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} flags + * Returns a picklist. + * + * @param {string} listId - The ID of the list */ - getTestRunCodeCoverage(project, runId, flags) { + getList(listId) { return __awaiter(this, void 0, void 0, function* () { - if (flags == null) { - throw new TypeError('flags can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId - }; - let queryValues = { - flags: flags, + listId: listId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "5641efbc-6f9b-401a-baeb-d3da22489e5e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -36452,23 +48913,21 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get file coverage for the specified file + * Returns meta data of the picklist. * - * @param {Contracts.FileCoverageRequest} fileCoverageRequest - File details with pull request iteration context - * @param {string} project - Project ID or project name */ - getFileLevelCodeCoverage(fileCoverageRequest, project) { + getListsMetadata() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "4a6d0c46-51ca-45aa-9163-249cee3289b7", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); } catch (err) { reject(err); @@ -36477,22 +48936,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.ResultsFilter} filter - * @param {string} project - Project ID or project name + * Updates a list. + * + * @param {WorkItemTrackingProcessInterfaces.PickList} picklist + * @param {string} listId - The ID of the list */ - queryTestResultHistory(filter, project) { + updateList(picklist, listId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + listId: listId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "bdf7a97b-0395-4da8-9d5d-f957619327d1", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultHistory, false); + res = yield this.rest.replace(url, picklist, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -36502,25 +48963,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get test run message logs + * Adds a page to the work item form. * - * @param {string} project - Project ID or project name - * @param {number} runId - ID of the run to get. + * @param {WorkItemTrackingProcessInterfaces.Page} page - The page. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. */ - getTestRunMessageLogs(project, runId) { + addPage(page, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "e9ab0c6a-1984-418b-87c0-ee4202318ba3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestMessageLogDetails, true); + res = yield this.rest.create(url, page, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.Page, false); resolve(ret); } catch (err) { @@ -36530,40 +48992,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get summary of test results. + * Removes a page from the work item form * - * @param {string} project - Project ID or project name - * @param {number} pipelineId - Pipeline Id. This is same as build Id. - * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character. - * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character. - * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. - * @param {Contracts.Metrics[]} metricNames - * @param {boolean} groupByNode - Group summary for each node of the pipleine heirarchy + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page */ - getTestPipelineMetrics(project, pipelineId, stageName, phaseName, jobName, metricNames, groupByNode) { + removePage(processId, witRefName, pageId) { return __awaiter(this, void 0, void 0, function* () { - if (pipelineId == null) { - throw new TypeError('pipelineId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - pipelineId: pipelineId, - stageName: stageName, - phaseName: phaseName, - jobName: jobName, - metricNames: metricNames && metricNames.join(","), - groupByNode: groupByNode, + processId: processId, + witRefName: witRefName, + pageId: pageId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "65f35817-86a1-4131-b38b-3ec2d4744e53", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.PipelineTestMetrics, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -36573,40 +49022,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - * @param {string} orderby - * @param {boolean} shouldIncludeResults - * @param {boolean} queryRunSummaryForInProgress + * Updates a page on the work item form + * + * @param {WorkItemTrackingProcessInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getTestResultDetailsForBuild(project, buildId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { + updatePage(page, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - publishContext: publishContext, - groupBy: groupBy, - '$filter': filter, - '$orderby': orderby, - shouldIncludeResults: shouldIncludeResults, - queryRunSummaryForInProgress: queryRunSummaryForInProgress, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "a518c749-4524-45b2-a7ef-1ac009b312cd", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsDetails, false); + res = yield this.rest.update(url, page, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.Page, false); resolve(ret); } catch (err) { @@ -36616,45 +49051,21 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - * @param {string} orderby - * @param {boolean} shouldIncludeResults - * @param {boolean} queryRunSummaryForInProgress + * Creates a process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessModel} createRequest - CreateProcessModel. */ - getTestResultDetailsForRelease(project, releaseId, releaseEnvId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { + createNewProcess(createRequest) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } - if (releaseEnvId == null) { - throw new TypeError('releaseEnvId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - releaseId: releaseId, - releaseEnvId: releaseEnvId, - publishContext: publishContext, - groupBy: groupBy, - '$filter': filter, - '$orderby': orderby, - shouldIncludeResults: shouldIncludeResults, - queryRunSummaryForInProgress: queryRunSummaryForInProgress, - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "19a8183a-69fb-47d7-bfbf-1b6b0d921294", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsDetails, false); + res = yield this.rest.create(url, createRequest, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); resolve(ret); } catch (err) { @@ -36664,23 +49075,22 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestResultDocument} document - * @param {string} project - Project ID or project name - * @param {number} runId + * Removes a process of a specific ID. + * + * @param {string} processTypeId */ - publishTestResultDocument(document, project, runId) { + deleteProcessById(processTypeId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processTypeId: processTypeId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "74838649-b038-42f1-a0e7-6deb3973bf14", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, document, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -36691,37 +49101,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {string[]} fields - * @param {string} continuationToken + * Edit a process of a specific ID. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessModel} updateRequest + * @param {string} processTypeId */ - getResultGroupsByBuild(project, buildId, publishContext, fields, continuationToken) { + editProcess(updateRequest, processTypeId) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } - if (publishContext == null) { - throw new TypeError('publishContext can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - publishContext: publishContext, - fields: fields && fields.join(","), - continuationToken: continuationToken, + processTypeId: processTypeId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "e49244d1-c49f-49ad-a717-3bbaefe6a201", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, updateRequest, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); resolve(ret); } catch (err) { @@ -36731,39 +49128,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {string} publishContext - * @param {number} releaseEnvId - * @param {string[]} fields - * @param {string} continuationToken + * Get list of all processes including system and inherited. + * + * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand */ - getResultGroupsByRelease(project, releaseId, publishContext, releaseEnvId, fields, continuationToken) { + getListOfProcesses(expand) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } - if (publishContext == null) { - throw new TypeError('publishContext can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; + let routeValues = {}; let queryValues = { - releaseId: releaseId, - publishContext: publishContext, - releaseEnvId: releaseEnvId, - fields: fields && fields.join(","), - continuationToken: continuationToken, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "3c2b6bb0-0620-434a-a5c3-26aa0fcfda15", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, true); resolve(ret); } catch (err) { @@ -36773,28 +49155,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get list of test Result meta data details for corresponding testcasereferenceId + * Get a single process of a specified ID. * - * @param {string[]} testCaseReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). - * @param {string} project - Project ID or project name - * @param {Contracts.ResultMetaDataDetails} detailsToInclude - Details to include with test results metadata. Default is None. Other values are FlakyIdentifiers. + * @param {string} processTypeId + * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand */ - queryTestResultsMetaData(testCaseReferenceIds, project, detailsToInclude) { + getProcessByItsId(processTypeId, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processTypeId: processTypeId }; let queryValues = { - detailsToInclude: detailsToInclude, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "testresults", "b72ff4c0-4341-4213-ba27-f517cf341c95", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, testCaseReferenceIds, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); resolve(ret); } catch (err) { @@ -36804,26 +49185,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Update properties of test result meta data + * Adds a rule to work item type in the process. * - * @param {Contracts.TestResultMetaDataUpdateInput} testResultMetaDataUpdateInput - TestResultMetaData update input TestResultMetaDataUpdateInput - * @param {string} project - Project ID or project name - * @param {number} testCaseReferenceId - TestCaseReference Id of Test Result to be updated. + * @param {WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest} processRuleCreate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - updateTestResultsMetaData(testResultMetaDataUpdateInput, project, testCaseReferenceId) { + addProcessWorkItemTypeRule(processRuleCreate, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - testCaseReferenceId: testCaseReferenceId + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "testresults", "b72ff4c0-4341-4213-ba27-f517cf341c95", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, testResultMetaDataUpdateInput, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, processRuleCreate, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); resolve(ret); } catch (err) { @@ -36833,22 +49214,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestResultsQuery} query - * @param {string} project - Project ID or project name + * Removes a rule from the work item type in the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule */ - getTestResultsByQuery(query, project) { + deleteProcessWorkItemTypeRule(processId, witRefName, ruleId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId, + witRefName: witRefName, + ruleId: ruleId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "14033a2c-af25-4af1-9e39-8ef6900482e3", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, query, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsQuery, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -36858,32 +49244,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.QueryModel} queryModel - * @param {string} project - Project ID or project name - * @param {boolean} includeResultDetails - * @param {boolean} includeIterationDetails - * @param {number} skip - * @param {number} top + * Returns a single rule in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule */ - getTestResultsByQueryWiql(queryModel, project, includeResultDetails, includeIterationDetails, skip, top) { + getProcessWorkItemTypeRule(processId, witRefName, ruleId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - includeResultDetails: includeResultDetails, - includeIterationDetails: includeIterationDetails, - '$skip': skip, - '$top': top, + processId: processId, + witRefName: witRefName, + ruleId: ruleId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "5ea78be3-2f5a-4110-8034-c27f24c62db1", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, queryModel, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); resolve(ret); } catch (err) { @@ -36893,24 +49274,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestCaseResult[]} results - * @param {string} project - Project ID or project name - * @param {number} runId + * Returns a list of all rules in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - addTestResultsToTestRun(results, project, runId) { + getProcessWorkItemTypeRules(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "02afa165-e79a-4d70-8f0c-2af0f35b4e07", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, results, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, true); resolve(ret); } catch (err) { @@ -36920,29 +49302,28 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testResultId - * @param {Contracts.ResultDetails} detailsToInclude + * Updates a rule in the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest} processRule + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule */ - getTestResultById(project, runId, testResultId, detailsToInclude) { + updateProcessWorkItemTypeRule(processRule, processId, witRefName, ruleId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testResultId: testResultId - }; - let queryValues = { - detailsToInclude: detailsToInclude, + processId: processId, + witRefName: witRefName, + ruleId: ruleId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "02afa165-e79a-4d70-8f0c-2af0f35b4e07", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, false); + res = yield this.rest.replace(url, processRule, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); resolve(ret); } catch (err) { @@ -36952,35 +49333,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {Contracts.ResultDetails} detailsToInclude - * @param {number} skip - * @param {number} top - * @param {Contracts.TestOutcome[]} outcomes - * @param {boolean} newTestsOnly + * Creates a state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getTestResults(project, runId, detailsToInclude, skip, top, outcomes, newTestsOnly) { + createStateDefinition(stateModel, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId - }; - let queryValues = { - detailsToInclude: detailsToInclude, - '$skip': skip, - '$top': top, - outcomes: outcomes && outcomes.join(","), - '$newTestsOnly': newTestsOnly, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "02afa165-e79a-4d70-8f0c-2af0f35b4e07", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + res = yield this.rest.create(url, stateModel, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); resolve(ret); } catch (err) { @@ -36990,24 +49362,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestCaseResult[]} results - * @param {string} project - Project ID or project name - * @param {number} runId + * Removes a state definition in the work item type of the process. + * + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state */ - updateTestResults(results, project, runId) { + deleteStateDefinition(processId, witRefName, stateId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName, + stateId: stateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "02afa165-e79a-4d70-8f0c-2af0f35b4e07", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, results, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37017,36 +49392,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {Contracts.TestOutcome[]} outcomes - * @param {number} top - * @param {string} continuationToken + * Returns a single state definition in a work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state */ - getTestResultsByBuild(project, buildId, publishContext, outcomes, top, continuationToken) { + getStateDefinition(processId, witRefName, stateId) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - publishContext: publishContext, - outcomes: outcomes && outcomes.join(","), - '$top': top, - continuationToken: continuationToken, + processId: processId, + witRefName: witRefName, + stateId: stateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "f48cc885-dbc4-4efc-ab19-ae8c19d1e02a", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); resolve(ret); } catch (err) { @@ -37056,44 +49422,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get a list of results. + * Returns a list of all state definitions in a work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} pipelineId - Pipeline Id. This is same as build Id. - * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character. - * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character. - * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. - * @param {Contracts.TestOutcome[]} outcomes - List of outcome of results - * @param {number} top - Maximum number of results to return - * @param {String} continuationToken - Header to pass the continuationToken + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getTestResultsByPipeline(customHeaders, project, pipelineId, stageName, phaseName, jobName, outcomes, top, continuationToken) { + getStateDefinitions(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (pipelineId == null) { - throw new TypeError('pipelineId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - pipelineId: pipelineId, - stageName: stageName, - phaseName: phaseName, - jobName: jobName, - outcomes: outcomes && outcomes.join(","), - '$top': top, + processId: processId, + witRefName: witRefName }; - customHeaders = customHeaders || {}; - customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "80169dc2-30c3-4c25-84b2-dd67d7ff1f52", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, true); resolve(ret); } catch (err) { @@ -37103,38 +49450,28 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvid - * @param {string} publishContext - * @param {Contracts.TestOutcome[]} outcomes - * @param {number} top - * @param {string} continuationToken + * Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden. + * + * @param {WorkItemTrackingProcessInterfaces.HideStateModel} hideStateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state */ - getTestResultsByRelease(project, releaseId, releaseEnvid, publishContext, outcomes, top, continuationToken) { + hideStateDefinition(hideStateModel, processId, witRefName, stateId) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - releaseId: releaseId, - releaseEnvid: releaseEnvid, - publishContext: publishContext, - outcomes: outcomes && outcomes.join(","), - '$top': top, - continuationToken: continuationToken, + processId: processId, + witRefName: witRefName, + stateId: stateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "3994b949-77e5-495d-8034-edf80d95b84e", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.replace(url, hideStateModel, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); resolve(ret); } catch (err) { @@ -37144,40 +49481,28 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get all the available groups details and for these groups get failed and aborted results. + * Updates a given state definition in the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} pipelineId - Pipeline Id. This is same as build Id. - * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character. - * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character. - * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. - * @param {boolean} shouldIncludeFailedAndAbortedResults - If true, it will return Ids of failed and aborted results for each test group - * @param {boolean} queryGroupSummaryForInProgress - If true, it will calculate summary for InProgress runs as well. + * @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state */ - testResultsGroupDetails(project, pipelineId, stageName, phaseName, jobName, shouldIncludeFailedAndAbortedResults, queryGroupSummaryForInProgress) { + updateStateDefinition(stateModel, processId, witRefName, stateId) { return __awaiter(this, void 0, void 0, function* () { - if (pipelineId == null) { - throw new TypeError('pipelineId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - pipelineId: pipelineId, - stageName: stageName, - phaseName: phaseName, - jobName: jobName, - shouldIncludeFailedAndAbortedResults: shouldIncludeFailedAndAbortedResults, - queryGroupSummaryForInProgress: queryGroupSummaryForInProgress, + processId: processId, + witRefName: witRefName, + stateId: stateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "f903b850-06af-4b50-a344-d7bbfb19e93b", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsDetails, false); + res = yield this.rest.update(url, stateModel, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); resolve(ret); } catch (err) { @@ -37187,34 +49512,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {Contracts.BuildReference} buildToCompare + * Deletes a system control modification on the work item form. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} controlId - The ID of the control. */ - queryTestResultsReportForBuild(project, buildId, publishContext, includeFailureDetails, buildToCompare) { + deleteSystemControl(processId, witRefName, controlId) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - publishContext: publishContext, - includeFailureDetails: includeFailureDetails, - buildToCompare: buildToCompare, + processId: processId, + witRefName: witRefName, + controlId: controlId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "e009fa95-95a5-4ad4-9681-590043ce2423", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -37224,38 +49542,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get summary of test results. + * Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s) * - * @param {string} project - Project ID or project name - * @param {number} pipelineId - Pipeline Id. This is same as build Id. - * @param {string} stageName - Name of the stage. Maximum supported length for name is 256 character. - * @param {string} phaseName - Name of the phase. Maximum supported length for name is 256 character. - * @param {string} jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. - * @param {boolean} includeFailureDetails - If true returns failure insights + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. */ - queryTestResultsReportForPipeline(project, pipelineId, stageName, phaseName, jobName, includeFailureDetails) { + getSystemControls(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (pipelineId == null) { - throw new TypeError('pipelineId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - pipelineId: pipelineId, - stageName: stageName, - phaseName: phaseName, - jobName: jobName, - includeFailureDetails: includeFailureDetails, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "71f746a1-7d68-40fe-b705-9d821a73dff2", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -37265,39 +49570,28 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {Contracts.ReleaseReference} releaseToCompare + * Updates/adds a system control on the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} controlId - The ID of the control. */ - queryTestResultsReportForRelease(project, releaseId, releaseEnvId, publishContext, includeFailureDetails, releaseToCompare) { + updateSystemControl(control, processId, witRefName, controlId) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } - if (releaseEnvId == null) { - throw new TypeError('releaseEnvId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - releaseId: releaseId, - releaseEnvId: releaseEnvId, - publishContext: publishContext, - includeFailureDetails: includeFailureDetails, - releaseToCompare: releaseToCompare, + processId: processId, + witRefName: witRefName, + controlId: controlId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "f10f9577-2c04-45ab-8c99-b26567a7cd55", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, false); + res = yield this.rest.update(url, control, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37307,22 +49601,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.ReleaseReference[]} releases - * @param {string} project - Project ID or project name + * Creates a work item type in the process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest} workItemType + * @param {string} processId - The ID of the process on which to create work item type. */ - queryTestResultsSummaryForReleases(releases, project) { + createProcessWorkItemType(workItemType, processId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "f10f9577-2c04-45ab-8c99-b26567a7cd55", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, releases, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, true); + res = yield this.rest.create(url, workItemType, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); resolve(ret); } catch (err) { @@ -37332,26 +49628,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestResultsContext} resultsContext - * @param {string} project - Project ID or project name - * @param {number[]} workItemIds + * Removes a work item type in the process. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. */ - queryTestSummaryByRequirement(resultsContext, project, workItemIds) { + deleteProcessWorkItemType(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - workItemIds: workItemIds && workItemIds.join(","), + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "3b7fd26f-c335-4e55-afc1-a588f5e2af3c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, resultsContext, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestSummaryForWorkItem, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37361,22 +49656,29 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestResultTrendFilter} filter - * @param {string} project - Project ID or project name + * Returns a single work item type in a process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return */ - queryResultTrendForBuild(filter, project) { + getProcessWorkItemType(processId, witRefName, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId, + witRefName: witRefName + }; + let queryValues = { + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "0886a7ae-315a-4dba-9122-bcce93301f3a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.AggregatedDataForResultTrend, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); resolve(ret); } catch (err) { @@ -37386,22 +49688,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestResultTrendFilter} filter - * @param {string} project - Project ID or project name + * Returns a list of all work item types in a process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return */ - queryResultTrendForRelease(filter, project) { + getProcessWorkItemTypes(processId, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId + }; + let queryValues = { + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "107f23c3-359a-460a-a70c-63ee739f9f9a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.AggregatedDataForResultTrend, true); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, true); resolve(ret); } catch (err) { @@ -37411,22 +49718,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.RunCreateModel} testRun - * @param {string} project - Project ID or project name + * Updates a work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest} workItemTypeUpdate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - createTestRun(testRun, project) { + updateProcessWorkItemType(workItemTypeUpdate, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, testRun, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, false); + res = yield this.rest.update(url, workItemTypeUpdate, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); resolve(ret); } catch (err) { @@ -37436,22 +49747,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId + * Adds a behavior to the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior */ - deleteTestRun(project, runId) { + addBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.create(url, behavior, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -37462,29 +49776,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {boolean} includeDetails - * @param {boolean} includeTags + * Returns a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior */ - getTestRunById(project, runId, includeDetails, includeTags) { + getBehaviorForWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId - }; - let queryValues = { - includeDetails: includeDetails, - includeTags: includeTags, + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors, + behaviorRefName: behaviorRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37494,39 +49806,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {string} buildUri - * @param {string} owner - * @param {string} tmiRunId - * @param {number} planId - * @param {boolean} includeRunDetails - * @param {boolean} automated - * @param {number} skip - * @param {number} top + * Returns a list of all behaviors for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior */ - getTestRuns(project, buildUri, owner, tmiRunId, planId, includeRunDetails, automated, skip, top) { + getBehaviorsForWorkItemType(processId, witRefNameForBehaviors) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildUri: buildUri, - owner: owner, - tmiRunId: tmiRunId, - planId: planId, - includeRunDetails: includeRunDetails, - automated: automated, - '$skip': skip, - '$top': top, + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -37536,63 +49834,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. + * Removes a behavior for the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory). - * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). - * @param {Contracts.TestRunState} state - Current state of the Runs to be queried. - * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids. - * @param {boolean} isAutomated - Automation type of the Runs to be queried. - * @param {Contracts.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried. - * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids. - * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids. - * @param {string} branchName - Source Branch name of the Runs to be queried. - * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids. - * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids. - * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids. - * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids. - * @param {string} runTitle - Run Title of the Runs to be queried. - * @param {number} top - Number of runs to be queried. Limit is 100 - * @param {string} continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior */ - queryTestRuns(project, minLastUpdatedDate, maxLastUpdatedDate, state, planIds, isAutomated, publishContext, buildIds, buildDefIds, branchName, releaseIds, releaseDefIds, releaseEnvIds, releaseEnvDefIds, runTitle, top, continuationToken) { + removeBehaviorFromWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { return __awaiter(this, void 0, void 0, function* () { - if (minLastUpdatedDate == null) { - throw new TypeError('minLastUpdatedDate can not be null or undefined'); - } - if (maxLastUpdatedDate == null) { - throw new TypeError('maxLastUpdatedDate can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - minLastUpdatedDate: minLastUpdatedDate, - maxLastUpdatedDate: maxLastUpdatedDate, - state: state, - planIds: planIds && planIds.join(","), - isAutomated: isAutomated, - publishContext: publishContext, - buildIds: buildIds && buildIds.join(","), - buildDefIds: buildDefIds && buildDefIds.join(","), - branchName: branchName, - releaseIds: releaseIds && releaseIds.join(","), - releaseDefIds: releaseDefIds && releaseDefIds.join(","), - releaseEnvIds: releaseEnvIds && releaseEnvIds.join(","), - releaseEnvDefIds: releaseEnvDefIds && releaseEnvDefIds.join(","), - runTitle: runTitle, - '$top': top, - continuationToken: continuationToken, + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors, + behaviorRefName: behaviorRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37602,24 +49864,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.RunUpdateModel} runUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId + * Updates a behavior for the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior */ - updateTestRun(runUpdateModel, project, runId) { + updateBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "364538f9-8062-4ce0-b024-75a0fb463f0d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, runUpdateModel, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, false); + res = yield this.rest.update(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37628,26 +49892,61 @@ class TestResultsApi extends basem.ClientApiBase { })); }); } +} +WorkItemTrackingProcessApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; +exports.WorkItemTrackingProcessApi = WorkItemTrackingProcessApi; + + +/***/ }), + +/***/ 53333: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(80273); +const WorkItemTrackingProcessDefinitionsInterfaces = __nccwpck_require__(21655); +class WorkItemTrackingProcessDefinitionsApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-WorkItemTracking-api', options); + } /** - * Get test run summary, used when we want to get summary of a run by outcome. Test run should be in completed state. + * Creates a single behavior in the given process. * - * @param {string} project - Project ID or project name - * @param {number} runId - ID of the run to get. + * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel} behavior + * @param {string} processId - The ID of the process */ - getTestRunSummaryByOutcome(project, runId) { + createBehavior(behavior, processId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "5c6a250c-53b7-4851-990c-42a7a00c8b39", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRunStatistic, false); + res = yield this.rest.create(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37657,27 +49956,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get TestResultsSettings data + * Removes a behavior in the process. * - * @param {string} project - Project ID or project name - * @param {Contracts.TestResultsSettingsType} settingsType + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior */ - getTestResultsSettings(project, settingsType) { + deleteBehavior(processId, behaviorId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - settingsType: settingsType, + processId: processId, + behaviorId: behaviorId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "testresults", "7319952e-e5a9-4e19-a006-84f3be8b7c68", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsSettings, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37687,24 +49984,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Update project settings of test results + * Returns a single behavior in the process. * - * @param {Contracts.TestResultsUpdateSettings} testResultsUpdateSettings - * @param {string} project - Project ID or project name + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior */ - updatePipelinesTestSettings(testResultsUpdateSettings, project) { + getBehavior(processId, behaviorId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId, + behaviorId: behaviorId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "testresults", "7319952e-e5a9-4e19-a006-84f3be8b7c68", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, testResultsUpdateSettings, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsSettings, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37714,40 +50012,23 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Gets the list of results whose failure matches with the provided one. + * Returns a list of all behaviors in the process. * - * @param {string} project - Project ID or project name - * @param {number} runId - id of test run - * @param {number} testResultId - id of test result inside a test run - * @param {number} testSubResultId - id of subresult inside a test result - * @param {number} top - Maximum number of results to return - * @param {String} continuationToken - Header to pass the continuationToken + * @param {string} processId - The ID of the process */ - getSimilarTestResults(customHeaders, project, runId, testResultId, testSubResultId, top, continuationToken) { + getBehaviors(processId) { return __awaiter(this, void 0, void 0, function* () { - if (testSubResultId == null) { - throw new TypeError('testSubResultId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testResultId: testResultId - }; - let queryValues = { - testSubResultId: testSubResultId, - '$top': top, + processId: processId }; - customHeaders = customHeaders || {}; - customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "67d0a074-b255-4902-a639-e3e6de7a3de6", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -37757,25 +50038,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get test run statistics , used when we want to get summary of a run by outcome. + * Replaces a behavior in the process. * - * @param {string} project - Project ID or project name - * @param {number} runId - ID of the run to get. + * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel} behaviorData + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior */ - getTestRunStatistics(project, runId) { + replaceBehavior(behaviorData, processId, behaviorId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + behaviorId: behaviorId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "82b986e8-ca9e-4a89-b39e-f65c69bc104a", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRunStatistic, false); + res = yield this.rest.replace(url, behaviorData, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37785,30 +50067,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - *

Gets the coverage status for the last successful build of a definition, optionally scoped to a specific branch

+ * Creates a control in a group * - * @param {string} project - Project ID or project name - * @param {string} definition - The ID or name of the definition. - * @param {string} branchName - The branch name. - * @param {string} label - The String to replace the default text on the left side of the badge. + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group to add the control to */ - getCoverageStatusBadge(project, definition, branchName, label) { + addControlToGroup(control, processId, witRefName, groupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - definition: definition - }; - let queryValues = { - branchName: branchName, - label: label, + processId: processId, + witRefName: witRefName, + groupId: groupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "73b7c9d8-defb-4b60-b3d6-2162d60d6b13", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.create(url, control, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -37819,28 +50098,30 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId + * Updates a control on the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The updated control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group + * @param {string} controlId - The ID of the control */ - getTestTagsForBuild(project, buildId) { + editControl(control, processId, witRefName, groupId, controlId) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "52ee2057-4b54-41a6-a18c-ed4375a00f8d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.update(url, control, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37850,33 +50131,29 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId + * Removes a control from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group + * @param {string} controlId - The ID of the control to remove */ - getTestTagsForRelease(project, releaseId, releaseEnvId) { + removeControlFromGroup(processId, witRefName, groupId, controlId) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } - if (releaseEnvId == null) { - throw new TypeError('releaseEnvId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - releaseId: releaseId, - releaseEnvId: releaseEnvId, + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "52ee2057-4b54-41a6-a18c-ed4375a00f8d", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37886,24 +50163,34 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestTagsUpdateModel} testTagsUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId + * Moves a control to a new group + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group to move the control to + * @param {string} controlId - The id of the control + * @param {string} removeFromGroupId - The group to remove the control from */ - updateTestRunTags(testTagsUpdateModel, project, runId) { + setControlInGroup(control, processId, witRefName, groupId, controlId, removeFromGroupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId + }; + let queryValues = { + removeFromGroupId: removeFromGroupId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "a5e2f411-2b43-45f3-989c-05b71339f5b8", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.update(url, testTagsUpdateModel, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.replace(url, control, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -37913,28 +50200,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} buildId + * Creates a single field in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldModel} field + * @param {string} processId - The ID of the process */ - getTestTagSummaryForBuild(project, buildId) { + createField(field, processId) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, + processId: processId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "655a8f6b-fec7-4b46-b672-68b44141b498", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "f36c66c7-911d-4163-8938-d3c5d0d7f5aa", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FieldModel, false); resolve(ret); } catch (err) { @@ -37944,33 +50227,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId + * Updates a given field in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate} field + * @param {string} processId - The ID of the process */ - getTestTagSummaryForRelease(project, releaseId, releaseEnvId) { + updateField(field, processId) { return __awaiter(this, void 0, void 0, function* () { - if (releaseId == null) { - throw new TypeError('releaseId can not be null or undefined'); - } - if (releaseEnvId == null) { - throw new TypeError('releaseEnvId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - releaseId: releaseId, - releaseEnvId: releaseEnvId, + processId: processId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "655a8f6b-fec7-4b46-b672-68b44141b498", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "f36c66c7-911d-4163-8938-d3c5d0d7f5aa", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.update(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FieldModel, false); resolve(ret); } catch (err) { @@ -37980,25 +50254,29 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Creates an attachment in the LogStore for the specified buildId. + * Adds a group to the work item form * - * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - Contains attachment info like stream, filename, comment, attachmentType - * @param {string} project - Project ID or project name - * @param {number} buildId - BuildId + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page to add the group to + * @param {string} sectionId - The ID of the section to add the group to */ - createBuildAttachmentInLogStore(attachmentRequestModel, project, buildId) { + addGroup(group, processId, witRefName, pageId, sectionId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - buildId: buildId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "6f747e16-18c2-435a-b4fb-fa05d6845fee", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); + res = yield this.rest.create(url, group, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -38009,25 +50287,31 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Creates an attachment in the LogStore for the specified runId. + * Updates a group in the work item form * - * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel - Contains attachment info like stream, filename, comment, attachmentType - * @param {string} project - Project ID or project name - * @param {number} runId - Test RunId + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group */ - createTestRunLogStoreAttachment(attachmentRequestModel, project, runId) { + editGroup(group, processId, witRefName, pageId, sectionId, groupId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, attachmentRequestModel, options); + res = yield this.rest.update(url, group, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -38038,27 +50322,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Deletes the attachment with the specified filename for the specified runId from the LogStore. + * Removes a group from the work item form * - * @param {string} project - Project ID or project name - * @param {number} runId - Test RunId - * @param {string} filename - Attachment FileName + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section to the group is in + * @param {string} groupId - The ID of the group */ - deleteTestRunLogStoreAttachment(project, runId, filename) { + removeGroup(processId, witRefName, pageId, sectionId, groupId) { return __awaiter(this, void 0, void 0, function* () { - if (filename == null) { - throw new TypeError('filename can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId - }; - let queryValues = { - filename: filename, + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; @@ -38073,31 +50356,45 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns the attachment with the specified filename for the specified runId from the LogStore. + * Moves a group to a different page and section * - * @param {string} project - Project ID or project name - * @param {number} runId - Test RunId - * @param {string} filename - Attachment FileName + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group + * @param {string} removeFromPageId - ID of the page to remove the group from + * @param {string} removeFromSectionId - ID of the section to remove the group from */ - getTestRunLogStoreAttachmentContent(project, runId, filename) { + setGroupInPage(group, processId, witRefName, pageId, sectionId, groupId, removeFromPageId, removeFromSectionId) { return __awaiter(this, void 0, void 0, function* () { - if (filename == null) { - throw new TypeError('filename can not be null or undefined'); + if (removeFromPageId == null) { + throw new TypeError('removeFromPageId can not be null or undefined'); + } + if (removeFromSectionId == null) { + throw new TypeError('removeFromSectionId can not be null or undefined'); } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId }; let queryValues = { - filename: filename, + removeFromPageId: removeFromPageId, + removeFromSectionId: removeFromSectionId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues, queryValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); } catch (err) { reject(err); @@ -38106,25 +50403,39 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns a list of attachments for the specified runId from the LogStore. + * Moves a group to a different section * - * @param {string} project - Project ID or project name - * @param {number} runId - Test RunId + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group + * @param {string} removeFromSectionId - ID of the section to remove the group from */ - getTestRunLogStoreAttachments(project, runId) { + setGroupInSection(group, processId, witRefName, pageId, sectionId, groupId, removeFromSectionId) { return __awaiter(this, void 0, void 0, function* () { + if (removeFromSectionId == null) { + throw new TypeError('removeFromSectionId can not be null or undefined'); + } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + let queryValues = { + removeFromSectionId: removeFromSectionId, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreAttachment, true); + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38134,31 +50445,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns the attachment with the specified filename for the specified runId from the LogStore. + * Gets the form layout * - * @param {string} project - Project ID or project name - * @param {number} runId - Test RunId - * @param {string} filename - Attachment FileName + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getTestRunLogStoreAttachmentZip(project, runId, filename) { + getFormLayout(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (filename == null) { - throw new TypeError('filename can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId - }; - let queryValues = { - filename: filename, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "3eacc80a-ddca-4404-857a-6331aac99063", routeValues); let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FormLayout, false); + resolve(ret); } catch (err) { reject(err); @@ -38167,24 +50473,20 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Creates a new test failure type + * Returns meta data of the picklist. * - * @param {Contracts.TestResultFailureTypeRequestModel} testResultFailureType - * @param {string} project - Project ID or project name */ - createFailureType(testResultFailureType, project) { + getListsMetadata() { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "c4ac0486-830c-4a2a-9ef9-e8a1791a70fd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "b45cc931-98e3-44a1-b1cd-2e8e9c6dc1c6", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, testResultFailureType, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -38194,24 +50496,20 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Deletes a test failure type with specified failureTypeId + * Creates a picklist. * - * @param {string} project - Project ID or project name - * @param {number} failureTypeId + * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist */ - deleteFailureType(project, failureTypeId) { + createList(picklist) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - failureTypeId: failureTypeId - }; + let routeValues = {}; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "c4ac0486-830c-4a2a-9ef9-e8a1791a70fd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); + res = yield this.rest.create(url, picklist, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -38222,23 +50520,23 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Returns the list of test failure types. + * Removes a picklist. * - * @param {string} project - Project ID or project name + * @param {string} listId - The ID of the list */ - getFailureTypes(project) { + deleteList(listId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + listId: listId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "c4ac0486-830c-4a2a-9ef9-e8a1791a70fd", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38248,24 +50546,23 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get history of a test method using TestHistoryQuery + * Returns a picklist. * - * @param {Contracts.TestHistoryQuery} filter - TestHistoryQuery to get history - * @param {string} project - Project ID or project name + * @param {string} listId - The ID of the list */ - queryTestHistory(filter, project) { + getList(listId) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + listId: listId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "2a41bd6a-8118-4403-b74e-5ba7492aed9d", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestHistoryQuery, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38275,47 +50572,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get list of build attachments reference + * Updates a list. * - * @param {string} project - Project ID or project name - * @param {number} buildId - Id of the build to get - * @param {Contracts.TestLogType} type - type of the attachment to get - * @param {string} directoryPath - directory path for which attachments are needed - * @param {string} fileNamePrefix - file name prefix to filter the list of attachment - * @param {boolean} fetchMetaData - Default is false, set if metadata is needed - * @param {number} top - Number of test attachments reference to return - * @param {String} continuationToken - Header to pass the continuationToken + * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist + * @param {string} listId - The ID of the list */ - getTestLogsForBuild(customHeaders, project, buildId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) { + updateList(picklist, listId) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - type: type, - directoryPath: directoryPath, - fileNamePrefix: fileNamePrefix, - fetchMetaData: fetchMetaData, - top: top, + listId: listId }; - customHeaders = customHeaders || {}; - customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "dff8ce3a-e539-4817-a405-d968491a88f1", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); + res = yield this.rest.replace(url, picklist, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38325,46 +50599,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get list of test result attachments reference + * Adds a page to the work item form * - * @param {string} project - Project ID or project name - * @param {number} runId - Id of the test run that contains the result - * @param {number} resultId - Id of the test result - * @param {Contracts.TestLogType} type - type of attachments to get - * @param {string} directoryPath - directory path of attachments to get - * @param {string} fileNamePrefix - file name prefix to filter the list of attachment - * @param {boolean} fetchMetaData - Default is false, set if metadata is needed - * @param {number} top - Numbe of attachments reference to return - * @param {String} continuationToken - Header to pass the continuationToken + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getTestResultLogs(customHeaders, project, runId, resultId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) { + addPage(page, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - resultId: resultId - }; - let queryValues = { - type: type, - directoryPath: directoryPath, - fileNamePrefix: fileNamePrefix, - fetchMetaData: fetchMetaData, - top: top, + processId: processId, + witRefName: witRefName }; - customHeaders = customHeaders || {}; - customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "714caaac-ae1e-4869-8323-9bc0f5120dbf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); + res = yield this.rest.create(url, page, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.Page, false); resolve(ret); } catch (err) { @@ -38374,51 +50628,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get list of test subresult attachments reference + * Updates a page on the work item form * - * @param {string} project - Project ID or project name - * @param {number} runId - Id of the test run that contains the results - * @param {number} resultId - Id of the test result that contains subresult - * @param {number} subResultId - Id of the test subresult - * @param {Contracts.TestLogType} type - type of the attachments to get - * @param {string} directoryPath - directory path of the attachment to get - * @param {string} fileNamePrefix - file name prefix to filter the list of attachments - * @param {boolean} fetchMetaData - Default is false, set if metadata is needed - * @param {number} top - Number of attachments reference to return - * @param {String} continuationToken - Header to pass the continuationToken + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getTestSubResultLogs(customHeaders, project, runId, resultId, subResultId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) { + editPage(page, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (subResultId == null) { - throw new TypeError('subResultId can not be null or undefined'); - } - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - resultId: resultId - }; - let queryValues = { - subResultId: subResultId, - type: type, - directoryPath: directoryPath, - fileNamePrefix: fileNamePrefix, - fetchMetaData: fetchMetaData, - top: top, + processId: processId, + witRefName: witRefName }; - customHeaders = customHeaders || {}; - customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "714caaac-ae1e-4869-8323-9bc0f5120dbf", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); + res = yield this.rest.update(url, page, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.Page, false); resolve(ret); } catch (err) { @@ -38428,44 +50657,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get list of test run attachments reference + * Removes a page from the work item form * - * @param {string} project - Project ID or project name - * @param {number} runId - Id of the test run - * @param {Contracts.TestLogType} type - type of the attachments to get - * @param {string} directoryPath - directory path for which attachments are needed - * @param {string} fileNamePrefix - file name prefix to filter the list of attachment - * @param {boolean} fetchMetaData - Default is false, set if metadata is needed - * @param {number} top - Number of attachments reference to return - * @param {String} continuationToken - Header to pass the continuationToken + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page */ - getTestRunLogs(customHeaders, project, runId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) { + removePage(processId, witRefName, pageId) { return __awaiter(this, void 0, void 0, function* () { - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId - }; - let queryValues = { - type: type, - directoryPath: directoryPath, - fileNamePrefix: fileNamePrefix, - fetchMetaData: fetchMetaData, - top: top, + processId: processId, + witRefName: witRefName, + pageId: pageId }; - customHeaders = customHeaders || {}; - customHeaders["x-ms-continuationtoken"] = "continuationToken"; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "5b47b946-e875-4c9a-acdc-2a20996caebe", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38475,40 +50687,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get SAS Uri of a build attachment + * Creates a state definition in the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} build - Id of the build to get - * @param {Contracts.TestLogType} type - type of the file - * @param {string} filePath - filePath for which sas uri is needed + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getTestLogStoreEndpointDetailsForBuildLog(project, build, type, filePath) { + createStateDefinition(stateModel, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (build == null) { - throw new TypeError('build can not be null or undefined'); - } - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } - if (filePath == null) { - throw new TypeError('filePath can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - build: build, - type: type, - filePath: filePath, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "39b09be7-f0c9-4a83-a513-9ae31b45c56f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + res = yield this.rest.create(url, stateModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38518,35 +50716,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Create and Get sas uri of the build container + * Removes a state definition in the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} buildId - Id of the build to get - * @param {Contracts.TestLogStoreOperationType} testLogStoreOperationType - Type of operation to perform using sas uri + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state */ - testLogStoreEndpointDetailsForBuild(project, buildId, testLogStoreOperationType) { + deleteStateDefinition(processId, witRefName, stateId) { return __awaiter(this, void 0, void 0, function* () { - if (buildId == null) { - throw new TypeError('buildId can not be null or undefined'); - } - if (testLogStoreOperationType == null) { - throw new TypeError('testLogStoreOperationType can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - buildId: buildId, - testLogStoreOperationType: testLogStoreOperationType, + processId: processId, + witRefName: witRefName, + stateId: stateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "39b09be7-f0c9-4a83-a513-9ae31b45c56f", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38556,39 +50746,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get SAS Uri of a test results attachment + * Returns a state definition in the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} runId - Id of the test run that contains result - * @param {number} resultId - Id of the test result whose files need to be downloaded - * @param {Contracts.TestLogType} type - type of the file - * @param {string} filePath - filePath for which sas uri is needed + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state */ - getTestLogStoreEndpointDetailsForResultLog(project, runId, resultId, type, filePath) { + getStateDefinition(processId, witRefName, stateId) { return __awaiter(this, void 0, void 0, function* () { - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } - if (filePath == null) { - throw new TypeError('filePath can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - resultId: resultId - }; - let queryValues = { - type: type, - filePath: filePath, + processId: processId, + witRefName: witRefName, + stateId: stateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "da630b37-1236-45b5-945e-1d7bdb673850", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38598,44 +50776,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get SAS Uri of a test subresults attachment + * Returns a list of all state definitions in the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} runId - Id of the test run that contains result - * @param {number} resultId - Id of the test result that contains subresult - * @param {number} subResultId - Id of the test subresult whose file sas uri is needed - * @param {Contracts.TestLogType} type - type of the file - * @param {string} filePath - filePath for which sas uri is needed + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getTestLogStoreEndpointDetailsForSubResultLog(project, runId, resultId, subResultId, type, filePath) { + getStateDefinitions(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (subResultId == null) { - throw new TypeError('subResultId can not be null or undefined'); - } - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } - if (filePath == null) { - throw new TypeError('filePath can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - resultId: resultId - }; - let queryValues = { - subResultId: subResultId, - type: type, - filePath: filePath, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "da630b37-1236-45b5-945e-1d7bdb673850", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -38645,44 +50804,28 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Create empty file for a result and Get Sas uri for the file + * Hides a state definition in the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} runId - Id of the test run that contains the result - * @param {number} resultId - Id of the test results that contains sub result - * @param {number} subResultId - Id of the test sub result whose file sas uri is needed - * @param {string} filePath - file path inside the sub result for which sas uri is needed - * @param {Contracts.TestLogType} type - Type of the file for download + * @param {WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel} hideStateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state */ - testLogStoreEndpointDetailsForResult(project, runId, resultId, subResultId, filePath, type) { + hideStateDefinition(hideStateModel, processId, witRefName, stateId) { return __awaiter(this, void 0, void 0, function* () { - if (subResultId == null) { - throw new TypeError('subResultId can not be null or undefined'); - } - if (filePath == null) { - throw new TypeError('filePath can not be null or undefined'); - } - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - resultId: resultId - }; - let queryValues = { - subResultId: subResultId, - filePath: filePath, - type: type, + processId: processId, + witRefName: witRefName, + stateId: stateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "da630b37-1236-45b5-945e-1d7bdb673850", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + res = yield this.rest.replace(url, hideStateModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38692,37 +50835,28 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Get SAS Uri of a test run attachment + * Updates a given state definition in the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} runId - Id of the test run whose file has to be downloaded - * @param {Contracts.TestLogType} type - type of the file - * @param {string} filePath - filePath for which sas uri is needed + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state */ - getTestLogStoreEndpointDetailsForRunLog(project, runId, type, filePath) { + updateStateDefinition(stateModel, processId, witRefName, stateId) { return __awaiter(this, void 0, void 0, function* () { - if (type == null) { - throw new TypeError('type can not be null or undefined'); - } - if (filePath == null) { - throw new TypeError('filePath can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId - }; - let queryValues = { - type: type, - filePath: filePath, + processId: processId, + witRefName: witRefName, + stateId: stateId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "67eb3f92-6c97-4fd9-8b63-6cbdc7e526ea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + res = yield this.rest.update(url, stateModel, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38732,36 +50866,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Create empty file for a run and Get Sas uri for the file + * Adds a behavior to the work item type of the process. * - * @param {string} project - Project ID or project name - * @param {number} runId - Id of the run to get endpoint details - * @param {Contracts.TestLogStoreOperationType} testLogStoreOperationType - Type of operation to perform using sas uri - * @param {string} filePath - file path to create an empty file - * @param {Contracts.TestLogType} type - Default is GeneralAttachment, type of empty file to be created + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior */ - testLogStoreEndpointDetailsForRun(project, runId, testLogStoreOperationType, filePath, type) { + addBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { return __awaiter(this, void 0, void 0, function* () { - if (testLogStoreOperationType == null) { - throw new TypeError('testLogStoreOperationType can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId - }; - let queryValues = { - testLogStoreOperationType: testLogStoreOperationType, - filePath: filePath, - type: type, + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "67eb3f92-6c97-4fd9-8b63-6cbdc7e526ea", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + res = yield this.rest.create(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38771,21 +50895,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.TestSettings} testSettings - * @param {string} project - Project ID or project name + * Returns a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior */ - createTestSettings(testSettings, project) { + getBehaviorForWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors, + behaviorRefName: behaviorRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "930bad47-f826-4099-9597-f44d0a9c735c", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, testSettings, options); + res = yield this.rest.get(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -38796,28 +50925,25 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId + * Returns a list of all behaviors for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior */ - deleteTestSettings(project, testSettingsId) { + getBehaviorsForWorkItemType(processId, witRefNameForBehaviors) { return __awaiter(this, void 0, void 0, function* () { - if (testSettingsId == null) { - throw new TypeError('testSettingsId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - testSettingsId: testSettingsId, + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "930bad47-f826-4099-9597-f44d0a9c735c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); resolve(ret); } catch (err) { @@ -38827,27 +50953,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId + * Removes a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior */ - getTestSettingsById(project, testSettingsId) { + removeBehaviorFromWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { return __awaiter(this, void 0, void 0, function* () { - if (testSettingsId == null) { - throw new TypeError('testSettingsId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - testSettingsId: testSettingsId, + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors, + behaviorRefName: behaviorRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "testresults", "930bad47-f826-4099-9597-f44d0a9c735c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -38858,22 +50983,26 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {Contracts.WorkItemToTestLinks} workItemToTestLinks - * @param {string} project - Project ID or project name + * Updates default work item type for the behavior of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior */ - addWorkItemToTestLinks(workItemToTestLinks, project) { + updateBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "4e3abe63-ca46-4fe0-98b2-363f7ec7aa5f", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, workItemToTestLinks, options); - let ret = this.formatResponse(res.result, Contracts.TypeInfo.WorkItemToTestLinks, false); + res = yield this.rest.update(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -38883,33 +51012,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {string} testName - * @param {number} workItemId + * Creates a work item type in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel} workItemType + * @param {string} processId - The ID of the process */ - deleteTestMethodToWorkItemLink(project, testName, workItemId) { + createWorkItemType(workItemType, processId) { return __awaiter(this, void 0, void 0, function* () { - if (testName == null) { - throw new TypeError('testName can not be null or undefined'); - } - if (workItemId == null) { - throw new TypeError('workItemId can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - testName: testName, - workItemId: workItemId, + processId: processId }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "cbd50bd7-f7ed-4e35-b127-4408ae6bfa2c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); + res = yield this.rest.create(url, workItemType, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); resolve(ret); } catch (err) { @@ -38919,27 +51039,24 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {string} testName + * Removes a work item type in the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - queryTestMethodLinkedWorkItems(project, testName) { + deleteWorkItemType(processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (testName == null) { - throw new TypeError('testName can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - testName: testName, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "cbd50bd7-f7ed-4e35-b127-4408ae6bfa2c", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, null, options); + res = yield this.rest.del(url, options); let ret = this.formatResponse(res.result, null, false); resolve(ret); } @@ -38950,25 +51067,29 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId + * Returns a work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand */ - getTestResultWorkItemsById(project, runId, testCaseResultId) { + getWorkItemType(processId, witRefName, expand) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - runId: runId, - testCaseResultId: testCaseResultId + processId: processId, + witRefName: witRefName + }; + let queryValues = { + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "3d032fd6-e7a0-468b-b105-75d206f99aad", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); resolve(ret); } catch (err) { @@ -38978,40 +51099,27 @@ class TestResultsApi extends basem.ClientApiBase { }); } /** - * Query Test Result WorkItems based on filter + * Returns a list of all work item types in the process. * - * @param {string} project - Project ID or project name - * @param {string} workItemCategory - can take values Microsoft.BugCategory or all(for getting all workitems) - * @param {string} automatedTestName - * @param {number} testCaseId - * @param {Date} maxCompleteDate - * @param {number} days - * @param {number} workItemCount + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand */ - queryTestResultWorkItems(project, workItemCategory, automatedTestName, testCaseId, maxCompleteDate, days, workItemCount) { + getWorkItemTypes(processId, expand) { return __awaiter(this, void 0, void 0, function* () { - if (workItemCategory == null) { - throw new TypeError('workItemCategory can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId }; let queryValues = { - workItemCategory: workItemCategory, - automatedTestName: automatedTestName, - testCaseId: testCaseId, - maxCompleteDate: maxCompleteDate, - days: days, - '$workItemCount': workItemCount, + '$expand': expand, }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "testresults", "f7401a26-331b-44fe-a470-f7ed35138e4a", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues, queryValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, true); resolve(ret); } catch (err) { @@ -39020,71 +51128,27 @@ class TestResultsApi extends basem.ClientApiBase { })); }); } -} -TestResultsApi.RESOURCE_AREA_ID = "c83eaf52-edf3-4034-ae11-17d38f25404c"; -exports.TestResultsApi = TestResultsApi; - - -/***/ }), - -/***/ 5417: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const TfvcInterfaces = __nccwpck_require__(9003); -class TfvcApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Tfvc-api', options); - } /** - * Get a single branch hierarchy at the given path with parents or children as specified. + * Updates a work item type of the process. * - * @param {string} path - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - Return the parent branch, if there is one. Default: False - * @param {boolean} includeChildren - Return child branches, if there are any. Default: False + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel} workItemTypeUpdate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type */ - getBranch(path, project, includeParent, includeChildren) { + updateWorkItemType(workItemTypeUpdate, processId, witRefName) { return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - path: path, - includeParent: includeParent, - includeChildren: includeChildren, + processId: processId, + witRefName: witRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, false); + res = yield this.rest.update(url, workItemTypeUpdate, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); resolve(ret); } catch (err) { @@ -39094,33 +51158,26 @@ class TfvcApi extends basem.ClientApiBase { }); } /** - * Get a collection of branch roots -- first-level children, branches with no parents. + * Adds a field to the work item type in the process. * - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - Return the parent branch, if there is one. Default: False - * @param {boolean} includeChildren - Return the child branches for each root branch. Default: False - * @param {boolean} includeDeleted - Return deleted branches. Default: False - * @param {boolean} includeLinks - Return links. Default: False + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for the field */ - getBranches(project, includeParent, includeChildren, includeDeleted, includeLinks) { + addFieldToWorkItemType(field, processId, witRefNameForFields) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - includeParent: includeParent, - includeChildren: includeChildren, - includeDeleted: includeDeleted, - includeLinks: includeLinks, + processId: processId, + witRefNameForFields: witRefNameForFields }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, true); + res = yield this.rest.create(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); resolve(ret); } catch (err) { @@ -39130,34 +51187,27 @@ class TfvcApi extends basem.ClientApiBase { }); } /** - * Get branch hierarchies below the specified scopePath + * Returns a single field in the work item type of the process. * - * @param {string} scopePath - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. - * @param {string} project - Project ID or project name - * @param {boolean} includeDeleted - Return deleted branches. Default: False - * @param {boolean} includeLinks - Return links. Default: False + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + * @param {string} fieldRefName - The reference name of the field */ - getBranchRefs(scopePath, project, includeDeleted, includeLinks) { + getWorkItemTypeField(processId, witRefNameForFields, fieldRefName) { return __awaiter(this, void 0, void 0, function* () { - if (scopePath == null) { - throw new TypeError('scopePath can not be null or undefined'); - } return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project - }; - let queryValues = { - scopePath: scopePath, - includeDeleted: includeDeleted, - includeLinks: includeLinks, + processId: processId, + witRefNameForFields: witRefNameForFields, + fieldRefName: fieldRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranchRef, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); resolve(ret); } catch (err) { @@ -39167,29 +51217,25 @@ class TfvcApi extends basem.ClientApiBase { }); } /** - * Retrieve Tfvc changes for a given changeset. + * Returns a list of all fields in the work item type of the process. * - * @param {number} id - ID of the changeset. Default: null - * @param {number} skip - Number of results to skip. Default: null - * @param {number} top - The maximum number of results to return. Default: null + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields */ - getChangesetChanges(id, skip, top) { + getWorkItemTypeFields(processId, witRefNameForFields) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - id: id - }; - let queryValues = { - '$skip': skip, - '$top': top, + processId: processId, + witRefNameForFields: witRefNameForFields }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "f32b86f2-15b9-4fe6-81b1-6f8938617ee5", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChange, true); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, true); resolve(ret); } catch (err) { @@ -39199,24 +51245,27 @@ class TfvcApi extends basem.ClientApiBase { }); } /** - * Create a new changeset. + * Removes a field in the work item type of the process. * - * @param {TfvcInterfaces.TfvcChangeset} changeset - * @param {string} project - Project ID or project name + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + * @param {string} fieldRefName - The reference name of the field */ - createChangeset(changeset, project) { + removeFieldFromWorkItemType(processId, witRefNameForFields, fieldRefName) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project + processId: processId, + witRefNameForFields: witRefNameForFields, + fieldRefName: fieldRefName }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.create(url, changeset, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, false); + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); resolve(ret); } catch (err) { @@ -39226,45 +51275,26 @@ class TfvcApi extends basem.ClientApiBase { }); } /** - * Retrieve a Tfvc Changeset + * Updates a single field in the scope of the given process and work item type. * - * @param {number} id - Changeset Id to retrieve. - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - Number of changes to return (maximum 100 changes) Default: 0 - * @param {boolean} includeDetails - Include policy details and check-in notes in the response. Default: false - * @param {boolean} includeWorkItems - Include workitems. Default: false - * @param {number} maxCommentLength - Include details about associated work items in the response. Default: null - * @param {boolean} includeSourceRename - Include renames. Default: false - * @param {number} skip - Number of results to skip. Default: null - * @param {number} top - The maximum number of results to return. Default: null - * @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field - The model with which to update the field + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields */ - getChangeset(id, project, maxChangeCount, includeDetails, includeWorkItems, maxCommentLength, includeSourceRename, skip, top, orderby, searchCriteria) { + updateWorkItemTypeField(field, processId, witRefNameForFields) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let routeValues = { - project: project, - id: id - }; - let queryValues = { - maxChangeCount: maxChangeCount, - includeDetails: includeDetails, - includeWorkItems: includeWorkItems, - maxCommentLength: maxCommentLength, - includeSourceRename: includeSourceRename, - '$skip': skip, - '$top': top, - '$orderby': orderby, - searchCriteria: searchCriteria, + processId: processId, + witRefNameForFields: witRefNameForFields }; try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues, queryValues); + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); let url = verData.requestUrl; let options = this.createRequestOptions('application/json', verData.apiVersion); let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangeset, false); + res = yield this.rest.update(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); resolve(ret); } catch (err) { @@ -39273,4063 +51303,2233 @@ class TfvcApi extends basem.ClientApiBase { })); }); } +} +WorkItemTrackingProcessDefinitionsApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; +exports.WorkItemTrackingProcessDefinitionsApi = WorkItemTrackingProcessDefinitionsApi; + + +/***/ }), + +/***/ 26456: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", ({ value: true })); +const resthandlers = __nccwpck_require__(74442); +class BasicCredentialHandler extends resthandlers.BasicCredentialHandler { + constructor(username, password, allowCrossOriginAuthentication = true) { + super(username, password, allowCrossOriginAuthentication); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; + + +/***/ }), + +/***/ 91141: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", ({ value: true })); +const resthandlers = __nccwpck_require__(74442); +class BearerCredentialHandler extends resthandlers.BearerCredentialHandler { + constructor(token, allowCrossOriginAuthentication = true) { + super(token, allowCrossOriginAuthentication); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; + + +/***/ }), + +/***/ 33450: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", ({ value: true })); +const resthandlers = __nccwpck_require__(74442); +class NtlmCredentialHandler extends resthandlers.NtlmCredentialHandler { + constructor(username, password, workstation, domain) { + super(username, password, workstation, domain); + } +} +exports.NtlmCredentialHandler = NtlmCredentialHandler; + + +/***/ }), + +/***/ 266: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", ({ value: true })); +const resthandlers = __nccwpck_require__(74442); +class PersonalAccessTokenCredentialHandler extends resthandlers.PersonalAccessTokenCredentialHandler { + constructor(token, allowCrossOriginAuthentication = true) { + super(token, allowCrossOriginAuthentication); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + + +/***/ }), + +/***/ 42167: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const TFS_TestManagement_Contracts = __nccwpck_require__(93047); +const TfsCoreInterfaces = __nccwpck_require__(73931); +var AgentStatus; +(function (AgentStatus) { + /** + * Indicates that the build agent cannot be contacted. + */ + AgentStatus[AgentStatus["Unavailable"] = 0] = "Unavailable"; + /** + * Indicates that the build agent is currently available. + */ + AgentStatus[AgentStatus["Available"] = 1] = "Available"; + /** + * Indicates that the build agent has taken itself offline. + */ + AgentStatus[AgentStatus["Offline"] = 2] = "Offline"; +})(AgentStatus = exports.AgentStatus || (exports.AgentStatus = {})); +var AuditAction; +(function (AuditAction) { + AuditAction[AuditAction["Add"] = 1] = "Add"; + AuditAction[AuditAction["Update"] = 2] = "Update"; + AuditAction[AuditAction["Delete"] = 3] = "Delete"; +})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); +/** + * Represents the desired scope of authorization for a build. + */ +var BuildAuthorizationScope; +(function (BuildAuthorizationScope) { + /** + * The identity used should have build service account permissions scoped to the project collection. This is useful when resources for a single build are spread across multiple projects. + */ + BuildAuthorizationScope[BuildAuthorizationScope["ProjectCollection"] = 1] = "ProjectCollection"; + /** + * The identity used should have build service account permissions scoped to the project in which the build definition resides. This is useful for isolation of build jobs to a particular team project to avoid any unintentional escalation of privilege attacks during a build. + */ + BuildAuthorizationScope[BuildAuthorizationScope["Project"] = 2] = "Project"; +})(BuildAuthorizationScope = exports.BuildAuthorizationScope || (exports.BuildAuthorizationScope = {})); +var BuildOptionInputType; +(function (BuildOptionInputType) { + BuildOptionInputType[BuildOptionInputType["String"] = 0] = "String"; + BuildOptionInputType[BuildOptionInputType["Boolean"] = 1] = "Boolean"; + BuildOptionInputType[BuildOptionInputType["StringList"] = 2] = "StringList"; + BuildOptionInputType[BuildOptionInputType["Radio"] = 3] = "Radio"; + BuildOptionInputType[BuildOptionInputType["PickList"] = 4] = "PickList"; + BuildOptionInputType[BuildOptionInputType["MultiLine"] = 5] = "MultiLine"; + BuildOptionInputType[BuildOptionInputType["BranchFilter"] = 6] = "BranchFilter"; +})(BuildOptionInputType = exports.BuildOptionInputType || (exports.BuildOptionInputType = {})); +var BuildPhaseStatus; +(function (BuildPhaseStatus) { + /** + * The state is not known. + */ + BuildPhaseStatus[BuildPhaseStatus["Unknown"] = 0] = "Unknown"; + /** + * The build phase completed unsuccessfully. + */ + BuildPhaseStatus[BuildPhaseStatus["Failed"] = 1] = "Failed"; + /** + * The build phase completed successfully. + */ + BuildPhaseStatus[BuildPhaseStatus["Succeeded"] = 2] = "Succeeded"; +})(BuildPhaseStatus = exports.BuildPhaseStatus || (exports.BuildPhaseStatus = {})); +/** + * Specifies the desired ordering of builds. + */ +var BuildQueryOrder; +(function (BuildQueryOrder) { + /** + * Order by finish time ascending. + */ + BuildQueryOrder[BuildQueryOrder["FinishTimeAscending"] = 2] = "FinishTimeAscending"; + /** + * Order by finish time descending. + */ + BuildQueryOrder[BuildQueryOrder["FinishTimeDescending"] = 3] = "FinishTimeDescending"; + /** + * Order by queue time descending. + */ + BuildQueryOrder[BuildQueryOrder["QueueTimeDescending"] = 4] = "QueueTimeDescending"; + /** + * Order by queue time ascending. + */ + BuildQueryOrder[BuildQueryOrder["QueueTimeAscending"] = 5] = "QueueTimeAscending"; + /** + * Order by start time descending. + */ + BuildQueryOrder[BuildQueryOrder["StartTimeDescending"] = 6] = "StartTimeDescending"; + /** + * Order by start time ascending. + */ + BuildQueryOrder[BuildQueryOrder["StartTimeAscending"] = 7] = "StartTimeAscending"; +})(BuildQueryOrder = exports.BuildQueryOrder || (exports.BuildQueryOrder = {})); +var BuildReason; +(function (BuildReason) { + /** + * No reason. This value should not be used. + */ + BuildReason[BuildReason["None"] = 0] = "None"; + /** + * The build was started manually. + */ + BuildReason[BuildReason["Manual"] = 1] = "Manual"; + /** + * The build was started for the trigger TriggerType.ContinuousIntegration. + */ + BuildReason[BuildReason["IndividualCI"] = 2] = "IndividualCI"; + /** + * The build was started for the trigger TriggerType.BatchedContinuousIntegration. + */ + BuildReason[BuildReason["BatchedCI"] = 4] = "BatchedCI"; + /** + * The build was started for the trigger TriggerType.Schedule. + */ + BuildReason[BuildReason["Schedule"] = 8] = "Schedule"; + /** + * The build was started for the trigger TriggerType.ScheduleForced. + */ + BuildReason[BuildReason["ScheduleForced"] = 16] = "ScheduleForced"; + /** + * The build was created by a user. + */ + BuildReason[BuildReason["UserCreated"] = 32] = "UserCreated"; + /** + * The build was started manually for private validation. + */ + BuildReason[BuildReason["ValidateShelveset"] = 64] = "ValidateShelveset"; + /** + * The build was started for the trigger ContinuousIntegrationType.Gated. + */ + BuildReason[BuildReason["CheckInShelveset"] = 128] = "CheckInShelveset"; + /** + * The build was started by a pull request. Added in resource version 3. + */ + BuildReason[BuildReason["PullRequest"] = 256] = "PullRequest"; + /** + * The build was started when another build completed. + */ + BuildReason[BuildReason["BuildCompletion"] = 512] = "BuildCompletion"; + /** + * The build was started when resources in pipeline triggered it + */ + BuildReason[BuildReason["ResourceTrigger"] = 1024] = "ResourceTrigger"; + /** + * The build was triggered for retention policy purposes. + */ + BuildReason[BuildReason["Triggered"] = 1967] = "Triggered"; + /** + * All reasons. + */ + BuildReason[BuildReason["All"] = 2031] = "All"; +})(BuildReason = exports.BuildReason || (exports.BuildReason = {})); +/** + * This is not a Flags enum because we don't want to set multiple statuses on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum This will ensure that things that key off multiple result types (like labelling sources) continue to work + */ +var BuildResult; +(function (BuildResult) { + /** + * No result + */ + BuildResult[BuildResult["None"] = 0] = "None"; + /** + * The build completed successfully. + */ + BuildResult[BuildResult["Succeeded"] = 2] = "Succeeded"; + /** + * The build completed compilation successfully but had other errors. + */ + BuildResult[BuildResult["PartiallySucceeded"] = 4] = "PartiallySucceeded"; + /** + * The build completed unsuccessfully. + */ + BuildResult[BuildResult["Failed"] = 8] = "Failed"; + /** + * The build was canceled before starting. + */ + BuildResult[BuildResult["Canceled"] = 32] = "Canceled"; +})(BuildResult = exports.BuildResult || (exports.BuildResult = {})); +var BuildStatus; +(function (BuildStatus) { + /** + * No status. + */ + BuildStatus[BuildStatus["None"] = 0] = "None"; + /** + * The build is currently in progress. + */ + BuildStatus[BuildStatus["InProgress"] = 1] = "InProgress"; + /** + * The build has completed. + */ + BuildStatus[BuildStatus["Completed"] = 2] = "Completed"; + /** + * The build is cancelling + */ + BuildStatus[BuildStatus["Cancelling"] = 4] = "Cancelling"; + /** + * The build is inactive in the queue. + */ + BuildStatus[BuildStatus["Postponed"] = 8] = "Postponed"; + /** + * The build has not yet started. + */ + BuildStatus[BuildStatus["NotStarted"] = 32] = "NotStarted"; + /** + * All status. + */ + BuildStatus[BuildStatus["All"] = 47] = "All"; +})(BuildStatus = exports.BuildStatus || (exports.BuildStatus = {})); +var ControllerStatus; +(function (ControllerStatus) { + /** + * Indicates that the build controller cannot be contacted. + */ + ControllerStatus[ControllerStatus["Unavailable"] = 0] = "Unavailable"; + /** + * Indicates that the build controller is currently available. + */ + ControllerStatus[ControllerStatus["Available"] = 1] = "Available"; + /** + * Indicates that the build controller has taken itself offline. + */ + ControllerStatus[ControllerStatus["Offline"] = 2] = "Offline"; +})(ControllerStatus = exports.ControllerStatus || (exports.ControllerStatus = {})); +var DefinitionQuality; +(function (DefinitionQuality) { + DefinitionQuality[DefinitionQuality["Definition"] = 1] = "Definition"; + DefinitionQuality[DefinitionQuality["Draft"] = 2] = "Draft"; +})(DefinitionQuality = exports.DefinitionQuality || (exports.DefinitionQuality = {})); +/** + * Specifies the desired ordering of definitions. + */ +var DefinitionQueryOrder; +(function (DefinitionQueryOrder) { + /** + * No order + */ + DefinitionQueryOrder[DefinitionQueryOrder["None"] = 0] = "None"; + /** + * Order by created on/last modified time ascending. + */ + DefinitionQueryOrder[DefinitionQueryOrder["LastModifiedAscending"] = 1] = "LastModifiedAscending"; + /** + * Order by created on/last modified time descending. + */ + DefinitionQueryOrder[DefinitionQueryOrder["LastModifiedDescending"] = 2] = "LastModifiedDescending"; + /** + * Order by definition name ascending. + */ + DefinitionQueryOrder[DefinitionQueryOrder["DefinitionNameAscending"] = 3] = "DefinitionNameAscending"; + /** + * Order by definition name descending. + */ + DefinitionQueryOrder[DefinitionQueryOrder["DefinitionNameDescending"] = 4] = "DefinitionNameDescending"; +})(DefinitionQueryOrder = exports.DefinitionQueryOrder || (exports.DefinitionQueryOrder = {})); +var DefinitionQueueStatus; +(function (DefinitionQueueStatus) { + /** + * When enabled the definition queue allows builds to be queued by users, the system will queue scheduled, gated and continuous integration builds, and the queued builds will be started by the system. + */ + DefinitionQueueStatus[DefinitionQueueStatus["Enabled"] = 0] = "Enabled"; + /** + * When paused the definition queue allows builds to be queued by users and the system will queue scheduled, gated and continuous integration builds. Builds in the queue will not be started by the system. + */ + DefinitionQueueStatus[DefinitionQueueStatus["Paused"] = 1] = "Paused"; + /** + * When disabled the definition queue will not allow builds to be queued by users and the system will not queue scheduled, gated or continuous integration builds. Builds already in the queue will not be started by the system. + */ + DefinitionQueueStatus[DefinitionQueueStatus["Disabled"] = 2] = "Disabled"; +})(DefinitionQueueStatus = exports.DefinitionQueueStatus || (exports.DefinitionQueueStatus = {})); +var DefinitionTriggerType; +(function (DefinitionTriggerType) { + /** + * Manual builds only. + */ + DefinitionTriggerType[DefinitionTriggerType["None"] = 1] = "None"; + /** + * A build should be started for each changeset. + */ + DefinitionTriggerType[DefinitionTriggerType["ContinuousIntegration"] = 2] = "ContinuousIntegration"; + /** + * A build should be started for multiple changesets at a time at a specified interval. + */ + DefinitionTriggerType[DefinitionTriggerType["BatchedContinuousIntegration"] = 4] = "BatchedContinuousIntegration"; + /** + * A build should be started on a specified schedule whether or not changesets exist. + */ + DefinitionTriggerType[DefinitionTriggerType["Schedule"] = 8] = "Schedule"; + /** + * A validation build should be started for each check-in. + */ + DefinitionTriggerType[DefinitionTriggerType["GatedCheckIn"] = 16] = "GatedCheckIn"; + /** + * A validation build should be started for each batch of check-ins. + */ + DefinitionTriggerType[DefinitionTriggerType["BatchedGatedCheckIn"] = 32] = "BatchedGatedCheckIn"; + /** + * A build should be triggered when a GitHub pull request is created or updated. Added in resource version 3 + */ + DefinitionTriggerType[DefinitionTriggerType["PullRequest"] = 64] = "PullRequest"; + /** + * A build should be triggered when another build completes. + */ + DefinitionTriggerType[DefinitionTriggerType["BuildCompletion"] = 128] = "BuildCompletion"; + /** + * All types. + */ + DefinitionTriggerType[DefinitionTriggerType["All"] = 255] = "All"; +})(DefinitionTriggerType = exports.DefinitionTriggerType || (exports.DefinitionTriggerType = {})); +var DefinitionType; +(function (DefinitionType) { + DefinitionType[DefinitionType["Xaml"] = 1] = "Xaml"; + DefinitionType[DefinitionType["Build"] = 2] = "Build"; +})(DefinitionType = exports.DefinitionType || (exports.DefinitionType = {})); +var DeleteOptions; +(function (DeleteOptions) { + /** + * No data should be deleted. This value should not be used. + */ + DeleteOptions[DeleteOptions["None"] = 0] = "None"; + /** + * The drop location should be deleted. + */ + DeleteOptions[DeleteOptions["DropLocation"] = 1] = "DropLocation"; + /** + * The test results should be deleted. + */ + DeleteOptions[DeleteOptions["TestResults"] = 2] = "TestResults"; + /** + * The version control label should be deleted. + */ + DeleteOptions[DeleteOptions["Label"] = 4] = "Label"; + /** + * The build should be deleted. + */ + DeleteOptions[DeleteOptions["Details"] = 8] = "Details"; + /** + * Published symbols should be deleted. + */ + DeleteOptions[DeleteOptions["Symbols"] = 16] = "Symbols"; + /** + * All data should be deleted. + */ + DeleteOptions[DeleteOptions["All"] = 31] = "All"; +})(DeleteOptions = exports.DeleteOptions || (exports.DeleteOptions = {})); +/** + * Specifies the desired ordering of folders. + */ +var FolderQueryOrder; +(function (FolderQueryOrder) { + /** + * No order + */ + FolderQueryOrder[FolderQueryOrder["None"] = 0] = "None"; + /** + * Order by folder name and path ascending. + */ + FolderQueryOrder[FolderQueryOrder["FolderAscending"] = 1] = "FolderAscending"; + /** + * Order by folder name and path descending. + */ + FolderQueryOrder[FolderQueryOrder["FolderDescending"] = 2] = "FolderDescending"; +})(FolderQueryOrder = exports.FolderQueryOrder || (exports.FolderQueryOrder = {})); +var GetOption; +(function (GetOption) { + /** + * Use the latest changeset at the time the build is queued. + */ + GetOption[GetOption["LatestOnQueue"] = 0] = "LatestOnQueue"; + /** + * Use the latest changeset at the time the build is started. + */ + GetOption[GetOption["LatestOnBuild"] = 1] = "LatestOnBuild"; + /** + * A user-specified version has been supplied. + */ + GetOption[GetOption["Custom"] = 2] = "Custom"; +})(GetOption = exports.GetOption || (exports.GetOption = {})); +var IssueType; +(function (IssueType) { + IssueType[IssueType["Error"] = 1] = "Error"; + IssueType[IssueType["Warning"] = 2] = "Warning"; +})(IssueType = exports.IssueType || (exports.IssueType = {})); +var ProcessTemplateType; +(function (ProcessTemplateType) { + /** + * Indicates a custom template. + */ + ProcessTemplateType[ProcessTemplateType["Custom"] = 0] = "Custom"; + /** + * Indicates a default template. + */ + ProcessTemplateType[ProcessTemplateType["Default"] = 1] = "Default"; + /** + * Indicates an upgrade template. + */ + ProcessTemplateType[ProcessTemplateType["Upgrade"] = 2] = "Upgrade"; +})(ProcessTemplateType = exports.ProcessTemplateType || (exports.ProcessTemplateType = {})); +var QueryDeletedOption; +(function (QueryDeletedOption) { + /** + * Include only non-deleted builds. + */ + QueryDeletedOption[QueryDeletedOption["ExcludeDeleted"] = 0] = "ExcludeDeleted"; + /** + * Include deleted and non-deleted builds. + */ + QueryDeletedOption[QueryDeletedOption["IncludeDeleted"] = 1] = "IncludeDeleted"; + /** + * Include only deleted builds. + */ + QueryDeletedOption[QueryDeletedOption["OnlyDeleted"] = 2] = "OnlyDeleted"; +})(QueryDeletedOption = exports.QueryDeletedOption || (exports.QueryDeletedOption = {})); +var QueueOptions; +(function (QueueOptions) { + /** + * No queue options + */ + QueueOptions[QueueOptions["None"] = 0] = "None"; + /** + * Create a plan Id for the build, do not run it + */ + QueueOptions[QueueOptions["DoNotRun"] = 1] = "DoNotRun"; +})(QueueOptions = exports.QueueOptions || (exports.QueueOptions = {})); +var QueuePriority; +(function (QueuePriority) { + /** + * Low priority. + */ + QueuePriority[QueuePriority["Low"] = 5] = "Low"; + /** + * Below normal priority. + */ + QueuePriority[QueuePriority["BelowNormal"] = 4] = "BelowNormal"; + /** + * Normal priority. + */ + QueuePriority[QueuePriority["Normal"] = 3] = "Normal"; + /** + * Above normal priority. + */ + QueuePriority[QueuePriority["AboveNormal"] = 2] = "AboveNormal"; + /** + * High priority. + */ + QueuePriority[QueuePriority["High"] = 1] = "High"; +})(QueuePriority = exports.QueuePriority || (exports.QueuePriority = {})); +var RepositoryCleanOptions; +(function (RepositoryCleanOptions) { + RepositoryCleanOptions[RepositoryCleanOptions["Source"] = 0] = "Source"; + RepositoryCleanOptions[RepositoryCleanOptions["SourceAndOutputDir"] = 1] = "SourceAndOutputDir"; + /** + * Re-create $(build.sourcesDirectory) + */ + RepositoryCleanOptions[RepositoryCleanOptions["SourceDir"] = 2] = "SourceDir"; + /** + * Re-create $(agnet.buildDirectory) which contains $(build.sourcesDirectory), $(build.binariesDirectory) and any folders that left from previous build. + */ + RepositoryCleanOptions[RepositoryCleanOptions["AllBuildDir"] = 3] = "AllBuildDir"; +})(RepositoryCleanOptions = exports.RepositoryCleanOptions || (exports.RepositoryCleanOptions = {})); +var ResultSet; +(function (ResultSet) { /** - * Retrieve Tfvc Changesets - * - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - Include details about associated work items in the response. Default: null - * @param {number} skip - Number of results to skip. Default: null - * @param {number} top - The maximum number of results to return. Default: null - * @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + * Include all repositories */ - getChangesets(project, maxCommentLength, skip, top, orderby, searchCriteria) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - maxCommentLength: maxCommentLength, - '$skip': skip, - '$top': top, - '$orderby': orderby, - searchCriteria: searchCriteria, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ResultSet[ResultSet["All"] = 0] = "All"; /** - * Returns changesets for a given list of changeset Ids. - * - * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - List of changeset IDs. + * Include most relevant repositories for user */ - getBatchedChangesets(changesetsRequestData) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "b7e7c173-803c-4fea-9ec8-31ee35c5502a", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, changesetsRequestData, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ResultSet[ResultSet["Top"] = 1] = "Top"; +})(ResultSet = exports.ResultSet || (exports.ResultSet = {})); +var ScheduleDays; +(function (ScheduleDays) { /** - * Retrieves the work items associated with a particular changeset. - * - * @param {number} id - ID of the changeset. + * Do not run. */ - getChangesetWorkItems(id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["None"] = 0] = "None"; /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name + * Run on Monday. */ - getItemsBatch(itemRequestData, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "fe6f827b-5f64-480f-b8af-1eca3b80e833", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, itemRequestData, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["Monday"] = 1] = "Monday"; /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name + * Run on Tuesday. */ - getItemsBatchZip(itemRequestData, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "fe6f827b-5f64-480f-b8af-1eca3b80e833", routeValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["Tuesday"] = 2] = "Tuesday"; /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - Version control path of an individual item to return. - * @param {string} project - Project ID or project name - * @param {string} fileName - file name of item returned. - * @param {boolean} download - If true, create a downloadable attachment. - * @param {string} scopePath - Version control path of a folder to return multiple items. - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. - * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * Run on Wednesday. */ - getItem(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { - return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - path: path, - fileName: fileName, - download: download, - scopePath: scopePath, - recursionLevel: recursionLevel, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["Wednesday"] = 4] = "Wednesday"; /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - Version control path of an individual item to return. - * @param {string} project - Project ID or project name - * @param {string} fileName - file name of item returned. - * @param {boolean} download - If true, create a downloadable attachment. - * @param {string} scopePath - Version control path of a folder to return multiple items. - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. - * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * Run on Thursday. */ - getItemContent(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { - return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - path: path, - fileName: fileName, - download: download, - scopePath: scopePath, - recursionLevel: recursionLevel, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["Thursday"] = 8] = "Thursday"; /** - * Get a list of Tfvc items - * - * @param {string} project - Project ID or project name - * @param {string} scopePath - Version control path of a folder to return multiple items. - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). - * @param {boolean} includeLinks - True to include links. - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + * Run on Friday. */ - getItems(project, scopePath, recursionLevel, includeLinks, versionDescriptor) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - scopePath: scopePath, - recursionLevel: recursionLevel, - includeLinks: includeLinks, - versionDescriptor: versionDescriptor, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["Friday"] = 16] = "Friday"; /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - Version control path of an individual item to return. - * @param {string} project - Project ID or project name - * @param {string} fileName - file name of item returned. - * @param {boolean} download - If true, create a downloadable attachment. - * @param {string} scopePath - Version control path of a folder to return multiple items. - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. - * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * Run on Saturday. */ - getItemText(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { - return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - path: path, - fileName: fileName, - download: download, - scopePath: scopePath, - recursionLevel: recursionLevel, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["Saturday"] = 32] = "Saturday"; /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - Version control path of an individual item to return. - * @param {string} project - Project ID or project name - * @param {string} fileName - file name of item returned. - * @param {boolean} download - If true, create a downloadable attachment. - * @param {string} scopePath - Version control path of a folder to return multiple items. - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. - * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * Run on Sunday. */ - getItemZip(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { - return __awaiter(this, void 0, void 0, function* () { - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - path: path, - fileName: fileName, - download: download, - scopePath: scopePath, - recursionLevel: recursionLevel, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["Sunday"] = 64] = "Sunday"; /** - * Get items under a label. - * - * @param {string} labelId - Unique identifier of label - * @param {number} top - Max number of items to return - * @param {number} skip - Number of items to skip + * Run on all days of the week. */ - getLabelItems(labelId, top, skip) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - labelId: labelId - }; - let queryValues = { - '$top': top, - '$skip': skip, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "06166e34-de17-4b60-8cd1-23182a346fda", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ScheduleDays[ScheduleDays["All"] = 127] = "All"; +})(ScheduleDays = exports.ScheduleDays || (exports.ScheduleDays = {})); +var ServiceHostStatus; +(function (ServiceHostStatus) { /** - * Get a single deep label. - * - * @param {string} labelId - Unique identifier of label - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount - * @param {string} project - Project ID or project name + * The service host is currently connected and accepting commands. */ - getLabel(labelId, requestData, project) { - return __awaiter(this, void 0, void 0, function* () { - if (requestData == null) { - throw new TypeError('requestData can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - labelId: labelId - }; - let queryValues = { - requestData: requestData, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a5d9bd7f-b661-4d0e-b9be-d9c16affae54", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcLabel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ServiceHostStatus[ServiceHostStatus["Online"] = 1] = "Online"; /** - * Get a collection of shallow label references. - * - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter - * @param {string} project - Project ID or project name - * @param {number} top - Max number of labels to return, defaults to 100 when undefined - * @param {number} skip - Number of labels to skip + * The service host is currently disconnected and not accepting commands. */ - getLabels(requestData, project, top, skip) { - return __awaiter(this, void 0, void 0, function* () { - if (requestData == null) { - throw new TypeError('requestData can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - requestData: requestData, - '$top': top, - '$skip': skip, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a5d9bd7f-b661-4d0e-b9be-d9c16affae54", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcLabelRef, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ServiceHostStatus[ServiceHostStatus["Offline"] = 2] = "Offline"; +})(ServiceHostStatus = exports.ServiceHostStatus || (exports.ServiceHostStatus = {})); +var SourceProviderAvailability; +(function (SourceProviderAvailability) { /** - * Get changes included in a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {number} top - Max number of changes to return - * @param {number} skip - Number of changes to skip + * The source provider is available in the hosted environment. */ - getShelvesetChanges(shelvesetId, top, skip) { - return __awaiter(this, void 0, void 0, function* () { - if (shelvesetId == null) { - throw new TypeError('shelvesetId can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - shelvesetId: shelvesetId, - '$top': top, - '$skip': skip, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "dbaf075b-0445-4c34-9e5b-82292f856522", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChange, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SourceProviderAvailability[SourceProviderAvailability["Hosted"] = 1] = "Hosted"; /** - * Get a single deep shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + * The source provider is available in the on-premises environment. */ - getShelveset(shelvesetId, requestData) { - return __awaiter(this, void 0, void 0, function* () { - if (shelvesetId == null) { - throw new TypeError('shelvesetId can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - shelvesetId: shelvesetId, - requestData: requestData, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e36d44fb-e907-4b0a-b194-f83f1ed32ad3", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcShelveset, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SourceProviderAvailability[SourceProviderAvailability["OnPremises"] = 2] = "OnPremises"; /** - * Return a collection of shallow shelveset references. - * - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength - * @param {number} top - Max number of shelvesets to return - * @param {number} skip - Number of shelvesets to skip + * The source provider is available in all environments. */ - getShelvesets(requestData, top, skip) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - requestData: requestData, - '$top': top, - '$skip': skip, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e36d44fb-e907-4b0a-b194-f83f1ed32ad3", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcShelvesetRef, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SourceProviderAvailability[SourceProviderAvailability["All"] = 3] = "All"; +})(SourceProviderAvailability = exports.SourceProviderAvailability || (exports.SourceProviderAvailability = {})); +var StageUpdateType; +(function (StageUpdateType) { + StageUpdateType[StageUpdateType["Cancel"] = 0] = "Cancel"; + StageUpdateType[StageUpdateType["Retry"] = 1] = "Retry"; +})(StageUpdateType = exports.StageUpdateType || (exports.StageUpdateType = {})); +var SupportLevel; +(function (SupportLevel) { /** - * Get work items associated with a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID + * The functionality is not supported. */ - getShelvesetWorkItems(shelvesetId) { - return __awaiter(this, void 0, void 0, function* () { - if (shelvesetId == null) { - throw new TypeError('shelvesetId can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - shelvesetId: shelvesetId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a7a0c1c1-373e-425a-b031-a519474d743d", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SupportLevel[SupportLevel["Unsupported"] = 0] = "Unsupported"; /** - * Provides File Count and Uncompressed Bytes for a Collection/Project at a particular scope for TFVC. - * - * @param {string} project - Project ID or project name - * @param {string} scopePath - '$/' for collection, '$/project' for specific project + * The functionality is supported. */ - getTfvcStatistics(project, scopePath) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - scopePath: scopePath, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e15c74c0-3605-40e0-aed4-4cc61e549ed8", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } -} -TfvcApi.RESOURCE_AREA_ID = "8aa40520-446d-40e6-89f6-9c9f9ce44c48"; -exports.TfvcApi = TfvcApi; - - -/***/ }), - -/***/ 9686: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -//******************************************************************************************************* -// significant portions of this file copied from: VSO\src\Vssf\WebPlatform\Platform\Scripts\VSS\WebApi\RestClient.ts -//******************************************************************************************************* -Object.defineProperty(exports, "__esModule", ({ value: true })); -/// Imports of 3rd Party /// -const url = __nccwpck_require__(7310); -const path = __nccwpck_require__(1017); -class InvalidApiResourceVersionError { - constructor(message) { - this.name = "Invalid resource version"; - this.message = message; - } -} -exports.InvalidApiResourceVersionError = InvalidApiResourceVersionError; -/** - * Base class that should be used (derived from) to make requests to VSS REST apis - */ -class VsoClient { - constructor(baseUrl, restClient) { - this.baseUrl = baseUrl; - this.basePath = url.parse(baseUrl).pathname; - this.restClient = restClient; - this._locationsByAreaPromises = {}; - this._initializationPromise = Promise.resolve(true); - } - autoNegotiateApiVersion(location, requestedVersion) { - let negotiatedVersion; - let apiVersion; - let apiVersionString; - if (requestedVersion) { - let apiVersionRegEx = new RegExp('(\\d+(\\.\\d+)?)(-preview(\\.(\\d+))?)?'); - // Need to handle 3 types of api versions + invalid apiversion - // '2.1-preview.1' = ["2.1-preview.1", "2.1", ".1", -preview.1", ".1", "1"] - // '2.1-preview' = ["2.1-preview", "2.1", ".1", "-preview", undefined, undefined] - // '2.1' = ["2.1", "2.1", ".1", undefined, undefined, undefined] - let isPreview = false; - let resourceVersion; - let regExExecArray = apiVersionRegEx.exec(requestedVersion); - if (regExExecArray) { - if (regExExecArray[1]) { - // we have an api version - apiVersion = +regExExecArray[1]; - apiVersionString = regExExecArray[1]; - if (regExExecArray[3]) { - // requesting preview - isPreview = true; - if (regExExecArray[5]) { - // we have a resource version - resourceVersion = +regExExecArray[5]; - } - } - // compare the location version and requestedversion - if (apiVersion <= +location.releasedVersion - || (!resourceVersion && apiVersion <= +location.maxVersion && isPreview) - || (resourceVersion && apiVersion <= +location.maxVersion && resourceVersion <= +location.resourceVersion)) { - negotiatedVersion = requestedVersion; - } - // else fall back to latest version of the resource from location - } - } - } - if (!negotiatedVersion) { - // Use the latest version of the resource if the api version was not specified in the request or if the requested version is higher then the location's supported version - if (apiVersion < +location.maxVersion) { - negotiatedVersion = apiVersionString + "-preview"; - } - else if (location.maxVersion === location.releasedVersion) { - negotiatedVersion = location.maxVersion; - } - else { - negotiatedVersion = location.maxVersion + "-preview." + location.resourceVersion; - } - } - return negotiatedVersion; - } + SupportLevel[SupportLevel["Supported"] = 1] = "Supported"; /** - * Gets the route template for a resource based on its location ID and negotiates the api version + * The functionality is required. */ - getVersioningData(apiVersion, area, locationId, routeValues, queryParams) { - let requestUrl; - return this.beginGetLocation(area, locationId) - .then((location) => { - if (!location) { - throw new Error("Failed to find api location for area: " + area + " id: " + locationId); - } - apiVersion = this.autoNegotiateApiVersion(location, apiVersion); - requestUrl = this.getRequestUrl(location.routeTemplate, location.area, location.resourceName, routeValues, queryParams); - return { - apiVersion: apiVersion, - requestUrl: requestUrl - }; - }); - } + SupportLevel[SupportLevel["Required"] = 2] = "Required"; +})(SupportLevel = exports.SupportLevel || (exports.SupportLevel = {})); +var TaskResult; +(function (TaskResult) { + TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; + TaskResult[TaskResult["SucceededWithIssues"] = 1] = "SucceededWithIssues"; + TaskResult[TaskResult["Failed"] = 2] = "Failed"; + TaskResult[TaskResult["Canceled"] = 3] = "Canceled"; + TaskResult[TaskResult["Skipped"] = 4] = "Skipped"; + TaskResult[TaskResult["Abandoned"] = 5] = "Abandoned"; +})(TaskResult = exports.TaskResult || (exports.TaskResult = {})); +var TimelineRecordState; +(function (TimelineRecordState) { + TimelineRecordState[TimelineRecordState["Pending"] = 0] = "Pending"; + TimelineRecordState[TimelineRecordState["InProgress"] = 1] = "InProgress"; + TimelineRecordState[TimelineRecordState["Completed"] = 2] = "Completed"; +})(TimelineRecordState = exports.TimelineRecordState || (exports.TimelineRecordState = {})); +var ValidationResult; +(function (ValidationResult) { + ValidationResult[ValidationResult["OK"] = 0] = "OK"; + ValidationResult[ValidationResult["Warning"] = 1] = "Warning"; + ValidationResult[ValidationResult["Error"] = 2] = "Error"; +})(ValidationResult = exports.ValidationResult || (exports.ValidationResult = {})); +var WorkspaceMappingType; +(function (WorkspaceMappingType) { /** - * Sets a promise that is waited on before any requests are issued. Can be used to asynchronously - * set the request url and auth token manager. + * The path is mapped in the workspace. */ - _setInitializationPromise(promise) { - if (promise) { - this._initializationPromise = promise; - } - } + WorkspaceMappingType[WorkspaceMappingType["Map"] = 0] = "Map"; /** - * Gets information about an API resource location (route template, supported versions, etc.) - * - * @param area resource area name - * @param locationId Guid of the location to get + * The path is cloaked in the workspace. */ - beginGetLocation(area, locationId) { - return this._initializationPromise.then(() => { - return this.beginGetAreaLocations(area); - }).then((areaLocations) => { - return areaLocations[(locationId || "").toLowerCase()]; - }); - } - beginGetAreaLocations(area) { - let areaLocationsPromise = this._locationsByAreaPromises[area]; - if (!areaLocationsPromise) { - let requestUrl = this.resolveUrl(VsoClient.APIS_RELATIVE_PATH + "/" + area); - areaLocationsPromise = this.restClient.options(requestUrl) - .then((res) => { - let locationsLookup = {}; - let resourceLocations = res.result.value; - let i; - for (i = 0; i < resourceLocations.length; i++) { - let resourceLocation = resourceLocations[i]; - locationsLookup[resourceLocation.id.toLowerCase()] = resourceLocation; - } - // If we have completed successfully, cache the response. - this._locationsByAreaPromises[area] = areaLocationsPromise; - return locationsLookup; - }); + WorkspaceMappingType[WorkspaceMappingType["Cloak"] = 1] = "Cloak"; +})(WorkspaceMappingType = exports.WorkspaceMappingType || (exports.WorkspaceMappingType = {})); +exports.TypeInfo = { + AgentStatus: { + enumValues: { + "unavailable": 0, + "available": 1, + "offline": 2 } - return areaLocationsPromise; - } - resolveUrl(relativeUrl) { - return url.resolve(this.baseUrl, path.join(this.basePath, relativeUrl)); - } - queryParamsToStringHelper(queryParams, prefix) { - if (queryParams == null || queryParams.length === 0) { - return ''; + }, + AuditAction: { + enumValues: { + "add": 1, + "update": 2, + "delete": 3 } - let queryString = ''; - if (typeof (queryParams) !== 'string') { - for (let property in queryParams) { - if (queryParams.hasOwnProperty(property)) { - const prop = queryParams[property]; - const newPrefix = prefix + encodeURIComponent(property.toString()) + '.'; - queryString += this.queryParamsToStringHelper(prop, newPrefix); - } - } + }, + Build: {}, + BuildAgent: {}, + BuildAuthorizationScope: { + enumValues: { + "projectCollection": 1, + "project": 2 + } + }, + BuildCompletedEvent: {}, + BuildCompletionTrigger: {}, + BuildController: {}, + BuildDefinition: {}, + BuildDefinition3_2: {}, + BuildDefinitionReference: {}, + BuildDefinitionReference3_2: {}, + BuildDefinitionRevision: {}, + BuildDefinitionSourceProvider: {}, + BuildDefinitionTemplate: {}, + BuildDefinitionTemplate3_2: {}, + BuildDeletedEvent: {}, + BuildDeployment: {}, + BuildLog: {}, + BuildMetric: {}, + BuildOptionDefinition: {}, + BuildOptionInputDefinition: {}, + BuildOptionInputType: { + enumValues: { + "string": 0, + "boolean": 1, + "stringList": 2, + "radio": 3, + "pickList": 4, + "multiLine": 5, + "branchFilter": 6 + } + }, + BuildPhaseStatus: { + enumValues: { + "unknown": 0, + "failed": 1, + "succeeded": 2 + } + }, + BuildProcessTemplate: {}, + BuildQueryOrder: { + enumValues: { + "finishTimeAscending": 2, + "finishTimeDescending": 3, + "queueTimeDescending": 4, + "queueTimeAscending": 5, + "startTimeDescending": 6, + "startTimeAscending": 7 + } + }, + BuildQueuedEvent: {}, + BuildReason: { + enumValues: { + "none": 0, + "manual": 1, + "individualCI": 2, + "batchedCI": 4, + "schedule": 8, + "scheduleForced": 16, + "userCreated": 32, + "validateShelveset": 64, + "checkInShelveset": 128, + "pullRequest": 256, + "buildCompletion": 512, + "resourceTrigger": 1024, + "triggered": 1967, + "all": 2031 + } + }, + BuildReference: {}, + BuildRequestValidationResult: {}, + BuildResult: { + enumValues: { + "none": 0, + "succeeded": 2, + "partiallySucceeded": 4, + "failed": 8, + "canceled": 32 + } + }, + BuildRetentionHistory: {}, + BuildRetentionSample: {}, + BuildServer: {}, + BuildStatus: { + enumValues: { + "none": 0, + "inProgress": 1, + "completed": 2, + "cancelling": 4, + "postponed": 8, + "notStarted": 32, + "all": 47 + } + }, + BuildSummary: {}, + BuildTagsAddedEvent: {}, + BuildTrigger: {}, + BuildUpdatedEvent: {}, + Change: {}, + ContinuousDeploymentDefinition: {}, + ContinuousIntegrationTrigger: {}, + ControllerStatus: { + enumValues: { + "unavailable": 0, + "available": 1, + "offline": 2 + } + }, + DefinitionQuality: { + enumValues: { + "definition": 1, + "draft": 2 + } + }, + DefinitionQueryOrder: { + enumValues: { + "none": 0, + "lastModifiedAscending": 1, + "lastModifiedDescending": 2, + "definitionNameAscending": 3, + "definitionNameDescending": 4 + } + }, + DefinitionQueueStatus: { + enumValues: { + "enabled": 0, + "paused": 1, + "disabled": 2 + } + }, + DefinitionReference: {}, + DefinitionTriggerType: { + enumValues: { + "none": 1, + "continuousIntegration": 2, + "batchedContinuousIntegration": 4, + "schedule": 8, + "gatedCheckIn": 16, + "batchedGatedCheckIn": 32, + "pullRequest": 64, + "buildCompletion": 128, + "all": 255 + } + }, + DefinitionType: { + enumValues: { + "xaml": 1, + "build": 2 + } + }, + DeleteOptions: { + enumValues: { + "none": 0, + "dropLocation": 1, + "testResults": 2, + "label": 4, + "details": 8, + "symbols": 16, + "all": 31 + } + }, + DesignerProcess: {}, + Folder: {}, + FolderQueryOrder: { + enumValues: { + "none": 0, + "folderAscending": 1, + "folderDescending": 2 + } + }, + GatedCheckInTrigger: {}, + GetOption: { + enumValues: { + "latestOnQueue": 0, + "latestOnBuild": 1, + "custom": 2 + } + }, + InformationNode: {}, + Issue: {}, + IssueType: { + enumValues: { + "error": 1, + "warning": 2 + } + }, + Phase: {}, + ProcessTemplateType: { + enumValues: { + "custom": 0, + "default": 1, + "upgrade": 2 + } + }, + PullRequestTrigger: {}, + QueryDeletedOption: { + enumValues: { + "excludeDeleted": 0, + "includeDeleted": 1, + "onlyDeleted": 2 } - if (queryString === '' && prefix.length > 0) { - // Date.prototype.toString() returns a string that is not valid for the REST API. - // Need to specially call `toUTCString()` instead for such cases - const queryValue = typeof queryParams === 'object' && 'toUTCString' in queryParams ? queryParams.toUTCString() : queryParams.toString(); - // Will always need to chop period off of end of prefix - queryString = prefix.slice(0, -1) + '=' + encodeURIComponent(queryValue) + '&'; + }, + QueueOptions: { + enumValues: { + "none": 0, + "doNotRun": 1 } - return queryString; - } - queryParamsToString(queryParams) { - const queryString = '?' + this.queryParamsToStringHelper(queryParams, ''); - // Will always need to slice either a ? or & off of the end - return queryString.slice(0, -1); - } - getRequestUrl(routeTemplate, area, resource, routeValues, queryParams) { - // Add area/resource route values (based on the location) - routeValues = routeValues || {}; - if (!routeValues.area) { - routeValues.area = area; + }, + QueuePriority: { + enumValues: { + "low": 5, + "belowNormal": 4, + "normal": 3, + "aboveNormal": 2, + "high": 1 } - if (!routeValues.resource) { - routeValues.resource = resource; + }, + RepositoryCleanOptions: { + enumValues: { + "source": 0, + "sourceAndOutputDir": 1, + "sourceDir": 2, + "allBuildDir": 3 } - // Replace templated route values - let relativeUrl = this.replaceRouteValues(routeTemplate, routeValues); - // Append query parameters to the end - if (queryParams) { - relativeUrl += this.queryParamsToString(queryParams); + }, + RepositoryWebhook: {}, + ResultSet: { + enumValues: { + "all": 0, + "top": 1 } - // Resolve the relative url with the base - return url.resolve(this.baseUrl, path.join(this.basePath, relativeUrl)); - } - // helper method copied directly from VSS\WebAPI\restclient.ts - replaceRouteValues(routeTemplate, routeValues) { - let result = "", currentPathPart = "", paramName = "", insideParam = false, charIndex, routeTemplateLength = routeTemplate.length, c; - for (charIndex = 0; charIndex < routeTemplateLength; charIndex++) { - c = routeTemplate[charIndex]; - if (insideParam) { - if (c == "}") { - insideParam = false; - if (routeValues[paramName]) { - currentPathPart += encodeURIComponent(routeValues[paramName]); - } - else { - // Normalize param name in order to capture wild-card routes - let strippedParamName = paramName.replace(/[^a-z0-9]/ig, ''); - if (routeValues[strippedParamName]) { - currentPathPart += encodeURIComponent(routeValues[strippedParamName]); - } - } - paramName = ""; - } - else { - paramName += c; - } - } - else { - if (c == "/") { - if (currentPathPart) { - if (result) { - result += "/"; - } - result += currentPathPart; - currentPathPart = ""; - } - } - else if (c == "{") { - if ((charIndex + 1) < routeTemplateLength && routeTemplate[charIndex + 1] == "{") { - // Escaped '{' - currentPathPart += c; - charIndex++; - } - else { - insideParam = true; - } - } - else if (c == '}') { - currentPathPart += c; - if ((charIndex + 1) < routeTemplateLength && routeTemplate[charIndex + 1] == "}") { - // Escaped '}' - charIndex++; - } - } - else { - currentPathPart += c; - } - } + }, + RetentionLease: {}, + Schedule: {}, + ScheduleDays: { + enumValues: { + "none": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 4, + "thursday": 8, + "friday": 16, + "saturday": 32, + "sunday": 64, + "all": 127 } - if (currentPathPart) { - if (result) { - result += "/"; - } - result += currentPathPart; + }, + ScheduleTrigger: {}, + ServiceHostStatus: { + enumValues: { + "online": 1, + "offline": 2 } - return result; - } -} -VsoClient.APIS_RELATIVE_PATH = "_apis"; -VsoClient.PREVIEW_INDICATOR = "-preview."; -exports.VsoClient = VsoClient; - - -/***/ }), - -/***/ 7967: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const buildm = __nccwpck_require__(9893); -const corem = __nccwpck_require__(4020); -const dashboardm = __nccwpck_require__(7539); -const extmgmtm = __nccwpck_require__(4605); -const featuremgmtm = __nccwpck_require__(3193); -const filecontainerm = __nccwpck_require__(7558); -const gallerym = __nccwpck_require__(1939); -const gitm = __nccwpck_require__(4996); -const locationsm = __nccwpck_require__(4771); -const notificationm = __nccwpck_require__(8221); -const policym = __nccwpck_require__(266); -const profilem = __nccwpck_require__(8101); -const projectm = __nccwpck_require__(1682); -const releasem = __nccwpck_require__(3075); -const securityrolesm = __nccwpck_require__(806); -const taskagentm = __nccwpck_require__(2496); -const taskm = __nccwpck_require__(2354); -const testm = __nccwpck_require__(5742); -const testresultsm = __nccwpck_require__(1819); -const tfvcm = __nccwpck_require__(5417); -const wikim = __nccwpck_require__(6391); -const workm = __nccwpck_require__(8186); -const workitemtrackingm = __nccwpck_require__(8409); -const workitemtrackingprocessm = __nccwpck_require__(8313); -const workitemtrackingprocessdefinitionm = __nccwpck_require__(3333); -const basicm = __nccwpck_require__(6456); -const bearm = __nccwpck_require__(1141); -const ntlmm = __nccwpck_require__(3450); -const patm = __nccwpck_require__(4551); -const rm = __nccwpck_require__(7405); -const vsom = __nccwpck_require__(9686); -const crypto = __nccwpck_require__(6113); -const fs = __nccwpck_require__(7147); -const os = __nccwpck_require__(2037); -const url = __nccwpck_require__(7310); -const path = __nccwpck_require__(1017); -const isBrowser = typeof window !== 'undefined'; -/** - * Methods to return handler objects (see handlers folder) - */ -function getBasicHandler(username, password, allowCrossOriginAuthentication) { - return new basicm.BasicCredentialHandler(username, password, allowCrossOriginAuthentication); -} -exports.getBasicHandler = getBasicHandler; -function getNtlmHandler(username, password, workstation, domain) { - return new ntlmm.NtlmCredentialHandler(username, password, workstation, domain); -} -exports.getNtlmHandler = getNtlmHandler; -function getBearerHandler(token, allowCrossOriginAuthentication) { - return new bearm.BearerCredentialHandler(token, allowCrossOriginAuthentication); -} -exports.getBearerHandler = getBearerHandler; -function getPersonalAccessTokenHandler(token, allowCrossOriginAuthentication) { - return new patm.PersonalAccessTokenCredentialHandler(token, allowCrossOriginAuthentication); -} -exports.getPersonalAccessTokenHandler = getPersonalAccessTokenHandler; -function getHandlerFromToken(token, allowCrossOriginAuthentication) { - if (token.length === 52) { - return getPersonalAccessTokenHandler(token, allowCrossOriginAuthentication); - } - else { - return getBearerHandler(token, allowCrossOriginAuthentication); - } -} -exports.getHandlerFromToken = getHandlerFromToken; -; -// --------------------------------------------------------------------------- -// Factory to return client apis -// When new APIs are added, a method must be added here to instantiate the API -//---------------------------------------------------------------------------- -class WebApi { - /* - * Factory to return client apis and handlers - * @param defaultUrl default server url to use when creating new apis from factory methods - * @param authHandler default authentication credentials to use when creating new apis from factory methods - */ - constructor(defaultUrl, authHandler, options, requestSettings) { - /** - * Determines if the domain is exluded for proxy via the no_proxy env var - * @param url: the server url - */ - this.isNoProxyHost = function (_url) { - if (!process.env.no_proxy) { - return false; - } - const noProxyDomains = (process.env.no_proxy || '') - .split(',') - .map(v => v.toLowerCase()); - const serverUrl = url.parse(_url).host.toLowerCase(); - // return true if the no_proxy includes the host - return noProxyDomains.indexOf(serverUrl) !== -1; - }; - this.serverUrl = defaultUrl; - this.authHandler = authHandler; - this.options = options || {}; - if (!this.isNoProxyHost(this.serverUrl)) { - // try to get proxy setting from environment variable set by VSTS-Task-Lib if there is no proxy setting in the options - if (!this.options.proxy || !this.options.proxy.proxyUrl) { - if (global['_vsts_task_lib_proxy']) { - let proxyFromEnv = { - proxyUrl: global['_vsts_task_lib_proxy_url'], - proxyUsername: global['_vsts_task_lib_proxy_username'], - proxyPassword: this._readTaskLibSecrets(global['_vsts_task_lib_proxy_password']), - proxyBypassHosts: JSON.parse(global['_vsts_task_lib_proxy_bypass'] || "[]"), - }; - this.options.proxy = proxyFromEnv; - } - } + }, + SourceProviderAttributes: {}, + SourceProviderAvailability: { + enumValues: { + "hosted": 1, + "onPremises": 2, + "all": 3 } - // try get cert setting from environment variable set by VSTS-Task-Lib if there is no cert setting in the options - if (!this.options.cert) { - if (global['_vsts_task_lib_cert']) { - let certFromEnv = { - caFile: global['_vsts_task_lib_cert_ca'], - certFile: global['_vsts_task_lib_cert_clientcert'], - keyFile: global['_vsts_task_lib_cert_key'], - passphrase: this._readTaskLibSecrets(global['_vsts_task_lib_cert_passphrase']), - }; - this.options.cert = certFromEnv; - } + }, + StageUpdateType: { + enumValues: { + "cancel": 0, + "retry": 1 } - // try get ignore SSL error setting from environment variable set by VSTS-Task-Lib if there is no ignore SSL error setting in the options - if (!this.options.ignoreSslError) { - this.options.ignoreSslError = !!global['_vsts_task_lib_skip_cert_validation']; + }, + SupportedTrigger: {}, + SupportLevel: { + enumValues: { + "unsupported": 0, + "supported": 1, + "required": 2 } - let userAgent; - const nodeApiName = 'azure-devops-node-api'; - if (isBrowser) { - if (requestSettings) { - userAgent = `${requestSettings.productName}/${requestSettings.productVersion} (${nodeApiName}; ${window.navigator.userAgent})`; - } - else { - userAgent = `${nodeApiName} (${window.navigator.userAgent})`; - } + }, + TaskResult: { + enumValues: { + "succeeded": 0, + "succeededWithIssues": 1, + "failed": 2, + "canceled": 3, + "skipped": 4, + "abandoned": 5 } - else { - let nodeApiVersion = 'unknown'; - const packageJsonPath = __nccwpck_require__.ab + "package.json"; - if (fs.existsSync(__nccwpck_require__.ab + "package.json")) { - nodeApiVersion = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')).version; - } - const osName = os.platform(); - const osVersion = os.release(); - if (requestSettings) { - userAgent = `${requestSettings.productName}/${requestSettings.productVersion} (${nodeApiName} ${nodeApiVersion}; ${osName} ${osVersion})`; - } - else { - userAgent = `${nodeApiName}/${nodeApiVersion} (${osName} ${osVersion})`; - } + }, + Timeline: {}, + TimelineRecord: {}, + TimelineRecordState: { + enumValues: { + "pending": 0, + "inProgress": 1, + "completed": 2 } - this.rest = new rm.RestClient(userAgent, null, [this.authHandler], this.options); - this.vsoClient = new vsom.VsoClient(defaultUrl, this.rest); - } - /** - * Convenience factory to create with a bearer token. - * @param defaultServerUrl default server url to use when creating new apis from factory methods - * @param defaultAuthHandler default authentication credentials to use when creating new apis from factory methods - */ - static createWithBearerToken(defaultUrl, token, options) { - let bearerHandler = getBearerHandler(token); - return new this(defaultUrl, bearerHandler, options); - } - connect() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - try { - let res; - res = yield this.rest.get(this.vsoClient.resolveUrl('/_apis/connectionData')); - resolve(res.result); - } - catch (err) { - reject(err); - } - })); - }); - } - /** - * Each factory method can take a serverUrl and a list of handlers - * if these aren't provided, the default url and auth handler given to the constructor for this class will be used - */ - getBuildApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, buildm.BuildApi.RESOURCE_AREA_ID); - handlers = handlers || [this.authHandler]; - return new buildm.BuildApi(serverUrl, handlers, this.options); - }); - } - getCoreApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "79134c72-4a58-4b42-976c-04e7115f32bf"); - handlers = handlers || [this.authHandler]; - return new corem.CoreApi(serverUrl, handlers, this.options); - }); - } - getDashboardApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "31c84e0a-3ece-48fd-a29d-100849af99ba"); - handlers = handlers || [this.authHandler]; - return new dashboardm.DashboardApi(serverUrl, handlers, this.options); - }); - } - getExtensionManagementApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "6c2b0933-3600-42ae-bf8b-93d4f7e83594"); - handlers = handlers || [this.authHandler]; - return new extmgmtm.ExtensionManagementApi(serverUrl, handlers, this.options); - }); - } - getFeatureManagementApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); - handlers = handlers || [this.authHandler]; - return new featuremgmtm.FeatureManagementApi(serverUrl, handlers, this.options); - }); - } - getFileContainerApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); - handlers = handlers || [this.authHandler]; - return new filecontainerm.FileContainerApi(serverUrl, handlers, this.options); - }); - } - getGalleryApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, gallerym.GalleryApi.RESOURCE_AREA_ID); - handlers = handlers || [this.authHandler]; - return new gallerym.GalleryApi(serverUrl, handlers, this.options); - }); - } - getGitApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, gitm.GitApi.RESOURCE_AREA_ID); - handlers = handlers || [this.authHandler]; - return new gitm.GitApi(serverUrl, handlers, this.options); - }); - } - // TODO: Don't call resource area here? Will cause infinite loop? - getLocationsApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - let optionsClone = Object.assign({}, this.options); - optionsClone.allowRetries = true; - optionsClone.maxRetries = 5; - serverUrl = (yield serverUrl) || this.serverUrl; - handlers = handlers || [this.authHandler]; - return new locationsm.LocationsApi(serverUrl, handlers, optionsClone); - }); - } - getNotificationApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); - handlers = handlers || [this.authHandler]; - return new notificationm.NotificationApi(serverUrl, handlers, this.options); - }); - } - getPolicyApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "fb13a388-40dd-4a04-b530-013a739c72ef"); - handlers = handlers || [this.authHandler]; - return new policym.PolicyApi(serverUrl, handlers, this.options); - }); - } - getProfileApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "8ccfef3d-2b87-4e99-8ccb-66e343d2daa8"); - handlers = handlers || [this.authHandler]; - return new profilem.ProfileApi(serverUrl, handlers, this.options); - }); - } - getProjectAnalysisApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "7658fa33-b1bf-4580-990f-fac5896773d3"); - handlers = handlers || [this.authHandler]; - return new projectm.ProjectAnalysisApi(serverUrl, handlers, this.options); - }); - } - getSecurityRolesApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); - handlers = handlers || [this.authHandler]; - return new securityrolesm.SecurityRolesApi(serverUrl, handlers, this.options); - }); - } - getReleaseApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "efc2f575-36ef-48e9-b672-0c6fb4a48ac5"); - handlers = handlers || [this.authHandler]; - return new releasem.ReleaseApi(serverUrl, handlers, this.options); - }); - } - getTaskApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); - handlers = handlers || [this.authHandler]; - return new taskm.TaskApi(serverUrl, handlers, this.options); - }); - } - getTaskAgentApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd"); - handlers = handlers || [this.authHandler]; - return new taskagentm.TaskAgentApi(serverUrl, handlers, this.options); - }); - } - getTestApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e"); - handlers = handlers || [this.authHandler]; - return new testm.TestApi(serverUrl, handlers, this.options); - }); - } - getTestResultsApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "c83eaf52-edf3-4034-ae11-17d38f25404c"); - handlers = handlers || [this.authHandler]; - return new testresultsm.TestResultsApi(serverUrl, handlers, this.options); - }); - } - getTfvcApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "8aa40520-446d-40e6-89f6-9c9f9ce44c48"); - handlers = handlers || [this.authHandler]; - return new tfvcm.TfvcApi(serverUrl, handlers, this.options); - }); - } - getWikiApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3"); - handlers = handlers || [this.authHandler]; - return new wikim.WikiApi(serverUrl, handlers, this.options); - }); - } - getWorkApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"); - handlers = handlers || [this.authHandler]; - return new workm.WorkApi(serverUrl, handlers, this.options); - }); - } - getWorkItemTrackingApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, workitemtrackingm.WorkItemTrackingApi.RESOURCE_AREA_ID); - handlers = handlers || [this.authHandler]; - return new workitemtrackingm.WorkItemTrackingApi(serverUrl, handlers, this.options); - }); - } - getWorkItemTrackingProcessApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "5264459e-e5e0-4bd8-b118-0985e68a4ec5"); - handlers = handlers || [this.authHandler]; - return new workitemtrackingprocessm.WorkItemTrackingProcessApi(serverUrl, handlers, this.options); - }); - } - getWorkItemTrackingProcessDefinitionApi(serverUrl, handlers) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Load RESOURCE_AREA_ID correctly. - serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "5264459e-e5e0-4bd8-b118-0985e68a4ec5"); - handlers = handlers || [this.authHandler]; - return new workitemtrackingprocessdefinitionm.WorkItemTrackingProcessDefinitionsApi(serverUrl, handlers, this.options); - }); - } - _getResourceAreaUrl(serverUrl, resourceId) { - return __awaiter(this, void 0, void 0, function* () { - if (!resourceId) { - return serverUrl; - } - // This must be of type any, see comment just below. - const resourceAreas = yield this._getResourceAreas(); - if (resourceAreas === undefined) { - throw new Error((`Failed to retrieve resource areas ' + 'from server: ${serverUrl}`)); - } - // The response type differs based on whether or not there are resource areas. When we are on prem we get: - // {"count":0,"value":null} and when we are on VSTS we get an array of resource areas. - // Due to this strangeness the type of resourceAreas needs to be any and we need to check .count - // When going against vsts count will be undefined. On prem it will be 0 - if (!resourceAreas || resourceAreas.length === 0 || resourceAreas.count === 0) { - // For on prem environments we get an empty list - return serverUrl; - } - for (var resourceArea of resourceAreas) { - if (resourceArea.id.toLowerCase() === resourceId.toLowerCase()) { - return resourceArea.locationUrl; - } - } - throw new Error((`Could not find information for resource area ${resourceId} ' + 'from server: ${serverUrl}`)); - }); - } - _getResourceAreas() { - return __awaiter(this, void 0, void 0, function* () { - if (!this._resourceAreas) { - const locationClient = yield this.getLocationsApi(); - this._resourceAreas = yield locationClient.getResourceAreas(); - } - return this._resourceAreas; - }); - } - _readTaskLibSecrets(lookupKey) { - if (isBrowser) { - throw new Error("Browsers can't securely keep secrets"); + }, + TimelineRecordsUpdatedEvent: {}, + UpdateStageParameters: {}, + ValidationResult: { + enumValues: { + "ok": 0, + "warning": 1, + "error": 2 } - // the lookupKey should has following format - // base64encoded:base64encoded - if (lookupKey && lookupKey.indexOf(':') > 0) { - let lookupInfo = lookupKey.split(':', 2); - // file contains encryption key - let keyFile = new Buffer(lookupInfo[0], 'base64').toString('utf8'); - let encryptKey = new Buffer(fs.readFileSync(keyFile, 'utf8'), 'base64'); - let encryptedContent = new Buffer(lookupInfo[1], 'base64').toString('utf8'); - let decipher = crypto.createDecipher("aes-256-ctr", encryptKey); - let decryptedContent = decipher.update(encryptedContent, 'hex', 'utf8'); - decryptedContent += decipher.final('utf8'); - return decryptedContent; + }, + WorkspaceMapping: {}, + WorkspaceMappingType: { + enumValues: { + "map": 0, + "cloak": 1 } - } -} -exports.WebApi = WebApi; - - -/***/ }), - -/***/ 6391: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + }, + WorkspaceTemplate: {}, + XamlBuildDefinition: {}, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const Comments_Contracts = __nccwpck_require__(4743); -const WikiInterfaces = __nccwpck_require__(5507); -class WikiApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Wiki-api', options); - } - /** - * Uploads an attachment on a comment on a wiki page. - * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {number} pageId - Wiki page ID. - */ - createCommentAttachment(customHeaders, contentStream, project, wikiIdentifier, pageId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId - }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "5100d976-363d-42e7-a19d-4171ecb44782", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; - let res; - res = yield this.rest.uploadStream("POST", url, contentStream, options); - let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentAttachment, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +exports.TypeInfo.Build.fields = { + controller: { + typeInfo: exports.TypeInfo.BuildController + }, + definition: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + deletedDate: { + isDate: true, + }, + finishTime: { + isDate: true, + }, + lastChangedDate: { + isDate: true, + }, + priority: { + enumType: exports.TypeInfo.QueuePriority + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + queueOptions: { + enumType: exports.TypeInfo.QueueOptions + }, + queueTime: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.BuildReason + }, + result: { + enumType: exports.TypeInfo.BuildResult + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.BuildStatus + }, + triggeredByBuild: { + typeInfo: exports.TypeInfo.Build + }, + validationResults: { + isArray: true, + typeInfo: exports.TypeInfo.BuildRequestValidationResult } - /** - * Downloads an attachment on a comment on a wiki page. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {number} pageId - Wiki page ID. - * @param {string} attachmentId - Attachment ID. - */ - getAttachmentContent(project, wikiIdentifier, pageId, attachmentId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId, - attachmentId: attachmentId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "5100d976-363d-42e7-a19d-4171ecb44782", routeValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildAgent.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.AgentStatus + }, + updatedDate: { + isDate: true, } - /** - * Add a reaction on a wiki page comment. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name - * @param {number} pageId - Wiki page ID - * @param {number} commentId - ID of the associated comment - * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction being added - */ - addCommentReaction(project, wikiIdentifier, pageId, commentId, type) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId, - commentId: commentId, - type: type - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "7a5bc693-aab7-4d48-8f34-36f373022063", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentReaction, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildCompletedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build + }, + changes: { + isArray: true, + typeInfo: exports.TypeInfo.Change + }, + testResults: { + typeInfo: TFS_TestManagement_Contracts.TypeInfo.AggregatedResultsAnalysis + }, + timelineRecords: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord } - /** - * Delete a reaction on a wiki page comment. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or name - * @param {number} pageId - Wiki page ID - * @param {number} commentId - ID of the associated comment - * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction being deleted - */ - deleteCommentReaction(project, wikiIdentifier, pageId, commentId, type) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId, - commentId: commentId, - type: type - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "7a5bc693-aab7-4d48-8f34-36f373022063", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentReaction, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildCompletionTrigger.fields = { + definition: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * Gets a list of users who have reacted for the given wiki comment with a given reaction type. Supports paging, with a default page size of 100 users at a time. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {number} pageId - Wiki page ID. - * @param {number} commentId - ID of the associated comment - * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction for which the engaged users are being requested - * @param {number} top - Number of enagaged users to be returned in a given page. Optional, defaults to 100 - * @param {number} skip - Number of engaged users to be skipped to page the next set of engaged users, defaults to 0 - */ - getEngagedUsers(project, wikiIdentifier, pageId, commentId, type, top, skip) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId, - commentId: commentId, - type: type - }; - let queryValues = { - '$top': top, - '$skip': skip, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "598a5268-41a7-4162-b7dc-344131e4d1fa", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildController.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ControllerStatus + }, + updatedDate: { + isDate: true, } - /** - * Add a comment on a wiki page. - * - * @param {Comments_Contracts.CommentCreateParameters} request - Comment create request. - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {number} pageId - Wiki page ID. - */ - addComment(request, project, wikiIdentifier, pageId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, request, options); - let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDefinition.fields = { + createdDate: { + isDate: true, + }, + draftOf: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + drafts: { + isArray: true, + typeInfo: exports.TypeInfo.DefinitionReference + }, + jobAuthorizationScope: { + enumType: exports.TypeInfo.BuildAuthorizationScope + }, + latestBuild: { + typeInfo: exports.TypeInfo.Build + }, + latestCompletedBuild: { + typeInfo: exports.TypeInfo.Build + }, + metrics: { + isArray: true, + typeInfo: exports.TypeInfo.BuildMetric + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + quality: { + enumType: exports.TypeInfo.DefinitionQuality + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + triggers: { + isArray: true, + typeInfo: exports.TypeInfo.BuildTrigger + }, + type: { + enumType: exports.TypeInfo.DefinitionType } - /** - * Delete a comment on a wiki page. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or name. - * @param {number} pageId - Wiki page ID. - * @param {number} id - Comment ID. - */ - deleteComment(project, wikiIdentifier, pageId, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDefinition3_2.fields = { + createdDate: { + isDate: true, + }, + draftOf: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + drafts: { + isArray: true, + typeInfo: exports.TypeInfo.DefinitionReference + }, + jobAuthorizationScope: { + enumType: exports.TypeInfo.BuildAuthorizationScope + }, + latestBuild: { + typeInfo: exports.TypeInfo.Build + }, + latestCompletedBuild: { + typeInfo: exports.TypeInfo.Build + }, + metrics: { + isArray: true, + typeInfo: exports.TypeInfo.BuildMetric + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + quality: { + enumType: exports.TypeInfo.DefinitionQuality + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + triggers: { + isArray: true, + typeInfo: exports.TypeInfo.BuildTrigger + }, + type: { + enumType: exports.TypeInfo.DefinitionType } - /** - * Returns a comment associated with the Wiki Page. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {number} pageId - Wiki page ID. - * @param {number} id - ID of the comment to return. - * @param {boolean} excludeDeleted - Specify if the deleted comment should be skipped. - * @param {Comments_Contracts.CommentExpandOptions} expand - Specifies the additional data retrieval options for comments. - */ - getComment(project, wikiIdentifier, pageId, id, excludeDeleted, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId, - id: id - }; - let queryValues = { - excludeDeleted: excludeDeleted, - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDefinitionReference.fields = { + createdDate: { + isDate: true, + }, + draftOf: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + drafts: { + isArray: true, + typeInfo: exports.TypeInfo.DefinitionReference + }, + latestBuild: { + typeInfo: exports.TypeInfo.Build + }, + latestCompletedBuild: { + typeInfo: exports.TypeInfo.Build + }, + metrics: { + isArray: true, + typeInfo: exports.TypeInfo.BuildMetric + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + quality: { + enumType: exports.TypeInfo.DefinitionQuality + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + type: { + enumType: exports.TypeInfo.DefinitionType } - /** - * Returns a pageable list of comments. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {number} pageId - Wiki page ID. - * @param {number} top - Max number of comments to return. - * @param {string} continuationToken - Used to query for the next page of comments. - * @param {boolean} excludeDeleted - Specify if the deleted comments should be skipped. - * @param {Comments_Contracts.CommentExpandOptions} expand - Specifies the additional data retrieval options for comments. - * @param {Comments_Contracts.CommentSortOrder} order - Order in which the comments should be returned. - * @param {number} parentId - CommentId of the parent comment. - */ - listComments(project, wikiIdentifier, pageId, top, continuationToken, excludeDeleted, expand, order, parentId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId - }; - let queryValues = { - '$top': top, - continuationToken: continuationToken, - excludeDeleted: excludeDeleted, - '$expand': expand, - order: order, - parentId: parentId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentList, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDefinitionReference3_2.fields = { + createdDate: { + isDate: true, + }, + draftOf: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + drafts: { + isArray: true, + typeInfo: exports.TypeInfo.DefinitionReference + }, + metrics: { + isArray: true, + typeInfo: exports.TypeInfo.BuildMetric + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + quality: { + enumType: exports.TypeInfo.DefinitionQuality + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + type: { + enumType: exports.TypeInfo.DefinitionType } - /** - * Update a comment on a wiki page. - * - * @param {Comments_Contracts.CommentUpdateParameters} comment - Comment update request. - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {number} pageId - Wiki page ID. - * @param {number} id - Comment ID. - */ - updateComment(comment, project, wikiIdentifier, pageId, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, comment, options); - let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDefinitionRevision.fields = { + changedDate: { + isDate: true, + }, + changeType: { + enumType: exports.TypeInfo.AuditAction } - /** - * 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. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {string} path - Wiki page path. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional). - * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) - */ - getPageText(project, wikiIdentifier, path, recursionLevel, versionDescriptor, includeContent) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier - }; - let queryValues = { - path: path, - recursionLevel: recursionLevel, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDefinitionSourceProvider.fields = { + lastModified: { + isDate: true, + }, + supportedTriggerTypes: { + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * 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. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {string} path - Wiki page path. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional). - * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) - */ - getPageZip(project, wikiIdentifier, path, recursionLevel, versionDescriptor, includeContent) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier - }; - let queryValues = { - path: path, - recursionLevel: recursionLevel, - versionDescriptor: versionDescriptor, - includeContent: includeContent, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDefinitionTemplate.fields = { + template: { + typeInfo: exports.TypeInfo.BuildDefinition } - /** - * Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name.. - * @param {number} id - Wiki page ID. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). - * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) - */ - getPageByIdText(project, wikiIdentifier, id, recursionLevel, includeContent) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - id: id - }; - let queryValues = { - recursionLevel: recursionLevel, - includeContent: includeContent, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "ceddcf75-1068-452d-8b13-2d4d76e1f970", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("text/plain", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDefinitionTemplate3_2.fields = { + template: { + typeInfo: exports.TypeInfo.BuildDefinition3_2 } - /** - * Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name.. - * @param {number} id - Wiki page ID. - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). - * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) - */ - getPageByIdZip(project, wikiIdentifier, id, recursionLevel, includeContent) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - id: id - }; - let queryValues = { - recursionLevel: recursionLevel, - includeContent: includeContent, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "ceddcf75-1068-452d-8b13-2d4d76e1f970", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDeletedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build } - /** - * Returns pageable list of Wiki Pages - * - * @param {WikiInterfaces.WikiPagesBatchRequest} pagesBatchRequest - Wiki batch page request. - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - */ - getPagesBatch(pagesBatchRequest, project, wikiIdentifier, versionDescriptor) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier - }; - let queryValues = { - versionDescriptor: versionDescriptor, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "71323c46-2592-4398-8771-ced73dd87207", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, pagesBatchRequest, options); - let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageDetail, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildDeployment.fields = { + deployment: { + typeInfo: exports.TypeInfo.BuildSummary } - /** - * Returns page detail corresponding to Page ID. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {number} pageId - Wiki page ID. - * @param {number} pageViewsForDays - last N days from the current day for which page views is to be returned. It's inclusive of current day. - */ - getPageData(project, wikiIdentifier, pageId, pageViewsForDays) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier, - pageId: pageId - }; - let queryValues = { - pageViewsForDays: pageViewsForDays, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "81c4e0fe-7663-4d62-ad46-6ab78459f274", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageDetail, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildLog.fields = { + createdOn: { + isDate: true, + }, + lastChangedOn: { + isDate: true, } - /** - * Creates a new page view stats resource or updates an existing page view stats resource. - * - * @param {string} project - Project ID or project name - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {GitInterfaces.GitVersionDescriptor} wikiVersion - Wiki version. - * @param {string} path - Wiki page path. - * @param {string} oldPath - Old page path. This is optional and required to rename path in existing page view stats. - */ - createOrUpdatePageViewStats(project, wikiIdentifier, wikiVersion, path, oldPath) { - return __awaiter(this, void 0, void 0, function* () { - if (wikiVersion == null) { - throw new TypeError('wikiVersion can not be null or undefined'); - } - if (path == null) { - throw new TypeError('path can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier - }; - let queryValues = { - wikiVersion: wikiVersion, - path: path, - oldPath: oldPath, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "1087b746-5d15-41b9-bea6-14e325e7f880", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, null, options); - let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageViewStats, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildMetric.fields = { + date: { + isDate: true, } - /** - * Creates the wiki resource. - * - * @param {WikiInterfaces.WikiCreateParametersV2} wikiCreateParams - Parameters for the wiki creation. - * @param {string} project - Project ID or project name - */ - createWiki(wikiCreateParams, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, wikiCreateParams, options); - let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildOptionDefinition.fields = { + inputs: { + isArray: true, + typeInfo: exports.TypeInfo.BuildOptionInputDefinition } - /** - * Deletes the wiki corresponding to the wiki ID or wiki name provided. - * - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {string} project - Project ID or project name - */ - deleteWiki(wikiIdentifier, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildOptionInputDefinition.fields = { + type: { + enumType: exports.TypeInfo.BuildOptionInputType } - /** - * Gets all wikis in a project or collection. - * - * @param {string} project - Project ID or project name - */ - getAllWikis(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildProcessTemplate.fields = { + supportedReasons: { + enumType: exports.TypeInfo.BuildReason + }, + templateType: { + enumType: exports.TypeInfo.ProcessTemplateType } - /** - * Gets the wiki corresponding to the wiki ID or wiki name provided. - * - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {string} project - Project ID or project name - */ - getWiki(wikiIdentifier, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildQueuedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build } - /** - * Updates the wiki corresponding to the wiki ID or wiki name provided using the update parameters. - * - * @param {WikiInterfaces.WikiUpdateParameters} updateParameters - Update parameters. - * @param {string} wikiIdentifier - Wiki ID or wiki name. - * @param {string} project - Project ID or project name - */ - updateWiki(updateParameters, wikiIdentifier, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - wikiIdentifier: wikiIdentifier - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, updateParameters, options); - let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildReference.fields = { + finishTime: { + isDate: true, + }, + queueTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.BuildResult + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.BuildStatus } -} -WikiApi.RESOURCE_AREA_ID = "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3"; -exports.WikiApi = WikiApi; - - -/***/ }), - -/***/ 8186: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const WorkInterfaces = __nccwpck_require__(7480); -class WorkApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-Work-api', options); +exports.TypeInfo.BuildRequestValidationResult.fields = { + result: { + enumType: exports.TypeInfo.ValidationResult } - /** - * Gets backlog configuration for a team - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - */ - getBacklogConfigurations(teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "7799f497-3cb5-4f16-ad4f-5cd06012db64", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogConfiguration, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildRetentionHistory.fields = { + buildRetentionSamples: { + isArray: true, + typeInfo: exports.TypeInfo.BuildRetentionSample } - /** - * Get a list of work items within a backlog level - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} backlogId - */ - getBacklogLevelWorkItems(teamContext, backlogId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - backlogId: backlogId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "7c468d96-ab1d-4294-a360-92f07e9ccd98", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildRetentionSample.fields = { + sampleTime: { + isDate: true, } - /** - * Get a backlog level - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} id - The id of the backlog level - */ - getBacklog(teamContext, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "a93726f9-7867-4e38-b4f2-0bfafc2f6a94", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogLevelConfiguration, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildServer.fields = { + status: { + enumType: exports.TypeInfo.ServiceHostStatus + }, + statusChangedDate: { + isDate: true, } - /** - * List all backlog levels - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - */ - getBacklogs(teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "a93726f9-7867-4e38-b4f2-0bfafc2f6a94", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogLevelConfiguration, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildSummary.fields = { + finishTime: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.BuildReason + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.BuildStatus } - /** - * Gets a badge that displays the status of columns on the board. - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} id - The id of the board. - * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. - * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. - */ - getBoardBadge(teamContext, id, columnOptions, columns) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - id: id - }; - let queryValues = { - columnOptions: columnOptions, - columns: columns && columns.join(","), - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0120b002-ab6c-4ca0-98cf-a8d7492f865c", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildTagsAddedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build } - /** - * Gets a badge that displays the status of columns on the board. - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} id - The id of the board. - * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. - * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. - */ - getBoardBadgeData(teamContext, id, columnOptions, columns) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - id: id - }; - let queryValues = { - columnOptions: columnOptions, - columns: columns && columns.join(","), - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0120b002-ab6c-4ca0-98cf-a8d7492f865c", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * Get available board columns in a project - * - * @param {string} project - Project ID or project name - */ - getColumnSuggestedValues(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "eb7ec5a3-1ba3-4fd1-b834-49a5a387e57d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.BuildUpdatedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build } - /** - * Returns the list of parent field filter model for the given list of workitem ids - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} childBacklogContextCategoryRefName - * @param {number[]} workitemIds - */ - getBoardMappingParentItems(teamContext, childBacklogContextCategoryRefName, workitemIds) { - return __awaiter(this, void 0, void 0, function* () { - if (childBacklogContextCategoryRefName == null) { - throw new TypeError('childBacklogContextCategoryRefName can not be null or undefined'); - } - if (workitemIds == null) { - throw new TypeError('workitemIds can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - let queryValues = { - childBacklogContextCategoryRefName: childBacklogContextCategoryRefName, - workitemIds: workitemIds && workitemIds.join(","), - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "186abea3-5c35-432f-9e28-7a15b4312a0e", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Change.fields = { + timestamp: { + isDate: true, } - /** - * Get available board rows in a project - * - * @param {string} project - Project ID or project name - */ - getRowSuggestedValues(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.ContinuousDeploymentDefinition.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } - /** - * Get board - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} id - identifier for board, either board's backlog level name (Eg:"Stories") or Id - */ - getBoard(teamContext, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Board, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.ContinuousIntegrationTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * Get boards - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - */ - getBoards(teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.DefinitionReference.fields = { + createdDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + type: { + enumType: exports.TypeInfo.DefinitionType } - /** - * Update board options - * - * @param {{ [key: string] : string; }} options - options to updated - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} id - identifier for board, either category plural name (Eg:"Stories") or guid - */ - setBoardOptions(options, teamContext, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, options, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.DesignerProcess.fields = { + phases: { + isArray: true, + typeInfo: exports.TypeInfo.Phase } - /** - * Get board user settings for a board id - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - Board ID or Name - */ - getBoardUserSettings(teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "b30d9f58-1891-4b0a-b168-c46408f919b0", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Folder.fields = { + createdOn: { + isDate: true, + }, + lastChangedDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } - /** - * Update board user settings for the board id - * - * @param {{ [key: string] : string; }} boardUserSettings - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - */ - updateBoardUserSettings(boardUserSettings, teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "b30d9f58-1891-4b0a-b168-c46408f919b0", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, boardUserSettings, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.GatedCheckInTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * Get a team's capacity including total capacity and days off - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - ID of the iteration - */ - getCapacitiesWithIdentityRefAndTotals(teamContext, iterationId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamCapacity, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.InformationNode.fields = { + lastModifiedDate: { + isDate: true, } - /** - * Get a team member's capacity - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - ID of the iteration - * @param {string} teamMemberId - ID of the team member - */ - getCapacityWithIdentityRef(teamContext, iterationId, teamMemberId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId, - teamMemberId: teamMemberId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Issue.fields = { + type: { + enumType: exports.TypeInfo.IssueType } - /** - * Replace a team's capacity - * - * @param {WorkInterfaces.TeamMemberCapacityIdentityRef[]} capacities - Team capacity to replace - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - ID of the iteration - */ - replaceCapacitiesWithIdentityRef(capacities, teamContext, iterationId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, capacities, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Phase.fields = { + jobAuthorizationScope: { + enumType: exports.TypeInfo.BuildAuthorizationScope } - /** - * Update a team member's capacity - * - * @param {WorkInterfaces.CapacityPatch} patch - Updated capacity - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - ID of the iteration - * @param {string} teamMemberId - ID of the team member - */ - updateCapacityWithIdentityRef(patch, teamContext, iterationId, teamMemberId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId, - teamMemberId: teamMemberId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, patch, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.PullRequestTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * Get board card Rule settings for the board id or board by name - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - */ - getBoardCardRuleSettings(teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "b044a3d9-02ea-49c7-91a1-b730949cc896", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.RepositoryWebhook.fields = { + types: { + isArray: true, + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * Update board card Rule settings for the board id or board by name - * - * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - */ - updateBoardCardRuleSettings(boardCardRuleSettings, teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "b044a3d9-02ea-49c7-91a1-b730949cc896", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, boardCardRuleSettings, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.RetentionLease.fields = { + createdOn: { + isDate: true, + }, + validUntil: { + isDate: true, } - /** - * Update taskboard card Rule settings - * - * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - */ - updateTaskboardCardRuleSettings(boardCardRuleSettings, teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "3f84a8d1-1aab-423e-a94b-6dcbdcca511f", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, boardCardRuleSettings, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Schedule.fields = { + daysToBuild: { + enumType: exports.TypeInfo.ScheduleDays } - /** - * Get board card settings for the board id or board by name - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - */ - getBoardCardSettings(teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "07c3b467-bc60-4f05-8e34-599ce288fafc", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.ScheduleTrigger.fields = { + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.Schedule + }, + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * Update board card settings for the board id or board by name - * - * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - */ - updateBoardCardSettings(boardCardSettingsToSave, teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "07c3b467-bc60-4f05-8e34-599ce288fafc", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, boardCardSettingsToSave, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.SourceProviderAttributes.fields = { + supportedTriggers: { + isArray: true, + typeInfo: exports.TypeInfo.SupportedTrigger } - /** - * Update taskboard card settings - * - * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - */ - updateTaskboardCardSettings(boardCardSettingsToSave, teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "0d63745f-31f3-4cf3-9056-2a064e567637", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, boardCardSettingsToSave, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.SupportedTrigger.fields = { + supportedCapabilities: { + isDictionary: true, + dictionaryValueEnumType: exports.TypeInfo.SupportLevel + }, + type: { + enumType: exports.TypeInfo.DefinitionTriggerType } - /** - * Get a board chart - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id - * @param {string} name - The chart name - */ - getBoardChart(teamContext, board, name) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board, - name: name - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Timeline.fields = { + lastChangedOn: { + isDate: true, + }, + records: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord } - /** - * Get board charts - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id - */ - getBoardCharts(teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.TimelineRecord.fields = { + finishTime: { + isDate: true, + }, + issues: { + isArray: true, + typeInfo: exports.TypeInfo.Issue + }, + lastModified: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TimelineRecordState } - /** - * Update a board chart - * - * @param {WorkInterfaces.BoardChart} chart - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id - * @param {string} name - The chart name - */ - updateBoardChart(chart, teamContext, board, name) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board, - name: name - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, chart, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.TimelineRecordsUpdatedEvent.fields = { + timelineRecords: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord } - /** - * Get columns on a board - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - Name or ID of the specific board - */ - getBoardColumns(teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c555d7ff-84e1-47df-9923-a3fe0cd8751b", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BoardColumn, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.UpdateStageParameters.fields = { + state: { + enumType: exports.TypeInfo.StageUpdateType + } +}; +exports.TypeInfo.WorkspaceMapping.fields = { + mappingType: { + enumType: exports.TypeInfo.WorkspaceMappingType + } +}; +exports.TypeInfo.WorkspaceTemplate.fields = { + lastModifiedDate: { + isDate: true, + }, + mappings: { + isArray: true, + typeInfo: exports.TypeInfo.WorkspaceMapping + } +}; +exports.TypeInfo.XamlBuildDefinition.fields = { + controller: { + typeInfo: exports.TypeInfo.BuildController + }, + createdDate: { + isDate: true, + }, + createdOn: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + supportedReasons: { + enumType: exports.TypeInfo.BuildReason + }, + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + }, + type: { + enumType: exports.TypeInfo.DefinitionType } +}; + + +/***/ }), + +/***/ 74743: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Specifies the additional data retrieval options for comments. + */ +var CommentExpandOptions; +(function (CommentExpandOptions) { /** - * Update columns on a board - * - * @param {WorkInterfaces.BoardColumn[]} boardColumns - List of board columns to update - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - Name or ID of the specific board + * Include comments only, no mentions, reactions or rendered text */ - updateBoardColumns(boardColumns, teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c555d7ff-84e1-47df-9923-a3fe0cd8751b", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, boardColumns, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BoardColumn, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentExpandOptions[CommentExpandOptions["None"] = 0] = "None"; /** - * Get Delivery View Data - * - * @param {string} project - Project ID or project name - * @param {string} id - Identifier for delivery view - * @param {number} revision - Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. - * @param {Date} startDate - The start date of timeline - * @param {Date} endDate - The end date of timeline + * Include comment reactions */ - getDeliveryTimelineData(project, id, revision, startDate, endDate) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - let queryValues = { - revision: revision, - startDate: startDate, - endDate: endDate, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "bdd0834e-101f-49f0-a6ae-509f384a12b4", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.DeliveryViewData, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentExpandOptions[CommentExpandOptions["Reactions"] = 1] = "Reactions"; /** - * Get an iteration's capacity for all teams in iteration - * - * @param {string} project - Project ID or project name - * @param {string} iterationId - ID of the iteration + * Include the rendered text (html) in addition to markdown text */ - getTotalIterationCapacities(project, iterationId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - iterationId: iterationId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1e385ce0-396b-4273-8171-d64562c18d37", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentExpandOptions[CommentExpandOptions["RenderedText"] = 8] = "RenderedText"; + CommentExpandOptions[CommentExpandOptions["RenderedTextOnly"] = 16] = "RenderedTextOnly"; /** - * Delete a team's iteration by iterationId - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} id - ID of the iteration + * If specified, then responses will be expanded in the results */ - deleteTeamIteration(teamContext, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentExpandOptions[CommentExpandOptions["Children"] = 32] = "Children"; /** - * Get team's iteration by iterationId - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} id - ID of the iteration + * Expand everything including Reactions, Mentions and also include RenderedText (HTML) for markdown comments */ - getTeamIteration(teamContext, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentExpandOptions[CommentExpandOptions["All"] = -17] = "All"; +})(CommentExpandOptions = exports.CommentExpandOptions || (exports.CommentExpandOptions = {})); +/** + * Format of the comment. Ex. Markdown, Html. + */ +var CommentFormat; +(function (CommentFormat) { + CommentFormat[CommentFormat["Markdown"] = 0] = "Markdown"; + CommentFormat[CommentFormat["Html"] = 1] = "Html"; +})(CommentFormat = exports.CommentFormat || (exports.CommentFormat = {})); +var CommentMentionType; +(function (CommentMentionType) { /** - * Get a team's iterations using timeframe filter - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} timeframe - A filter for which iterations are returned based on relative time. Only Current is supported currently. + * An identity was mentioned by using the format @{VSID} */ - getTeamIterations(teamContext, timeframe) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - let queryValues = { - '$timeframe': timeframe, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentMentionType[CommentMentionType["Person"] = 0] = "Person"; /** - * Add an iteration to the team - * - * @param {WorkInterfaces.TeamSettingsIteration} iteration - Iteration to add - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * A work item was mentioned by using the format #{Work Item ID} */ - postTeamIteration(iteration, teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, iteration, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentMentionType[CommentMentionType["WorkItem"] = 1] = "WorkItem"; /** - * Add a new plan for the team - * - * @param {WorkInterfaces.CreatePlan} postedPlan - Plan definition - * @param {string} project - Project ID or project name + * A Pull Request was mentioned by using the format !{PR Number} */ - createPlan(postedPlan, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, postedPlan, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentMentionType[CommentMentionType["PullRequest"] = 2] = "PullRequest"; +})(CommentMentionType = exports.CommentMentionType || (exports.CommentMentionType = {})); +/** + * Represents different reaction types for a comment + */ +var CommentReactionType; +(function (CommentReactionType) { + CommentReactionType[CommentReactionType["Like"] = 0] = "Like"; + CommentReactionType[CommentReactionType["Dislike"] = 1] = "Dislike"; + CommentReactionType[CommentReactionType["Heart"] = 2] = "Heart"; + CommentReactionType[CommentReactionType["Hooray"] = 3] = "Hooray"; + CommentReactionType[CommentReactionType["Smile"] = 4] = "Smile"; + CommentReactionType[CommentReactionType["Confused"] = 5] = "Confused"; +})(CommentReactionType = exports.CommentReactionType || (exports.CommentReactionType = {})); +var CommentSortOrder; +(function (CommentSortOrder) { /** - * Delete the specified plan - * - * @param {string} project - Project ID or project name - * @param {string} id - Identifier of the plan + * The results will be sorted in Ascending order. */ - deletePlan(project, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + CommentSortOrder[CommentSortOrder["Asc"] = 1] = "Asc"; /** - * Get the information for the specified plan - * - * @param {string} project - Project ID or project name - * @param {string} id - Identifier of the plan + * The results will be sorted in Descending order. */ - getPlan(project, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); + CommentSortOrder[CommentSortOrder["Desc"] = 2] = "Desc"; +})(CommentSortOrder = exports.CommentSortOrder || (exports.CommentSortOrder = {})); +/** + * Represents the possible comment states. + */ +var CommentState; +(function (CommentState) { + CommentState[CommentState["Active"] = 0] = "Active"; + CommentState[CommentState["Resolved"] = 1] = "Resolved"; + CommentState[CommentState["Closed"] = 2] = "Closed"; +})(CommentState = exports.CommentState || (exports.CommentState = {})); +exports.TypeInfo = { + Comment: {}, + CommentAttachment: {}, + CommentExpandOptions: { + enumValues: { + "none": 0, + "reactions": 1, + "renderedText": 8, + "renderedTextOnly": 16, + "children": 32, + "all": -17 + } + }, + CommentFormat: { + enumValues: { + "markdown": 0, + "html": 1 + } + }, + CommentList: {}, + CommentMention: {}, + CommentMentionType: { + enumValues: { + "person": 0, + "workItem": 1, + "pullRequest": 2 + } + }, + CommentReaction: {}, + CommentReactionType: { + enumValues: { + "like": 0, + "dislike": 1, + "heart": 2, + "hooray": 3, + "smile": 4, + "confused": 5 + } + }, + CommentSortOrder: { + enumValues: { + "asc": 1, + "desc": 2 + } + }, + CommentState: { + enumValues: { + "active": 0, + "resolved": 1, + "closed": 2 + } + }, + CommentUpdateParameters: {}, + CommentVersion: {}, +}; +exports.TypeInfo.Comment.fields = { + createdDate: { + isDate: true, + }, + mentions: { + isArray: true, + typeInfo: exports.TypeInfo.CommentMention + }, + modifiedDate: { + isDate: true, + }, + reactions: { + isArray: true, + typeInfo: exports.TypeInfo.CommentReaction + }, + replies: { + typeInfo: exports.TypeInfo.CommentList + }, + state: { + enumType: exports.TypeInfo.CommentState + } +}; +exports.TypeInfo.CommentAttachment.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.CommentList.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment + } +}; +exports.TypeInfo.CommentMention.fields = { + type: { + enumType: exports.TypeInfo.CommentMentionType + } +}; +exports.TypeInfo.CommentReaction.fields = { + type: { + enumType: exports.TypeInfo.CommentReactionType + } +}; +exports.TypeInfo.CommentUpdateParameters.fields = { + state: { + enumType: exports.TypeInfo.CommentState + } +}; +exports.TypeInfo.CommentVersion.fields = { + createdDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.CommentState } +}; + + +/***/ }), + +/***/ 73931: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var ConnectedServiceKind; +(function (ConnectedServiceKind) { /** - * Get the information for all the plans configured for the given team - * - * @param {string} project - Project ID or project name + * Custom or unknown service */ - getPlans(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ConnectedServiceKind[ConnectedServiceKind["Custom"] = 0] = "Custom"; /** - * Update the information for the specified plan - * - * @param {WorkInterfaces.UpdatePlan} updatedPlan - Plan definition to be updated - * @param {string} project - Project ID or project name - * @param {string} id - Identifier of the plan + * Azure Subscription */ - updatePlan(updatedPlan, project, id) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, updatedPlan, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ConnectedServiceKind[ConnectedServiceKind["AzureSubscription"] = 1] = "AzureSubscription"; /** - * Get process configuration - * - * @param {string} project - Project ID or project name + * Chef Connection */ - getProcessConfiguration(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "f901ba42-86d2-4b0c-89c1-3f86d06daa84", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ConnectedServiceKind[ConnectedServiceKind["Chef"] = 2] = "Chef"; /** - * Get rows on a board - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - Name or ID of the specific board + * Generic Connection */ - getBoardRows(teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0863355d-aefd-4d63-8669-984c9b7b0e78", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ConnectedServiceKind[ConnectedServiceKind["Generic"] = 3] = "Generic"; +})(ConnectedServiceKind = exports.ConnectedServiceKind || (exports.ConnectedServiceKind = {})); +/** + * Type of process customization on a collection. + */ +var ProcessCustomizationType; +(function (ProcessCustomizationType) { /** - * Update rows on a board - * - * @param {WorkInterfaces.BoardRow[]} boardRows - List of board rows to update - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} board - Name or ID of the specific board + * Process customization can't be computed. */ - updateBoardRows(boardRows, teamContext, board) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - board: board - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0863355d-aefd-4d63-8669-984c9b7b0e78", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, boardRows, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ProcessCustomizationType[ProcessCustomizationType["Unknown"] = -1] = "Unknown"; /** - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * Customization based on project-scoped xml customization */ - getColumns(teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c6815dbe-8e7e-4ffe-9a79-e83ee712aa92", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ProcessCustomizationType[ProcessCustomizationType["Xml"] = 0] = "Xml"; /** - * @param {WorkInterfaces.UpdateTaskboardColumn[]} updateColumns - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * Customization based on process inheritance */ - updateColumns(updateColumns, teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c6815dbe-8e7e-4ffe-9a79-e83ee712aa92", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, updateColumns, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ProcessCustomizationType[ProcessCustomizationType["Inherited"] = 1] = "Inherited"; +})(ProcessCustomizationType = exports.ProcessCustomizationType || (exports.ProcessCustomizationType = {})); +var ProcessType; +(function (ProcessType) { + ProcessType[ProcessType["System"] = 0] = "System"; + ProcessType[ProcessType["Custom"] = 1] = "Custom"; + ProcessType[ProcessType["Inherited"] = 2] = "Inherited"; +})(ProcessType = exports.ProcessType || (exports.ProcessType = {})); +var ProjectChangeType; +(function (ProjectChangeType) { + ProjectChangeType[ProjectChangeType["Modified"] = 0] = "Modified"; + ProjectChangeType[ProjectChangeType["Deleted"] = 1] = "Deleted"; + ProjectChangeType[ProjectChangeType["Added"] = 2] = "Added"; +})(ProjectChangeType = exports.ProjectChangeType || (exports.ProjectChangeType = {})); +var ProjectVisibility; +(function (ProjectVisibility) { + ProjectVisibility[ProjectVisibility["Unchanged"] = -1] = "Unchanged"; /** - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId + * The project is only visible to users with explicit access. */ - getWorkItemColumns(teamContext, iterationId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1be23c36-8872-4abc-b57d-402cd6c669d9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ProjectVisibility[ProjectVisibility["Private"] = 0] = "Private"; /** - * @param {WorkInterfaces.UpdateTaskboardWorkItemColumn} updateColumn - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - * @param {number} workItemId + * Enterprise level project visibility */ - updateWorkItemColumn(updateColumn, teamContext, iterationId, workItemId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId, - workItemId: workItemId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1be23c36-8872-4abc-b57d-402cd6c669d9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, updateColumn, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ProjectVisibility[ProjectVisibility["Organization"] = 1] = "Organization"; /** - * Get team's days off for an iteration - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - ID of the iteration + * The project is visible to all. */ - getTeamDaysOff(teamContext, iterationId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "2d4faa2e-9150-4cbf-a47a-932b1b4a0773", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsDaysOff, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); + ProjectVisibility[ProjectVisibility["Public"] = 2] = "Public"; + ProjectVisibility[ProjectVisibility["SystemPrivate"] = 3] = "SystemPrivate"; +})(ProjectVisibility = exports.ProjectVisibility || (exports.ProjectVisibility = {})); +var SourceControlTypes; +(function (SourceControlTypes) { + SourceControlTypes[SourceControlTypes["Tfvc"] = 1] = "Tfvc"; + SourceControlTypes[SourceControlTypes["Git"] = 2] = "Git"; +})(SourceControlTypes = exports.SourceControlTypes || (exports.SourceControlTypes = {})); +exports.TypeInfo = { + ConnectedServiceKind: { + enumValues: { + "custom": 0, + "azureSubscription": 1, + "chef": 2, + "generic": 3 + } + }, + Process: {}, + ProcessCustomizationType: { + enumValues: { + "unknown": -1, + "xml": 0, + "inherited": 1 + } + }, + ProcessType: { + enumValues: { + "system": 0, + "custom": 1, + "inherited": 2 + } + }, + ProjectChangeType: { + enumValues: { + "modified": 0, + "deleted": 1, + "added": 2 + } + }, + ProjectInfo: {}, + ProjectMessage: {}, + ProjectVisibility: { + enumValues: { + "private": 0, + "organization": 1, + "public": 2 + } + }, + SourceControlTypes: { + enumValues: { + "tfvc": 1, + "git": 2 + } + }, + TeamProject: {}, + TeamProjectCollection: {}, + TeamProjectReference: {}, + TemporaryDataCreatedDTO: {}, + WebApiConnectedService: {}, + WebApiConnectedServiceDetails: {}, + WebApiProject: {}, +}; +exports.TypeInfo.Process.fields = { + type: { + enumType: exports.TypeInfo.ProcessType + } +}; +exports.TypeInfo.ProjectInfo.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: exports.TypeInfo.ProjectVisibility + } +}; +exports.TypeInfo.ProjectMessage.fields = { + project: { + typeInfo: exports.TypeInfo.ProjectInfo + }, + projectChangeType: { + enumType: exports.TypeInfo.ProjectChangeType + } +}; +exports.TypeInfo.TeamProject.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: exports.TypeInfo.ProjectVisibility + } +}; +exports.TypeInfo.TeamProjectCollection.fields = { + processCustomizationType: { + enumType: exports.TypeInfo.ProcessCustomizationType + } +}; +exports.TypeInfo.TeamProjectReference.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: exports.TypeInfo.ProjectVisibility + } +}; +exports.TypeInfo.TemporaryDataCreatedDTO.fields = { + expirationDate: { + isDate: true, + } +}; +exports.TypeInfo.WebApiConnectedService.fields = { + project: { + typeInfo: exports.TypeInfo.TeamProjectReference } +}; +exports.TypeInfo.WebApiConnectedServiceDetails.fields = { + connectedServiceMetaData: { + typeInfo: exports.TypeInfo.WebApiConnectedService + } +}; +exports.TypeInfo.WebApiProject.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: exports.TypeInfo.ProjectVisibility + } +}; + + +/***/ }), + +/***/ 86890: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * identifies the scope of dashboard storage and permissions. + */ +var DashboardScope; +(function (DashboardScope) { /** - * Set a team's days off for an iteration - * - * @param {WorkInterfaces.TeamSettingsDaysOffPatch} daysOffPatch - Team's days off patch containing a list of start and end dates - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - ID of the iteration + * [DEPRECATED] Dashboard is scoped to the collection user. */ - updateTeamDaysOff(daysOffPatch, teamContext, iterationId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "2d4faa2e-9150-4cbf-a47a-932b1b4a0773", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, daysOffPatch, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsDaysOff, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + DashboardScope[DashboardScope["Collection_User"] = 0] = "Collection_User"; /** - * Get a collection of team field values - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * Dashboard is scoped to the team. */ - getTeamFieldValues(teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "07ced576-58ed-49e6-9c1e-5cb53ab8bf2a", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + DashboardScope[DashboardScope["Project_Team"] = 1] = "Project_Team"; /** - * Update team field values - * - * @param {WorkInterfaces.TeamFieldValuesPatch} patch - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * Dashboard is scoped to the project. */ - updateTeamFieldValues(patch, teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "07ced576-58ed-49e6-9c1e-5cb53ab8bf2a", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, patch, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); + DashboardScope[DashboardScope["Project"] = 2] = "Project"; +})(DashboardScope = exports.DashboardScope || (exports.DashboardScope = {})); +var GroupMemberPermission; +(function (GroupMemberPermission) { + GroupMemberPermission[GroupMemberPermission["None"] = 0] = "None"; + GroupMemberPermission[GroupMemberPermission["Edit"] = 1] = "Edit"; + GroupMemberPermission[GroupMemberPermission["Manage"] = 2] = "Manage"; + GroupMemberPermission[GroupMemberPermission["ManagePermissions"] = 3] = "ManagePermissions"; +})(GroupMemberPermission = exports.GroupMemberPermission || (exports.GroupMemberPermission = {})); +var TeamDashboardPermission; +(function (TeamDashboardPermission) { + TeamDashboardPermission[TeamDashboardPermission["None"] = 0] = "None"; + TeamDashboardPermission[TeamDashboardPermission["Read"] = 1] = "Read"; + TeamDashboardPermission[TeamDashboardPermission["Create"] = 2] = "Create"; + TeamDashboardPermission[TeamDashboardPermission["Edit"] = 4] = "Edit"; + TeamDashboardPermission[TeamDashboardPermission["Delete"] = 8] = "Delete"; + TeamDashboardPermission[TeamDashboardPermission["ManagePermissions"] = 16] = "ManagePermissions"; +})(TeamDashboardPermission = exports.TeamDashboardPermission || (exports.TeamDashboardPermission = {})); +/** + * data contract required for the widget to function in a webaccess area or page. + */ +var WidgetScope; +(function (WidgetScope) { + WidgetScope[WidgetScope["Collection_User"] = 0] = "Collection_User"; + WidgetScope[WidgetScope["Project_Team"] = 1] = "Project_Team"; +})(WidgetScope = exports.WidgetScope || (exports.WidgetScope = {})); +exports.TypeInfo = { + CopyDashboardOptions: {}, + CopyDashboardResponse: {}, + Dashboard: {}, + DashboardGroup: {}, + DashboardGroupEntry: {}, + DashboardGroupEntryResponse: {}, + DashboardResponse: {}, + DashboardScope: { + enumValues: { + "collection_User": 0, + "project_Team": 1, + "project": 2 + } + }, + GroupMemberPermission: { + enumValues: { + "none": 0, + "edit": 1, + "manage": 2, + "managePermissions": 3 + } + }, + TeamDashboardPermission: { + enumValues: { + "none": 0, + "read": 1, + "create": 2, + "edit": 4, + "delete": 8, + "managePermissions": 16 + } + }, + Widget: {}, + WidgetMetadata: {}, + WidgetMetadataResponse: {}, + WidgetResponse: {}, + WidgetScope: { + enumValues: { + "collection_User": 0, + "project_Team": 1 + } + }, + WidgetsVersionedList: {}, + WidgetTypesResponse: {}, +}; +exports.TypeInfo.CopyDashboardOptions.fields = { + copyDashboardScope: { + enumType: exports.TypeInfo.DashboardScope + } +}; +exports.TypeInfo.CopyDashboardResponse.fields = { + copiedDashboard: { + typeInfo: exports.TypeInfo.Dashboard + }, + copyDashboardOptions: { + typeInfo: exports.TypeInfo.CopyDashboardOptions + } +}; +exports.TypeInfo.Dashboard.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.DashboardGroup.fields = { + dashboardEntries: { + isArray: true, + typeInfo: exports.TypeInfo.DashboardGroupEntry + }, + permission: { + enumType: exports.TypeInfo.GroupMemberPermission + }, + teamDashboardPermission: { + enumType: exports.TypeInfo.TeamDashboardPermission + } +}; +exports.TypeInfo.DashboardGroupEntry.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.DashboardGroupEntryResponse.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget } - /** - * Get a team's settings - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - */ - getTeamSettings(teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c3c1012b-bea7-49d7-b45e-1664e566f84c", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSetting, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.DashboardResponse.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget } - /** - * Update a team's settings - * - * @param {WorkInterfaces.TeamSettingsPatch} teamSettingsPatch - TeamSettings changes - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - */ - updateTeamSettings(teamSettingsPatch, teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c3c1012b-bea7-49d7-b45e-1664e566f84c", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, teamSettingsPatch, options); - let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSetting, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Widget.fields = { + dashboard: { + typeInfo: exports.TypeInfo.Dashboard } - /** - * Get work items for iteration - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - ID of the iteration - */ - getIterationWorkItems(teamContext, iterationId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "5b3ef1a6-d3ab-44cd-bafd-c7f45db850fa", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.WidgetMetadata.fields = { + supportedScopes: { + isArray: true, + enumType: exports.TypeInfo.WidgetScope } - /** - * Reorder Product Backlog/Boards Work Items - * - * @param {WorkInterfaces.ReorderOperation} operation - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - */ - reorderBacklogWorkItems(operation, teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1c22b714-e7e4-41b9-85e0-56ee13ef55ed", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, operation, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.WidgetMetadataResponse.fields = { + widgetMetadata: { + typeInfo: exports.TypeInfo.WidgetMetadata } - /** - * Reorder Sprint Backlog/Taskboard Work Items - * - * @param {WorkInterfaces.ReorderOperation} operation - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} iterationId - The id of the iteration - */ - reorderIterationWorkItems(operation, teamContext, iterationId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - iterationId: iterationId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "47755db2-d7eb-405a-8c25-675401525fc9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, operation, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.WidgetResponse.fields = { + dashboard: { + typeInfo: exports.TypeInfo.Dashboard } -} -WorkApi.RESOURCE_AREA_ID = "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"; -exports.WorkApi = WorkApi; +}; +exports.TypeInfo.WidgetsVersionedList.fields = { + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.WidgetTypesResponse.fields = { + widgetTypes: { + isArray: true, + typeInfo: exports.TypeInfo.WidgetMetadata + } +}; /***/ }), -/***/ 8409: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 67357: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - /* * --------------------------------------------------------- * Copyright(C) Microsoft Corporation. All rights reserved. @@ -43339,6078 +53539,2248 @@ exports.WorkApi = WorkApi; * Generated file, DO NOT EDIT * --------------------------------------------------------- */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const WorkItemTrackingInterfaces = __nccwpck_require__(6938); -class WorkItemTrackingApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-WorkItemTracking-api', options); - } +const GalleryInterfaces = __nccwpck_require__(48905); +/** + * How the acquisition is assigned + */ +var AcquisitionAssignmentType; +(function (AcquisitionAssignmentType) { + AcquisitionAssignmentType[AcquisitionAssignmentType["None"] = 0] = "None"; /** - * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details. - * - * @param {WorkItemTrackingInterfaces.QueryOption} queryOption + * Just assign for me */ - getAccountMyWorkData(queryOption) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - '$queryOption': queryOption, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "def3d688-ddf5-4096-9024-69beea15cdbd", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountMyWorkResult, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionAssignmentType[AcquisitionAssignmentType["Me"] = 1] = "Me"; /** - * Gets recent work item activities - * + * Assign for all users in the account */ - getRecentActivityData() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "1bc988f4-c15f-4072-ad35-497c87e3a909", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountRecentActivityWorkItemModel2, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionAssignmentType[AcquisitionAssignmentType["All"] = 2] = "All"; +})(AcquisitionAssignmentType = exports.AcquisitionAssignmentType || (exports.AcquisitionAssignmentType = {})); +var AcquisitionOperationState; +(function (AcquisitionOperationState) { /** - * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. - * + * Not allowed to use this AcquisitionOperation */ - getRecentMentions() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "d60eeb6e-e18c-4478-9e94-a0094e28f41c", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountRecentMentionWorkItemModel, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationState[AcquisitionOperationState["Disallow"] = 0] = "Disallow"; /** - * Get the list of work item tracking outbound artifact link types. - * + * Allowed to use this AcquisitionOperation */ - getWorkArtifactLinkTypes() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "1a31de40-e318-41cd-a6c6-881077df52e3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationState[AcquisitionOperationState["Allow"] = 1] = "Allow"; /** - * Queries work items linked to a given list of artifact URI. - * - * @param {WorkItemTrackingInterfaces.ArtifactUriQuery} artifactUriQuery - Defines a list of artifact URI for querying work items. - * @param {string} project - Project ID or project name + * Operation has already been completed and is no longer available */ - queryWorkItemsForArtifactUris(artifactUriQuery, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "a9a9aa7a-8c09-44d3-ad1b-46e855c1e3d3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, artifactUriQuery, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationState[AcquisitionOperationState["Completed"] = 3] = "Completed"; +})(AcquisitionOperationState = exports.AcquisitionOperationState || (exports.AcquisitionOperationState = {})); +/** + * Set of different types of operations that can be requested. + */ +var AcquisitionOperationType; +(function (AcquisitionOperationType) { /** - * Uploads an attachment. - * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} fileName - The name of the file - * @param {string} uploadType - Attachment upload type: Simple or Chunked - * @param {string} project - Project ID or project name - * @param {string} areaPath - Target project Area Path + * Not yet used */ - createAttachment(customHeaders, contentStream, fileName, uploadType, project, areaPath) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - fileName: fileName, - uploadType: uploadType, - areaPath: areaPath, - }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/octet-stream"; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; - let res; - res = yield this.rest.uploadStream("POST", url, contentStream, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Get"] = 0] = "Get"; /** - * Downloads an attachment. - * - * @param {string} id - Attachment ID - * @param {string} fileName - Name of the file - * @param {string} project - Project ID or project name - * @param {boolean} download - If set to true always download attachment + * Install this extension into the host provided */ - getAttachmentContent(id, fileName, project, download) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - let queryValues = { - fileName: fileName, - download: download, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/octet-stream", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Install"] = 1] = "Install"; /** - * Downloads an attachment. - * - * @param {string} id - Attachment ID - * @param {string} fileName - Name of the file - * @param {string} project - Project ID or project name - * @param {boolean} download - If set to true always download attachment + * Buy licenses for this extension and install into the host provided */ - getAttachmentZip(id, fileName, project, download) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - let queryValues = { - fileName: fileName, - download: download, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("application/zip", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Buy"] = 2] = "Buy"; /** - * Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project. - * - * @param {string} project - Project ID or project name - * @param {number[]} ids - Comma separated integer classification nodes ids. It's not required, if you want root nodes. - * @param {number} depth - Depth of children to fetch. - * @param {WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy} errorPolicy - Flag to handle errors in getting some nodes. Possible options are Fail and Omit. + * Try this extension */ - getClassificationNodes(project, ids, depth, errorPolicy) { - return __awaiter(this, void 0, void 0, function* () { - if (ids == null) { - throw new TypeError('ids can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - ids: ids && ids.join(","), - '$depth': depth, - errorPolicy: errorPolicy, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a70579d1-f53a-48ee-a5be-7be8659023b9", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Try"] = 3] = "Try"; /** - * Gets root classification nodes under the project. - * - * @param {string} project - Project ID or project name - * @param {number} depth - Depth of children to fetch. + * Request this extension for installation */ - getRootNodes(project, depth) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - '$depth': depth, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a70579d1-f53a-48ee-a5be-7be8659023b9", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Request"] = 4] = "Request"; /** - * Create new or update an existing classification node. - * - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update. - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. - * @param {string} path - Path of the classification node. + * No action found */ - createOrUpdateClassificationNode(postedNode, project, structureGroup, path) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - structureGroup: structureGroup, - path: path - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, postedNode, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["None"] = 5] = "None"; /** - * Delete an existing classification node. - * - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. - * @param {string} path - Path of the classification node. - * @param {number} reclassifyId - Id of the target classification node for reclassification. + * Request admins for purchasing extension */ - deleteClassificationNode(project, structureGroup, path, reclassifyId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - structureGroup: structureGroup, - path: path - }; - let queryValues = { - '$reclassifyId': reclassifyId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["PurchaseRequest"] = 6] = "PurchaseRequest"; +})(AcquisitionOperationType = exports.AcquisitionOperationType || (exports.AcquisitionOperationType = {})); +/** + * Represents different ways of including contributions based on licensing + */ +var ContributionLicensingBehaviorType; +(function (ContributionLicensingBehaviorType) { /** - * Gets the classification node for a given node path. - * - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. - * @param {string} path - Path of the classification node. - * @param {number} depth - Depth of children to fetch. + * Default value - only include the contribution if the user is licensed for the extension */ - getClassificationNode(project, structureGroup, path, depth) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - structureGroup: structureGroup, - path: path - }; - let queryValues = { - '$depth': depth, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfLicensed"] = 0] = "OnlyIfLicensed"; /** - * Update an existing classification node. - * - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update. - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. - * @param {string} path - Path of the classification node. + * Only include the contribution if the user is NOT licensed for the extension */ - updateClassificationNode(postedNode, project, structureGroup, path) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - structureGroup: structureGroup, - path: path - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, postedNode, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfUnlicensed"] = 1] = "OnlyIfUnlicensed"; /** - * Get users who reacted on the comment. - * - * @param {string} project - Project ID or project name - * @param {number} workItemId - WorkItem ID. - * @param {number} commentId - Comment ID. - * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction. - * @param {number} top - * @param {number} skip + * Always include the contribution regardless of whether or not the user is licensed for the extension */ - getEngagedUsers(project, workItemId, commentId, reactionType, top, skip) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId, - reactionType: reactionType - }; - let queryValues = { - '$top': top, - '$skip': skip, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "e33ca5e0-2349-4285-af3d-d72d86781c35", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["AlwaysInclude"] = 2] = "AlwaysInclude"; +})(ContributionLicensingBehaviorType = exports.ContributionLicensingBehaviorType || (exports.ContributionLicensingBehaviorType = {})); +/** + * The type of value used for a property + */ +var ContributionPropertyType; +(function (ContributionPropertyType) { /** - * Add a comment on a work item. - * - * @param {WorkItemTrackingInterfaces.CommentCreate} request - Comment create request. - * @param {string} project - Project ID or project name - * @param {number} workItemId - Id of a work item. + * Contribution type is unknown (value may be anything) */ - addComment(request, project, workItemId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, request, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionPropertyType[ContributionPropertyType["Unknown"] = 0] = "Unknown"; /** - * Delete a comment on a work item. - * - * @param {string} project - Project ID or project name - * @param {number} workItemId - Id of a work item. - * @param {number} commentId + * Value is a string */ - deleteComment(project, workItemId, commentId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionPropertyType[ContributionPropertyType["String"] = 1] = "String"; /** - * Returns a work item comment. - * - * @param {string} project - Project ID or project name - * @param {number} workItemId - Id of a work item to get the comment. - * @param {number} commentId - Id of the comment to return. - * @param {boolean} includeDeleted - Specify if the deleted comment should be retrieved. - * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + * Value is a Uri */ - getComment(project, workItemId, commentId, includeDeleted, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId - }; - let queryValues = { - includeDeleted: includeDeleted, - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionPropertyType[ContributionPropertyType["Uri"] = 2] = "Uri"; /** - * Returns a list of work item comments, pageable. - * - * @param {string} project - Project ID or project name - * @param {number} workItemId - Id of a work item to get comments for. - * @param {number} top - Max number of comments to return. - * @param {string} continuationToken - Used to query for the next page of comments. - * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved. - * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. - * @param {WorkItemTrackingInterfaces.CommentSortOrder} order - Order in which the comments should be returned. + * Value is a GUID */ - getComments(project, workItemId, top, continuationToken, includeDeleted, expand, order) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId - }; - let queryValues = { - '$top': top, - continuationToken: continuationToken, - includeDeleted: includeDeleted, - '$expand': expand, - order: order, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentList, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionPropertyType[ContributionPropertyType["Guid"] = 4] = "Guid"; /** - * Returns a list of work item comments by ids. - * - * @param {string} project - Project ID or project name - * @param {number} workItemId - Id of a work item to get comments for. - * @param {number[]} ids - Comma-separated list of comment ids to return. - * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved. - * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + * Value is True or False */ - getCommentsBatch(project, workItemId, ids, includeDeleted, expand) { - return __awaiter(this, void 0, void 0, function* () { - if (ids == null) { - throw new TypeError('ids can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId - }; - let queryValues = { - ids: ids && ids.join(","), - includeDeleted: includeDeleted, - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentList, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionPropertyType[ContributionPropertyType["Boolean"] = 8] = "Boolean"; /** - * Update a comment on a work item. - * - * @param {WorkItemTrackingInterfaces.CommentUpdate} request - Comment update request. - * @param {string} project - Project ID or project name - * @param {number} workItemId - Id of a work item. - * @param {number} commentId + * Value is an integer */ - updateComment(request, project, workItemId, commentId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, request, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionPropertyType[ContributionPropertyType["Integer"] = 16] = "Integer"; /** - * Adds a new reaction to a comment. - * - * @param {string} project - Project ID or project name - * @param {number} workItemId - WorkItem ID - * @param {number} commentId - Comment ID - * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction + * Value is a double */ - createCommentReaction(project, workItemId, commentId, reactionType) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId, - reactionType: reactionType - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, null, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionPropertyType[ContributionPropertyType["Double"] = 32] = "Double"; /** - * Deletes an existing reaction on a comment. - * - * @param {string} project - Project ID or project name - * @param {number} workItemId - WorkItem ID - * @param {number} commentId - Comment ID - * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction + * Value is a DateTime object */ - deleteCommentReaction(project, workItemId, commentId, reactionType) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId, - reactionType: reactionType - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributionPropertyType[ContributionPropertyType["DateTime"] = 64] = "DateTime"; + /** + * Value is a generic Dictionary/JObject/property bag + */ + ContributionPropertyType[ContributionPropertyType["Dictionary"] = 128] = "Dictionary"; + /** + * Value is an array + */ + ContributionPropertyType[ContributionPropertyType["Array"] = 256] = "Array"; + /** + * Value is an arbitrary/custom object + */ + ContributionPropertyType[ContributionPropertyType["Object"] = 512] = "Object"; +})(ContributionPropertyType = exports.ContributionPropertyType || (exports.ContributionPropertyType = {})); +/** + * Options that control the contributions to include in a query + */ +var ContributionQueryOptions; +(function (ContributionQueryOptions) { + ContributionQueryOptions[ContributionQueryOptions["None"] = 0] = "None"; + /** + * Include the direct contributions that have the ids queried. + */ + ContributionQueryOptions[ContributionQueryOptions["IncludeSelf"] = 16] = "IncludeSelf"; + /** + * Include the contributions that directly target the contributions queried. + */ + ContributionQueryOptions[ContributionQueryOptions["IncludeChildren"] = 32] = "IncludeChildren"; + /** + * Include the contributions from the entire sub-tree targeting the contributions queried. + */ + ContributionQueryOptions[ContributionQueryOptions["IncludeSubTree"] = 96] = "IncludeSubTree"; + /** + * Include the contribution being queried as well as all contributions that target them recursively. + */ + ContributionQueryOptions[ContributionQueryOptions["IncludeAll"] = 112] = "IncludeAll"; + /** + * Some callers may want the entire tree back without constraint evaluation being performed. + */ + ContributionQueryOptions[ContributionQueryOptions["IgnoreConstraints"] = 256] = "IgnoreConstraints"; +})(ContributionQueryOptions = exports.ContributionQueryOptions || (exports.ContributionQueryOptions = {})); +/** + * Set of flags applied to extensions that are relevant to contribution consumers + */ +var ExtensionFlags; +(function (ExtensionFlags) { /** - * Gets reactions of a comment. - * - * @param {string} project - Project ID or project name - * @param {number} workItemId - WorkItem ID - * @param {number} commentId - Comment ID + * A built-in extension is installed for all VSTS accounts by default */ - getCommentReactions(project, workItemId, commentId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionFlags[ExtensionFlags["BuiltIn"] = 1] = "BuiltIn"; /** - * @param {string} project - Project ID or project name - * @param {number} workItemId - * @param {number} commentId - * @param {number} version + * The extension comes from a fully-trusted publisher */ - getCommentVersion(project, workItemId, commentId, version) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId, - version: version - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "49e03b34-3be0-42e3-8a5d-e8dfb88ac954", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentVersion, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionFlags[ExtensionFlags["Trusted"] = 2] = "Trusted"; +})(ExtensionFlags = exports.ExtensionFlags || (exports.ExtensionFlags = {})); +/** + * Represents the state of an extension request + */ +var ExtensionRequestState; +(function (ExtensionRequestState) { /** - * @param {string} project - Project ID or project name - * @param {number} workItemId - * @param {number} commentId + * The request has been opened, but not yet responded to */ - getCommentVersions(project, workItemId, commentId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - workItemId: workItemId, - commentId: commentId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "49e03b34-3be0-42e3-8a5d-e8dfb88ac954", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentVersion, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionRequestState[ExtensionRequestState["Open"] = 0] = "Open"; /** - * Create a new field. - * - * @param {WorkItemTrackingInterfaces.WorkItemField} workItemField - New field definition - * @param {string} project - Project ID or project name + * The request was accepted (extension installed or license assigned) */ - createField(workItemField, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, workItemField, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionRequestState[ExtensionRequestState["Accepted"] = 1] = "Accepted"; /** - * Deletes the field. To undelete a filed, see "Update Field" API. - * - * @param {string} fieldNameOrRefName - Field simple name or reference name - * @param {string} project - Project ID or project name + * The request was rejected (extension not installed or license not assigned) */ - deleteField(fieldNameOrRefName, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - fieldNameOrRefName: fieldNameOrRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionRequestState[ExtensionRequestState["Rejected"] = 2] = "Rejected"; +})(ExtensionRequestState = exports.ExtensionRequestState || (exports.ExtensionRequestState = {})); +var ExtensionRequestUpdateType; +(function (ExtensionRequestUpdateType) { + ExtensionRequestUpdateType[ExtensionRequestUpdateType["Created"] = 1] = "Created"; + ExtensionRequestUpdateType[ExtensionRequestUpdateType["Approved"] = 2] = "Approved"; + ExtensionRequestUpdateType[ExtensionRequestUpdateType["Rejected"] = 3] = "Rejected"; + ExtensionRequestUpdateType[ExtensionRequestUpdateType["Deleted"] = 4] = "Deleted"; +})(ExtensionRequestUpdateType = exports.ExtensionRequestUpdateType || (exports.ExtensionRequestUpdateType = {})); +/** + * States of an extension Note: If you add value to this enum, you need to do 2 other things. First add the back compat enum in value src\Vssf\Sdk\Server\Contributions\InstalledExtensionMessage.cs. Second, you can not send the new value on the message bus. You need to remove it from the message bus event prior to being sent. + */ +var ExtensionStateFlags; +(function (ExtensionStateFlags) { /** - * Gets information on a specific field. - * - * @param {string} fieldNameOrRefName - Field simple name or reference name - * @param {string} project - Project ID or project name + * No flags set */ - getField(fieldNameOrRefName, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - fieldNameOrRefName: fieldNameOrRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["None"] = 0] = "None"; /** - * Returns information for all fields. The project ID/name parameter is optional. - * - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.GetFieldsExpand} expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. + * Extension is disabled */ - getFields(project, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["Disabled"] = 1] = "Disabled"; /** - * Update a field. - * - * @param {WorkItemTrackingInterfaces.UpdateWorkItemField} payload - Payload contains desired value of the field's properties - * @param {string} fieldNameOrRefName - Name/reference name of the field to be updated - * @param {string} project - Project ID or project name + * Extension is a built in */ - updateField(payload, fieldNameOrRefName, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - fieldNameOrRefName: fieldNameOrRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, payload, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["BuiltIn"] = 2] = "BuiltIn"; /** - * Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile. - * - * @param {WorkItemTrackingInterfaces.ProcessIdModel} newProcess - * @param {string} project - Project ID or project name + * Extension has multiple versions */ - migrateProjectsProcess(newProcess, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "19801631-d4e5-47e9-8166-0330de0ff1e6", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, newProcess, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["MultiVersion"] = 4] = "MultiVersion"; /** - * Creates a query, or moves a query. - * - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. - * @param {string} project - Project ID or project name - * @param {string} query - The parent id or path under which the query is to be created. - * @param {boolean} validateWiqlOnly - If you only want to validate your WIQL query without actually creating one, set it to true. Default is false. + * Extension is not installed. This is for builtin extensions only and can not otherwise be set. */ - createQuery(postedQuery, project, query, validateWiqlOnly) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - query: query - }; - let queryValues = { - validateWiqlOnly: validateWiqlOnly, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, postedQuery, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["UnInstalled"] = 8] = "UnInstalled"; /** - * Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder. - * - * @param {string} project - Project ID or project name - * @param {string} query - ID or path of the query or folder to delete. + * Error performing version check */ - deleteQuery(project, query) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - query: query - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["VersionCheckError"] = 16] = "VersionCheckError"; /** - * Gets the root queries and their children - * - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results. - * @param {number} depth - In the folder of queries, return child queries and folders to this depth. - * @param {boolean} includeDeleted - Include deleted queries and folders + * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. */ - getQueries(project, expand, depth, includeDeleted) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - '$expand': expand, - '$depth': depth, - '$includeDeleted': includeDeleted, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["Trusted"] = 32] = "Trusted"; /** - * Retrieves an individual query and its children - * - * @param {string} project - Project ID or project name - * @param {string} query - ID or path of the query. - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results. - * @param {number} depth - In the folder of queries, return child queries and folders to this depth. - * @param {boolean} includeDeleted - Include deleted queries and folders - * @param {boolean} useIsoDateFormat - DateTime query clauses will be formatted using a ISO 8601 compliant format + * Extension is currently in an error state */ - getQuery(project, query, expand, depth, includeDeleted, useIsoDateFormat) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - query: query - }; - let queryValues = { - '$expand': expand, - '$depth': depth, - '$includeDeleted': includeDeleted, - '$useIsoDateFormat': useIsoDateFormat, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["Error"] = 64] = "Error"; /** - * Searches all queries the user has access to in the current project - * - * @param {string} project - Project ID or project name - * @param {string} filter - The text to filter the queries with. - * @param {number} top - The number of queries to return (Default is 50 and maximum is 200). - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {boolean} includeDeleted - Include deleted queries and folders + * Extension scopes have changed and the extension requires re-authorization */ - searchQueries(project, filter, top, expand, includeDeleted) { - return __awaiter(this, void 0, void 0, function* () { - if (filter == null) { - throw new TypeError('filter can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - '$filter': filter, - '$top': top, - '$expand': expand, - '$includeDeleted': includeDeleted, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItemsResult, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["NeedsReauthorization"] = 128] = "NeedsReauthorization"; /** - * Update a query or a folder. This allows you to update, rename and move queries and folders. - * - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - The query to update. - * @param {string} project - Project ID or project name - * @param {string} query - The ID or path for the query to update. - * @param {boolean} undeleteDescendants - Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants. + * Error performing auto-upgrade. For example, if the new version has demands not supported the extension cannot be auto-upgraded. */ - updateQuery(queryUpdate, project, query, undeleteDescendants) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - query: query - }; - let queryValues = { - '$undeleteDescendants': undeleteDescendants, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, queryUpdate, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["AutoUpgradeError"] = 256] = "AutoUpgradeError"; /** - * Gets a list of queries by ids (Maximum 1000) - * - * @param {WorkItemTrackingInterfaces.QueryBatchGetRequest} queryGetRequest - * @param {string} project - Project ID or project name + * Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported. */ - getQueriesBatch(queryGetRequest, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "549816f9-09b0-4e75-9e81-01fbfcd07426", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, queryGetRequest, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning"; +})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {})); +var ExtensionUpdateType; +(function (ExtensionUpdateType) { + ExtensionUpdateType[ExtensionUpdateType["Installed"] = 1] = "Installed"; + ExtensionUpdateType[ExtensionUpdateType["Uninstalled"] = 2] = "Uninstalled"; + ExtensionUpdateType[ExtensionUpdateType["Enabled"] = 3] = "Enabled"; + ExtensionUpdateType[ExtensionUpdateType["Disabled"] = 4] = "Disabled"; + ExtensionUpdateType[ExtensionUpdateType["VersionUpdated"] = 5] = "VersionUpdated"; + ExtensionUpdateType[ExtensionUpdateType["ActionRequired"] = 6] = "ActionRequired"; + ExtensionUpdateType[ExtensionUpdateType["ActionResolved"] = 7] = "ActionResolved"; +})(ExtensionUpdateType = exports.ExtensionUpdateType || (exports.ExtensionUpdateType = {})); +/** + * Installation issue type (Warning, Error) + */ +var InstalledExtensionStateIssueType; +(function (InstalledExtensionStateIssueType) { /** - * Destroys the specified work item permanently from the Recycle Bin. This action can not be undone. - * - * @param {number} id - ID of the work item to be destroyed permanently - * @param {string} project - Project ID or project name + * Represents an installation warning, for example an implicit demand not supported */ - destroyWorkItem(id, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Warning"] = 0] = "Warning"; /** - * Gets a deleted work item from Recycle Bin. - * - * @param {number} id - ID of the work item to be returned - * @param {string} project - Project ID or project name + * Represents an installation error, for example an explicit demand not supported */ - getDeletedWorkItem(id, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); + InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Error"] = 1] = "Error"; +})(InstalledExtensionStateIssueType = exports.InstalledExtensionStateIssueType || (exports.InstalledExtensionStateIssueType = {})); +exports.TypeInfo = { + AcquisitionAssignmentType: { + enumValues: { + "none": 0, + "me": 1, + "all": 2 + } + }, + AcquisitionOperation: {}, + AcquisitionOperationState: { + enumValues: { + "disallow": 0, + "allow": 1, + "completed": 3 + } + }, + AcquisitionOperationType: { + enumValues: { + "get": 0, + "install": 1, + "buy": 2, + "try": 3, + "request": 4, + "none": 5, + "purchaseRequest": 6 + } + }, + AcquisitionOptions: {}, + ContributionLicensingBehaviorType: { + enumValues: { + "onlyIfLicensed": 0, + "onlyIfUnlicensed": 1, + "alwaysInclude": 2 + } + }, + ContributionNodeQuery: {}, + ContributionPropertyDescription: {}, + ContributionPropertyType: { + enumValues: { + "unknown": 0, + "string": 1, + "uri": 2, + "guid": 4, + "boolean": 8, + "integer": 16, + "double": 32, + "dateTime": 64, + "dictionary": 128, + "array": 256, + "object": 512 + } + }, + ContributionQueryOptions: { + enumValues: { + "none": 0, + "includeSelf": 16, + "includeChildren": 32, + "includeSubTree": 96, + "includeAll": 112, + "ignoreConstraints": 256 + } + }, + ContributionType: {}, + ExtensionAcquisitionRequest: {}, + ExtensionAuditLog: {}, + ExtensionAuditLogEntry: {}, + ExtensionEvent: {}, + ExtensionFlags: { + enumValues: { + "builtIn": 1, + "trusted": 2 + } + }, + ExtensionLicensing: {}, + ExtensionManifest: {}, + ExtensionRequest: {}, + ExtensionRequestEvent: {}, + ExtensionRequestsEvent: {}, + ExtensionRequestState: { + enumValues: { + "open": 0, + "accepted": 1, + "rejected": 2 + } + }, + ExtensionRequestUpdateType: { + enumValues: { + "created": 1, + "approved": 2, + "rejected": 3, + "deleted": 4 + } + }, + ExtensionState: {}, + ExtensionStateFlags: { + enumValues: { + "none": 0, + "disabled": 1, + "builtIn": 2, + "multiVersion": 4, + "unInstalled": 8, + "versionCheckError": 16, + "trusted": 32, + "error": 64, + "needsReauthorization": 128, + "autoUpgradeError": 256, + "warning": 512 + } + }, + ExtensionUpdateType: { + enumValues: { + "installed": 1, + "uninstalled": 2, + "enabled": 3, + "disabled": 4, + "versionUpdated": 5, + "actionRequired": 6, + "actionResolved": 7 + } + }, + InstalledExtension: {}, + InstalledExtensionState: {}, + InstalledExtensionStateIssue: {}, + InstalledExtensionStateIssueType: { + enumValues: { + "warning": 0, + "error": 1 + } + }, + LicensingOverride: {}, + RequestedExtension: {}, +}; +exports.TypeInfo.AcquisitionOperation.fields = { + operationState: { + enumType: exports.TypeInfo.AcquisitionOperationState + }, + operationType: { + enumType: exports.TypeInfo.AcquisitionOperationType + } +}; +exports.TypeInfo.AcquisitionOptions.fields = { + defaultOperation: { + typeInfo: exports.TypeInfo.AcquisitionOperation + }, + operations: { + isArray: true, + typeInfo: exports.TypeInfo.AcquisitionOperation + } +}; +exports.TypeInfo.ContributionNodeQuery.fields = { + queryOptions: { + enumType: exports.TypeInfo.ContributionQueryOptions + } +}; +exports.TypeInfo.ContributionPropertyDescription.fields = { + type: { + enumType: exports.TypeInfo.ContributionPropertyType + } +}; +exports.TypeInfo.ContributionType.fields = { + properties: { + isDictionary: true, + dictionaryValueTypeInfo: exports.TypeInfo.ContributionPropertyDescription + } +}; +exports.TypeInfo.ExtensionAcquisitionRequest.fields = { + assignmentType: { + enumType: exports.TypeInfo.AcquisitionAssignmentType + }, + operationType: { + enumType: exports.TypeInfo.AcquisitionOperationType + } +}; +exports.TypeInfo.ExtensionAuditLog.fields = { + entries: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionAuditLogEntry + } +}; +exports.TypeInfo.ExtensionAuditLogEntry.fields = { + auditDate: { + isDate: true, + } +}; +exports.TypeInfo.ExtensionEvent.fields = { + extension: { + typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension + }, + updateType: { + enumType: exports.TypeInfo.ExtensionUpdateType + } +}; +exports.TypeInfo.ExtensionLicensing.fields = { + overrides: { + isArray: true, + typeInfo: exports.TypeInfo.LicensingOverride + } +}; +exports.TypeInfo.ExtensionManifest.fields = { + contributionTypes: { + isArray: true, + typeInfo: exports.TypeInfo.ContributionType + }, + licensing: { + typeInfo: exports.TypeInfo.ExtensionLicensing + } +}; +exports.TypeInfo.ExtensionRequest.fields = { + requestDate: { + isDate: true, + }, + requestState: { + enumType: exports.TypeInfo.ExtensionRequestState + }, + resolveDate: { + isDate: true, + } +}; +exports.TypeInfo.ExtensionRequestEvent.fields = { + extension: { + typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension + }, + request: { + typeInfo: exports.TypeInfo.ExtensionRequest + }, + updateType: { + enumType: exports.TypeInfo.ExtensionRequestUpdateType + } +}; +exports.TypeInfo.ExtensionRequestsEvent.fields = { + extension: { + typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension + }, + requests: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionRequest + }, + updateType: { + enumType: exports.TypeInfo.ExtensionRequestUpdateType + } +}; +exports.TypeInfo.ExtensionState.fields = { + flags: { + enumType: exports.TypeInfo.ExtensionStateFlags + }, + installationIssues: { + isArray: true, + typeInfo: exports.TypeInfo.InstalledExtensionStateIssue + }, + lastUpdated: { + isDate: true, + }, + lastVersionCheck: { + isDate: true, + } +}; +exports.TypeInfo.InstalledExtension.fields = { + contributionTypes: { + isArray: true, + typeInfo: exports.TypeInfo.ContributionType + }, + flags: { + enumType: exports.TypeInfo.ExtensionFlags + }, + installState: { + typeInfo: exports.TypeInfo.InstalledExtensionState + }, + lastPublished: { + isDate: true, + }, + licensing: { + typeInfo: exports.TypeInfo.ExtensionLicensing + } +}; +exports.TypeInfo.InstalledExtensionState.fields = { + flags: { + enumType: exports.TypeInfo.ExtensionStateFlags + }, + installationIssues: { + isArray: true, + typeInfo: exports.TypeInfo.InstalledExtensionStateIssue + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.InstalledExtensionStateIssue.fields = { + type: { + enumType: exports.TypeInfo.InstalledExtensionStateIssueType + } +}; +exports.TypeInfo.LicensingOverride.fields = { + behavior: { + enumType: exports.TypeInfo.ContributionLicensingBehaviorType + } +}; +exports.TypeInfo.RequestedExtension.fields = { + extensionRequests: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionRequest } +}; + + +/***/ }), + +/***/ 17278: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * The current state of a feature within a given scope + */ +var ContributedFeatureEnabledValue; +(function (ContributedFeatureEnabledValue) { /** - * Gets the work items from the recycle bin, whose IDs have been specified in the parameters - * - * @param {number[]} ids - Comma separated list of IDs of the deleted work items to be returned - * @param {string} project - Project ID or project name + * The state of the feature is not set for the specified scope */ - getDeletedWorkItems(ids, project) { - return __awaiter(this, void 0, void 0, function* () { - if (ids == null) { - throw new TypeError('ids can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - ids: ids && ids.join(","), - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Undefined"] = -1] = "Undefined"; /** - * Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. - * - * @param {string} project - Project ID or project name + * The feature is disabled at the specified scope */ - getDeletedWorkItemShallowReferences(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); + ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Disabled"] = 0] = "Disabled"; + /** + * The feature is enabled at the specified scope + */ + ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Enabled"] = 1] = "Enabled"; +})(ContributedFeatureEnabledValue = exports.ContributedFeatureEnabledValue || (exports.ContributedFeatureEnabledValue = {})); +exports.TypeInfo = { + ContributedFeatureEnabledValue: { + enumValues: { + "undefined": -1, + "disabled": 0, + "enabled": 1 + } + }, + ContributedFeatureState: {}, + ContributedFeatureStateQuery: {}, +}; +exports.TypeInfo.ContributedFeatureState.fields = { + state: { + enumType: exports.TypeInfo.ContributedFeatureEnabledValue + } +}; +exports.TypeInfo.ContributedFeatureStateQuery.fields = { + featureStates: { + isDictionary: true, + dictionaryValueTypeInfo: exports.TypeInfo.ContributedFeatureState } +}; + + +/***/ }), + +/***/ 6110: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Compression type for file stored in Blobstore + */ +var BlobCompressionType; +(function (BlobCompressionType) { + BlobCompressionType[BlobCompressionType["None"] = 0] = "None"; + BlobCompressionType[BlobCompressionType["GZip"] = 1] = "GZip"; +})(BlobCompressionType = exports.BlobCompressionType || (exports.BlobCompressionType = {})); +/** + * Status of a container item. + */ +var ContainerItemStatus; +(function (ContainerItemStatus) { /** - * Restores the deleted work item from Recycle Bin. - * - * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - Paylod with instructions to update the IsDeleted flag to false - * @param {number} id - ID of the work item to be restored - * @param {string} project - Project ID or project name + * Item is created. */ - restoreWorkItem(payload, id, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, payload, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContainerItemStatus[ContainerItemStatus["Created"] = 1] = "Created"; /** - * Returns a fully hydrated work item for the requested revision - * - * @param {number} id - * @param {number} revisionNumber - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param {string} project - Project ID or project name + * Item is a file pending for upload. */ - getRevision(id, revisionNumber, expand, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id, - revisionNumber: revisionNumber - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "a00c85a5-80fa-4565-99c3-bcd2181434bb", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContainerItemStatus[ContainerItemStatus["PendingUpload"] = 2] = "PendingUpload"; +})(ContainerItemStatus = exports.ContainerItemStatus || (exports.ContainerItemStatus = {})); +/** + * Type of a container item. + */ +var ContainerItemType; +(function (ContainerItemType) { /** - * Returns the list of fully hydrated work item revisions, paged. - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param {string} project - Project ID or project name + * Any item type. */ - getRevisions(id, top, skip, expand, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - let queryValues = { - '$top': top, - '$skip': skip, - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "a00c85a5-80fa-4565-99c3-bcd2181434bb", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContainerItemType[ContainerItemType["Any"] = 0] = "Any"; /** - * RESTful method to send mail for selected/queried work items. - * - * @param {WorkItemTrackingInterfaces.SendMailBody} body - * @param {string} project - Project ID or project name + * Item is a folder which can have child items. */ - sendMail(body, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "12438500-2f84-4fa7-9f1a-c31871b4959d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, body, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContainerItemType[ContainerItemType["Folder"] = 1] = "Folder"; /** - * @param {string} project - Project ID or project name - * @param {string} tagIdOrName + * Item is a file which is stored in the file service. */ - deleteTag(project, tagIdOrName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - tagIdOrName: tagIdOrName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ContainerItemType[ContainerItemType["File"] = 2] = "File"; +})(ContainerItemType = exports.ContainerItemType || (exports.ContainerItemType = {})); +/** + * Options a container can have. + */ +var ContainerOptions; +(function (ContainerOptions) { /** - * @param {string} project - Project ID or project name - * @param {string} tagIdOrName + * No option. */ - getTag(project, tagIdOrName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - tagIdOrName: tagIdOrName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); + ContainerOptions[ContainerOptions["None"] = 0] = "None"; +})(ContainerOptions = exports.ContainerOptions || (exports.ContainerOptions = {})); +exports.TypeInfo = { + BlobCompressionType: { + enumValues: { + "none": 0, + "gZip": 1 + } + }, + ContainerItemBlobReference: {}, + ContainerItemStatus: { + enumValues: { + "created": 1, + "pendingUpload": 2 + } + }, + ContainerItemType: { + enumValues: { + "any": 0, + "folder": 1, + "file": 2 + } + }, + ContainerOptions: { + enumValues: { + "none": 0 + } + }, + FileContainer: {}, + FileContainerItem: {}, +}; +exports.TypeInfo.ContainerItemBlobReference.fields = { + compressionType: { + enumType: exports.TypeInfo.BlobCompressionType } - /** - * @param {string} project - Project ID or project name - */ - getTags(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.FileContainer.fields = { + dateCreated: { + isDate: true, + }, + options: { + enumType: exports.TypeInfo.ContainerOptions } - /** - * @param {WorkItemTrackingInterfaces.WorkItemTagDefinition} tagData - * @param {string} project - Project ID or project name - * @param {string} tagIdOrName - */ - updateTag(tagData, project, tagIdOrName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - tagIdOrName: tagIdOrName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, tagData, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.FileContainerItem.fields = { + blobMetadata: { + typeInfo: exports.TypeInfo.ContainerItemBlobReference + }, + dateCreated: { + isDate: true, + }, + dateLastModified: { + isDate: true, + }, + itemType: { + enumType: exports.TypeInfo.ContainerItemType + }, + status: { + enumType: exports.TypeInfo.ContainerItemStatus } +}; + + +/***/ }), + +/***/ 48905: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * How the acquisition is assigned + */ +var AcquisitionAssignmentType; +(function (AcquisitionAssignmentType) { + AcquisitionAssignmentType[AcquisitionAssignmentType["None"] = 0] = "None"; /** - * Creates a template - * - * @param {WorkItemTrackingInterfaces.WorkItemTemplate} template - Template contents - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * Just assign for me */ - createTemplate(template, teamContext) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "6a90345f-a676-4969-afce-8e163e1d5642", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, template, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionAssignmentType[AcquisitionAssignmentType["Me"] = 1] = "Me"; /** - * Gets template - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} workitemtypename - Optional, When specified returns templates for given Work item type. + * Assign for all users in the account */ - getTemplates(teamContext, workitemtypename) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - let queryValues = { - workitemtypename: workitemtypename, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "6a90345f-a676-4969-afce-8e163e1d5642", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionAssignmentType[AcquisitionAssignmentType["All"] = 2] = "All"; +})(AcquisitionAssignmentType = exports.AcquisitionAssignmentType || (exports.AcquisitionAssignmentType = {})); +var AcquisitionOperationState; +(function (AcquisitionOperationState) { /** - * Deletes the template with given id - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} templateId - Template id + * Not allowed to use this AcquisitionOperation */ - deleteTemplate(teamContext, templateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - templateId: templateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationState[AcquisitionOperationState["Disallow"] = 0] = "Disallow"; /** - * Gets the template with specified id - * - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} templateId - Template Id + * Allowed to use this AcquisitionOperation */ - getTemplate(teamContext, templateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - templateId: templateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationState[AcquisitionOperationState["Allow"] = 1] = "Allow"; /** - * Replace template contents - * - * @param {WorkItemTrackingInterfaces.WorkItemTemplate} templateContent - Template contents to replace with - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {string} templateId - Template id + * Operation has already been completed and is no longer available */ - replaceTemplate(templateContent, teamContext, templateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - templateId: templateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, templateContent, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationState[AcquisitionOperationState["Completed"] = 3] = "Completed"; +})(AcquisitionOperationState = exports.AcquisitionOperationState || (exports.AcquisitionOperationState = {})); +/** + * Set of different types of operations that can be requested. + */ +var AcquisitionOperationType; +(function (AcquisitionOperationType) { /** - * Returns a single update for a work item - * - * @param {number} id - * @param {number} updateNumber - * @param {string} project - Project ID or project name + * Not yet used */ - getUpdate(id, updateNumber, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id, - updateNumber: updateNumber - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "6570bf97-d02c-4a91-8d93-3abe9895b1a9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemUpdate, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Get"] = 0] = "Get"; /** - * Returns a the deltas between work item revisions - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param {string} project - Project ID or project name + * Install this extension into the host provided */ - getUpdates(id, top, skip, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - let queryValues = { - '$top': top, - '$skip': skip, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "6570bf97-d02c-4a91-8d93-3abe9895b1a9", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemUpdate, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Install"] = 1] = "Install"; /** - * Gets the results of the query given its WIQL. - * - * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the WIQL. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - Whether or not to use time precision. - * @param {number} top - The max number of results to return. + * Buy licenses for this extension and install into the host provided */ - queryByWiql(wiql, teamContext, timePrecision, top) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team - }; - let queryValues = { - timePrecision: timePrecision, - '$top': top, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "1a9c53f7-f243-4447-b110-35ef023636e4", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, wiql, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemQueryResult, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Buy"] = 2] = "Buy"; /** - * Gets the results of the query given the query ID. - * - * @param {string} id - The query ID. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - Whether or not to use time precision. - * @param {number} top - The max number of results to return. + * Try this extension */ - queryById(id, teamContext, timePrecision, top) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let project = null; - let team = null; - if (teamContext) { - project = teamContext.projectId || teamContext.project; - team = teamContext.teamId || teamContext.team; - } - let routeValues = { - project: project, - team: team, - id: id - }; - let queryValues = { - timePrecision: timePrecision, - '$top': top, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a02355f5-5f8a-4671-8e32-369d23aac83d", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemQueryResult, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Try"] = 3] = "Try"; /** - * Get a work item icon given the friendly name and icon color. - * - * @param {string} icon - The name of the icon - * @param {string} color - The 6-digit hex color for the icon - * @param {number} v - The version of the icon (used only for cache invalidation) + * Request this extension for installation */ - getWorkItemIconJson(icon, color, v) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - icon: icon - }; - let queryValues = { - color: color, - v: v, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["Request"] = 4] = "Request"; /** - * Get a list of all work item icons. - * + * No action found */ - getWorkItemIcons() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["None"] = 5] = "None"; /** - * Get a work item icon given the friendly name and icon color. - * - * @param {string} icon - The name of the icon - * @param {string} color - The 6-digit hex color for the icon - * @param {number} v - The version of the icon (used only for cache invalidation) + * Request admins for purchasing extension */ - getWorkItemIconSvg(icon, color, v) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - icon: icon - }; - let queryValues = { - color: color, - v: v, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("image/svg+xml", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } + AcquisitionOperationType[AcquisitionOperationType["PurchaseRequest"] = 6] = "PurchaseRequest"; +})(AcquisitionOperationType = exports.AcquisitionOperationType || (exports.AcquisitionOperationType = {})); +var ConcernCategory; +(function (ConcernCategory) { + ConcernCategory[ConcernCategory["General"] = 1] = "General"; + ConcernCategory[ConcernCategory["Abusive"] = 2] = "Abusive"; + ConcernCategory[ConcernCategory["Spam"] = 4] = "Spam"; +})(ConcernCategory = exports.ConcernCategory || (exports.ConcernCategory = {})); +var DraftPatchOperation; +(function (DraftPatchOperation) { + DraftPatchOperation[DraftPatchOperation["Publish"] = 1] = "Publish"; + DraftPatchOperation[DraftPatchOperation["Cancel"] = 2] = "Cancel"; +})(DraftPatchOperation = exports.DraftPatchOperation || (exports.DraftPatchOperation = {})); +var DraftStateType; +(function (DraftStateType) { + DraftStateType[DraftStateType["Unpublished"] = 1] = "Unpublished"; + DraftStateType[DraftStateType["Published"] = 2] = "Published"; + DraftStateType[DraftStateType["Cancelled"] = 3] = "Cancelled"; + DraftStateType[DraftStateType["Error"] = 4] = "Error"; +})(DraftStateType = exports.DraftStateType || (exports.DraftStateType = {})); +var ExtensionDeploymentTechnology; +(function (ExtensionDeploymentTechnology) { + ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Exe"] = 1] = "Exe"; + ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Msi"] = 2] = "Msi"; + ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Vsix"] = 3] = "Vsix"; + ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["ReferralLink"] = 4] = "ReferralLink"; +})(ExtensionDeploymentTechnology = exports.ExtensionDeploymentTechnology || (exports.ExtensionDeploymentTechnology = {})); +/** + * Type of event + */ +var ExtensionLifecycleEventType; +(function (ExtensionLifecycleEventType) { + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Uninstall"] = 1] = "Uninstall"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Install"] = 2] = "Install"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Review"] = 3] = "Review"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Acquisition"] = 4] = "Acquisition"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Sales"] = 5] = "Sales"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Other"] = 999] = "Other"; +})(ExtensionLifecycleEventType = exports.ExtensionLifecycleEventType || (exports.ExtensionLifecycleEventType = {})); +/** + * Set of flags that can be associated with a given permission over an extension + */ +var ExtensionPolicyFlags; +(function (ExtensionPolicyFlags) { /** - * Get a work item icon given the friendly name and icon color. - * - * @param {string} icon - The name of the icon - * @param {string} color - The 6-digit hex color for the icon - * @param {number} v - The version of the icon (used only for cache invalidation) + * No permission */ - getWorkItemIconXaml(icon, color, v) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - icon: icon - }; - let queryValues = { - color: color, - v: v, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); - let url = verData.requestUrl; - let apiVersion = verData.apiVersion; - let accept = this.createAcceptHeader("image/xaml+xml", apiVersion); - resolve((yield this.http.get(url, { "Accept": accept })).message); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionPolicyFlags[ExtensionPolicyFlags["None"] = 0] = "None"; /** - * Get a batch of work item links - * - * @param {string} project - Project ID or project name - * @param {string[]} linkTypes - A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types. - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. - * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. - * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. + * Permission on private extensions */ - getReportingLinksByLinkType(project, linkTypes, types, continuationToken, startDateTime) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - linkTypes: linkTypes && linkTypes.join(","), - types: types && types.join(","), - continuationToken: continuationToken, - startDateTime: startDateTime, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "b5b5b6d0-0308-40a1-b3f4-b9bb3c66878f", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionPolicyFlags[ExtensionPolicyFlags["Private"] = 1] = "Private"; /** - * Gets the work item relation type definition. - * - * @param {string} relation - The relation name + * Permission on public extensions */ - getRelationType(relation) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - relation: relation - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionPolicyFlags[ExtensionPolicyFlags["Public"] = 2] = "Public"; /** - * Gets the work item relation types. - * + * Permission in extensions that are in preview */ - getRelationTypes() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionPolicyFlags[ExtensionPolicyFlags["Preview"] = 4] = "Preview"; /** - * Get a batch of work item revisions with the option of including deleted items - * - * @param {string} project - Project ID or project name - * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. - * @param {boolean} includeDeleted - Specify if the deleted item should be returned. - * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. - * @param {boolean} includeLatestOnly - Return only the latest revisions of work items, skipping all historical revisions - * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand - Return all the fields in work item revisions, including long text fields which are not returned by default - * @param {boolean} includeDiscussionChangesOnly - Return only the those revisions of work items, where only history field was changed - * @param {number} maxPageSize - The maximum number of results to return in this batch + * Permission in released extensions */ - readReportingRevisionsGet(project, fields, types, continuationToken, startDateTime, includeIdentityRef, includeDeleted, includeTagRef, includeLatestOnly, expand, includeDiscussionChangesOnly, maxPageSize) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - fields: fields && fields.join(","), - types: types && types.join(","), - continuationToken: continuationToken, - startDateTime: startDateTime, - includeIdentityRef: includeIdentityRef, - includeDeleted: includeDeleted, - includeTagRef: includeTagRef, - includeLatestOnly: includeLatestOnly, - '$expand': expand, - includeDiscussionChangesOnly: includeDiscussionChangesOnly, - '$maxPageSize': maxPageSize, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f828fe59-dd87-495d-a17c-7a8d6211ca6c", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionPolicyFlags[ExtensionPolicyFlags["Released"] = 8] = "Released"; /** - * Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit. - * - * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format - * @param {string} project - Project ID or project name - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand + * Permission in 1st party extensions */ - readReportingRevisionsPost(filter, project, continuationToken, startDateTime, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - continuationToken: continuationToken, - startDateTime: startDateTime, - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f828fe59-dd87-495d-a17c-7a8d6211ca6c", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, filter, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionPolicyFlags[ExtensionPolicyFlags["FirstParty"] = 16] = "FirstParty"; /** - * @param {string} project - Project ID or project name - * @param {string} continuationToken - * @param {number} maxPageSize + * Mask that defines all permissions */ - readReportingDiscussions(project, continuationToken, maxPageSize) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - continuationToken: continuationToken, - '$maxPageSize': maxPageSize, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4a644469-90c5-4fcc-9a9f-be0827d369ec", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionPolicyFlags[ExtensionPolicyFlags["All"] = 31] = "All"; +})(ExtensionPolicyFlags = exports.ExtensionPolicyFlags || (exports.ExtensionPolicyFlags = {})); +/** + * Type of extension filters that are supported in the queries. + */ +var ExtensionQueryFilterType; +(function (ExtensionQueryFilterType) { /** - * Creates a single work item. - * - * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the work item - * @param {string} project - Project ID or project name - * @param {string} type - The work item type of the work item to create - * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item - * @param {boolean} bypassRules - Do not enforce the work item type rules on this update - * @param {boolean} suppressNotifications - Do not fire any notifications for this change - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. */ - createWorkItem(customHeaders, document, project, type, validateOnly, bypassRules, suppressNotifications, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - type: type - }; - let queryValues = { - validateOnly: validateOnly, - bypassRules: bypassRules, - suppressNotifications: suppressNotifications, - '$expand': expand, - }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/json-patch+json"; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "62d3d110-0047-428c-ad3c-4fe872c91c74", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; - let res; - res = yield this.rest.create(url, document, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["Tag"] = 1] = "Tag"; /** - * Returns a single work item from a template. - * - * @param {string} project - Project ID or project name - * @param {string} type - The work item type name - * @param {string} fields - Comma-separated list of requested fields - * @param {Date} asOf - AsOf UTC date time string - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * The Values are an ExtensionName or fragment that is used to match other extension names. */ - getWorkItemTemplate(project, type, fields, asOf, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - type: type - }; - let queryValues = { - fields: fields, - asOf: asOf, - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "62d3d110-0047-428c-ad3c-4fe872c91c74", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["DisplayName"] = 2] = "DisplayName"; /** - * Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution. - * - * @param {number} id - ID of the work item to be deleted - * @param {string} project - Project ID or project name - * @param {boolean} destroy - Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone. + * The Filter is one or more tokens that define what scope to return private extensions for. */ - deleteWorkItem(id, project, destroy) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - let queryValues = { - destroy: destroy, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["Private"] = 3] = "Private"; /** - * Returns a single work item. - * - * @param {number} id - The work item id - * @param {string[]} fields - Comma-separated list of requested fields - * @param {Date} asOf - AsOf UTC date time string - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. - * @param {string} project - Project ID or project name + * Retrieve a set of extensions based on their id's. The values should be the extension id's encoded as strings. */ - getWorkItem(id, fields, asOf, expand, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - let queryValues = { - fields: fields && fields.join(","), - asOf: asOf, - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["Id"] = 4] = "Id"; /** - * Returns a list of work items (Maximum 200) - * - * @param {number[]} ids - The comma-separated list of requested work item ids. (Maximum 200 ids allowed). - * @param {string[]} fields - Comma-separated list of requested fields - * @param {Date} asOf - AsOf UTC date time string - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. - * @param {WorkItemTrackingInterfaces.WorkItemErrorPolicy} errorPolicy - The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}. - * @param {string} project - Project ID or project name + * The category is unlike other filters. It is AND'd with the other filters instead of being a separate query. */ - getWorkItems(ids, fields, asOf, expand, errorPolicy, project) { - return __awaiter(this, void 0, void 0, function* () { - if (ids == null) { - throw new TypeError('ids can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - let queryValues = { - ids: ids && ids.join(","), - fields: fields && fields.join(","), - asOf: asOf, - '$expand': expand, - errorPolicy: errorPolicy, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["Category"] = 5] = "Category"; /** - * Updates a single work item. - * - * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the update - * @param {number} id - The id of the work item to update - * @param {string} project - Project ID or project name - * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item - * @param {boolean} bypassRules - Do not enforce the work item type rules on this update - * @param {boolean} suppressNotifications - Do not fire any notifications for this change - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * Certain contribution types may be indexed to allow for query by type. User defined types can't be indexed at the moment. */ - updateWorkItem(customHeaders, document, id, project, validateOnly, bypassRules, suppressNotifications, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - id: id - }; - let queryValues = { - validateOnly: validateOnly, - bypassRules: bypassRules, - suppressNotifications: suppressNotifications, - '$expand': expand, - }; - customHeaders = customHeaders || {}; - customHeaders["Content-Type"] = "application/json-patch+json"; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - options.additionalHeaders = customHeaders; - let res; - res = yield this.rest.update(url, document, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["ContributionType"] = 6] = "ContributionType"; /** - * Gets work items for a list of work item ids (Maximum 200) - * - * @param {WorkItemTrackingInterfaces.WorkItemBatchGetRequest} workItemGetRequest - * @param {string} project - Project ID or project name + * Retrieve an set extension based on the name based identifier. This differs from the internal id (which is being deprecated). */ - getWorkItemsBatch(workItemGetRequest, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "908509b6-4248-4475-a1cd-829139ba419f", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, workItemGetRequest, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["Name"] = 7] = "Name"; /** - * INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects - * - * @param {string[]} projectNames + * The InstallationTarget for an extension defines the target consumer for the extension. This may be something like VS, VSOnline, or VSCode */ - getWorkItemStateColors(projectNames) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "0b83df8a-3496-4ddb-ba44-63634f4cda61", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, projectNames, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTarget"] = 8] = "InstallationTarget"; /** - * Returns the next state on the given work item IDs. - * - * @param {number[]} ids - list of work item ids - * @param {string} action - possible actions. Currently only supports checkin + * Query for featured extensions, no value is allowed when using the query type. */ - getWorkItemNextStatesOnCheckinAction(ids, action) { - return __awaiter(this, void 0, void 0, function* () { - if (ids == null) { - throw new TypeError('ids can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - ids: ids && ids.join(","), - action: action, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "afae844b-e2f6-44c2-8053-17b3bb936a40", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["Featured"] = 9] = "Featured"; /** - * Get all work item type categories. - * - * @param {string} project - Project ID or project name + * The SearchText provided by the user to search for extensions */ - getWorkItemTypeCategories(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "9b9f5734-36c8-415e-ba67-f83b45c31408", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["SearchText"] = 10] = "SearchText"; /** - * Get specific work item type category by name. - * - * @param {string} project - Project ID or project name - * @param {string} category - The category name + * Query for extensions that are featured in their own category, The filterValue for this is name of category of extensions. */ - getWorkItemTypeCategory(project, category) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - category: category - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "9b9f5734-36c8-415e-ba67-f83b45c31408", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["FeaturedInCategory"] = 11] = "FeaturedInCategory"; /** - * INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects - * - * @param {string[]} projectNames + * When retrieving extensions from a query, exclude the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be excluded. In case of multiple flags to be specified, a logical OR of the interger values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. */ - getWorkItemTypeColors(projectNames) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "958fde80-115e-43fb-bd65-749c48057faf", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, projectNames, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["ExcludeWithFlags"] = 12] = "ExcludeWithFlags"; /** - * INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects - * - * @param {string[]} projectNames + * When retrieving extensions from a query, include the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included. */ - getWorkItemTypeColorAndIcons(projectNames) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f0f8dc62-3975-48ce-8051-f636b68b52e3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, projectNames, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["IncludeWithFlags"] = 13] = "IncludeWithFlags"; /** - * Returns a work item type definition. - * - * @param {string} project - Project ID or project name - * @param {string} type - Work item type name + * Filter the extensions based on the LCID values applicable. Any extensions which are not having any LCID values will also be filtered. This is currently only supported for VS extensions. */ - getWorkItemType(project, type) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - type: type - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["Lcid"] = 14] = "Lcid"; /** - * Returns the list of work item types - * - * @param {string} project - Project ID or project name + * Filter to provide the version of the installation target. This filter will be used along with InstallationTarget filter. The value should be a valid version string. Currently supported only if search text is provided. */ - getWorkItemTypes(project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTargetVersion"] = 15] = "InstallationTargetVersion"; /** - * Get a list of fields for a work item type with detailed references. - * - * @param {string} project - Project ID or project name - * @param {string} type - Work item type. - * @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. + * Filter type for specifying a range of installation target version. The filter will be used along with InstallationTarget filter. The value should be a pair of well formed version values separated by hyphen(-). Currently supported only if search text is provided. */ - getWorkItemTypeFieldsWithReferences(project, type, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - type: type - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "bd293ce5-3d25-4192-8e67-e8092e879efb", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTargetVersionRange"] = 16] = "InstallationTargetVersionRange"; /** - * Get a field for a work item type with detailed references. - * - * @param {string} project - Project ID or project name - * @param {string} type - Work item type. - * @param {string} field - * @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. + * Filter type for specifying metadata key and value to be used for filtering. */ - getWorkItemTypeFieldWithReferences(project, type, field, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - type: type, - field: field - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "bd293ce5-3d25-4192-8e67-e8092e879efb", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["VsixMetadata"] = 17] = "VsixMetadata"; /** - * Returns the state names and colors for a work item type. - * - * @param {string} project - Project ID or project name - * @param {string} type - The state name + * Filter to get extensions published by a publisher having supplied internal name */ - getWorkItemTypeStates(project, type) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - type: type - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "7c9d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["PublisherName"] = 18] = "PublisherName"; /** - * Export work item type - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} exportGlobalLists + * Filter to get extensions published by all publishers having supplied display name */ - exportWorkItemTypeDefinition(project, type, exportGlobalLists) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project, - type: type - }; - let queryValues = { - exportGlobalLists: exportGlobalLists, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "8637ac8b-5eb6-4f90-b3f7-4f2ff576a459", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["PublisherDisplayName"] = 19] = "PublisherDisplayName"; /** - * Add/updates a work item type - * - * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel - * @param {string} project - Project ID or project name + * When retrieving extensions from a query, include the extensions which have a publisher having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter There should be at most one filter of this type. This only acts as a restrictive filter after. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included. */ - updateWorkItemTypeDefinition(updateModel, project) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - project: project - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "8637ac8b-5eb6-4f90-b3f7-4f2ff576a459", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, updateModel, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } -} -WorkItemTrackingApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; -exports.WorkItemTrackingApi = WorkItemTrackingApi; - - -/***/ }), - -/***/ 8313: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const WorkItemTrackingProcessInterfaces = __nccwpck_require__(4524); -class WorkItemTrackingProcessApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-WorkItemTracking-api', options); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["IncludeWithPublisherFlags"] = 20] = "IncludeWithPublisherFlags"; /** - * Creates a single behavior in the given process. - * - * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest} behavior - * @param {string} processId - The ID of the process + * Filter to get extensions shared with particular organization */ - createProcessBehavior(behavior, processId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, behavior, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["OrganizationSharedWith"] = 21] = "OrganizationSharedWith"; /** - * Removes a behavior in the process. - * - * @param {string} processId - The ID of the process - * @param {string} behaviorRefName - The reference name of the behavior + * Filter to get VS IDE extensions by Product Architecture */ - deleteProcessBehavior(processId, behaviorRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - behaviorRefName: behaviorRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["ProductArchitecture"] = 22] = "ProductArchitecture"; /** - * Returns a behavior of the process. - * - * @param {string} processId - The ID of the process - * @param {string} behaviorRefName - The reference name of the behavior - * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand + * Filter to get VS Code extensions by target platform. */ - getProcessBehavior(processId, behaviorRefName, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - behaviorRefName: behaviorRefName - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["TargetPlatform"] = 23] = "TargetPlatform"; /** - * Returns a list of all behaviors in the process. - * - * @param {string} processId - The ID of the process - * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand + * Retrieve an extension based on the extensionName. */ - getProcessBehaviors(processId, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFilterType[ExtensionQueryFilterType["ExtensionName"] = 24] = "ExtensionName"; +})(ExtensionQueryFilterType = exports.ExtensionQueryFilterType || (exports.ExtensionQueryFilterType = {})); +/** + * Set of flags used to determine which set of information is retrieved when reading published extensions + */ +var ExtensionQueryFlags; +(function (ExtensionQueryFlags) { /** - * Replaces a behavior in the process. - * - * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest} behaviorData - * @param {string} processId - The ID of the process - * @param {string} behaviorRefName - The reference name of the behavior + * None is used to retrieve only the basic extension details. */ - updateProcessBehavior(behaviorData, processId, behaviorRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - behaviorRefName: behaviorRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, behaviorData, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["None"] = 0] = "None"; /** - * Creates a control in a group. - * - * @param {WorkItemTrackingProcessInterfaces.Control} control - The control. - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} groupId - The ID of the group to add the control to. + * IncludeVersions will return version information for extensions returned */ - createControlInGroup(control, processId, witRefName, groupId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - groupId: groupId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, control, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeVersions"] = 1] = "IncludeVersions"; /** - * Moves a control to a specified group. - * - * @param {WorkItemTrackingProcessInterfaces.Control} control - The control. - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} groupId - The ID of the group to move the control to. - * @param {string} controlId - The ID of the control. - * @param {string} removeFromGroupId - The group ID to remove the control from. + * IncludeFiles will return information about which files were found within the extension that were stored independent of the manifest. When asking for files, versions will be included as well since files are returned as a property of the versions. These files can be retrieved using the path to the file without requiring the entire manifest be downloaded. */ - moveControlToGroup(control, processId, witRefName, groupId, controlId, removeFromGroupId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - groupId: groupId, - controlId: controlId - }; - let queryValues = { - removeFromGroupId: removeFromGroupId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, control, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeFiles"] = 2] = "IncludeFiles"; /** - * Removes a control from the work item form. - * - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} groupId - The ID of the group. - * @param {string} controlId - The ID of the control to remove. + * Include the Categories and Tags that were added to the extension definition. */ - removeControlFromGroup(processId, witRefName, groupId, controlId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - groupId: groupId, - controlId: controlId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeCategoryAndTags"] = 4] = "IncludeCategoryAndTags"; /** - * Updates a control on the work item form. - * - * @param {WorkItemTrackingProcessInterfaces.Control} control - The updated control. - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} groupId - The ID of the group. - * @param {string} controlId - The ID of the control. + * Include the details about which accounts the extension has been shared with if the extension is a private extension. */ - updateControl(control, processId, witRefName, groupId, controlId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - groupId: groupId, - controlId: controlId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, control, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeSharedAccounts"] = 8] = "IncludeSharedAccounts"; /** - * Adds a field to a work item type. - * - * @param {WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest} field - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. + * Include properties associated with versions of the extension */ - addFieldToWorkItemType(field, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, field, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeVersionProperties"] = 16] = "IncludeVersionProperties"; /** - * Returns a list of all fields in a work item type. - * - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. + * Excluding non-validated extensions will remove any extension versions that either are in the process of being validated or have failed validation. */ - getAllWorkItemTypeFields(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["ExcludeNonValidated"] = 32] = "ExcludeNonValidated"; /** - * Returns a field in a work item type. - * - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} fieldRefName - The reference name of the field. - * @param {WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeFieldsExpandLevel} expand + * Include the set of installation targets the extension has requested. */ - getWorkItemTypeField(processId, witRefName, fieldRefName, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - fieldRefName: fieldRefName - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeInstallationTargets"] = 64] = "IncludeInstallationTargets"; + /** + * Include the base uri for assets of this extension + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeAssetUri"] = 128] = "IncludeAssetUri"; /** - * Removes a field from a work item type. Does not permanently delete the field. - * - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} fieldRefName - The reference name of the field. + * Include the statistics associated with this extension */ - removeWorkItemTypeField(processId, witRefName, fieldRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - fieldRefName: fieldRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeStatistics"] = 256] = "IncludeStatistics"; /** - * Updates a field in a work item type. - * - * @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest} field - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} fieldRefName - The reference name of the field. + * When retrieving versions from a query, only include the latest version of the extensions that matched. This is useful when the caller doesn't need all the published versions. It will save a significant size in the returned payload. */ - updateWorkItemTypeField(field, processId, witRefName, fieldRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - fieldRefName: fieldRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, field, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeLatestVersionOnly"] = 512] = "IncludeLatestVersionOnly"; /** - * Adds a group to the work item form. - * - * @param {WorkItemTrackingProcessInterfaces.Group} group - The group. - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} pageId - The ID of the page to add the group to. - * @param {string} sectionId - The ID of the section to add the group to. + * This flag switches the asset uri to use GetAssetByName instead of CDN When this is used, values of base asset uri and base asset uri fallback are switched When this is used, source of asset files are pointed to Gallery service always even if CDN is available */ - addGroup(group, processId, witRefName, pageId, sectionId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, group, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["UseFallbackAssetUri"] = 1024] = "UseFallbackAssetUri"; /** - * Moves a group to a different page and section. - * - * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} pageId - The ID of the page the group is in. - * @param {string} sectionId - The ID of the section the group is i.n - * @param {string} groupId - The ID of the group. - * @param {string} removeFromPageId - ID of the page to remove the group from. - * @param {string} removeFromSectionId - ID of the section to remove the group from. + * This flag is used to get all the metadata values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal. */ - moveGroupToPage(group, processId, witRefName, pageId, sectionId, groupId, removeFromPageId, removeFromSectionId) { - return __awaiter(this, void 0, void 0, function* () { - if (removeFromPageId == null) { - throw new TypeError('removeFromPageId can not be null or undefined'); - } - if (removeFromSectionId == null) { - throw new TypeError('removeFromSectionId can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId, - groupId: groupId - }; - let queryValues = { - removeFromPageId: removeFromPageId, - removeFromSectionId: removeFromSectionId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, group, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeMetadata"] = 2048] = "IncludeMetadata"; /** - * Moves a group to a different section. - * - * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} pageId - The ID of the page the group is in. - * @param {string} sectionId - The ID of the section the group is in. - * @param {string} groupId - The ID of the group. - * @param {string} removeFromSectionId - ID of the section to remove the group from. + * This flag is used to indicate to return very small data for extension required by VS IDE. This flag is only compatible when querying is done by VS IDE */ - moveGroupToSection(group, processId, witRefName, pageId, sectionId, groupId, removeFromSectionId) { - return __awaiter(this, void 0, void 0, function* () { - if (removeFromSectionId == null) { - throw new TypeError('removeFromSectionId can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId, - groupId: groupId - }; - let queryValues = { - removeFromSectionId: removeFromSectionId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, group, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeMinimalPayloadForVsIde"] = 4096] = "IncludeMinimalPayloadForVsIde"; /** - * Removes a group from the work item form. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} pageId - The ID of the page the group is in - * @param {string} sectionId - The ID of the section to the group is in - * @param {string} groupId - The ID of the group + * This flag is used to get Lcid values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal */ - removeGroup(processId, witRefName, pageId, sectionId, groupId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId, - groupId: groupId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeLcids"] = 8192] = "IncludeLcids"; /** - * Updates a group in the work item form. - * - * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} pageId - The ID of the page the group is in. - * @param {string} sectionId - The ID of the section the group is in. - * @param {string} groupId - The ID of the group. + * Include the details about which organizations the extension has been shared with if the extension is a private extension. */ - updateGroup(group, processId, witRefName, pageId, sectionId, groupId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId, - groupId: groupId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, group, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeSharedOrganizations"] = 16384] = "IncludeSharedOrganizations"; /** - * Gets the form layout. - * - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. + * Include the details if an extension is in conflict list or not Currently being used for VSCode extensions. */ - getFormLayout(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "fa8646eb-43cd-4b71-9564-40106fd63e40", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.FormLayout, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["IncludeNameConflictInfo"] = 32768] = "IncludeNameConflictInfo"; /** - * Creates a picklist. - * - * @param {WorkItemTrackingProcessInterfaces.PickList} picklist - Picklist + * AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required. */ - createList(picklist) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, picklist, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionQueryFlags[ExtensionQueryFlags["AllAttributes"] = 16863] = "AllAttributes"; +})(ExtensionQueryFlags = exports.ExtensionQueryFlags || (exports.ExtensionQueryFlags = {})); +var ExtensionStatisticOperation; +(function (ExtensionStatisticOperation) { + ExtensionStatisticOperation[ExtensionStatisticOperation["None"] = 0] = "None"; + ExtensionStatisticOperation[ExtensionStatisticOperation["Set"] = 1] = "Set"; + ExtensionStatisticOperation[ExtensionStatisticOperation["Increment"] = 2] = "Increment"; + ExtensionStatisticOperation[ExtensionStatisticOperation["Decrement"] = 3] = "Decrement"; + ExtensionStatisticOperation[ExtensionStatisticOperation["Delete"] = 4] = "Delete"; +})(ExtensionStatisticOperation = exports.ExtensionStatisticOperation || (exports.ExtensionStatisticOperation = {})); +/** + * Stats aggregation type + */ +var ExtensionStatsAggregateType; +(function (ExtensionStatsAggregateType) { + ExtensionStatsAggregateType[ExtensionStatsAggregateType["Daily"] = 1] = "Daily"; +})(ExtensionStatsAggregateType = exports.ExtensionStatsAggregateType || (exports.ExtensionStatsAggregateType = {})); +/** + * Set of flags that can be associated with a given extension version. These flags apply to a specific version of the extension. + */ +var ExtensionVersionFlags; +(function (ExtensionVersionFlags) { /** - * Removes a picklist. - * - * @param {string} listId - The ID of the list + * No flags exist for this version. */ - deleteList(listId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - listId: listId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionVersionFlags[ExtensionVersionFlags["None"] = 0] = "None"; /** - * Returns a picklist. - * - * @param {string} listId - The ID of the list + * The Validated flag for a version means the extension version has passed validation and can be used.. */ - getList(listId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - listId: listId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ExtensionVersionFlags[ExtensionVersionFlags["Validated"] = 1] = "Validated"; +})(ExtensionVersionFlags = exports.ExtensionVersionFlags || (exports.ExtensionVersionFlags = {})); +/** + * Type of event + */ +var NotificationTemplateType; +(function (NotificationTemplateType) { /** - * Returns meta data of the picklist. - * + * Template type for Review Notification. */ - getListsMetadata() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + NotificationTemplateType[NotificationTemplateType["ReviewNotification"] = 1] = "ReviewNotification"; /** - * Updates a list. - * - * @param {WorkItemTrackingProcessInterfaces.PickList} picklist - * @param {string} listId - The ID of the list + * Template type for Qna Notification. */ - updateList(picklist, listId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - listId: listId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, picklist, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + NotificationTemplateType[NotificationTemplateType["QnaNotification"] = 2] = "QnaNotification"; /** - * Adds a page to the work item form. - * - * @param {WorkItemTrackingProcessInterfaces.Page} page - The page. - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. + * Template type for Customer Contact Notification. */ - addPage(page, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, page, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.Page, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + NotificationTemplateType[NotificationTemplateType["CustomerContactNotification"] = 3] = "CustomerContactNotification"; /** - * Removes a page from the work item form - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} pageId - The ID of the page + * Template type for Publisher Member Notification. */ - removePage(processId, witRefName, pageId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + NotificationTemplateType[NotificationTemplateType["PublisherMemberUpdateNotification"] = 4] = "PublisherMemberUpdateNotification"; +})(NotificationTemplateType = exports.NotificationTemplateType || (exports.NotificationTemplateType = {})); +/** + * PagingDirection is used to define which set direction to move the returned result set based on a previous query. + */ +var PagingDirection; +(function (PagingDirection) { /** - * Updates a page on the work item form - * - * @param {WorkItemTrackingProcessInterfaces.Page} page - The page - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * Backward will return results from earlier in the resultset. */ - updatePage(page, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, page, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.Page, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PagingDirection[PagingDirection["Backward"] = 1] = "Backward"; /** - * Creates a process. - * - * @param {WorkItemTrackingProcessInterfaces.CreateProcessModel} createRequest - CreateProcessModel. + * Forward will return results from later in the resultset. */ - createNewProcess(createRequest) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, createRequest, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PagingDirection[PagingDirection["Forward"] = 2] = "Forward"; +})(PagingDirection = exports.PagingDirection || (exports.PagingDirection = {})); +/** + * Set of flags that can be associated with a given extension. These flags apply to all versions of the extension and not to a specific version. + */ +var PublishedExtensionFlags; +(function (PublishedExtensionFlags) { /** - * Removes a process of a specific ID. - * - * @param {string} processTypeId + * No flags exist for this extension. */ - deleteProcessById(processTypeId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processTypeId: processTypeId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["None"] = 0] = "None"; /** - * Edit a process of a specific ID. - * - * @param {WorkItemTrackingProcessInterfaces.UpdateProcessModel} updateRequest - * @param {string} processTypeId + * The Disabled flag for an extension means the extension can't be changed and won't be used by consumers. The disabled flag is managed by the service and can't be supplied by the Extension Developers. */ - editProcess(updateRequest, processTypeId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processTypeId: processTypeId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, updateRequest, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Disabled"] = 1] = "Disabled"; /** - * Get list of all processes including system and inherited. - * - * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand + * BuiltIn Extension are available to all Tenants. An explicit registration is not required. This attribute is reserved and can't be supplied by Extension Developers. BuiltIn extensions are by definition Public. There is no need to set the public flag for extensions marked BuiltIn. */ - getListOfProcesses(expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["BuiltIn"] = 2] = "BuiltIn"; /** - * Get a single process of a specified ID. - * - * @param {string} processTypeId - * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand + * This extension has been validated by the service. The extension meets the requirements specified. This attribute is reserved and can't be supplied by the Extension Developers. Validation is a process that ensures that all contributions are well formed. They meet the requirements defined by the contribution type they are extending. Note this attribute will be updated asynchronously as the extension is validated by the developer of the contribution type. There will be restricted access to the extension while this process is performed. */ - getProcessByItsId(processTypeId, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processTypeId: processTypeId - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Validated"] = 4] = "Validated"; /** - * Adds a rule to work item type in the process. - * - * @param {WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest} processRuleCreate - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. */ - addProcessWorkItemTypeRule(processRuleCreate, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, processRuleCreate, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Trusted"] = 8] = "Trusted"; /** - * Removes a rule from the work item type in the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} ruleId - The ID of the rule + * The Paid flag indicates that the commerce can be enabled for this extension. Publisher needs to setup Offer/Pricing plan in Azure. If Paid flag is set and a corresponding Offer is not available, the extension will automatically be marked as Preview. If the publisher intends to make the extension Paid in the future, it is mandatory to set the Preview flag. This is currently available only for VSTS extensions only. */ - deleteProcessWorkItemTypeRule(processId, witRefName, ruleId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - ruleId: ruleId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Paid"] = 16] = "Paid"; /** - * Returns a single rule in the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} ruleId - The ID of the rule + * This extension registration is public, making its visibility open to the public. This means all tenants have the ability to install this extension. Without this flag the extension will be private and will need to be shared with the tenants that can install it. */ - getProcessWorkItemTypeRule(processId, witRefName, ruleId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - ruleId: ruleId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Public"] = 256] = "Public"; /** - * Returns a list of all rules in the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * This extension has multiple versions active at one time and version discovery should be done using the defined "Version Discovery" protocol to determine the version available to a specific user or tenant. @TODO: Link to Version Discovery Protocol. */ - getProcessWorkItemTypeRules(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["MultiVersion"] = 512] = "MultiVersion"; /** - * Updates a rule in the work item type of the process. - * - * @param {WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest} processRule - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} ruleId - The ID of the rule + * The system flag is reserved, and cant be used by publishers. */ - updateProcessWorkItemTypeRule(processRule, processId, witRefName, ruleId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - ruleId: ruleId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, processRule, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["System"] = 1024] = "System"; /** - * Creates a state definition in the work item type of the process. - * - * @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * The Preview flag indicates that the extension is still under preview (not yet of "release" quality). These extensions may be decorated differently in the gallery and may have different policies applied to them. */ - createStateDefinition(stateModel, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, stateModel, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Preview"] = 2048] = "Preview"; /** - * Removes a state definition in the work item type of the process. - * - * @param {string} processId - ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} stateId - ID of the state + * The Unpublished flag indicates that the extension can't be installed/downloaded. Users who have installed such an extension can continue to use the extension. */ - deleteStateDefinition(processId, witRefName, stateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - stateId: stateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Unpublished"] = 4096] = "Unpublished"; /** - * Returns a single state definition in a work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} stateId - The ID of the state + * The Trial flag indicates that the extension is in Trial version. The flag is right now being used only with respect to Visual Studio extensions. */ - getStateDefinition(processId, witRefName, stateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - stateId: stateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Trial"] = 8192] = "Trial"; /** - * Returns a list of all state definitions in a work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * The Locked flag indicates that extension has been locked from Marketplace. Further updates/acquisitions are not allowed on the extension until this is present. This should be used along with making the extension private/unpublished. */ - getStateDefinitions(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Locked"] = 16384] = "Locked"; /** - * Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden. - * - * @param {WorkItemTrackingProcessInterfaces.HideStateModel} hideStateModel - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} stateId - The ID of the state + * This flag is set for extensions we want to hide from Marketplace home and search pages. This will be used to override the exposure of builtIn flags. */ - hideStateDefinition(hideStateModel, processId, witRefName, stateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - stateId: stateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, hideStateModel, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublishedExtensionFlags[PublishedExtensionFlags["Hidden"] = 32768] = "Hidden"; +})(PublishedExtensionFlags = exports.PublishedExtensionFlags || (exports.PublishedExtensionFlags = {})); +var PublisherFlags; +(function (PublisherFlags) { /** - * Updates a given state definition in the work item type of the process. - * - * @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel - * @param {string} processId - ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} stateId - ID of the state + * This should never be returned, it is used to represent a publisher who's flags haven't changed during update calls. */ - updateStateDefinition(stateModel, processId, witRefName, stateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - stateId: stateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, stateModel, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherFlags[PublisherFlags["UnChanged"] = 1073741824] = "UnChanged"; + /** + * No flags exist for this publisher. + */ + PublisherFlags[PublisherFlags["None"] = 0] = "None"; + /** + * The Disabled flag for a publisher means the publisher can't be changed and won't be used by consumers, this extends to extensions owned by the publisher as well. The disabled flag is managed by the service and can't be supplied by the Extension Developers. + */ + PublisherFlags[PublisherFlags["Disabled"] = 1] = "Disabled"; + /** + * A verified publisher is one that Microsoft has done some review of and ensured the publisher meets a set of requirements. The requirements to become a verified publisher are not listed here. They can be found in public documentation (TBD). + */ + PublisherFlags[PublisherFlags["Verified"] = 2] = "Verified"; + /** + * A Certified publisher is one that is Microsoft verified and in addition meets a set of requirements for its published extensions. The requirements to become a certified publisher are not listed here. They can be found in public documentation (TBD). + */ + PublisherFlags[PublisherFlags["Certified"] = 4] = "Certified"; + /** + * This is the set of flags that can't be supplied by the developer and is managed by the service itself. + */ + PublisherFlags[PublisherFlags["ServiceFlags"] = 7] = "ServiceFlags"; +})(PublisherFlags = exports.PublisherFlags || (exports.PublisherFlags = {})); +var PublisherPermissions; +(function (PublisherPermissions) { + /** + * This gives the bearer the rights to read Publishers and Extensions. + */ + PublisherPermissions[PublisherPermissions["Read"] = 1] = "Read"; /** - * Deletes a system control modification on the work item form. - * - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} controlId - The ID of the control. + * This gives the bearer the rights to update, delete, and share Extensions (but not the ability to create them). */ - deleteSystemControl(processId, witRefName, controlId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - controlId: controlId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["UpdateExtension"] = 2] = "UpdateExtension"; /** - * Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s) - * - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. + * This gives the bearer the rights to create new Publishers at the root of the namespace. */ - getSystemControls(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["CreatePublisher"] = 4] = "CreatePublisher"; /** - * Updates/adds a system control on the work item form. - * - * @param {WorkItemTrackingProcessInterfaces.Control} control - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. - * @param {string} controlId - The ID of the control. + * This gives the bearer the rights to create new Extensions within a publisher. */ - updateSystemControl(control, processId, witRefName, controlId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - controlId: controlId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, control, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["PublishExtension"] = 8] = "PublishExtension"; /** - * Creates a work item type in the process. - * - * @param {WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest} workItemType - * @param {string} processId - The ID of the process on which to create work item type. + * Admin gives the bearer the rights to manage restricted attributes of Publishers and Extensions. */ - createProcessWorkItemType(workItemType, processId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, workItemType, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["Admin"] = 16] = "Admin"; /** - * Removes a work item type in the process. - * - * @param {string} processId - The ID of the process. - * @param {string} witRefName - The reference name of the work item type. + * TrustedPartner gives the bearer the rights to publish a extensions with restricted capabilities. */ - deleteProcessWorkItemType(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["TrustedPartner"] = 32] = "TrustedPartner"; /** - * Returns a single work item type in a process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return + * PrivateRead is another form of read designed to allow higher privilege accessors the ability to read private extensions. */ - getProcessWorkItemType(processId, witRefName, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["PrivateRead"] = 64] = "PrivateRead"; /** - * Returns a list of all work item types in a process. - * - * @param {string} processId - The ID of the process - * @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return + * This gives the bearer the rights to delete any extension. */ - getProcessWorkItemTypes(processId, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["DeleteExtension"] = 128] = "DeleteExtension"; /** - * Updates a work item type of the process. - * - * @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest} workItemTypeUpdate - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * This gives the bearer the rights edit the publisher settings. */ - updateProcessWorkItemType(workItemTypeUpdate, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, workItemTypeUpdate, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["EditSettings"] = 256] = "EditSettings"; /** - * Adds a behavior to the work item type of the process. - * - * @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * This gives the bearer the rights to see all permissions on the publisher. */ - addBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, behavior, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["ViewPermissions"] = 512] = "ViewPermissions"; /** - * Returns a behavior for the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior - * @param {string} behaviorRefName - The reference name of the behavior + * This gives the bearer the rights to assign permissions on the publisher. */ - getBehaviorForWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors, - behaviorRefName: behaviorRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["ManagePermissions"] = 1024] = "ManagePermissions"; /** - * Returns a list of all behaviors for the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * This gives the bearer the rights to delete the publisher. */ - getBehaviorsForWorkItemType(processId, witRefNameForBehaviors) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherPermissions[PublisherPermissions["DeletePublisher"] = 2048] = "DeletePublisher"; +})(PublisherPermissions = exports.PublisherPermissions || (exports.PublisherPermissions = {})); +/** + * Set of flags used to define the attributes requested when a publisher is returned. Some API's allow the caller to specify the level of detail needed. + */ +var PublisherQueryFlags; +(function (PublisherQueryFlags) { /** - * Removes a behavior for the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior - * @param {string} behaviorRefName - The reference name of the behavior + * None is used to retrieve only the basic publisher details. */ - removeBehaviorFromWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors, - behaviorRefName: behaviorRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherQueryFlags[PublisherQueryFlags["None"] = 0] = "None"; /** - * Updates a behavior for the work item type of the process. - * - * @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * Is used to include a list of basic extension details for all extensions published by the requested publisher. */ - updateBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, behavior, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } -} -WorkItemTrackingProcessApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; -exports.WorkItemTrackingProcessApi = WorkItemTrackingProcessApi; - - -/***/ }), - -/***/ 3333: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- + PublisherQueryFlags[PublisherQueryFlags["IncludeExtensions"] = 1] = "IncludeExtensions"; + /** + * Is used to include email address of all the users who are marked as owners for the publisher + */ + PublisherQueryFlags[PublisherQueryFlags["IncludeEmailAddress"] = 2] = "IncludeEmailAddress"; +})(PublisherQueryFlags = exports.PublisherQueryFlags || (exports.PublisherQueryFlags = {})); +/** + * Access definition for a RoleAssignment. */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const basem = __nccwpck_require__(273); -const WorkItemTrackingProcessDefinitionsInterfaces = __nccwpck_require__(1655); -class WorkItemTrackingProcessDefinitionsApi extends basem.ClientApiBase { - constructor(baseUrl, handlers, options) { - super(baseUrl, handlers, 'node-WorkItemTracking-api', options); - } +var PublisherRoleAccess; +(function (PublisherRoleAccess) { /** - * Creates a single behavior in the given process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel} behavior - * @param {string} processId - The ID of the process + * Access has been explicitly set. */ - createBehavior(behavior, processId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, behavior, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherRoleAccess[PublisherRoleAccess["Assigned"] = 1] = "Assigned"; /** - * Removes a behavior in the process. - * - * @param {string} processId - The ID of the process - * @param {string} behaviorId - The ID of the behavior + * Access has been inherited from a higher scope. */ - deleteBehavior(processId, behaviorId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - behaviorId: behaviorId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherRoleAccess[PublisherRoleAccess["Inherited"] = 2] = "Inherited"; +})(PublisherRoleAccess = exports.PublisherRoleAccess || (exports.PublisherRoleAccess = {})); +var PublisherState; +(function (PublisherState) { /** - * Returns a single behavior in the process. - * - * @param {string} processId - The ID of the process - * @param {string} behaviorId - The ID of the behavior + * No state exists for this publisher. */ - getBehavior(processId, behaviorId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - behaviorId: behaviorId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherState[PublisherState["None"] = 0] = "None"; /** - * Returns a list of all behaviors in the process. - * - * @param {string} processId - The ID of the process + * This state indicates that publisher has applied for Marketplace verification (via UI) and still not been certified. This state would be reset once the publisher is verified. */ - getBehaviors(processId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherState[PublisherState["VerificationPending"] = 1] = "VerificationPending"; /** - * Replaces a behavior in the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel} behaviorData - * @param {string} processId - The ID of the process - * @param {string} behaviorId - The ID of the behavior + * This state indicates that publisher has applied for Marketplace certification (via UI) and still not been certified. This state would be reset once the publisher is certified. */ - replaceBehavior(behaviorData, processId, behaviorId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - behaviorId: behaviorId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, behaviorData, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherState[PublisherState["CertificationPending"] = 2] = "CertificationPending"; /** - * Creates a control in a group - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} groupId - The ID of the group to add the control to + * This state indicates that publisher had applied for Marketplace certification (via UI) but his/her certification got rejected. This state would be reset if and when the publisher is certified. */ - addControlToGroup(control, processId, witRefName, groupId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - groupId: groupId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, control, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherState[PublisherState["CertificationRejected"] = 4] = "CertificationRejected"; /** - * Updates a control on the work item form - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The updated control - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} groupId - The ID of the group - * @param {string} controlId - The ID of the control + * This state indicates that publisher was certified on the Marketplace, but his/her certification got revoked. This state would never be reset, even after publisher gets re-certified. It would indicate that the publisher certification was revoked at least once. */ - editControl(control, processId, witRefName, groupId, controlId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - groupId: groupId, - controlId: controlId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, control, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + PublisherState[PublisherState["CertificationRevoked"] = 8] = "CertificationRevoked"; +})(PublisherState = exports.PublisherState || (exports.PublisherState = {})); +/** + * Denotes the status of the QnA Item + */ +var QnAItemStatus; +(function (QnAItemStatus) { + QnAItemStatus[QnAItemStatus["None"] = 0] = "None"; /** - * Removes a control from the work item form - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} groupId - The ID of the group - * @param {string} controlId - The ID of the control to remove + * The UserEditable flag indicates whether the item is editable by the logged in user. */ - removeControlFromGroup(processId, witRefName, groupId, controlId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - groupId: groupId, - controlId: controlId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + QnAItemStatus[QnAItemStatus["UserEditable"] = 1] = "UserEditable"; /** - * Moves a control to a new group - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} groupId - The ID of the group to move the control to - * @param {string} controlId - The id of the control - * @param {string} removeFromGroupId - The group to remove the control from + * The PublisherCreated flag indicates whether the item has been created by extension publisher. */ - setControlInGroup(control, processId, witRefName, groupId, controlId, removeFromGroupId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - groupId: groupId, - controlId: controlId - }; - let queryValues = { - removeFromGroupId: removeFromGroupId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, control, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + QnAItemStatus[QnAItemStatus["PublisherCreated"] = 2] = "PublisherCreated"; +})(QnAItemStatus = exports.QnAItemStatus || (exports.QnAItemStatus = {})); +/** + * The status of a REST Api response status. + */ +var RestApiResponseStatus; +(function (RestApiResponseStatus) { /** - * Creates a single field in the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldModel} field - * @param {string} processId - The ID of the process + * The operation is completed. */ - createField(field, processId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "f36c66c7-911d-4163-8938-d3c5d0d7f5aa", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, field, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FieldModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + RestApiResponseStatus[RestApiResponseStatus["Completed"] = 0] = "Completed"; /** - * Updates a given field in the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate} field - * @param {string} processId - The ID of the process + * The operation is failed. */ - updateField(field, processId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "f36c66c7-911d-4163-8938-d3c5d0d7f5aa", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, field, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FieldModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + RestApiResponseStatus[RestApiResponseStatus["Failed"] = 1] = "Failed"; /** - * Adds a group to the work item form - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The group - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} pageId - The ID of the page to add the group to - * @param {string} sectionId - The ID of the section to add the group to + * The operation is in progress. */ - addGroup(group, processId, witRefName, pageId, sectionId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, group, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + RestApiResponseStatus[RestApiResponseStatus["Inprogress"] = 2] = "Inprogress"; /** - * Updates a group in the work item form - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} pageId - The ID of the page the group is in - * @param {string} sectionId - The ID of the section the group is in - * @param {string} groupId - The ID of the group + * The operation is in skipped. */ - editGroup(group, processId, witRefName, pageId, sectionId, groupId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId, - groupId: groupId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, group, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + RestApiResponseStatus[RestApiResponseStatus["Skipped"] = 3] = "Skipped"; +})(RestApiResponseStatus = exports.RestApiResponseStatus || (exports.RestApiResponseStatus = {})); +/** + * Type of operation + */ +var ReviewEventOperation; +(function (ReviewEventOperation) { + ReviewEventOperation[ReviewEventOperation["Create"] = 1] = "Create"; + ReviewEventOperation[ReviewEventOperation["Update"] = 2] = "Update"; + ReviewEventOperation[ReviewEventOperation["Delete"] = 3] = "Delete"; +})(ReviewEventOperation = exports.ReviewEventOperation || (exports.ReviewEventOperation = {})); +/** + * Options to GetReviews query + */ +var ReviewFilterOptions; +(function (ReviewFilterOptions) { /** - * Removes a group from the work item form - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} pageId - The ID of the page the group is in - * @param {string} sectionId - The ID of the section to the group is in - * @param {string} groupId - The ID of the group + * No filtering, all reviews are returned (default option) */ - removeGroup(processId, witRefName, pageId, sectionId, groupId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId, - groupId: groupId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ReviewFilterOptions[ReviewFilterOptions["None"] = 0] = "None"; /** - * Moves a group to a different page and section - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} pageId - The ID of the page the group is in - * @param {string} sectionId - The ID of the section the group is in - * @param {string} groupId - The ID of the group - * @param {string} removeFromPageId - ID of the page to remove the group from - * @param {string} removeFromSectionId - ID of the section to remove the group from + * Filter out review items with empty review text */ - setGroupInPage(group, processId, witRefName, pageId, sectionId, groupId, removeFromPageId, removeFromSectionId) { - return __awaiter(this, void 0, void 0, function* () { - if (removeFromPageId == null) { - throw new TypeError('removeFromPageId can not be null or undefined'); - } - if (removeFromSectionId == null) { - throw new TypeError('removeFromSectionId can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId, - groupId: groupId - }; - let queryValues = { - removeFromPageId: removeFromPageId, - removeFromSectionId: removeFromSectionId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, group, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ReviewFilterOptions[ReviewFilterOptions["FilterEmptyReviews"] = 1] = "FilterEmptyReviews"; /** - * Moves a group to a different section - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} pageId - The ID of the page the group is in - * @param {string} sectionId - The ID of the section the group is in - * @param {string} groupId - The ID of the group - * @param {string} removeFromSectionId - ID of the section to remove the group from + * Filter out review items with empty usernames */ - setGroupInSection(group, processId, witRefName, pageId, sectionId, groupId, removeFromSectionId) { - return __awaiter(this, void 0, void 0, function* () { - if (removeFromSectionId == null) { - throw new TypeError('removeFromSectionId can not be null or undefined'); - } - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId, - sectionId: sectionId, - groupId: groupId - }; - let queryValues = { - removeFromSectionId: removeFromSectionId, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, group, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ReviewFilterOptions[ReviewFilterOptions["FilterEmptyUserNames"] = 2] = "FilterEmptyUserNames"; +})(ReviewFilterOptions = exports.ReviewFilterOptions || (exports.ReviewFilterOptions = {})); +/** + * Denotes the patch operation type + */ +var ReviewPatchOperation; +(function (ReviewPatchOperation) { /** - * Gets the form layout - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * Flag a review */ - getFormLayout(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "3eacc80a-ddca-4404-857a-6331aac99063", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FormLayout, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ReviewPatchOperation[ReviewPatchOperation["FlagReview"] = 1] = "FlagReview"; + /** + * Update an existing review + */ + ReviewPatchOperation[ReviewPatchOperation["UpdateReview"] = 2] = "UpdateReview"; + /** + * Submit a reply for a review + */ + ReviewPatchOperation[ReviewPatchOperation["ReplyToReview"] = 3] = "ReplyToReview"; + /** + * Submit an admin response + */ + ReviewPatchOperation[ReviewPatchOperation["AdminResponseForReview"] = 4] = "AdminResponseForReview"; + /** + * Delete an Admin Reply + */ + ReviewPatchOperation[ReviewPatchOperation["DeleteAdminReply"] = 5] = "DeleteAdminReply"; /** - * Returns meta data of the picklist. - * + * Delete Publisher Reply */ - getListsMetadata() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "b45cc931-98e3-44a1-b1cd-2e8e9c6dc1c6", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + ReviewPatchOperation[ReviewPatchOperation["DeletePublisherReply"] = 6] = "DeletePublisherReply"; +})(ReviewPatchOperation = exports.ReviewPatchOperation || (exports.ReviewPatchOperation = {})); +/** + * Type of event + */ +var ReviewResourceType; +(function (ReviewResourceType) { + ReviewResourceType[ReviewResourceType["Review"] = 1] = "Review"; + ReviewResourceType[ReviewResourceType["PublisherReply"] = 2] = "PublisherReply"; + ReviewResourceType[ReviewResourceType["AdminReply"] = 3] = "AdminReply"; +})(ReviewResourceType = exports.ReviewResourceType || (exports.ReviewResourceType = {})); +/** + * Defines the sort order that can be defined for Extensions query + */ +var SortByType; +(function (SortByType) { /** - * Creates a picklist. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist + * The results will be sorted by relevance in case search query is given, if no search query resutls will be provided as is */ - createList(picklist) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = {}; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, picklist, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["Relevance"] = 0] = "Relevance"; /** - * Removes a picklist. - * - * @param {string} listId - The ID of the list + * The results will be sorted as per Last Updated date of the extensions with recently updated at the top */ - deleteList(listId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - listId: listId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["LastUpdatedDate"] = 1] = "LastUpdatedDate"; /** - * Returns a picklist. - * - * @param {string} listId - The ID of the list + * Results will be sorted Alphabetically as per the title of the extension */ - getList(listId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - listId: listId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["Title"] = 2] = "Title"; /** - * Updates a list. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist - * @param {string} listId - The ID of the list + * Results will be sorted Alphabetically as per Publisher title */ - updateList(picklist, listId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - listId: listId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, picklist, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["Publisher"] = 3] = "Publisher"; /** - * Adds a page to the work item form - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * Results will be sorted by Install Count */ - addPage(page, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, page, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.Page, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["InstallCount"] = 4] = "InstallCount"; /** - * Updates a page on the work item form - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * The results will be sorted as per Published date of the extensions */ - editPage(page, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, page, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.Page, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["PublishedDate"] = 5] = "PublishedDate"; /** - * Removes a page from the work item form - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} pageId - The ID of the page + * The results will be sorted as per Average ratings of the extensions */ - removePage(processId, witRefName, pageId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - pageId: pageId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["AverageRating"] = 6] = "AverageRating"; /** - * Creates a state definition in the work item type of the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * The results will be sorted as per Trending Daily Score of the extensions */ - createStateDefinition(stateModel, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, stateModel, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["TrendingDaily"] = 7] = "TrendingDaily"; /** - * Removes a state definition in the work item type of the process. - * - * @param {string} processId - ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} stateId - ID of the state + * The results will be sorted as per Trending weekly Score of the extensions */ - deleteStateDefinition(processId, witRefName, stateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - stateId: stateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["TrendingWeekly"] = 8] = "TrendingWeekly"; /** - * Returns a state definition in the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} stateId - The ID of the state + * The results will be sorted as per Trending monthly Score of the extensions */ - getStateDefinition(processId, witRefName, stateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - stateId: stateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["TrendingMonthly"] = 9] = "TrendingMonthly"; /** - * Returns a list of all state definitions in the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type + * The results will be sorted as per ReleaseDate of the extensions (date on which the extension first went public) */ - getStateDefinitions(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["ReleaseDate"] = 10] = "ReleaseDate"; /** - * Hides a state definition in the work item type of the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel} hideStateModel - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} stateId - The ID of the state + * The results will be sorted as per Author defined in the VSix/Metadata. If not defined, publisher name is used This is specifically needed by VS IDE, other (new and old) clients are not encouraged to use this */ - hideStateDefinition(hideStateModel, processId, witRefName, stateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - stateId: stateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.replace(url, hideStateModel, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["Author"] = 11] = "Author"; /** - * Updates a given state definition in the work item type of the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel - * @param {string} processId - ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {string} stateId - ID of the state + * The results will be sorted as per Weighted Rating of the extension. */ - updateStateDefinition(stateModel, processId, witRefName, stateId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName, - stateId: stateId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, stateModel, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortByType[SortByType["WeightedRating"] = 12] = "WeightedRating"; +})(SortByType = exports.SortByType || (exports.SortByType = {})); +/** + * Defines the sort order that can be defined for Extensions query + */ +var SortOrderType; +(function (SortOrderType) { /** - * Adds a behavior to the work item type of the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * Results will be sorted in the default order as per the sorting type defined. The default varies for each type, e.g. for Relevance, default is Descending, for Title default is Ascending etc. */ - addBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, behavior, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); - } + SortOrderType[SortOrderType["Default"] = 0] = "Default"; /** - * Returns a behavior for the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior - * @param {string} behaviorRefName - The reference name of the behavior + * The results will be sorted in Ascending order */ - getBehaviorForWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors, - behaviorRefName: behaviorRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); + SortOrderType[SortOrderType["Ascending"] = 1] = "Ascending"; + /** + * The results will be sorted in Descending order + */ + SortOrderType[SortOrderType["Descending"] = 2] = "Descending"; +})(SortOrderType = exports.SortOrderType || (exports.SortOrderType = {})); +var VSCodeWebExtensionStatisicsType; +(function (VSCodeWebExtensionStatisicsType) { + VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Install"] = 1] = "Install"; + VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Update"] = 2] = "Update"; + VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Uninstall"] = 3] = "Uninstall"; +})(VSCodeWebExtensionStatisicsType = exports.VSCodeWebExtensionStatisicsType || (exports.VSCodeWebExtensionStatisicsType = {})); +exports.TypeInfo = { + AcquisitionAssignmentType: { + enumValues: { + "none": 0, + "me": 1, + "all": 2 + } + }, + AcquisitionOperation: {}, + AcquisitionOperationState: { + enumValues: { + "disallow": 0, + "allow": 1, + "completed": 3 + } + }, + AcquisitionOperationType: { + enumValues: { + "get": 0, + "install": 1, + "buy": 2, + "try": 3, + "request": 4, + "none": 5, + "purchaseRequest": 6 + } + }, + AcquisitionOptions: {}, + AzureRestApiResponseModel: {}, + Concern: {}, + ConcernCategory: { + enumValues: { + "general": 1, + "abusive": 2, + "spam": 4 + } + }, + CustomerLastContact: {}, + CustomerSupportRequest: {}, + DraftPatchOperation: { + enumValues: { + "publish": 1, + "cancel": 2 + } + }, + DraftStateType: { + enumValues: { + "unpublished": 1, + "published": 2, + "cancelled": 3, + "error": 4 + } + }, + ExtensionAcquisitionRequest: {}, + ExtensionDailyStat: {}, + ExtensionDailyStats: {}, + ExtensionDeploymentTechnology: { + enumValues: { + "exe": 1, + "msi": 2, + "vsix": 3, + "referralLink": 4 + } + }, + ExtensionDraft: {}, + ExtensionDraftPatch: {}, + ExtensionEvent: {}, + ExtensionEvents: {}, + ExtensionFilterResult: {}, + ExtensionLifecycleEventType: { + enumValues: { + "uninstall": 1, + "install": 2, + "review": 3, + "acquisition": 4, + "sales": 5, + "other": 999 + } + }, + ExtensionPayload: {}, + ExtensionPolicy: {}, + ExtensionPolicyFlags: { + enumValues: { + "none": 0, + "private": 1, + "public": 2, + "preview": 4, + "released": 8, + "firstParty": 16, + "all": 31 + } + }, + ExtensionQuery: {}, + ExtensionQueryFilterType: { + enumValues: { + "tag": 1, + "displayName": 2, + "private": 3, + "id": 4, + "category": 5, + "contributionType": 6, + "name": 7, + "installationTarget": 8, + "featured": 9, + "searchText": 10, + "featuredInCategory": 11, + "excludeWithFlags": 12, + "includeWithFlags": 13, + "lcid": 14, + "installationTargetVersion": 15, + "installationTargetVersionRange": 16, + "vsixMetadata": 17, + "publisherName": 18, + "publisherDisplayName": 19, + "includeWithPublisherFlags": 20, + "organizationSharedWith": 21, + "productArchitecture": 22, + "targetPlatform": 23, + "extensionName": 24 + } + }, + ExtensionQueryFlags: { + enumValues: { + "none": 0, + "includeVersions": 1, + "includeFiles": 2, + "includeCategoryAndTags": 4, + "includeSharedAccounts": 8, + "includeVersionProperties": 16, + "excludeNonValidated": 32, + "includeInstallationTargets": 64, + "includeAssetUri": 128, + "includeStatistics": 256, + "includeLatestVersionOnly": 512, + "useFallbackAssetUri": 1024, + "includeMetadata": 2048, + "includeMinimalPayloadForVsIde": 4096, + "includeLcids": 8192, + "includeSharedOrganizations": 16384, + "includeNameConflictInfo": 32768, + "allAttributes": 16863 + } + }, + ExtensionQueryResult: {}, + ExtensionStatisticOperation: { + enumValues: { + "none": 0, + "set": 1, + "increment": 2, + "decrement": 3, + "delete": 4 + } + }, + ExtensionStatisticUpdate: {}, + ExtensionStatsAggregateType: { + enumValues: { + "daily": 1 + } + }, + ExtensionVersion: {}, + ExtensionVersionFlags: { + enumValues: { + "none": 0, + "validated": 1 + } + }, + NotificationsData: {}, + NotificationTemplateType: { + enumValues: { + "reviewNotification": 1, + "qnaNotification": 2, + "customerContactNotification": 3, + "publisherMemberUpdateNotification": 4 + } + }, + PagingDirection: { + enumValues: { + "backward": 1, + "forward": 2 + } + }, + PublishedExtension: {}, + PublishedExtensionFlags: { + enumValues: { + "none": 0, + "disabled": 1, + "builtIn": 2, + "validated": 4, + "trusted": 8, + "paid": 16, + "public": 256, + "multiVersion": 512, + "system": 1024, + "preview": 2048, + "unpublished": 4096, + "trial": 8192, + "locked": 16384, + "hidden": 32768 + } + }, + Publisher: {}, + PublisherBase: {}, + PublisherFacts: {}, + PublisherFilterResult: {}, + PublisherFlags: { + enumValues: { + "unChanged": 1073741824, + "none": 0, + "disabled": 1, + "verified": 2, + "certified": 4, + "serviceFlags": 7 + } + }, + PublisherPermissions: { + enumValues: { + "read": 1, + "updateExtension": 2, + "createPublisher": 4, + "publishExtension": 8, + "admin": 16, + "trustedPartner": 32, + "privateRead": 64, + "deleteExtension": 128, + "editSettings": 256, + "viewPermissions": 512, + "managePermissions": 1024, + "deletePublisher": 2048 + } + }, + PublisherQuery: {}, + PublisherQueryFlags: { + enumValues: { + "none": 0, + "includeExtensions": 1, + "includeEmailAddress": 2 + } + }, + PublisherQueryResult: {}, + PublisherRoleAccess: { + enumValues: { + "assigned": 1, + "inherited": 2 + } + }, + PublisherRoleAssignment: {}, + PublisherState: { + enumValues: { + "none": 0, + "verificationPending": 1, + "certificationPending": 2, + "certificationRejected": 4, + "certificationRevoked": 8 + } + }, + QnAItem: {}, + QnAItemStatus: { + enumValues: { + "none": 0, + "userEditable": 1, + "publisherCreated": 2 + } + }, + QueryFilter: {}, + Question: {}, + QuestionsResult: {}, + Response: {}, + RestApiResponseStatus: { + enumValues: { + "completed": 0, + "failed": 1, + "inprogress": 2, + "skipped": 3 + } + }, + RestApiResponseStatusModel: {}, + Review: {}, + ReviewEventOperation: { + enumValues: { + "create": 1, + "update": 2, + "delete": 3 + } + }, + ReviewEventProperties: {}, + ReviewFilterOptions: { + enumValues: { + "none": 0, + "filterEmptyReviews": 1, + "filterEmptyUserNames": 2 + } + }, + ReviewPatch: {}, + ReviewPatchOperation: { + enumValues: { + "flagReview": 1, + "updateReview": 2, + "replyToReview": 3, + "adminResponseForReview": 4, + "deleteAdminReply": 5, + "deletePublisherReply": 6 + } + }, + ReviewReply: {}, + ReviewResourceType: { + enumValues: { + "review": 1, + "publisherReply": 2, + "adminReply": 3 + } + }, + ReviewsResult: {}, + SortByType: { + enumValues: { + "relevance": 0, + "lastUpdatedDate": 1, + "title": 2, + "publisher": 3, + "installCount": 4, + "publishedDate": 5, + "averageRating": 6, + "trendingDaily": 7, + "trendingWeekly": 8, + "trendingMonthly": 9, + "releaseDate": 10, + "author": 11, + "weightedRating": 12 + } + }, + SortOrderType: { + enumValues: { + "default": 0, + "ascending": 1, + "descending": 2 + } + }, + UserExtensionPolicy: {}, + UserReportedConcern: {}, + VSCodeWebExtensionStatisicsType: { + enumValues: { + "install": 1, + "update": 2, + "uninstall": 3 + } + }, +}; +exports.TypeInfo.AcquisitionOperation.fields = { + operationState: { + enumType: exports.TypeInfo.AcquisitionOperationState + }, + operationType: { + enumType: exports.TypeInfo.AcquisitionOperationType + } +}; +exports.TypeInfo.AcquisitionOptions.fields = { + defaultOperation: { + typeInfo: exports.TypeInfo.AcquisitionOperation + }, + operations: { + isArray: true, + typeInfo: exports.TypeInfo.AcquisitionOperation + } +}; +exports.TypeInfo.AzureRestApiResponseModel.fields = { + operationStatus: { + typeInfo: exports.TypeInfo.RestApiResponseStatusModel + } +}; +exports.TypeInfo.Concern.fields = { + category: { + enumType: exports.TypeInfo.ConcernCategory + }, + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.CustomerLastContact.fields = { + lastContactDate: { + isDate: true, + } +}; +exports.TypeInfo.CustomerSupportRequest.fields = { + review: { + typeInfo: exports.TypeInfo.Review + } +}; +exports.TypeInfo.ExtensionAcquisitionRequest.fields = { + assignmentType: { + enumType: exports.TypeInfo.AcquisitionAssignmentType + }, + operationType: { + enumType: exports.TypeInfo.AcquisitionOperationType + } +}; +exports.TypeInfo.ExtensionDailyStat.fields = { + statisticDate: { + isDate: true, + } +}; +exports.TypeInfo.ExtensionDailyStats.fields = { + dailyStats: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionDailyStat + } +}; +exports.TypeInfo.ExtensionDraft.fields = { + createdDate: { + isDate: true, + }, + draftState: { + enumType: exports.TypeInfo.DraftStateType + }, + lastUpdated: { + isDate: true, + }, + payload: { + typeInfo: exports.TypeInfo.ExtensionPayload + } +}; +exports.TypeInfo.ExtensionDraftPatch.fields = { + operation: { + enumType: exports.TypeInfo.DraftPatchOperation + } +}; +exports.TypeInfo.ExtensionEvent.fields = { + statisticDate: { + isDate: true, + } +}; +exports.TypeInfo.ExtensionEvents.fields = { + events: { + isDictionary: true, + dictionaryValueFieldInfo: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionEvent + } + } +}; +exports.TypeInfo.ExtensionFilterResult.fields = { + extensions: { + isArray: true, + typeInfo: exports.TypeInfo.PublishedExtension + } +}; +exports.TypeInfo.ExtensionPayload.fields = { + type: { + enumType: exports.TypeInfo.ExtensionDeploymentTechnology + } +}; +exports.TypeInfo.ExtensionPolicy.fields = { + install: { + enumType: exports.TypeInfo.ExtensionPolicyFlags + }, + request: { + enumType: exports.TypeInfo.ExtensionPolicyFlags + } +}; +exports.TypeInfo.ExtensionQuery.fields = { + filters: { + isArray: true, + typeInfo: exports.TypeInfo.QueryFilter + }, + flags: { + enumType: exports.TypeInfo.ExtensionQueryFlags + } +}; +exports.TypeInfo.ExtensionQueryResult.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionFilterResult + } +}; +exports.TypeInfo.ExtensionStatisticUpdate.fields = { + operation: { + enumType: exports.TypeInfo.ExtensionStatisticOperation + } +}; +exports.TypeInfo.ExtensionVersion.fields = { + flags: { + enumType: exports.TypeInfo.ExtensionVersionFlags + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.NotificationsData.fields = { + type: { + enumType: exports.TypeInfo.NotificationTemplateType + } +}; +exports.TypeInfo.PublishedExtension.fields = { + deploymentType: { + enumType: exports.TypeInfo.ExtensionDeploymentTechnology + }, + flags: { + enumType: exports.TypeInfo.PublishedExtensionFlags + }, + lastUpdated: { + isDate: true, + }, + publishedDate: { + isDate: true, + }, + publisher: { + typeInfo: exports.TypeInfo.PublisherFacts + }, + releaseDate: { + isDate: true, + }, + versions: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionVersion + } +}; +exports.TypeInfo.Publisher.fields = { + extensions: { + isArray: true, + typeInfo: exports.TypeInfo.PublishedExtension + }, + flags: { + enumType: exports.TypeInfo.PublisherFlags + }, + lastUpdated: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.PublisherState + } +}; +exports.TypeInfo.PublisherBase.fields = { + extensions: { + isArray: true, + typeInfo: exports.TypeInfo.PublishedExtension + }, + flags: { + enumType: exports.TypeInfo.PublisherFlags + }, + lastUpdated: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.PublisherState } - /** - * Returns a list of all behaviors for the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior - */ - getBehaviorsForWorkItemType(processId, witRefNameForBehaviors) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, null, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.PublisherFacts.fields = { + flags: { + enumType: exports.TypeInfo.PublisherFlags } - /** - * Removes a behavior for the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior - * @param {string} behaviorRefName - The reference name of the behavior - */ - removeBehaviorFromWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors, - behaviorRefName: behaviorRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.PublisherFilterResult.fields = { + publishers: { + isArray: true, + typeInfo: exports.TypeInfo.Publisher } - /** - * Updates default work item type for the behavior of the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior - * @param {string} processId - The ID of the process - * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior - */ - updateBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForBehaviors: witRefNameForBehaviors - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, behavior, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.PublisherQuery.fields = { + filters: { + isArray: true, + typeInfo: exports.TypeInfo.QueryFilter + }, + flags: { + enumType: exports.TypeInfo.PublisherQueryFlags } - /** - * Creates a work item type in the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel} workItemType - * @param {string} processId - The ID of the process - */ - createWorkItemType(workItemType, processId) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, workItemType, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.PublisherQueryResult.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.PublisherFilterResult } - /** - * Removes a work item type in the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - */ - deleteWorkItemType(processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.PublisherRoleAssignment.fields = { + access: { + enumType: exports.TypeInfo.PublisherRoleAccess } - /** - * Returns a work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - * @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand - */ - getWorkItemType(processId, witRefName, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.QnAItem.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, } - /** - * Returns a list of all work item types in the process. - * - * @param {string} processId - The ID of the process - * @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand - */ - getWorkItemTypes(processId, expand) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId - }; - let queryValues = { - '$expand': expand, - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues, queryValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.QueryFilter.fields = { + direction: { + enumType: exports.TypeInfo.PagingDirection } - /** - * Updates a work item type of the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel} workItemTypeUpdate - * @param {string} processId - The ID of the process - * @param {string} witRefName - The reference name of the work item type - */ - updateWorkItemType(workItemTypeUpdate, processId, witRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefName: witRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, workItemTypeUpdate, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Question.fields = { + createdDate: { + isDate: true, + }, + responses: { + isArray: true, + typeInfo: exports.TypeInfo.Response + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, } - /** - * Adds a field to the work item type in the process. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field - * @param {string} processId - The ID of the process - * @param {string} witRefNameForFields - Work item type reference name for the field - */ - addFieldToWorkItemType(field, processId, witRefNameForFields) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForFields: witRefNameForFields - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.create(url, field, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.QuestionsResult.fields = { + questions: { + isArray: true, + typeInfo: exports.TypeInfo.Question } - /** - * Returns a single field in the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForFields - Work item type reference name for fields - * @param {string} fieldRefName - The reference name of the field - */ - getWorkItemTypeField(processId, witRefNameForFields, fieldRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForFields: witRefNameForFields, - fieldRefName: fieldRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Response.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, } - /** - * Returns a list of all fields in the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForFields - Work item type reference name for fields - */ - getWorkItemTypeFields(processId, witRefNameForFields) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForFields: witRefNameForFields - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.get(url, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, true); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.RestApiResponseStatusModel.fields = { + status: { + enumType: exports.TypeInfo.RestApiResponseStatus } - /** - * Removes a field in the work item type of the process. - * - * @param {string} processId - The ID of the process - * @param {string} witRefNameForFields - Work item type reference name for fields - * @param {string} fieldRefName - The reference name of the field - */ - removeFieldFromWorkItemType(processId, witRefNameForFields, fieldRefName) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForFields: witRefNameForFields, - fieldRefName: fieldRefName - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.del(url, options); - let ret = this.formatResponse(res.result, null, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.Review.fields = { + adminReply: { + typeInfo: exports.TypeInfo.ReviewReply + }, + reply: { + typeInfo: exports.TypeInfo.ReviewReply + }, + updatedDate: { + isDate: true, } - /** - * Updates a single field in the scope of the given process and work item type. - * - * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field - The model with which to update the field - * @param {string} processId - The ID of the process - * @param {string} witRefNameForFields - Work item type reference name for fields - */ - updateWorkItemTypeField(field, processId, witRefNameForFields) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let routeValues = { - processId: processId, - witRefNameForFields: witRefNameForFields - }; - try { - let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); - let url = verData.requestUrl; - let options = this.createRequestOptions('application/json', verData.apiVersion); - let res; - res = yield this.rest.update(url, field, options); - let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); - resolve(ret); - } - catch (err) { - reject(err); - } - })); - }); +}; +exports.TypeInfo.ReviewEventProperties.fields = { + eventOperation: { + enumType: exports.TypeInfo.ReviewEventOperation + }, + replyDate: { + isDate: true, + }, + resourceType: { + enumType: exports.TypeInfo.ReviewResourceType + }, + reviewDate: { + isDate: true, } -} -WorkItemTrackingProcessDefinitionsApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; -exports.WorkItemTrackingProcessDefinitionsApi = WorkItemTrackingProcessDefinitionsApi; - - -/***/ }), - -/***/ 6456: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", ({ value: true })); -const resthandlers = __nccwpck_require__(4442); -class BasicCredentialHandler extends resthandlers.BasicCredentialHandler { - constructor(username, password, allowCrossOriginAuthentication = true) { - super(username, password, allowCrossOriginAuthentication); +}; +exports.TypeInfo.ReviewPatch.fields = { + operation: { + enumType: exports.TypeInfo.ReviewPatchOperation + }, + reportedConcern: { + typeInfo: exports.TypeInfo.UserReportedConcern + }, + reviewItem: { + typeInfo: exports.TypeInfo.Review } -} -exports.BasicCredentialHandler = BasicCredentialHandler; - - -/***/ }), - -/***/ 1141: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", ({ value: true })); -const resthandlers = __nccwpck_require__(4442); -class BearerCredentialHandler extends resthandlers.BearerCredentialHandler { - constructor(token, allowCrossOriginAuthentication = true) { - super(token, allowCrossOriginAuthentication); +}; +exports.TypeInfo.ReviewReply.fields = { + updatedDate: { + isDate: true, } -} -exports.BearerCredentialHandler = BearerCredentialHandler; - - -/***/ }), - -/***/ 3450: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", ({ value: true })); -const resthandlers = __nccwpck_require__(4442); -class NtlmCredentialHandler extends resthandlers.NtlmCredentialHandler { - constructor(username, password, workstation, domain) { - super(username, password, workstation, domain); +}; +exports.TypeInfo.ReviewsResult.fields = { + reviews: { + isArray: true, + typeInfo: exports.TypeInfo.Review } -} -exports.NtlmCredentialHandler = NtlmCredentialHandler; - - -/***/ }), - -/***/ 4551: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", ({ value: true })); -const resthandlers = __nccwpck_require__(4442); -class PersonalAccessTokenCredentialHandler extends resthandlers.PersonalAccessTokenCredentialHandler { - constructor(token, allowCrossOriginAuthentication = true) { - super(token, allowCrossOriginAuthentication); +}; +exports.TypeInfo.UserExtensionPolicy.fields = { + permissions: { + typeInfo: exports.TypeInfo.ExtensionPolicy } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +}; +exports.TypeInfo.UserReportedConcern.fields = { + category: { + enumType: exports.TypeInfo.ConcernCategory + }, + submittedDate: { + isDate: true, + } +}; /***/ }), -/***/ 2167: +/***/ 89803: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -49425,2786 +55795,2433 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const TFS_TestManagement_Contracts = __nccwpck_require__(3047); -const TfsCoreInterfaces = __nccwpck_require__(3931); -var AgentStatus; -(function (AgentStatus) { +const PolicyInterfaces = __nccwpck_require__(88555); +const TfsCoreInterfaces = __nccwpck_require__(73931); +/** + * The status of a comment thread. + */ +var CommentThreadStatus; +(function (CommentThreadStatus) { /** - * Indicates that the build agent cannot be contacted. + * The thread status is unknown. */ - AgentStatus[AgentStatus["Unavailable"] = 0] = "Unavailable"; + CommentThreadStatus[CommentThreadStatus["Unknown"] = 0] = "Unknown"; /** - * Indicates that the build agent is currently available. + * The thread status is active. */ - AgentStatus[AgentStatus["Available"] = 1] = "Available"; + CommentThreadStatus[CommentThreadStatus["Active"] = 1] = "Active"; /** - * Indicates that the build agent has taken itself offline. + * The thread status is resolved as fixed. */ - AgentStatus[AgentStatus["Offline"] = 2] = "Offline"; -})(AgentStatus = exports.AgentStatus || (exports.AgentStatus = {})); -var AuditAction; -(function (AuditAction) { - AuditAction[AuditAction["Add"] = 1] = "Add"; - AuditAction[AuditAction["Update"] = 2] = "Update"; - AuditAction[AuditAction["Delete"] = 3] = "Delete"; -})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); -/** - * Represents the desired scope of authorization for a build. - */ -var BuildAuthorizationScope; -(function (BuildAuthorizationScope) { + CommentThreadStatus[CommentThreadStatus["Fixed"] = 2] = "Fixed"; /** - * The identity used should have build service account permissions scoped to the project collection. This is useful when resources for a single build are spread across multiple projects. + * The thread status is resolved as won't fix. */ - BuildAuthorizationScope[BuildAuthorizationScope["ProjectCollection"] = 1] = "ProjectCollection"; + CommentThreadStatus[CommentThreadStatus["WontFix"] = 3] = "WontFix"; /** - * The identity used should have build service account permissions scoped to the project in which the build definition resides. This is useful for isolation of build jobs to a particular team project to avoid any unintentional escalation of privilege attacks during a build. + * The thread status is closed. */ - BuildAuthorizationScope[BuildAuthorizationScope["Project"] = 2] = "Project"; -})(BuildAuthorizationScope = exports.BuildAuthorizationScope || (exports.BuildAuthorizationScope = {})); -var BuildOptionInputType; -(function (BuildOptionInputType) { - BuildOptionInputType[BuildOptionInputType["String"] = 0] = "String"; - BuildOptionInputType[BuildOptionInputType["Boolean"] = 1] = "Boolean"; - BuildOptionInputType[BuildOptionInputType["StringList"] = 2] = "StringList"; - BuildOptionInputType[BuildOptionInputType["Radio"] = 3] = "Radio"; - BuildOptionInputType[BuildOptionInputType["PickList"] = 4] = "PickList"; - BuildOptionInputType[BuildOptionInputType["MultiLine"] = 5] = "MultiLine"; - BuildOptionInputType[BuildOptionInputType["BranchFilter"] = 6] = "BranchFilter"; -})(BuildOptionInputType = exports.BuildOptionInputType || (exports.BuildOptionInputType = {})); -var BuildPhaseStatus; -(function (BuildPhaseStatus) { + CommentThreadStatus[CommentThreadStatus["Closed"] = 4] = "Closed"; /** - * The state is not known. + * The thread status is resolved as by design. */ - BuildPhaseStatus[BuildPhaseStatus["Unknown"] = 0] = "Unknown"; + CommentThreadStatus[CommentThreadStatus["ByDesign"] = 5] = "ByDesign"; /** - * The build phase completed unsuccessfully. + * The thread status is pending. */ - BuildPhaseStatus[BuildPhaseStatus["Failed"] = 1] = "Failed"; + CommentThreadStatus[CommentThreadStatus["Pending"] = 6] = "Pending"; +})(CommentThreadStatus = exports.CommentThreadStatus || (exports.CommentThreadStatus = {})); +/** + * The type of a comment. + */ +var CommentType; +(function (CommentType) { /** - * The build phase completed successfully. + * The comment type is not known. */ - BuildPhaseStatus[BuildPhaseStatus["Succeeded"] = 2] = "Succeeded"; -})(BuildPhaseStatus = exports.BuildPhaseStatus || (exports.BuildPhaseStatus = {})); + CommentType[CommentType["Unknown"] = 0] = "Unknown"; + /** + * This is a regular user comment. + */ + CommentType[CommentType["Text"] = 1] = "Text"; + /** + * The comment comes as a result of a code change. + */ + CommentType[CommentType["CodeChange"] = 2] = "CodeChange"; + /** + * The comment represents a system message. + */ + CommentType[CommentType["System"] = 3] = "System"; +})(CommentType = exports.CommentType || (exports.CommentType = {})); /** - * Specifies the desired ordering of builds. + * Current status of the asynchronous operation. */ -var BuildQueryOrder; -(function (BuildQueryOrder) { +var GitAsyncOperationStatus; +(function (GitAsyncOperationStatus) { /** - * Order by finish time ascending. + * The operation is waiting in a queue and has not yet started. */ - BuildQueryOrder[BuildQueryOrder["FinishTimeAscending"] = 2] = "FinishTimeAscending"; + GitAsyncOperationStatus[GitAsyncOperationStatus["Queued"] = 1] = "Queued"; /** - * Order by finish time descending. + * The operation is currently in progress. */ - BuildQueryOrder[BuildQueryOrder["FinishTimeDescending"] = 3] = "FinishTimeDescending"; + GitAsyncOperationStatus[GitAsyncOperationStatus["InProgress"] = 2] = "InProgress"; /** - * Order by queue time descending. + * The operation has completed. */ - BuildQueryOrder[BuildQueryOrder["QueueTimeDescending"] = 4] = "QueueTimeDescending"; + GitAsyncOperationStatus[GitAsyncOperationStatus["Completed"] = 3] = "Completed"; /** - * Order by queue time ascending. + * The operation has failed. Check for an error message. */ - BuildQueryOrder[BuildQueryOrder["QueueTimeAscending"] = 5] = "QueueTimeAscending"; + GitAsyncOperationStatus[GitAsyncOperationStatus["Failed"] = 4] = "Failed"; /** - * Order by start time descending. + * The operation has been abandoned. */ - BuildQueryOrder[BuildQueryOrder["StartTimeDescending"] = 6] = "StartTimeDescending"; + GitAsyncOperationStatus[GitAsyncOperationStatus["Abandoned"] = 5] = "Abandoned"; +})(GitAsyncOperationStatus = exports.GitAsyncOperationStatus || (exports.GitAsyncOperationStatus = {})); +var GitAsyncRefOperationFailureStatus; +(function (GitAsyncRefOperationFailureStatus) { /** - * Order by start time ascending. + * No status */ - BuildQueryOrder[BuildQueryOrder["StartTimeAscending"] = 7] = "StartTimeAscending"; -})(BuildQueryOrder = exports.BuildQueryOrder || (exports.BuildQueryOrder = {})); -var BuildReason; -(function (BuildReason) { + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["None"] = 0] = "None"; /** - * No reason. This value should not be used. + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. */ - BuildReason[BuildReason["None"] = 0] = "None"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["InvalidRefName"] = 1] = "InvalidRefName"; /** - * The build was started manually. + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. */ - BuildReason[BuildReason["Manual"] = 1] = "Manual"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["RefNameConflict"] = 2] = "RefNameConflict"; /** - * The build was started for the trigger TriggerType.ContinuousIntegration. + * The ref update request could not be completed because the user lacks the permission to create a branch */ - BuildReason[BuildReason["IndividualCI"] = 2] = "IndividualCI"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["CreateBranchPermissionRequired"] = 3] = "CreateBranchPermissionRequired"; /** - * The build was started for the trigger TriggerType.BatchedContinuousIntegration. + * The ref update request could not be completed because the user lacks write permissions required to write this ref */ - BuildReason[BuildReason["BatchedCI"] = 4] = "BatchedCI"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["WritePermissionRequired"] = 4] = "WritePermissionRequired"; /** - * The build was started for the trigger TriggerType.Schedule. + * Target branch was deleted after Git async operation started */ - BuildReason[BuildReason["Schedule"] = 8] = "Schedule"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["TargetBranchDeleted"] = 5] = "TargetBranchDeleted"; /** - * The build was started for the trigger TriggerType.ScheduleForced. + * Git object is too large to materialize into memory */ - BuildReason[BuildReason["ScheduleForced"] = 16] = "ScheduleForced"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["GitObjectTooLarge"] = 6] = "GitObjectTooLarge"; /** - * The build was created by a user. + * Identity who authorized the operation was not found */ - BuildReason[BuildReason["UserCreated"] = 32] = "UserCreated"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["OperationIndentityNotFound"] = 7] = "OperationIndentityNotFound"; /** - * The build was started manually for private validation. + * Async operation was not found */ - BuildReason[BuildReason["ValidateShelveset"] = 64] = "ValidateShelveset"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["AsyncOperationNotFound"] = 8] = "AsyncOperationNotFound"; /** - * The build was started for the trigger ContinuousIntegrationType.Gated. + * Unexpected failure */ - BuildReason[BuildReason["CheckInShelveset"] = 128] = "CheckInShelveset"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["Other"] = 9] = "Other"; /** - * The build was started by a pull request. Added in resource version 3. + * Initiator of async operation has signature with empty name or email */ - BuildReason[BuildReason["PullRequest"] = 256] = "PullRequest"; + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["EmptyCommitterSignature"] = 10] = "EmptyCommitterSignature"; +})(GitAsyncRefOperationFailureStatus = exports.GitAsyncRefOperationFailureStatus || (exports.GitAsyncRefOperationFailureStatus = {})); +/** + * The type of a merge conflict. + */ +var GitConflictType; +(function (GitConflictType) { /** - * The build was started when another build completed. + * No conflict */ - BuildReason[BuildReason["BuildCompletion"] = 512] = "BuildCompletion"; + GitConflictType[GitConflictType["None"] = 0] = "None"; /** - * The build was started when resources in pipeline triggered it + * Added on source and target; content differs */ - BuildReason[BuildReason["ResourceTrigger"] = 1024] = "ResourceTrigger"; + GitConflictType[GitConflictType["AddAdd"] = 1] = "AddAdd"; /** - * The build was triggered for retention policy purposes. + * Added on source and rename destination on target */ - BuildReason[BuildReason["Triggered"] = 1967] = "Triggered"; + GitConflictType[GitConflictType["AddRename"] = 2] = "AddRename"; /** - * All reasons. + * Deleted on source and edited on target */ - BuildReason[BuildReason["All"] = 2031] = "All"; -})(BuildReason = exports.BuildReason || (exports.BuildReason = {})); + GitConflictType[GitConflictType["DeleteEdit"] = 3] = "DeleteEdit"; + /** + * Deleted on source and renamed on target + */ + GitConflictType[GitConflictType["DeleteRename"] = 4] = "DeleteRename"; + /** + * Path is a directory on source and a file on target + */ + GitConflictType[GitConflictType["DirectoryFile"] = 5] = "DirectoryFile"; + /** + * Children of directory which has DirectoryFile or FileDirectory conflict + */ + GitConflictType[GitConflictType["DirectoryChild"] = 6] = "DirectoryChild"; + /** + * Edited on source and deleted on target + */ + GitConflictType[GitConflictType["EditDelete"] = 7] = "EditDelete"; + /** + * Edited on source and target; content differs + */ + GitConflictType[GitConflictType["EditEdit"] = 8] = "EditEdit"; + /** + * Path is a file on source and a directory on target + */ + GitConflictType[GitConflictType["FileDirectory"] = 9] = "FileDirectory"; + /** + * Same file renamed on both source and target; destination paths differ + */ + GitConflictType[GitConflictType["Rename1to2"] = 10] = "Rename1to2"; + /** + * Different files renamed to same destination path on both source and target + */ + GitConflictType[GitConflictType["Rename2to1"] = 11] = "Rename2to1"; + /** + * Rename destination on source and new file on target + */ + GitConflictType[GitConflictType["RenameAdd"] = 12] = "RenameAdd"; + /** + * Renamed on source and deleted on target + */ + GitConflictType[GitConflictType["RenameDelete"] = 13] = "RenameDelete"; + /** + * Rename destination on both source and target; content differs + */ + GitConflictType[GitConflictType["RenameRename"] = 14] = "RenameRename"; +})(GitConflictType = exports.GitConflictType || (exports.GitConflictType = {})); /** - * This is not a Flags enum because we don't want to set multiple statuses on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum This will ensure that things that key off multiple result types (like labelling sources) continue to work + * Represents the possible outcomes from a request to update a pull request conflict */ -var BuildResult; -(function (BuildResult) { +var GitConflictUpdateStatus; +(function (GitConflictUpdateStatus) { /** - * No result + * Indicates that pull request conflict update request was completed successfully */ - BuildResult[BuildResult["None"] = 0] = "None"; + GitConflictUpdateStatus[GitConflictUpdateStatus["Succeeded"] = 0] = "Succeeded"; /** - * The build completed successfully. + * Indicates that the update request did not fit the expected data contract */ - BuildResult[BuildResult["Succeeded"] = 2] = "Succeeded"; + GitConflictUpdateStatus[GitConflictUpdateStatus["BadRequest"] = 1] = "BadRequest"; /** - * The build completed compilation successfully but had other errors. + * Indicates that the requested resolution was not valid */ - BuildResult[BuildResult["PartiallySucceeded"] = 4] = "PartiallySucceeded"; + GitConflictUpdateStatus[GitConflictUpdateStatus["InvalidResolution"] = 2] = "InvalidResolution"; /** - * The build completed unsuccessfully. + * Indicates that the conflict in the update request was not a supported conflict type */ - BuildResult[BuildResult["Failed"] = 8] = "Failed"; + GitConflictUpdateStatus[GitConflictUpdateStatus["UnsupportedConflictType"] = 3] = "UnsupportedConflictType"; /** - * The build was canceled before starting. + * Indicates that the conflict could not be found */ - BuildResult[BuildResult["Canceled"] = 32] = "Canceled"; -})(BuildResult = exports.BuildResult || (exports.BuildResult = {})); -var BuildStatus; -(function (BuildStatus) { + GitConflictUpdateStatus[GitConflictUpdateStatus["NotFound"] = 4] = "NotFound"; +})(GitConflictUpdateStatus = exports.GitConflictUpdateStatus || (exports.GitConflictUpdateStatus = {})); +/** + * Accepted types of version + */ +var GitHistoryMode; +(function (GitHistoryMode) { /** - * No status. + * The history mode used by `git log`. This is the default. */ - BuildStatus[BuildStatus["None"] = 0] = "None"; + GitHistoryMode[GitHistoryMode["SimplifiedHistory"] = 0] = "SimplifiedHistory"; /** - * The build is currently in progress. + * The history mode used by `git log --first-parent` */ - BuildStatus[BuildStatus["InProgress"] = 1] = "InProgress"; + GitHistoryMode[GitHistoryMode["FirstParent"] = 1] = "FirstParent"; /** - * The build has completed. + * The history mode used by `git log --full-history` */ - BuildStatus[BuildStatus["Completed"] = 2] = "Completed"; + GitHistoryMode[GitHistoryMode["FullHistory"] = 2] = "FullHistory"; /** - * The build is cancelling + * The history mode used by `git log --full-history --simplify-merges` */ - BuildStatus[BuildStatus["Cancelling"] = 4] = "Cancelling"; + GitHistoryMode[GitHistoryMode["FullHistorySimplifyMerges"] = 3] = "FullHistorySimplifyMerges"; +})(GitHistoryMode = exports.GitHistoryMode || (exports.GitHistoryMode = {})); +var GitObjectType; +(function (GitObjectType) { + GitObjectType[GitObjectType["Bad"] = 0] = "Bad"; + GitObjectType[GitObjectType["Commit"] = 1] = "Commit"; + GitObjectType[GitObjectType["Tree"] = 2] = "Tree"; + GitObjectType[GitObjectType["Blob"] = 3] = "Blob"; + GitObjectType[GitObjectType["Tag"] = 4] = "Tag"; + GitObjectType[GitObjectType["Ext2"] = 5] = "Ext2"; + GitObjectType[GitObjectType["OfsDelta"] = 6] = "OfsDelta"; + GitObjectType[GitObjectType["RefDelta"] = 7] = "RefDelta"; +})(GitObjectType = exports.GitObjectType || (exports.GitObjectType = {})); +var GitPathActions; +(function (GitPathActions) { + GitPathActions[GitPathActions["None"] = 0] = "None"; + GitPathActions[GitPathActions["Edit"] = 1] = "Edit"; + GitPathActions[GitPathActions["Delete"] = 2] = "Delete"; + GitPathActions[GitPathActions["Add"] = 3] = "Add"; + GitPathActions[GitPathActions["Rename"] = 4] = "Rename"; +})(GitPathActions = exports.GitPathActions || (exports.GitPathActions = {})); +/** + * Enumeration of possible merge strategies which can be used to complete a pull request. + */ +var GitPullRequestMergeStrategy; +(function (GitPullRequestMergeStrategy) { /** - * The build is inactive in the queue. + * A two-parent, no-fast-forward merge. The source branch is unchanged. This is the default behavior. */ - BuildStatus[BuildStatus["Postponed"] = 8] = "Postponed"; + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["NoFastForward"] = 1] = "NoFastForward"; /** - * The build has not yet started. + * Put all changes from the pull request into a single-parent commit. */ - BuildStatus[BuildStatus["NotStarted"] = 32] = "NotStarted"; + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["Squash"] = 2] = "Squash"; /** - * All status. + * Rebase the source branch on top of the target branch HEAD commit, and fast-forward the target branch. The source branch is updated during the rebase operation. */ - BuildStatus[BuildStatus["All"] = 47] = "All"; -})(BuildStatus = exports.BuildStatus || (exports.BuildStatus = {})); -var ControllerStatus; -(function (ControllerStatus) { + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["Rebase"] = 3] = "Rebase"; /** - * Indicates that the build controller cannot be contacted. + * Rebase the source branch on top of the target branch HEAD commit, and create a two-parent, no-fast-forward merge. The source branch is updated during the rebase operation. */ - ControllerStatus[ControllerStatus["Unavailable"] = 0] = "Unavailable"; + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["RebaseMerge"] = 4] = "RebaseMerge"; +})(GitPullRequestMergeStrategy = exports.GitPullRequestMergeStrategy || (exports.GitPullRequestMergeStrategy = {})); +/** + * Accepted types of pull request queries. + */ +var GitPullRequestQueryType; +(function (GitPullRequestQueryType) { /** - * Indicates that the build controller is currently available. + * No query type set. */ - ControllerStatus[ControllerStatus["Available"] = 1] = "Available"; + GitPullRequestQueryType[GitPullRequestQueryType["NotSet"] = 0] = "NotSet"; /** - * Indicates that the build controller has taken itself offline. + * Search for pull requests that created the supplied merge commits. */ - ControllerStatus[ControllerStatus["Offline"] = 2] = "Offline"; -})(ControllerStatus = exports.ControllerStatus || (exports.ControllerStatus = {})); -var DefinitionQuality; -(function (DefinitionQuality) { - DefinitionQuality[DefinitionQuality["Definition"] = 1] = "Definition"; - DefinitionQuality[DefinitionQuality["Draft"] = 2] = "Draft"; -})(DefinitionQuality = exports.DefinitionQuality || (exports.DefinitionQuality = {})); + GitPullRequestQueryType[GitPullRequestQueryType["LastMergeCommit"] = 1] = "LastMergeCommit"; + /** + * Search for pull requests that merged the supplied commits. + */ + GitPullRequestQueryType[GitPullRequestQueryType["Commit"] = 2] = "Commit"; +})(GitPullRequestQueryType = exports.GitPullRequestQueryType || (exports.GitPullRequestQueryType = {})); +var GitPullRequestReviewFileType; +(function (GitPullRequestReviewFileType) { + GitPullRequestReviewFileType[GitPullRequestReviewFileType["ChangeEntry"] = 0] = "ChangeEntry"; + GitPullRequestReviewFileType[GitPullRequestReviewFileType["Attachment"] = 1] = "Attachment"; +})(GitPullRequestReviewFileType = exports.GitPullRequestReviewFileType || (exports.GitPullRequestReviewFileType = {})); /** - * Specifies the desired ordering of definitions. + * Search type on ref name */ -var DefinitionQueryOrder; -(function (DefinitionQueryOrder) { +var GitRefSearchType; +(function (GitRefSearchType) { + GitRefSearchType[GitRefSearchType["Exact"] = 0] = "Exact"; + GitRefSearchType[GitRefSearchType["StartsWith"] = 1] = "StartsWith"; + GitRefSearchType[GitRefSearchType["Contains"] = 2] = "Contains"; +})(GitRefSearchType = exports.GitRefSearchType || (exports.GitRefSearchType = {})); +/** + * Enumerates the modes under which ref updates can be written to their repositories. + */ +var GitRefUpdateMode; +(function (GitRefUpdateMode) { /** - * No order + * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. */ - DefinitionQueryOrder[DefinitionQueryOrder["None"] = 0] = "None"; + GitRefUpdateMode[GitRefUpdateMode["BestEffort"] = 0] = "BestEffort"; /** - * Order by created on/last modified time ascending. + * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. */ - DefinitionQueryOrder[DefinitionQueryOrder["LastModifiedAscending"] = 1] = "LastModifiedAscending"; + GitRefUpdateMode[GitRefUpdateMode["AllOrNone"] = 1] = "AllOrNone"; +})(GitRefUpdateMode = exports.GitRefUpdateMode || (exports.GitRefUpdateMode = {})); +/** + * Represents the possible outcomes from a request to update a ref in a repository. + */ +var GitRefUpdateStatus; +(function (GitRefUpdateStatus) { /** - * Order by created on/last modified time descending. + * Indicates that the ref update request was completed successfully. */ - DefinitionQueryOrder[DefinitionQueryOrder["LastModifiedDescending"] = 2] = "LastModifiedDescending"; + GitRefUpdateStatus[GitRefUpdateStatus["Succeeded"] = 0] = "Succeeded"; /** - * Order by definition name ascending. + * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. */ - DefinitionQueryOrder[DefinitionQueryOrder["DefinitionNameAscending"] = 3] = "DefinitionNameAscending"; + GitRefUpdateStatus[GitRefUpdateStatus["ForcePushRequired"] = 1] = "ForcePushRequired"; /** - * Order by definition name descending. + * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. */ - DefinitionQueryOrder[DefinitionQueryOrder["DefinitionNameDescending"] = 4] = "DefinitionNameDescending"; -})(DefinitionQueryOrder = exports.DefinitionQueryOrder || (exports.DefinitionQueryOrder = {})); -var DefinitionQueueStatus; -(function (DefinitionQueueStatus) { + GitRefUpdateStatus[GitRefUpdateStatus["StaleOldObjectId"] = 2] = "StaleOldObjectId"; /** - * When enabled the definition queue allows builds to be queued by users, the system will queue scheduled, gated and continuous integration builds, and the queued builds will be started by the system. + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. */ - DefinitionQueueStatus[DefinitionQueueStatus["Enabled"] = 0] = "Enabled"; + GitRefUpdateStatus[GitRefUpdateStatus["InvalidRefName"] = 3] = "InvalidRefName"; /** - * When paused the definition queue allows builds to be queued by users and the system will queue scheduled, gated and continuous integration builds. Builds in the queue will not be started by the system. + * The request was not processed */ - DefinitionQueueStatus[DefinitionQueueStatus["Paused"] = 1] = "Paused"; + GitRefUpdateStatus[GitRefUpdateStatus["Unprocessed"] = 4] = "Unprocessed"; /** - * When disabled the definition queue will not allow builds to be queued by users and the system will not queue scheduled, gated or continuous integration builds. Builds already in the queue will not be started by the system. + * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) */ - DefinitionQueueStatus[DefinitionQueueStatus["Disabled"] = 2] = "Disabled"; -})(DefinitionQueueStatus = exports.DefinitionQueueStatus || (exports.DefinitionQueueStatus = {})); -var DefinitionTriggerType; -(function (DefinitionTriggerType) { + GitRefUpdateStatus[GitRefUpdateStatus["UnresolvableToCommit"] = 5] = "UnresolvableToCommit"; /** - * Manual builds only. + * The ref update request could not be completed because the user lacks write permissions required to write this ref */ - DefinitionTriggerType[DefinitionTriggerType["None"] = 1] = "None"; + GitRefUpdateStatus[GitRefUpdateStatus["WritePermissionRequired"] = 6] = "WritePermissionRequired"; /** - * A build should be started for each changeset. + * The ref update request could not be completed because the user lacks note creation permissions required to write this note */ - DefinitionTriggerType[DefinitionTriggerType["ContinuousIntegration"] = 2] = "ContinuousIntegration"; + GitRefUpdateStatus[GitRefUpdateStatus["ManageNotePermissionRequired"] = 7] = "ManageNotePermissionRequired"; /** - * A build should be started for multiple changesets at a time at a specified interval. + * The ref update request could not be completed because the user lacks the permission to create a branch */ - DefinitionTriggerType[DefinitionTriggerType["BatchedContinuousIntegration"] = 4] = "BatchedContinuousIntegration"; + GitRefUpdateStatus[GitRefUpdateStatus["CreateBranchPermissionRequired"] = 8] = "CreateBranchPermissionRequired"; + /** + * The ref update request could not be completed because the user lacks the permission to create a tag + */ + GitRefUpdateStatus[GitRefUpdateStatus["CreateTagPermissionRequired"] = 9] = "CreateTagPermissionRequired"; + /** + * The ref update could not be completed because it was rejected by the plugin. + */ + GitRefUpdateStatus[GitRefUpdateStatus["RejectedByPlugin"] = 10] = "RejectedByPlugin"; + /** + * The ref update could not be completed because the ref is locked by another user. + */ + GitRefUpdateStatus[GitRefUpdateStatus["Locked"] = 11] = "Locked"; + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + GitRefUpdateStatus[GitRefUpdateStatus["RefNameConflict"] = 12] = "RefNameConflict"; + /** + * The ref update could not be completed because it was rejected by policy. + */ + GitRefUpdateStatus[GitRefUpdateStatus["RejectedByPolicy"] = 13] = "RejectedByPolicy"; + /** + * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. + */ + GitRefUpdateStatus[GitRefUpdateStatus["SucceededNonExistentRef"] = 14] = "SucceededNonExistentRef"; + /** + * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. + */ + GitRefUpdateStatus[GitRefUpdateStatus["SucceededCorruptRef"] = 15] = "SucceededCorruptRef"; +})(GitRefUpdateStatus = exports.GitRefUpdateStatus || (exports.GitRefUpdateStatus = {})); +/** + * The type of a merge conflict. + */ +var GitResolutionError; +(function (GitResolutionError) { /** - * A build should be started on a specified schedule whether or not changesets exist. + * No error */ - DefinitionTriggerType[DefinitionTriggerType["Schedule"] = 8] = "Schedule"; + GitResolutionError[GitResolutionError["None"] = 0] = "None"; /** - * A validation build should be started for each check-in. + * User set a blob id for resolving a content merge, but blob was not found in repo during application */ - DefinitionTriggerType[DefinitionTriggerType["GatedCheckIn"] = 16] = "GatedCheckIn"; + GitResolutionError[GitResolutionError["MergeContentNotFound"] = 1] = "MergeContentNotFound"; /** - * A validation build should be started for each batch of check-ins. + * Attempted to resolve a conflict by moving a file to another path, but path was already in use */ - DefinitionTriggerType[DefinitionTriggerType["BatchedGatedCheckIn"] = 32] = "BatchedGatedCheckIn"; + GitResolutionError[GitResolutionError["PathInUse"] = 2] = "PathInUse"; /** - * A build should be triggered when a GitHub pull request is created or updated. Added in resource version 3 + * No error */ - DefinitionTriggerType[DefinitionTriggerType["PullRequest"] = 64] = "PullRequest"; + GitResolutionError[GitResolutionError["InvalidPath"] = 3] = "InvalidPath"; /** - * A build should be triggered when another build completes. + * GitResolutionAction was set to an unrecognized value */ - DefinitionTriggerType[DefinitionTriggerType["BuildCompletion"] = 128] = "BuildCompletion"; + GitResolutionError[GitResolutionError["UnknownAction"] = 4] = "UnknownAction"; /** - * All types. + * GitResolutionMergeType was set to an unrecognized value */ - DefinitionTriggerType[DefinitionTriggerType["All"] = 255] = "All"; -})(DefinitionTriggerType = exports.DefinitionTriggerType || (exports.DefinitionTriggerType = {})); -var DefinitionType; -(function (DefinitionType) { - DefinitionType[DefinitionType["Xaml"] = 1] = "Xaml"; - DefinitionType[DefinitionType["Build"] = 2] = "Build"; -})(DefinitionType = exports.DefinitionType || (exports.DefinitionType = {})); -var DeleteOptions; -(function (DeleteOptions) { + GitResolutionError[GitResolutionError["UnknownMergeType"] = 5] = "UnknownMergeType"; /** - * No data should be deleted. This value should not be used. + * Any error for which a more specific code doesn't apply */ - DeleteOptions[DeleteOptions["None"] = 0] = "None"; + GitResolutionError[GitResolutionError["OtherError"] = 255] = "OtherError"; +})(GitResolutionError = exports.GitResolutionError || (exports.GitResolutionError = {})); +var GitResolutionMergeType; +(function (GitResolutionMergeType) { + GitResolutionMergeType[GitResolutionMergeType["Undecided"] = 0] = "Undecided"; + GitResolutionMergeType[GitResolutionMergeType["TakeSourceContent"] = 1] = "TakeSourceContent"; + GitResolutionMergeType[GitResolutionMergeType["TakeTargetContent"] = 2] = "TakeTargetContent"; + GitResolutionMergeType[GitResolutionMergeType["AutoMerged"] = 3] = "AutoMerged"; + GitResolutionMergeType[GitResolutionMergeType["UserMerged"] = 4] = "UserMerged"; +})(GitResolutionMergeType = exports.GitResolutionMergeType || (exports.GitResolutionMergeType = {})); +var GitResolutionPathConflictAction; +(function (GitResolutionPathConflictAction) { + GitResolutionPathConflictAction[GitResolutionPathConflictAction["Undecided"] = 0] = "Undecided"; + GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepSourceRenameTarget"] = 1] = "KeepSourceRenameTarget"; + GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepSourceDeleteTarget"] = 2] = "KeepSourceDeleteTarget"; + GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepTargetRenameSource"] = 3] = "KeepTargetRenameSource"; + GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepTargetDeleteSource"] = 4] = "KeepTargetDeleteSource"; +})(GitResolutionPathConflictAction = exports.GitResolutionPathConflictAction || (exports.GitResolutionPathConflictAction = {})); +var GitResolutionRename1to2Action; +(function (GitResolutionRename1to2Action) { + GitResolutionRename1to2Action[GitResolutionRename1to2Action["Undecided"] = 0] = "Undecided"; + GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepSourcePath"] = 1] = "KeepSourcePath"; + GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepTargetPath"] = 2] = "KeepTargetPath"; + GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepBothFiles"] = 3] = "KeepBothFiles"; +})(GitResolutionRename1to2Action = exports.GitResolutionRename1to2Action || (exports.GitResolutionRename1to2Action = {})); +/** + * Resolution status of a conflict. + */ +var GitResolutionStatus; +(function (GitResolutionStatus) { + GitResolutionStatus[GitResolutionStatus["Unresolved"] = 0] = "Unresolved"; + GitResolutionStatus[GitResolutionStatus["PartiallyResolved"] = 1] = "PartiallyResolved"; + GitResolutionStatus[GitResolutionStatus["Resolved"] = 2] = "Resolved"; +})(GitResolutionStatus = exports.GitResolutionStatus || (exports.GitResolutionStatus = {})); +var GitResolutionWhichAction; +(function (GitResolutionWhichAction) { + GitResolutionWhichAction[GitResolutionWhichAction["Undecided"] = 0] = "Undecided"; + GitResolutionWhichAction[GitResolutionWhichAction["PickSourceAction"] = 1] = "PickSourceAction"; + GitResolutionWhichAction[GitResolutionWhichAction["PickTargetAction"] = 2] = "PickTargetAction"; +})(GitResolutionWhichAction = exports.GitResolutionWhichAction || (exports.GitResolutionWhichAction = {})); +/** + * State of the status. + */ +var GitStatusState; +(function (GitStatusState) { /** - * The drop location should be deleted. + * Status state not set. Default state. */ - DeleteOptions[DeleteOptions["DropLocation"] = 1] = "DropLocation"; + GitStatusState[GitStatusState["NotSet"] = 0] = "NotSet"; /** - * The test results should be deleted. + * Status pending. */ - DeleteOptions[DeleteOptions["TestResults"] = 2] = "TestResults"; + GitStatusState[GitStatusState["Pending"] = 1] = "Pending"; /** - * The version control label should be deleted. + * Status succeeded. */ - DeleteOptions[DeleteOptions["Label"] = 4] = "Label"; + GitStatusState[GitStatusState["Succeeded"] = 2] = "Succeeded"; /** - * The build should be deleted. + * Status failed. */ - DeleteOptions[DeleteOptions["Details"] = 8] = "Details"; + GitStatusState[GitStatusState["Failed"] = 3] = "Failed"; /** - * Published symbols should be deleted. + * Status with an error. */ - DeleteOptions[DeleteOptions["Symbols"] = 16] = "Symbols"; + GitStatusState[GitStatusState["Error"] = 4] = "Error"; /** - * All data should be deleted. + * Status is not applicable to the target object. */ - DeleteOptions[DeleteOptions["All"] = 31] = "All"; -})(DeleteOptions = exports.DeleteOptions || (exports.DeleteOptions = {})); + GitStatusState[GitStatusState["NotApplicable"] = 5] = "NotApplicable"; +})(GitStatusState = exports.GitStatusState || (exports.GitStatusState = {})); /** - * Specifies the desired ordering of folders. + * Accepted types of version options */ -var FolderQueryOrder; -(function (FolderQueryOrder) { - /** - * No order - */ - FolderQueryOrder[FolderQueryOrder["None"] = 0] = "None"; - /** - * Order by folder name and path ascending. - */ - FolderQueryOrder[FolderQueryOrder["FolderAscending"] = 1] = "FolderAscending"; +var GitVersionOptions; +(function (GitVersionOptions) { /** - * Order by folder name and path descending. + * Not specified */ - FolderQueryOrder[FolderQueryOrder["FolderDescending"] = 2] = "FolderDescending"; -})(FolderQueryOrder = exports.FolderQueryOrder || (exports.FolderQueryOrder = {})); -var GetOption; -(function (GetOption) { + GitVersionOptions[GitVersionOptions["None"] = 0] = "None"; /** - * Use the latest changeset at the time the build is queued. + * Commit that changed item prior to the current version */ - GetOption[GetOption["LatestOnQueue"] = 0] = "LatestOnQueue"; + GitVersionOptions[GitVersionOptions["PreviousChange"] = 1] = "PreviousChange"; /** - * Use the latest changeset at the time the build is started. + * First parent of commit (HEAD^) */ - GetOption[GetOption["LatestOnBuild"] = 1] = "LatestOnBuild"; + GitVersionOptions[GitVersionOptions["FirstParent"] = 2] = "FirstParent"; +})(GitVersionOptions = exports.GitVersionOptions || (exports.GitVersionOptions = {})); +/** + * Accepted types of version + */ +var GitVersionType; +(function (GitVersionType) { /** - * A user-specified version has been supplied. + * Interpret the version as a branch name */ - GetOption[GetOption["Custom"] = 2] = "Custom"; -})(GetOption = exports.GetOption || (exports.GetOption = {})); -var IssueType; -(function (IssueType) { - IssueType[IssueType["Error"] = 1] = "Error"; - IssueType[IssueType["Warning"] = 2] = "Warning"; -})(IssueType = exports.IssueType || (exports.IssueType = {})); -var ProcessTemplateType; -(function (ProcessTemplateType) { + GitVersionType[GitVersionType["Branch"] = 0] = "Branch"; /** - * Indicates a custom template. + * Interpret the version as a tag name */ - ProcessTemplateType[ProcessTemplateType["Custom"] = 0] = "Custom"; + GitVersionType[GitVersionType["Tag"] = 1] = "Tag"; /** - * Indicates a default template. + * Interpret the version as a commit ID (SHA1) */ - ProcessTemplateType[ProcessTemplateType["Default"] = 1] = "Default"; + GitVersionType[GitVersionType["Commit"] = 2] = "Commit"; +})(GitVersionType = exports.GitVersionType || (exports.GitVersionType = {})); +var ItemContentType; +(function (ItemContentType) { + ItemContentType[ItemContentType["RawText"] = 0] = "RawText"; + ItemContentType[ItemContentType["Base64Encoded"] = 1] = "Base64Encoded"; +})(ItemContentType = exports.ItemContentType || (exports.ItemContentType = {})); +/** + * The reason for which the pull request iteration was created. + */ +var IterationReason; +(function (IterationReason) { + IterationReason[IterationReason["Push"] = 0] = "Push"; + IterationReason[IterationReason["ForcePush"] = 1] = "ForcePush"; + IterationReason[IterationReason["Create"] = 2] = "Create"; + IterationReason[IterationReason["Rebase"] = 4] = "Rebase"; + IterationReason[IterationReason["Unknown"] = 8] = "Unknown"; + IterationReason[IterationReason["Retarget"] = 16] = "Retarget"; + IterationReason[IterationReason["ResolveConflicts"] = 32] = "ResolveConflicts"; +})(IterationReason = exports.IterationReason || (exports.IterationReason = {})); +/** + * Type of change for a line diff block + */ +var LineDiffBlockChangeType; +(function (LineDiffBlockChangeType) { /** - * Indicates an upgrade template. + * No change - both the blocks are identical */ - ProcessTemplateType[ProcessTemplateType["Upgrade"] = 2] = "Upgrade"; -})(ProcessTemplateType = exports.ProcessTemplateType || (exports.ProcessTemplateType = {})); -var QueryDeletedOption; -(function (QueryDeletedOption) { + LineDiffBlockChangeType[LineDiffBlockChangeType["None"] = 0] = "None"; /** - * Include only non-deleted builds. + * Lines were added to the block in the modified file */ - QueryDeletedOption[QueryDeletedOption["ExcludeDeleted"] = 0] = "ExcludeDeleted"; + LineDiffBlockChangeType[LineDiffBlockChangeType["Add"] = 1] = "Add"; /** - * Include deleted and non-deleted builds. + * Lines were deleted from the block in the original file */ - QueryDeletedOption[QueryDeletedOption["IncludeDeleted"] = 1] = "IncludeDeleted"; + LineDiffBlockChangeType[LineDiffBlockChangeType["Delete"] = 2] = "Delete"; /** - * Include only deleted builds. + * Lines were modified */ - QueryDeletedOption[QueryDeletedOption["OnlyDeleted"] = 2] = "OnlyDeleted"; -})(QueryDeletedOption = exports.QueryDeletedOption || (exports.QueryDeletedOption = {})); -var QueueOptions; -(function (QueueOptions) { + LineDiffBlockChangeType[LineDiffBlockChangeType["Edit"] = 3] = "Edit"; +})(LineDiffBlockChangeType = exports.LineDiffBlockChangeType || (exports.LineDiffBlockChangeType = {})); +/** + * The status of a pull request merge. + */ +var PullRequestAsyncStatus; +(function (PullRequestAsyncStatus) { /** - * No queue options + * Status is not set. Default state. */ - QueueOptions[QueueOptions["None"] = 0] = "None"; + PullRequestAsyncStatus[PullRequestAsyncStatus["NotSet"] = 0] = "NotSet"; /** - * Create a plan Id for the build, do not run it + * Pull request merge is queued. */ - QueueOptions[QueueOptions["DoNotRun"] = 1] = "DoNotRun"; -})(QueueOptions = exports.QueueOptions || (exports.QueueOptions = {})); -var QueuePriority; -(function (QueuePriority) { + PullRequestAsyncStatus[PullRequestAsyncStatus["Queued"] = 1] = "Queued"; /** - * Low priority. + * Pull request merge failed due to conflicts. */ - QueuePriority[QueuePriority["Low"] = 5] = "Low"; + PullRequestAsyncStatus[PullRequestAsyncStatus["Conflicts"] = 2] = "Conflicts"; /** - * Below normal priority. + * Pull request merge succeeded. */ - QueuePriority[QueuePriority["BelowNormal"] = 4] = "BelowNormal"; + PullRequestAsyncStatus[PullRequestAsyncStatus["Succeeded"] = 3] = "Succeeded"; /** - * Normal priority. + * Pull request merge rejected by policy. */ - QueuePriority[QueuePriority["Normal"] = 3] = "Normal"; + PullRequestAsyncStatus[PullRequestAsyncStatus["RejectedByPolicy"] = 4] = "RejectedByPolicy"; /** - * Above normal priority. + * Pull request merge failed. */ - QueuePriority[QueuePriority["AboveNormal"] = 2] = "AboveNormal"; + PullRequestAsyncStatus[PullRequestAsyncStatus["Failure"] = 5] = "Failure"; +})(PullRequestAsyncStatus = exports.PullRequestAsyncStatus || (exports.PullRequestAsyncStatus = {})); +/** + * The specific type of a pull request merge failure. + */ +var PullRequestMergeFailureType; +(function (PullRequestMergeFailureType) { /** - * High priority. + * Type is not set. Default type. */ - QueuePriority[QueuePriority["High"] = 1] = "High"; -})(QueuePriority = exports.QueuePriority || (exports.QueuePriority = {})); -var RepositoryCleanOptions; -(function (RepositoryCleanOptions) { - RepositoryCleanOptions[RepositoryCleanOptions["Source"] = 0] = "Source"; - RepositoryCleanOptions[RepositoryCleanOptions["SourceAndOutputDir"] = 1] = "SourceAndOutputDir"; + PullRequestMergeFailureType[PullRequestMergeFailureType["None"] = 0] = "None"; /** - * Re-create $(build.sourcesDirectory) + * Pull request merge failure type unknown. */ - RepositoryCleanOptions[RepositoryCleanOptions["SourceDir"] = 2] = "SourceDir"; + PullRequestMergeFailureType[PullRequestMergeFailureType["Unknown"] = 1] = "Unknown"; /** - * Re-create $(agnet.buildDirectory) which contains $(build.sourcesDirectory), $(build.binariesDirectory) and any folders that left from previous build. + * Pull request merge failed due to case mismatch. */ - RepositoryCleanOptions[RepositoryCleanOptions["AllBuildDir"] = 3] = "AllBuildDir"; -})(RepositoryCleanOptions = exports.RepositoryCleanOptions || (exports.RepositoryCleanOptions = {})); -var ResultSet; -(function (ResultSet) { + PullRequestMergeFailureType[PullRequestMergeFailureType["CaseSensitive"] = 2] = "CaseSensitive"; /** - * Include all repositories + * Pull request merge failed due to an object being too large. */ - ResultSet[ResultSet["All"] = 0] = "All"; + PullRequestMergeFailureType[PullRequestMergeFailureType["ObjectTooLarge"] = 3] = "ObjectTooLarge"; +})(PullRequestMergeFailureType = exports.PullRequestMergeFailureType || (exports.PullRequestMergeFailureType = {})); +/** + * Status of a pull request. + */ +var PullRequestStatus; +(function (PullRequestStatus) { /** - * Include most relevant repositories for user + * Status not set. Default state. */ - ResultSet[ResultSet["Top"] = 1] = "Top"; -})(ResultSet = exports.ResultSet || (exports.ResultSet = {})); -var ScheduleDays; -(function (ScheduleDays) { + PullRequestStatus[PullRequestStatus["NotSet"] = 0] = "NotSet"; /** - * Do not run. + * Pull request is active. */ - ScheduleDays[ScheduleDays["None"] = 0] = "None"; + PullRequestStatus[PullRequestStatus["Active"] = 1] = "Active"; /** - * Run on Monday. + * Pull request is abandoned. */ - ScheduleDays[ScheduleDays["Monday"] = 1] = "Monday"; + PullRequestStatus[PullRequestStatus["Abandoned"] = 2] = "Abandoned"; /** - * Run on Tuesday. + * Pull request is completed. */ - ScheduleDays[ScheduleDays["Tuesday"] = 2] = "Tuesday"; + PullRequestStatus[PullRequestStatus["Completed"] = 3] = "Completed"; /** - * Run on Wednesday. + * Used in pull request search criteria to include all statuses. */ - ScheduleDays[ScheduleDays["Wednesday"] = 4] = "Wednesday"; + PullRequestStatus[PullRequestStatus["All"] = 4] = "All"; +})(PullRequestStatus = exports.PullRequestStatus || (exports.PullRequestStatus = {})); +var RefFavoriteType; +(function (RefFavoriteType) { + RefFavoriteType[RefFavoriteType["Invalid"] = 0] = "Invalid"; + RefFavoriteType[RefFavoriteType["Folder"] = 1] = "Folder"; + RefFavoriteType[RefFavoriteType["Ref"] = 2] = "Ref"; +})(RefFavoriteType = exports.RefFavoriteType || (exports.RefFavoriteType = {})); +/** + * Enumeration that represents the types of IDEs supported. + */ +var SupportedIdeType; +(function (SupportedIdeType) { + SupportedIdeType[SupportedIdeType["Unknown"] = 0] = "Unknown"; + SupportedIdeType[SupportedIdeType["AndroidStudio"] = 1] = "AndroidStudio"; + SupportedIdeType[SupportedIdeType["AppCode"] = 2] = "AppCode"; + SupportedIdeType[SupportedIdeType["CLion"] = 3] = "CLion"; + SupportedIdeType[SupportedIdeType["DataGrip"] = 4] = "DataGrip"; + SupportedIdeType[SupportedIdeType["Eclipse"] = 13] = "Eclipse"; + SupportedIdeType[SupportedIdeType["IntelliJ"] = 5] = "IntelliJ"; + SupportedIdeType[SupportedIdeType["MPS"] = 6] = "MPS"; + SupportedIdeType[SupportedIdeType["PhpStorm"] = 7] = "PhpStorm"; + SupportedIdeType[SupportedIdeType["PyCharm"] = 8] = "PyCharm"; + SupportedIdeType[SupportedIdeType["RubyMine"] = 9] = "RubyMine"; + SupportedIdeType[SupportedIdeType["Tower"] = 10] = "Tower"; + SupportedIdeType[SupportedIdeType["VisualStudio"] = 11] = "VisualStudio"; + SupportedIdeType[SupportedIdeType["VSCode"] = 14] = "VSCode"; + SupportedIdeType[SupportedIdeType["WebStorm"] = 12] = "WebStorm"; +})(SupportedIdeType = exports.SupportedIdeType || (exports.SupportedIdeType = {})); +/** + * Options for Version handling. + */ +var TfvcVersionOption; +(function (TfvcVersionOption) { /** - * Run on Thursday. + * None. */ - ScheduleDays[ScheduleDays["Thursday"] = 8] = "Thursday"; + TfvcVersionOption[TfvcVersionOption["None"] = 0] = "None"; /** - * Run on Friday. + * Return the previous version. */ - ScheduleDays[ScheduleDays["Friday"] = 16] = "Friday"; + TfvcVersionOption[TfvcVersionOption["Previous"] = 1] = "Previous"; /** - * Run on Saturday. + * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier. */ - ScheduleDays[ScheduleDays["Saturday"] = 32] = "Saturday"; + TfvcVersionOption[TfvcVersionOption["UseRename"] = 2] = "UseRename"; +})(TfvcVersionOption = exports.TfvcVersionOption || (exports.TfvcVersionOption = {})); +/** + * Type of Version object + */ +var TfvcVersionType; +(function (TfvcVersionType) { /** - * Run on Sunday. + * Version is treated as a ChangesetId. */ - ScheduleDays[ScheduleDays["Sunday"] = 64] = "Sunday"; + TfvcVersionType[TfvcVersionType["None"] = 0] = "None"; /** - * Run on all days of the week. + * Version is treated as a ChangesetId. */ - ScheduleDays[ScheduleDays["All"] = 127] = "All"; -})(ScheduleDays = exports.ScheduleDays || (exports.ScheduleDays = {})); -var ServiceHostStatus; -(function (ServiceHostStatus) { + TfvcVersionType[TfvcVersionType["Changeset"] = 1] = "Changeset"; /** - * The service host is currently connected and accepting commands. + * Version is treated as a Shelveset name and owner. */ - ServiceHostStatus[ServiceHostStatus["Online"] = 1] = "Online"; + TfvcVersionType[TfvcVersionType["Shelveset"] = 2] = "Shelveset"; /** - * The service host is currently disconnected and not accepting commands. + * Version is treated as a Change. */ - ServiceHostStatus[ServiceHostStatus["Offline"] = 2] = "Offline"; -})(ServiceHostStatus = exports.ServiceHostStatus || (exports.ServiceHostStatus = {})); -var SourceProviderAvailability; -(function (SourceProviderAvailability) { + TfvcVersionType[TfvcVersionType["Change"] = 3] = "Change"; /** - * The source provider is available in the hosted environment. + * Version is treated as a Date. */ - SourceProviderAvailability[SourceProviderAvailability["Hosted"] = 1] = "Hosted"; + TfvcVersionType[TfvcVersionType["Date"] = 4] = "Date"; /** - * The source provider is available in the on-premises environment. + * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used. */ - SourceProviderAvailability[SourceProviderAvailability["OnPremises"] = 2] = "OnPremises"; + TfvcVersionType[TfvcVersionType["Latest"] = 5] = "Latest"; /** - * The source provider is available in all environments. + * Version will be treated as a Tip, if no version is defined latest will be used. */ - SourceProviderAvailability[SourceProviderAvailability["All"] = 3] = "All"; -})(SourceProviderAvailability = exports.SourceProviderAvailability || (exports.SourceProviderAvailability = {})); -var StageUpdateType; -(function (StageUpdateType) { - StageUpdateType[StageUpdateType["Cancel"] = 0] = "Cancel"; - StageUpdateType[StageUpdateType["Retry"] = 1] = "Retry"; -})(StageUpdateType = exports.StageUpdateType || (exports.StageUpdateType = {})); -var SupportLevel; -(function (SupportLevel) { + TfvcVersionType[TfvcVersionType["Tip"] = 6] = "Tip"; /** - * The functionality is not supported. + * Version will be treated as a MergeSource. */ - SupportLevel[SupportLevel["Unsupported"] = 0] = "Unsupported"; + TfvcVersionType[TfvcVersionType["MergeSource"] = 7] = "MergeSource"; +})(TfvcVersionType = exports.TfvcVersionType || (exports.TfvcVersionType = {})); +var VersionControlChangeType; +(function (VersionControlChangeType) { + VersionControlChangeType[VersionControlChangeType["None"] = 0] = "None"; + VersionControlChangeType[VersionControlChangeType["Add"] = 1] = "Add"; + VersionControlChangeType[VersionControlChangeType["Edit"] = 2] = "Edit"; + VersionControlChangeType[VersionControlChangeType["Encoding"] = 4] = "Encoding"; + VersionControlChangeType[VersionControlChangeType["Rename"] = 8] = "Rename"; + VersionControlChangeType[VersionControlChangeType["Delete"] = 16] = "Delete"; + VersionControlChangeType[VersionControlChangeType["Undelete"] = 32] = "Undelete"; + VersionControlChangeType[VersionControlChangeType["Branch"] = 64] = "Branch"; + VersionControlChangeType[VersionControlChangeType["Merge"] = 128] = "Merge"; + VersionControlChangeType[VersionControlChangeType["Lock"] = 256] = "Lock"; + VersionControlChangeType[VersionControlChangeType["Rollback"] = 512] = "Rollback"; + VersionControlChangeType[VersionControlChangeType["SourceRename"] = 1024] = "SourceRename"; + VersionControlChangeType[VersionControlChangeType["TargetRename"] = 2048] = "TargetRename"; + VersionControlChangeType[VersionControlChangeType["Property"] = 4096] = "Property"; + VersionControlChangeType[VersionControlChangeType["All"] = 8191] = "All"; +})(VersionControlChangeType = exports.VersionControlChangeType || (exports.VersionControlChangeType = {})); +var VersionControlRecursionType; +(function (VersionControlRecursionType) { /** - * The functionality is supported. + * Only return the specified item. */ - SupportLevel[SupportLevel["Supported"] = 1] = "Supported"; + VersionControlRecursionType[VersionControlRecursionType["None"] = 0] = "None"; /** - * The functionality is required. + * Return the specified item and its direct children. */ - SupportLevel[SupportLevel["Required"] = 2] = "Required"; -})(SupportLevel = exports.SupportLevel || (exports.SupportLevel = {})); -var TaskResult; -(function (TaskResult) { - TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; - TaskResult[TaskResult["SucceededWithIssues"] = 1] = "SucceededWithIssues"; - TaskResult[TaskResult["Failed"] = 2] = "Failed"; - TaskResult[TaskResult["Canceled"] = 3] = "Canceled"; - TaskResult[TaskResult["Skipped"] = 4] = "Skipped"; - TaskResult[TaskResult["Abandoned"] = 5] = "Abandoned"; -})(TaskResult = exports.TaskResult || (exports.TaskResult = {})); -var TimelineRecordState; -(function (TimelineRecordState) { - TimelineRecordState[TimelineRecordState["Pending"] = 0] = "Pending"; - TimelineRecordState[TimelineRecordState["InProgress"] = 1] = "InProgress"; - TimelineRecordState[TimelineRecordState["Completed"] = 2] = "Completed"; -})(TimelineRecordState = exports.TimelineRecordState || (exports.TimelineRecordState = {})); -var ValidationResult; -(function (ValidationResult) { - ValidationResult[ValidationResult["OK"] = 0] = "OK"; - ValidationResult[ValidationResult["Warning"] = 1] = "Warning"; - ValidationResult[ValidationResult["Error"] = 2] = "Error"; -})(ValidationResult = exports.ValidationResult || (exports.ValidationResult = {})); -var WorkspaceMappingType; -(function (WorkspaceMappingType) { + VersionControlRecursionType[VersionControlRecursionType["OneLevel"] = 1] = "OneLevel"; /** - * The path is mapped in the workspace. + * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. */ - WorkspaceMappingType[WorkspaceMappingType["Map"] = 0] = "Map"; + VersionControlRecursionType[VersionControlRecursionType["OneLevelPlusNestedEmptyFolders"] = 4] = "OneLevelPlusNestedEmptyFolders"; /** - * The path is cloaked in the workspace. + * Return specified item and all descendants */ - WorkspaceMappingType[WorkspaceMappingType["Cloak"] = 1] = "Cloak"; -})(WorkspaceMappingType = exports.WorkspaceMappingType || (exports.WorkspaceMappingType = {})); + VersionControlRecursionType[VersionControlRecursionType["Full"] = 120] = "Full"; +})(VersionControlRecursionType = exports.VersionControlRecursionType || (exports.VersionControlRecursionType = {})); exports.TypeInfo = { - AgentStatus: { + Attachment: {}, + Change: {}, + ChangeList: {}, + Comment: {}, + CommentThread: {}, + CommentThreadStatus: { enumValues: { - "unavailable": 0, - "available": 1, - "offline": 2 + "unknown": 0, + "active": 1, + "fixed": 2, + "wontFix": 3, + "closed": 4, + "byDesign": 5, + "pending": 6 } }, - AuditAction: { + CommentType: { enumValues: { - "add": 1, - "update": 2, - "delete": 3 + "unknown": 0, + "text": 1, + "codeChange": 2, + "system": 3 } }, - Build: {}, - BuildAgent: {}, - BuildAuthorizationScope: { + FileDiff: {}, + GitAnnotatedTag: {}, + GitAsyncOperationStatus: { enumValues: { - "projectCollection": 1, - "project": 2 + "queued": 1, + "inProgress": 2, + "completed": 3, + "failed": 4, + "abandoned": 5 } }, - BuildCompletedEvent: {}, - BuildCompletionTrigger: {}, - BuildController: {}, - BuildDefinition: {}, - BuildDefinition3_2: {}, - BuildDefinitionReference: {}, - BuildDefinitionReference3_2: {}, - BuildDefinitionRevision: {}, - BuildDefinitionSourceProvider: {}, - BuildDefinitionTemplate: {}, - BuildDefinitionTemplate3_2: {}, - BuildDeletedEvent: {}, - BuildDeployment: {}, - BuildLog: {}, - BuildMetric: {}, - BuildOptionDefinition: {}, - BuildOptionInputDefinition: {}, - BuildOptionInputType: { + GitAsyncRefOperation: {}, + GitAsyncRefOperationDetail: {}, + GitAsyncRefOperationFailureStatus: { enumValues: { - "string": 0, - "boolean": 1, - "stringList": 2, - "radio": 3, - "pickList": 4, - "multiLine": 5, - "branchFilter": 6 + "none": 0, + "invalidRefName": 1, + "refNameConflict": 2, + "createBranchPermissionRequired": 3, + "writePermissionRequired": 4, + "targetBranchDeleted": 5, + "gitObjectTooLarge": 6, + "operationIndentityNotFound": 7, + "asyncOperationNotFound": 8, + "other": 9, + "emptyCommitterSignature": 10 } }, - BuildPhaseStatus: { + GitAsyncRefOperationParameters: {}, + GitAsyncRefOperationSource: {}, + GitBaseVersionDescriptor: {}, + GitBranchStats: {}, + GitChange: {}, + GitCherryPick: {}, + GitCommit: {}, + GitCommitChanges: {}, + GitCommitDiffs: {}, + GitCommitRef: {}, + GitCommitToCreate: {}, + GitConflict: {}, + GitConflictAddAdd: {}, + GitConflictAddRename: {}, + GitConflictDeleteEdit: {}, + GitConflictDeleteRename: {}, + GitConflictDirectoryFile: {}, + GitConflictEditDelete: {}, + GitConflictEditEdit: {}, + GitConflictFileDirectory: {}, + GitConflictRename1to2: {}, + GitConflictRename2to1: {}, + GitConflictRenameAdd: {}, + GitConflictRenameDelete: {}, + GitConflictRenameRename: {}, + GitConflictType: { enumValues: { - "unknown": 0, - "failed": 1, - "succeeded": 2 + "none": 0, + "addAdd": 1, + "addRename": 2, + "deleteEdit": 3, + "deleteRename": 4, + "directoryFile": 5, + "directoryChild": 6, + "editDelete": 7, + "editEdit": 8, + "fileDirectory": 9, + "rename1to2": 10, + "rename2to1": 11, + "renameAdd": 12, + "renameDelete": 13, + "renameRename": 14 } }, - BuildProcessTemplate: {}, - BuildQueryOrder: { + GitConflictUpdateResult: {}, + GitConflictUpdateStatus: { enumValues: { - "finishTimeAscending": 2, - "finishTimeDescending": 3, - "queueTimeDescending": 4, - "queueTimeAscending": 5, - "startTimeDescending": 6, - "startTimeAscending": 7 + "succeeded": 0, + "badRequest": 1, + "invalidResolution": 2, + "unsupportedConflictType": 3, + "notFound": 4 } }, - BuildQueuedEvent: {}, - BuildReason: { + GitDeletedRepository: {}, + GitForkRef: {}, + GitForkSyncRequest: {}, + GitForkTeamProjectReference: {}, + GitHistoryMode: { enumValues: { - "none": 0, - "manual": 1, - "individualCI": 2, - "batchedCI": 4, - "schedule": 8, - "scheduleForced": 16, - "userCreated": 32, - "validateShelveset": 64, - "checkInShelveset": 128, - "pullRequest": 256, - "buildCompletion": 512, - "resourceTrigger": 1024, - "triggered": 1967, - "all": 2031 + "simplifiedHistory": 0, + "firstParent": 1, + "fullHistory": 2, + "fullHistorySimplifyMerges": 3 } }, - BuildReference: {}, - BuildRequestValidationResult: {}, - BuildResult: { + GitImportFailedEvent: {}, + GitImportRequest: {}, + GitImportSucceededEvent: {}, + GitItem: {}, + GitItemDescriptor: {}, + GitItemRequestData: {}, + GitLastChangeTreeItems: {}, + GitMerge: {}, + GitObject: {}, + GitObjectType: { enumValues: { - "none": 0, - "succeeded": 2, - "partiallySucceeded": 4, - "failed": 8, - "canceled": 32 + "bad": 0, + "commit": 1, + "tree": 2, + "blob": 3, + "tag": 4, + "ext2": 5, + "ofsDelta": 6, + "refDelta": 7 } }, - BuildRetentionHistory: {}, - BuildRetentionSample: {}, - BuildServer: {}, - BuildStatus: { + GitPathAction: {}, + GitPathActions: { enumValues: { "none": 0, - "inProgress": 1, - "completed": 2, - "cancelling": 4, - "postponed": 8, - "notStarted": 32, - "all": 47 + "edit": 1, + "delete": 2, + "add": 3, + "rename": 4 } }, - BuildSummary: {}, - BuildTagsAddedEvent: {}, - BuildTrigger: {}, - BuildUpdatedEvent: {}, - Change: {}, - ContinuousDeploymentDefinition: {}, - ContinuousIntegrationTrigger: {}, - ControllerStatus: { + GitPathToItemsCollection: {}, + GitPolicyConfigurationResponse: {}, + GitPullRequest: {}, + GitPullRequestChange: {}, + GitPullRequestCommentThread: {}, + GitPullRequestCompletionOptions: {}, + GitPullRequestIteration: {}, + GitPullRequestIterationChanges: {}, + GitPullRequestMergeStrategy: { enumValues: { - "unavailable": 0, - "available": 1, - "offline": 2 + "noFastForward": 1, + "squash": 2, + "rebase": 3, + "rebaseMerge": 4 } }, - DefinitionQuality: { + GitPullRequestQuery: {}, + GitPullRequestQueryInput: {}, + GitPullRequestQueryType: { enumValues: { - "definition": 1, - "draft": 2 + "notSet": 0, + "lastMergeCommit": 1, + "commit": 2 } }, - DefinitionQueryOrder: { + GitPullRequestReviewFileType: { enumValues: { - "none": 0, - "lastModifiedAscending": 1, - "lastModifiedDescending": 2, - "definitionNameAscending": 3, - "definitionNameDescending": 4 + "changeEntry": 0, + "attachment": 1 } }, - DefinitionQueueStatus: { + GitPullRequestSearchCriteria: {}, + GitPullRequestStatus: {}, + GitPush: {}, + GitPushEventData: {}, + GitPushRef: {}, + GitPushSearchCriteria: {}, + GitQueryBranchStatsCriteria: {}, + GitQueryCommitsCriteria: {}, + GitQueryRefsCriteria: {}, + GitRef: {}, + GitRefFavorite: {}, + GitRefSearchType: { enumValues: { - "enabled": 0, - "paused": 1, - "disabled": 2 + "exact": 0, + "startsWith": 1, + "contains": 2 } }, - DefinitionReference: {}, - DefinitionTriggerType: { + GitRefUpdateMode: { enumValues: { - "none": 1, - "continuousIntegration": 2, - "batchedContinuousIntegration": 4, - "schedule": 8, - "gatedCheckIn": 16, - "batchedGatedCheckIn": 32, - "pullRequest": 64, - "buildCompletion": 128, - "all": 255 + "bestEffort": 0, + "allOrNone": 1 } }, - DefinitionType: { + GitRefUpdateResult: {}, + GitRefUpdateStatus: { enumValues: { - "xaml": 1, - "build": 2 + "succeeded": 0, + "forcePushRequired": 1, + "staleOldObjectId": 2, + "invalidRefName": 3, + "unprocessed": 4, + "unresolvableToCommit": 5, + "writePermissionRequired": 6, + "manageNotePermissionRequired": 7, + "createBranchPermissionRequired": 8, + "createTagPermissionRequired": 9, + "rejectedByPlugin": 10, + "locked": 11, + "refNameConflict": 12, + "rejectedByPolicy": 13, + "succeededNonExistentRef": 14, + "succeededCorruptRef": 15 } }, - DeleteOptions: { + GitRepository: {}, + GitRepositoryCreateOptions: {}, + GitRepositoryRef: {}, + GitResolutionError: { enumValues: { "none": 0, - "dropLocation": 1, - "testResults": 2, - "label": 4, - "details": 8, - "symbols": 16, - "all": 31 + "mergeContentNotFound": 1, + "pathInUse": 2, + "invalidPath": 3, + "unknownAction": 4, + "unknownMergeType": 5, + "otherError": 255 } }, - DesignerProcess: {}, - Folder: {}, - FolderQueryOrder: { + GitResolutionMergeContent: {}, + GitResolutionMergeType: { enumValues: { - "none": 0, - "folderAscending": 1, - "folderDescending": 2 + "undecided": 0, + "takeSourceContent": 1, + "takeTargetContent": 2, + "autoMerged": 3, + "userMerged": 4 } }, - GatedCheckInTrigger: {}, - GetOption: { + GitResolutionPathConflict: {}, + GitResolutionPathConflictAction: { enumValues: { - "latestOnQueue": 0, - "latestOnBuild": 1, - "custom": 2 + "undecided": 0, + "keepSourceRenameTarget": 1, + "keepSourceDeleteTarget": 2, + "keepTargetRenameSource": 3, + "keepTargetDeleteSource": 4 } }, - InformationNode: {}, - Issue: {}, - IssueType: { + GitResolutionPickOneAction: {}, + GitResolutionRename1to2: {}, + GitResolutionRename1to2Action: { enumValues: { - "error": 1, - "warning": 2 + "undecided": 0, + "keepSourcePath": 1, + "keepTargetPath": 2, + "keepBothFiles": 3 } }, - Phase: {}, - ProcessTemplateType: { + GitResolutionStatus: { enumValues: { - "custom": 0, - "default": 1, - "upgrade": 2 + "unresolved": 0, + "partiallyResolved": 1, + "resolved": 2 } }, - PullRequestTrigger: {}, - QueryDeletedOption: { + GitResolutionWhichAction: { enumValues: { - "excludeDeleted": 0, - "includeDeleted": 1, - "onlyDeleted": 2 + "undecided": 0, + "pickSourceAction": 1, + "pickTargetAction": 2 } }, - QueueOptions: { + GitRevert: {}, + GitStatus: {}, + GitStatusState: { + enumValues: { + "notSet": 0, + "pending": 1, + "succeeded": 2, + "failed": 3, + "error": 4, + "notApplicable": 5 + } + }, + GitTargetVersionDescriptor: {}, + GitTreeDiff: {}, + GitTreeDiffEntry: {}, + GitTreeDiffResponse: {}, + GitTreeEntryRef: {}, + GitTreeRef: {}, + GitUserDate: {}, + GitVersionDescriptor: {}, + GitVersionOptions: { enumValues: { "none": 0, - "doNotRun": 1 + "previousChange": 1, + "firstParent": 2 } }, - QueuePriority: { + GitVersionType: { enumValues: { - "low": 5, - "belowNormal": 4, - "normal": 3, - "aboveNormal": 2, - "high": 1 + "branch": 0, + "tag": 1, + "commit": 2 } }, - RepositoryCleanOptions: { + HistoryEntry: {}, + IncludedGitCommit: {}, + ItemContent: {}, + ItemContentType: { enumValues: { - "source": 0, - "sourceAndOutputDir": 1, - "sourceDir": 2, - "allBuildDir": 3 + "rawText": 0, + "base64Encoded": 1 } }, - RepositoryWebhook: {}, - ResultSet: { + ItemDetailsOptions: {}, + IterationReason: { enumValues: { - "all": 0, - "top": 1 + "push": 0, + "forcePush": 1, + "create": 2, + "rebase": 4, + "unknown": 8, + "retarget": 16, + "resolveConflicts": 32 } }, - RetentionLease: {}, - Schedule: {}, - ScheduleDays: { + LineDiffBlock: {}, + LineDiffBlockChangeType: { enumValues: { "none": 0, - "monday": 1, - "tuesday": 2, - "wednesday": 4, - "thursday": 8, - "friday": 16, - "saturday": 32, - "sunday": 64, - "all": 127 + "add": 1, + "delete": 2, + "edit": 3 } }, - ScheduleTrigger: {}, - ServiceHostStatus: { + PullRequestAsyncStatus: { enumValues: { - "online": 1, - "offline": 2 + "notSet": 0, + "queued": 1, + "conflicts": 2, + "succeeded": 3, + "rejectedByPolicy": 4, + "failure": 5 } }, - SourceProviderAttributes: {}, - SourceProviderAvailability: { + PullRequestMergeFailureType: { enumValues: { - "hosted": 1, - "onPremises": 2, - "all": 3 + "none": 0, + "unknown": 1, + "caseSensitive": 2, + "objectTooLarge": 3 } }, - StageUpdateType: { + PullRequestStatus: { enumValues: { - "cancel": 0, - "retry": 1 + "notSet": 0, + "active": 1, + "abandoned": 2, + "completed": 3, + "all": 4 } }, - SupportedTrigger: {}, - SupportLevel: { + RefFavoriteType: { enumValues: { - "unsupported": 0, - "supported": 1, - "required": 2 + "invalid": 0, + "folder": 1, + "ref": 2 } }, - TaskResult: { + SupportedIde: {}, + SupportedIdeType: { enumValues: { - "succeeded": 0, - "succeededWithIssues": 1, - "failed": 2, - "canceled": 3, - "skipped": 4, - "abandoned": 5 + "unknown": 0, + "androidStudio": 1, + "appCode": 2, + "cLion": 3, + "dataGrip": 4, + "eclipse": 13, + "intelliJ": 5, + "mps": 6, + "phpStorm": 7, + "pyCharm": 8, + "rubyMine": 9, + "tower": 10, + "visualStudio": 11, + "vsCode": 14, + "webStorm": 12 } }, - Timeline: {}, - TimelineRecord: {}, - TimelineRecordState: { + TfvcBranch: {}, + TfvcBranchRef: {}, + TfvcChange: {}, + TfvcChangeset: {}, + TfvcChangesetRef: {}, + TfvcCheckinEventData: {}, + TfvcHistoryEntry: {}, + TfvcItem: {}, + TfvcItemDescriptor: {}, + TfvcItemPreviousHash: {}, + TfvcItemRequestData: {}, + TfvcLabel: {}, + TfvcLabelRef: {}, + TfvcShelveset: {}, + TfvcShelvesetRef: {}, + TfvcVersionDescriptor: {}, + TfvcVersionOption: { enumValues: { - "pending": 0, - "inProgress": 1, - "completed": 2 + "none": 0, + "previous": 1, + "useRename": 2 } }, - TimelineRecordsUpdatedEvent: {}, - UpdateStageParameters: {}, - ValidationResult: { + TfvcVersionType: { enumValues: { - "ok": 0, - "warning": 1, - "error": 2 + "none": 0, + "changeset": 1, + "shelveset": 2, + "change": 3, + "date": 4, + "latest": 5, + "tip": 6, + "mergeSource": 7 + } + }, + UpdateRefsRequest: {}, + VersionControlChangeType: { + enumValues: { + "none": 0, + "add": 1, + "edit": 2, + "encoding": 4, + "rename": 8, + "delete": 16, + "undelete": 32, + "branch": 64, + "merge": 128, + "lock": 256, + "rollback": 512, + "sourceRename": 1024, + "targetRename": 2048, + "property": 4096, + "all": 8191 } }, - WorkspaceMapping: {}, - WorkspaceMappingType: { + VersionControlProjectInfo: {}, + VersionControlRecursionType: { enumValues: { - "map": 0, - "cloak": 1 + "none": 0, + "oneLevel": 1, + "oneLevelPlusNestedEmptyFolders": 4, + "full": 120 } }, - WorkspaceTemplate: {}, - XamlBuildDefinition: {}, }; -exports.TypeInfo.Build.fields = { - controller: { - typeInfo: exports.TypeInfo.BuildController +exports.TypeInfo.Attachment.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.Change.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType }, - definition: { - typeInfo: exports.TypeInfo.DefinitionReference + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.ChangeList.fields = { + changeCounts: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.VersionControlChangeType, }, - deletedDate: { + creationDate: { isDate: true, }, - finishTime: { + sortDate: { isDate: true, + } +}; +exports.TypeInfo.Comment.fields = { + commentType: { + enumType: exports.TypeInfo.CommentType }, - lastChangedDate: { + lastContentUpdatedDate: { isDate: true, }, - priority: { - enumType: exports.TypeInfo.QueuePriority - }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - }, - queueOptions: { - enumType: exports.TypeInfo.QueueOptions - }, - queueTime: { + lastUpdatedDate: { isDate: true, }, - reason: { - enumType: exports.TypeInfo.BuildReason + publishedDate: { + isDate: true, + } +}; +exports.TypeInfo.CommentThread.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment }, - result: { - enumType: exports.TypeInfo.BuildResult + lastUpdatedDate: { + isDate: true, }, - startTime: { + publishedDate: { isDate: true, }, status: { - enumType: exports.TypeInfo.BuildStatus - }, - triggeredByBuild: { - typeInfo: exports.TypeInfo.Build - }, - validationResults: { + enumType: exports.TypeInfo.CommentThreadStatus + } +}; +exports.TypeInfo.FileDiff.fields = { + lineDiffBlocks: { isArray: true, - typeInfo: exports.TypeInfo.BuildRequestValidationResult + typeInfo: exports.TypeInfo.LineDiffBlock } }; -exports.TypeInfo.BuildAgent.fields = { - createdDate: { - isDate: true, +exports.TypeInfo.GitAnnotatedTag.fields = { + taggedBy: { + typeInfo: exports.TypeInfo.GitUserDate }, - status: { - enumType: exports.TypeInfo.AgentStatus + taggedObject: { + typeInfo: exports.TypeInfo.GitObject + } +}; +exports.TypeInfo.GitAsyncRefOperation.fields = { + detailedStatus: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail }, - updatedDate: { - isDate: true, + parameters: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus } }; -exports.TypeInfo.BuildCompletedEvent.fields = { - build: { - typeInfo: exports.TypeInfo.Build +exports.TypeInfo.GitAsyncRefOperationDetail.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncRefOperationFailureStatus + } +}; +exports.TypeInfo.GitAsyncRefOperationParameters.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository }, - changes: { + source: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationSource + } +}; +exports.TypeInfo.GitAsyncRefOperationSource.fields = { + commitList: { isArray: true, - typeInfo: exports.TypeInfo.Change + typeInfo: exports.TypeInfo.GitCommitRef + } +}; +exports.TypeInfo.GitBaseVersionDescriptor.fields = { + baseVersionOptions: { + enumType: exports.TypeInfo.GitVersionOptions }, - testResults: { - typeInfo: TFS_TestManagement_Contracts.TypeInfo.AggregatedResultsAnalysis + baseVersionType: { + enumType: exports.TypeInfo.GitVersionType }, - timelineRecords: { - isArray: true, - typeInfo: exports.TypeInfo.TimelineRecord + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType } }; -exports.TypeInfo.BuildCompletionTrigger.fields = { - definition: { - typeInfo: exports.TypeInfo.DefinitionReference +exports.TypeInfo.GitBranchStats.fields = { + commit: { + typeInfo: exports.TypeInfo.GitCommitRef + } +}; +exports.TypeInfo.GitChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType }, - triggerType: { - enumType: exports.TypeInfo.DefinitionTriggerType + newContent: { + typeInfo: exports.TypeInfo.ItemContent } }; -exports.TypeInfo.BuildController.fields = { - createdDate: { - isDate: true, +exports.TypeInfo.GitCherryPick.fields = { + detailedStatus: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail }, - status: { - enumType: exports.TypeInfo.ControllerStatus + parameters: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters }, - updatedDate: { - isDate: true, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus } }; -exports.TypeInfo.BuildDefinition.fields = { - createdDate: { - isDate: true, - }, - draftOf: { - typeInfo: exports.TypeInfo.DefinitionReference +exports.TypeInfo.GitCommit.fields = { + author: { + typeInfo: exports.TypeInfo.GitUserDate }, - drafts: { + changes: { isArray: true, - typeInfo: exports.TypeInfo.DefinitionReference + typeInfo: exports.TypeInfo.GitChange }, - jobAuthorizationScope: { - enumType: exports.TypeInfo.BuildAuthorizationScope + committer: { + typeInfo: exports.TypeInfo.GitUserDate }, - latestBuild: { - typeInfo: exports.TypeInfo.Build + push: { + typeInfo: exports.TypeInfo.GitPushRef }, - latestCompletedBuild: { - typeInfo: exports.TypeInfo.Build + statuses: { + isArray: true, + typeInfo: exports.TypeInfo.GitStatus + } +}; +exports.TypeInfo.GitCommitChanges.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.GitChange + } +}; +exports.TypeInfo.GitCommitDiffs.fields = { + changeCounts: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.VersionControlChangeType, }, - metrics: { + changes: { isArray: true, - typeInfo: exports.TypeInfo.BuildMetric + typeInfo: exports.TypeInfo.GitChange + } +}; +exports.TypeInfo.GitCommitRef.fields = { + author: { + typeInfo: exports.TypeInfo.GitUserDate }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + changes: { + isArray: true, + typeInfo: exports.TypeInfo.GitChange }, - quality: { - enumType: exports.TypeInfo.DefinitionQuality + committer: { + typeInfo: exports.TypeInfo.GitUserDate }, - queueStatus: { - enumType: exports.TypeInfo.DefinitionQueueStatus + push: { + typeInfo: exports.TypeInfo.GitPushRef }, - triggers: { + statuses: { isArray: true, - typeInfo: exports.TypeInfo.BuildTrigger + typeInfo: exports.TypeInfo.GitStatus + } +}; +exports.TypeInfo.GitCommitToCreate.fields = { + baseRef: { + typeInfo: exports.TypeInfo.GitRef }, - type: { - enumType: exports.TypeInfo.DefinitionType + pathActions: { + isArray: true, + typeInfo: exports.TypeInfo.GitPathAction } }; -exports.TypeInfo.BuildDefinition3_2.fields = { - createdDate: { - isDate: true, +exports.TypeInfo.GitConflict.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - draftOf: { - typeInfo: exports.TypeInfo.DefinitionReference + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - drafts: { - isArray: true, - typeInfo: exports.TypeInfo.DefinitionReference + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - jobAuthorizationScope: { - enumType: exports.TypeInfo.BuildAuthorizationScope + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - latestBuild: { - typeInfo: exports.TypeInfo.Build + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - latestCompletedBuild: { - typeInfo: exports.TypeInfo.Build + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus }, - metrics: { - isArray: true, - typeInfo: exports.TypeInfo.BuildMetric + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictAddAdd.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - quality: { - enumType: exports.TypeInfo.DefinitionQuality + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - queueStatus: { - enumType: exports.TypeInfo.DefinitionQueueStatus + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - triggers: { - isArray: true, - typeInfo: exports.TypeInfo.BuildTrigger + resolution: { + typeInfo: exports.TypeInfo.GitResolutionMergeContent }, - type: { - enumType: exports.TypeInfo.DefinitionType - } -}; -exports.TypeInfo.BuildDefinitionReference.fields = { - createdDate: { - isDate: true, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - draftOf: { - typeInfo: exports.TypeInfo.DefinitionReference + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus }, - drafts: { - isArray: true, - typeInfo: exports.TypeInfo.DefinitionReference + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictAddRename.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - latestBuild: { - typeInfo: exports.TypeInfo.Build + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - latestCompletedBuild: { - typeInfo: exports.TypeInfo.Build + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - metrics: { - isArray: true, - typeInfo: exports.TypeInfo.BuildMetric + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict }, - quality: { - enumType: exports.TypeInfo.DefinitionQuality + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - queueStatus: { - enumType: exports.TypeInfo.DefinitionQueueStatus + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus }, - type: { - enumType: exports.TypeInfo.DefinitionType + resolvedDate: { + isDate: true, } }; -exports.TypeInfo.BuildDefinitionReference3_2.fields = { - createdDate: { - isDate: true, +exports.TypeInfo.GitConflictDeleteEdit.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - draftOf: { - typeInfo: exports.TypeInfo.DefinitionReference + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - drafts: { - isArray: true, - typeInfo: exports.TypeInfo.DefinitionReference + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - metrics: { - isArray: true, - typeInfo: exports.TypeInfo.BuildMetric + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPickOneAction }, - quality: { - enumType: exports.TypeInfo.DefinitionQuality + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - queueStatus: { - enumType: exports.TypeInfo.DefinitionQueueStatus + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus }, - type: { - enumType: exports.TypeInfo.DefinitionType - } -}; -exports.TypeInfo.BuildDefinitionRevision.fields = { - changedDate: { + resolvedDate: { isDate: true, - }, - changeType: { - enumType: exports.TypeInfo.AuditAction } }; -exports.TypeInfo.BuildDefinitionSourceProvider.fields = { - lastModified: { - isDate: true, +exports.TypeInfo.GitConflictDeleteRename.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - supportedTriggerTypes: { - enumType: exports.TypeInfo.DefinitionTriggerType - } -}; -exports.TypeInfo.BuildDefinitionTemplate.fields = { - template: { - typeInfo: exports.TypeInfo.BuildDefinition - } -}; -exports.TypeInfo.BuildDefinitionTemplate3_2.fields = { - template: { - typeInfo: exports.TypeInfo.BuildDefinition3_2 - } -}; -exports.TypeInfo.BuildDeletedEvent.fields = { - build: { - typeInfo: exports.TypeInfo.Build - } -}; -exports.TypeInfo.BuildDeployment.fields = { - deployment: { - typeInfo: exports.TypeInfo.BuildSummary - } -}; -exports.TypeInfo.BuildLog.fields = { - createdOn: { - isDate: true, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - lastChangedOn: { - isDate: true, - } -}; -exports.TypeInfo.BuildMetric.fields = { - date: { - isDate: true, - } -}; -exports.TypeInfo.BuildOptionDefinition.fields = { - inputs: { - isArray: true, - typeInfo: exports.TypeInfo.BuildOptionInputDefinition - } -}; -exports.TypeInfo.BuildOptionInputDefinition.fields = { - type: { - enumType: exports.TypeInfo.BuildOptionInputType - } -}; -exports.TypeInfo.BuildProcessTemplate.fields = { - supportedReasons: { - enumType: exports.TypeInfo.BuildReason + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - templateType: { - enumType: exports.TypeInfo.ProcessTemplateType - } -}; -exports.TypeInfo.BuildQueuedEvent.fields = { - build: { - typeInfo: exports.TypeInfo.Build - } -}; -exports.TypeInfo.BuildReference.fields = { - finishTime: { - isDate: true, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - queueTime: { - isDate: true, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPickOneAction }, - result: { - enumType: exports.TypeInfo.BuildResult + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - startTime: { - isDate: true, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus }, - status: { - enumType: exports.TypeInfo.BuildStatus - } -}; -exports.TypeInfo.BuildRequestValidationResult.fields = { - result: { - enumType: exports.TypeInfo.ValidationResult - } -}; -exports.TypeInfo.BuildRetentionHistory.fields = { - buildRetentionSamples: { - isArray: true, - typeInfo: exports.TypeInfo.BuildRetentionSample - } -}; -exports.TypeInfo.BuildRetentionSample.fields = { - sampleTime: { + resolvedDate: { isDate: true, } }; -exports.TypeInfo.BuildServer.fields = { - status: { - enumType: exports.TypeInfo.ServiceHostStatus +exports.TypeInfo.GitConflictDirectoryFile.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - statusChangedDate: { - isDate: true, - } -}; -exports.TypeInfo.BuildSummary.fields = { - finishTime: { - isDate: true, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - reason: { - enumType: exports.TypeInfo.BuildReason + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - startTime: { - isDate: true, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - status: { - enumType: exports.TypeInfo.BuildStatus - } -}; -exports.TypeInfo.BuildTagsAddedEvent.fields = { - build: { - typeInfo: exports.TypeInfo.Build - } -}; -exports.TypeInfo.BuildTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.DefinitionTriggerType - } -}; -exports.TypeInfo.BuildUpdatedEvent.fields = { - build: { - typeInfo: exports.TypeInfo.Build - } -}; -exports.TypeInfo.Change.fields = { - timestamp: { + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { isDate: true, + }, + sourceTree: { + typeInfo: exports.TypeInfo.GitTreeRef } }; -exports.TypeInfo.ContinuousDeploymentDefinition.fields = { - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - } -}; -exports.TypeInfo.ContinuousIntegrationTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.DefinitionTriggerType - } -}; -exports.TypeInfo.DefinitionReference.fields = { - createdDate: { - isDate: true, +exports.TypeInfo.GitConflictEditDelete.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - queueStatus: { - enumType: exports.TypeInfo.DefinitionQueueStatus + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - type: { - enumType: exports.TypeInfo.DefinitionType - } -}; -exports.TypeInfo.DesignerProcess.fields = { - phases: { - isArray: true, - typeInfo: exports.TypeInfo.Phase - } -}; -exports.TypeInfo.Folder.fields = { - createdOn: { - isDate: true, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - lastChangedDate: { - isDate: true, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPickOneAction }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - } -}; -exports.TypeInfo.GatedCheckInTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.DefinitionTriggerType - } -}; -exports.TypeInfo.InformationNode.fields = { - lastModifiedDate: { + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { isDate: true, } }; -exports.TypeInfo.Issue.fields = { - type: { - enumType: exports.TypeInfo.IssueType - } -}; -exports.TypeInfo.Phase.fields = { - jobAuthorizationScope: { - enumType: exports.TypeInfo.BuildAuthorizationScope - } -}; -exports.TypeInfo.PullRequestTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.DefinitionTriggerType - } -}; -exports.TypeInfo.RepositoryWebhook.fields = { - types: { - isArray: true, - enumType: exports.TypeInfo.DefinitionTriggerType - } -}; -exports.TypeInfo.RetentionLease.fields = { - createdOn: { - isDate: true, +exports.TypeInfo.GitConflictEditEdit.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - validUntil: { + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionMergeContent + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { isDate: true, } }; -exports.TypeInfo.Schedule.fields = { - daysToBuild: { - enumType: exports.TypeInfo.ScheduleDays - } -}; -exports.TypeInfo.ScheduleTrigger.fields = { - schedules: { - isArray: true, - typeInfo: exports.TypeInfo.Schedule +exports.TypeInfo.GitConflictFileDirectory.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - triggerType: { - enumType: exports.TypeInfo.DefinitionTriggerType - } -}; -exports.TypeInfo.SourceProviderAttributes.fields = { - supportedTriggers: { - isArray: true, - typeInfo: exports.TypeInfo.SupportedTrigger - } -}; -exports.TypeInfo.SupportedTrigger.fields = { - supportedCapabilities: { - isDictionary: true, - dictionaryValueEnumType: exports.TypeInfo.SupportLevel + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - type: { - enumType: exports.TypeInfo.DefinitionTriggerType - } -}; -exports.TypeInfo.Timeline.fields = { - lastChangedOn: { - isDate: true, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - records: { - isArray: true, - typeInfo: exports.TypeInfo.TimelineRecord - } -}; -exports.TypeInfo.TimelineRecord.fields = { - finishTime: { - isDate: true, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - issues: { - isArray: true, - typeInfo: exports.TypeInfo.Issue + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict }, - lastModified: { - isDate: true, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - result: { - enumType: exports.TypeInfo.TaskResult + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus }, - startTime: { + resolvedDate: { isDate: true, }, - state: { - enumType: exports.TypeInfo.TimelineRecordState - } -}; -exports.TypeInfo.TimelineRecordsUpdatedEvent.fields = { - timelineRecords: { - isArray: true, - typeInfo: exports.TypeInfo.TimelineRecord - } -}; -exports.TypeInfo.UpdateStageParameters.fields = { - state: { - enumType: exports.TypeInfo.StageUpdateType + targetTree: { + typeInfo: exports.TypeInfo.GitTreeRef } }; -exports.TypeInfo.WorkspaceMapping.fields = { - mappingType: { - enumType: exports.TypeInfo.WorkspaceMappingType +exports.TypeInfo.GitConflictRename1to2.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionRename1to2 + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, } }; -exports.TypeInfo.WorkspaceTemplate.fields = { - lastModifiedDate: { - isDate: true, +exports.TypeInfo.GitConflictRename2to1.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - mappings: { - isArray: true, - typeInfo: exports.TypeInfo.WorkspaceMapping + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, } }; -exports.TypeInfo.XamlBuildDefinition.fields = { - controller: { - typeInfo: exports.TypeInfo.BuildController +exports.TypeInfo.GitConflictRenameAdd.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - createdDate: { - isDate: true, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - createdOn: { - isDate: true, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - queueStatus: { - enumType: exports.TypeInfo.DefinitionQueueStatus + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict }, - supportedReasons: { - enumType: exports.TypeInfo.BuildReason + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - triggerType: { - enumType: exports.TypeInfo.DefinitionTriggerType + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus }, - type: { - enumType: exports.TypeInfo.DefinitionType + resolvedDate: { + isDate: true, } }; - - -/***/ }), - -/***/ 4743: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Specifies the additional data retrieval options for comments. - */ -var CommentExpandOptions; -(function (CommentExpandOptions) { - /** - * Include comments only, no mentions, reactions or rendered text - */ - CommentExpandOptions[CommentExpandOptions["None"] = 0] = "None"; - /** - * Include comment reactions - */ - CommentExpandOptions[CommentExpandOptions["Reactions"] = 1] = "Reactions"; - /** - * Include the rendered text (html) in addition to markdown text - */ - CommentExpandOptions[CommentExpandOptions["RenderedText"] = 8] = "RenderedText"; - CommentExpandOptions[CommentExpandOptions["RenderedTextOnly"] = 16] = "RenderedTextOnly"; - /** - * If specified, then responses will be expanded in the results - */ - CommentExpandOptions[CommentExpandOptions["Children"] = 32] = "Children"; - /** - * Expand everything including Reactions, Mentions and also include RenderedText (HTML) for markdown comments - */ - CommentExpandOptions[CommentExpandOptions["All"] = -17] = "All"; -})(CommentExpandOptions = exports.CommentExpandOptions || (exports.CommentExpandOptions = {})); -/** - * Format of the comment. Ex. Markdown, Html. - */ -var CommentFormat; -(function (CommentFormat) { - CommentFormat[CommentFormat["Markdown"] = 0] = "Markdown"; - CommentFormat[CommentFormat["Html"] = 1] = "Html"; -})(CommentFormat = exports.CommentFormat || (exports.CommentFormat = {})); -var CommentMentionType; -(function (CommentMentionType) { - /** - * An identity was mentioned by using the format @{VSID} - */ - CommentMentionType[CommentMentionType["Person"] = 0] = "Person"; - /** - * A work item was mentioned by using the format #{Work Item ID} - */ - CommentMentionType[CommentMentionType["WorkItem"] = 1] = "WorkItem"; - /** - * A Pull Request was mentioned by using the format !{PR Number} - */ - CommentMentionType[CommentMentionType["PullRequest"] = 2] = "PullRequest"; -})(CommentMentionType = exports.CommentMentionType || (exports.CommentMentionType = {})); -/** - * Represents different reaction types for a comment - */ -var CommentReactionType; -(function (CommentReactionType) { - CommentReactionType[CommentReactionType["Like"] = 0] = "Like"; - CommentReactionType[CommentReactionType["Dislike"] = 1] = "Dislike"; - CommentReactionType[CommentReactionType["Heart"] = 2] = "Heart"; - CommentReactionType[CommentReactionType["Hooray"] = 3] = "Hooray"; - CommentReactionType[CommentReactionType["Smile"] = 4] = "Smile"; - CommentReactionType[CommentReactionType["Confused"] = 5] = "Confused"; -})(CommentReactionType = exports.CommentReactionType || (exports.CommentReactionType = {})); -var CommentSortOrder; -(function (CommentSortOrder) { - /** - * The results will be sorted in Ascending order. - */ - CommentSortOrder[CommentSortOrder["Asc"] = 1] = "Asc"; - /** - * The results will be sorted in Descending order. - */ - CommentSortOrder[CommentSortOrder["Desc"] = 2] = "Desc"; -})(CommentSortOrder = exports.CommentSortOrder || (exports.CommentSortOrder = {})); -/** - * Represents the possible comment states. - */ -var CommentState; -(function (CommentState) { - CommentState[CommentState["Active"] = 0] = "Active"; - CommentState[CommentState["Resolved"] = 1] = "Resolved"; - CommentState[CommentState["Closed"] = 2] = "Closed"; -})(CommentState = exports.CommentState || (exports.CommentState = {})); -exports.TypeInfo = { - Comment: {}, - CommentAttachment: {}, - CommentExpandOptions: { - enumValues: { - "none": 0, - "reactions": 1, - "renderedText": 8, - "renderedTextOnly": 16, - "children": 32, - "all": -17 - } +exports.TypeInfo.GitConflictRenameDelete.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - CommentFormat: { - enumValues: { - "markdown": 0, - "html": 1 - } + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - CommentList: {}, - CommentMention: {}, - CommentMentionType: { - enumValues: { - "person": 0, - "workItem": 1, - "pullRequest": 2 - } + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - CommentReaction: {}, - CommentReactionType: { - enumValues: { - "like": 0, - "dislike": 1, - "heart": 2, - "hooray": 3, - "smile": 4, - "confused": 5 - } + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - CommentSortOrder: { - enumValues: { - "asc": 1, - "desc": 2 - } + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPickOneAction }, - CommentState: { - enumValues: { - "active": 0, - "resolved": 1, - "closed": 2 - } + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - CommentUpdateParameters: {}, - CommentVersion: {}, -}; -exports.TypeInfo.Comment.fields = { - createdDate: { + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { isDate: true, + } +}; +exports.TypeInfo.GitConflictRenameRename.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType }, - mentions: { - isArray: true, - typeInfo: exports.TypeInfo.CommentMention + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef }, - modifiedDate: { - isDate: true, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionMergeContent }, - reactions: { - isArray: true, - typeInfo: exports.TypeInfo.CommentReaction + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError }, - replies: { - typeInfo: exports.TypeInfo.CommentList + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus }, - state: { - enumType: exports.TypeInfo.CommentState - } -}; -exports.TypeInfo.CommentAttachment.fields = { - createdDate: { + resolvedDate: { isDate: true, } }; -exports.TypeInfo.CommentList.fields = { - comments: { - isArray: true, - typeInfo: exports.TypeInfo.Comment - } -}; -exports.TypeInfo.CommentMention.fields = { - type: { - enumType: exports.TypeInfo.CommentMentionType - } -}; -exports.TypeInfo.CommentReaction.fields = { - type: { - enumType: exports.TypeInfo.CommentReactionType - } -}; -exports.TypeInfo.CommentUpdateParameters.fields = { - state: { - enumType: exports.TypeInfo.CommentState +exports.TypeInfo.GitConflictUpdateResult.fields = { + updatedConflict: { + typeInfo: exports.TypeInfo.GitConflict + }, + updateStatus: { + enumType: exports.TypeInfo.GitConflictUpdateStatus } }; -exports.TypeInfo.CommentVersion.fields = { +exports.TypeInfo.GitDeletedRepository.fields = { createdDate: { isDate: true, }, - modifiedDate: { + deletedDate: { isDate: true, }, - state: { - enumType: exports.TypeInfo.CommentState + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; - - -/***/ }), - -/***/ 3931: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var ConnectedServiceKind; -(function (ConnectedServiceKind) { - /** - * Custom or unknown service - */ - ConnectedServiceKind[ConnectedServiceKind["Custom"] = 0] = "Custom"; - /** - * Azure Subscription - */ - ConnectedServiceKind[ConnectedServiceKind["AzureSubscription"] = 1] = "AzureSubscription"; - /** - * Chef Connection - */ - ConnectedServiceKind[ConnectedServiceKind["Chef"] = 2] = "Chef"; - /** - * Generic Connection - */ - ConnectedServiceKind[ConnectedServiceKind["Generic"] = 3] = "Generic"; -})(ConnectedServiceKind = exports.ConnectedServiceKind || (exports.ConnectedServiceKind = {})); -/** - * Type of process customization on a collection. - */ -var ProcessCustomizationType; -(function (ProcessCustomizationType) { - /** - * Process customization can't be computed. - */ - ProcessCustomizationType[ProcessCustomizationType["Unknown"] = -1] = "Unknown"; - /** - * Customization based on project-scoped xml customization - */ - ProcessCustomizationType[ProcessCustomizationType["Xml"] = 0] = "Xml"; - /** - * Customization based on process inheritance - */ - ProcessCustomizationType[ProcessCustomizationType["Inherited"] = 1] = "Inherited"; -})(ProcessCustomizationType = exports.ProcessCustomizationType || (exports.ProcessCustomizationType = {})); -var ProcessType; -(function (ProcessType) { - ProcessType[ProcessType["System"] = 0] = "System"; - ProcessType[ProcessType["Custom"] = 1] = "Custom"; - ProcessType[ProcessType["Inherited"] = 2] = "Inherited"; -})(ProcessType = exports.ProcessType || (exports.ProcessType = {})); -var ProjectChangeType; -(function (ProjectChangeType) { - ProjectChangeType[ProjectChangeType["Modified"] = 0] = "Modified"; - ProjectChangeType[ProjectChangeType["Deleted"] = 1] = "Deleted"; - ProjectChangeType[ProjectChangeType["Added"] = 2] = "Added"; -})(ProjectChangeType = exports.ProjectChangeType || (exports.ProjectChangeType = {})); -var ProjectVisibility; -(function (ProjectVisibility) { - ProjectVisibility[ProjectVisibility["Unchanged"] = -1] = "Unchanged"; - /** - * The project is only visible to users with explicit access. - */ - ProjectVisibility[ProjectVisibility["Private"] = 0] = "Private"; - /** - * Enterprise level project visibility - */ - ProjectVisibility[ProjectVisibility["Organization"] = 1] = "Organization"; - /** - * The project is visible to all. - */ - ProjectVisibility[ProjectVisibility["Public"] = 2] = "Public"; - ProjectVisibility[ProjectVisibility["SystemPrivate"] = 3] = "SystemPrivate"; -})(ProjectVisibility = exports.ProjectVisibility || (exports.ProjectVisibility = {})); -var SourceControlTypes; -(function (SourceControlTypes) { - SourceControlTypes[SourceControlTypes["Tfvc"] = 1] = "Tfvc"; - SourceControlTypes[SourceControlTypes["Git"] = 2] = "Git"; -})(SourceControlTypes = exports.SourceControlTypes || (exports.SourceControlTypes = {})); -exports.TypeInfo = { - ConnectedServiceKind: { - enumValues: { - "custom": 0, - "azureSubscription": 1, - "chef": 2, - "generic": 3 - } - }, - Process: {}, - ProcessCustomizationType: { - enumValues: { - "unknown": -1, - "xml": 0, - "inherited": 1 - } - }, - ProcessType: { - enumValues: { - "system": 0, - "custom": 1, - "inherited": 2 - } - }, - ProjectChangeType: { - enumValues: { - "modified": 0, - "deleted": 1, - "added": 2 - } - }, - ProjectInfo: {}, - ProjectMessage: {}, - ProjectVisibility: { - enumValues: { - "private": 0, - "organization": 1, - "public": 2 - } - }, - SourceControlTypes: { - enumValues: { - "tfvc": 1, - "git": 2 - } +exports.TypeInfo.GitForkRef.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository }, - TeamProject: {}, - TeamProjectCollection: {}, - TeamProjectReference: {}, - TemporaryDataCreatedDTO: {}, - WebApiConnectedService: {}, - WebApiConnectedServiceDetails: {}, - WebApiProject: {}, + statuses: { + isArray: true, + typeInfo: exports.TypeInfo.GitStatus + } }; -exports.TypeInfo.Process.fields = { - type: { - enumType: exports.TypeInfo.ProcessType +exports.TypeInfo.GitForkSyncRequest.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus } }; -exports.TypeInfo.ProjectInfo.fields = { +exports.TypeInfo.GitForkTeamProjectReference.fields = { lastUpdateTime: { isDate: true, }, visibility: { - enumType: exports.TypeInfo.ProjectVisibility + enumType: TfsCoreInterfaces.TypeInfo.ProjectVisibility } }; -exports.TypeInfo.ProjectMessage.fields = { - project: { - typeInfo: exports.TypeInfo.ProjectInfo - }, - projectChangeType: { - enumType: exports.TypeInfo.ProjectChangeType +exports.TypeInfo.GitImportFailedEvent.fields = { + targetRepository: { + typeInfo: exports.TypeInfo.GitRepository } }; -exports.TypeInfo.TeamProject.fields = { - lastUpdateTime: { - isDate: true, +exports.TypeInfo.GitImportRequest.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository }, - visibility: { - enumType: exports.TypeInfo.ProjectVisibility + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus } }; -exports.TypeInfo.TeamProjectCollection.fields = { - processCustomizationType: { - enumType: exports.TypeInfo.ProcessCustomizationType +exports.TypeInfo.GitImportSucceededEvent.fields = { + targetRepository: { + typeInfo: exports.TypeInfo.GitRepository } }; -exports.TypeInfo.TeamProjectReference.fields = { - lastUpdateTime: { - isDate: true, +exports.TypeInfo.GitItem.fields = { + gitObjectType: { + enumType: exports.TypeInfo.GitObjectType }, - visibility: { - enumType: exports.TypeInfo.ProjectVisibility + latestProcessedChange: { + typeInfo: exports.TypeInfo.GitCommitRef } }; -exports.TypeInfo.TemporaryDataCreatedDTO.fields = { - expirationDate: { +exports.TypeInfo.GitItemDescriptor.fields = { + recursionLevel: { + enumType: exports.TypeInfo.VersionControlRecursionType + }, + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType + } +}; +exports.TypeInfo.GitItemRequestData.fields = { + itemDescriptors: { + isArray: true, + typeInfo: exports.TypeInfo.GitItemDescriptor + } +}; +exports.TypeInfo.GitLastChangeTreeItems.fields = { + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + }, + lastExploredTime: { isDate: true, } }; -exports.TypeInfo.WebApiConnectedService.fields = { - project: { - typeInfo: exports.TypeInfo.TeamProjectReference +exports.TypeInfo.GitMerge.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus } }; -exports.TypeInfo.WebApiConnectedServiceDetails.fields = { - connectedServiceMetaData: { - typeInfo: exports.TypeInfo.WebApiConnectedService +exports.TypeInfo.GitObject.fields = { + objectType: { + enumType: exports.TypeInfo.GitObjectType } }; -exports.TypeInfo.WebApiProject.fields = { - lastUpdateTime: { - isDate: true, - }, - visibility: { - enumType: exports.TypeInfo.ProjectVisibility +exports.TypeInfo.GitPathAction.fields = { + action: { + enumType: exports.TypeInfo.GitPathActions } }; - - -/***/ }), - -/***/ 6890: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * identifies the scope of dashboard storage and permissions. - */ -var DashboardScope; -(function (DashboardScope) { - /** - * [DEPRECATED] Dashboard is scoped to the collection user. - */ - DashboardScope[DashboardScope["Collection_User"] = 0] = "Collection_User"; - /** - * Dashboard is scoped to the team. - */ - DashboardScope[DashboardScope["Project_Team"] = 1] = "Project_Team"; - /** - * Dashboard is scoped to the project. - */ - DashboardScope[DashboardScope["Project"] = 2] = "Project"; -})(DashboardScope = exports.DashboardScope || (exports.DashboardScope = {})); -var GroupMemberPermission; -(function (GroupMemberPermission) { - GroupMemberPermission[GroupMemberPermission["None"] = 0] = "None"; - GroupMemberPermission[GroupMemberPermission["Edit"] = 1] = "Edit"; - GroupMemberPermission[GroupMemberPermission["Manage"] = 2] = "Manage"; - GroupMemberPermission[GroupMemberPermission["ManagePermissions"] = 3] = "ManagePermissions"; -})(GroupMemberPermission = exports.GroupMemberPermission || (exports.GroupMemberPermission = {})); -var TeamDashboardPermission; -(function (TeamDashboardPermission) { - TeamDashboardPermission[TeamDashboardPermission["None"] = 0] = "None"; - TeamDashboardPermission[TeamDashboardPermission["Read"] = 1] = "Read"; - TeamDashboardPermission[TeamDashboardPermission["Create"] = 2] = "Create"; - TeamDashboardPermission[TeamDashboardPermission["Edit"] = 4] = "Edit"; - TeamDashboardPermission[TeamDashboardPermission["Delete"] = 8] = "Delete"; - TeamDashboardPermission[TeamDashboardPermission["ManagePermissions"] = 16] = "ManagePermissions"; -})(TeamDashboardPermission = exports.TeamDashboardPermission || (exports.TeamDashboardPermission = {})); -/** - * data contract required for the widget to function in a webaccess area or page. - */ -var WidgetScope; -(function (WidgetScope) { - WidgetScope[WidgetScope["Collection_User"] = 0] = "Collection_User"; - WidgetScope[WidgetScope["Project_Team"] = 1] = "Project_Team"; -})(WidgetScope = exports.WidgetScope || (exports.WidgetScope = {})); -exports.TypeInfo = { - CopyDashboardOptions: {}, - CopyDashboardResponse: {}, - Dashboard: {}, - DashboardGroup: {}, - DashboardGroupEntry: {}, - DashboardGroupEntryResponse: {}, - DashboardResponse: {}, - DashboardScope: { - enumValues: { - "collection_User": 0, - "project_Team": 1, - "project": 2 +exports.TypeInfo.GitPathToItemsCollection.fields = { + items: { + isDictionary: true, + dictionaryValueFieldInfo: { + isArray: true, + typeInfo: exports.TypeInfo.GitItem } + } +}; +exports.TypeInfo.GitPolicyConfigurationResponse.fields = { + policyConfigurations: { + isArray: true, + typeInfo: PolicyInterfaces.TypeInfo.PolicyConfiguration + } +}; +exports.TypeInfo.GitPullRequest.fields = { + closedDate: { + isDate: true, }, - GroupMemberPermission: { - enumValues: { - "none": 0, - "edit": 1, - "manage": 2, - "managePermissions": 3 - } + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef }, - TeamDashboardPermission: { - enumValues: { - "none": 0, - "read": 1, - "create": 2, - "edit": 4, - "delete": 8, - "managePermissions": 16 - } + completionOptions: { + typeInfo: exports.TypeInfo.GitPullRequestCompletionOptions }, - Widget: {}, - WidgetMetadata: {}, - WidgetMetadataResponse: {}, - WidgetResponse: {}, - WidgetScope: { - enumValues: { - "collection_User": 0, - "project_Team": 1 - } + completionQueueTime: { + isDate: true, }, - WidgetsVersionedList: {}, - WidgetTypesResponse: {}, -}; -exports.TypeInfo.CopyDashboardOptions.fields = { - copyDashboardScope: { - enumType: exports.TypeInfo.DashboardScope - } -}; -exports.TypeInfo.CopyDashboardResponse.fields = { - copiedDashboard: { - typeInfo: exports.TypeInfo.Dashboard + creationDate: { + isDate: true, }, - copyDashboardOptions: { - typeInfo: exports.TypeInfo.CopyDashboardOptions + forkSource: { + typeInfo: exports.TypeInfo.GitForkRef + }, + lastMergeCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + lastMergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + lastMergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeFailureType: { + enumType: exports.TypeInfo.PullRequestMergeFailureType + }, + mergeStatus: { + enumType: exports.TypeInfo.PullRequestAsyncStatus + }, + repository: { + typeInfo: exports.TypeInfo.GitRepository + }, + status: { + enumType: exports.TypeInfo.PullRequestStatus } }; -exports.TypeInfo.Dashboard.fields = { - dashboardScope: { - enumType: exports.TypeInfo.DashboardScope +exports.TypeInfo.GitPullRequestChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType }, - widgets: { - isArray: true, - typeInfo: exports.TypeInfo.Widget + newContent: { + typeInfo: exports.TypeInfo.ItemContent } }; -exports.TypeInfo.DashboardGroup.fields = { - dashboardEntries: { +exports.TypeInfo.GitPullRequestCommentThread.fields = { + comments: { isArray: true, - typeInfo: exports.TypeInfo.DashboardGroupEntry + typeInfo: exports.TypeInfo.Comment }, - permission: { - enumType: exports.TypeInfo.GroupMemberPermission + lastUpdatedDate: { + isDate: true, }, - teamDashboardPermission: { - enumType: exports.TypeInfo.TeamDashboardPermission - } -}; -exports.TypeInfo.DashboardGroupEntry.fields = { - dashboardScope: { - enumType: exports.TypeInfo.DashboardScope + publishedDate: { + isDate: true, }, - widgets: { - isArray: true, - typeInfo: exports.TypeInfo.Widget + status: { + enumType: exports.TypeInfo.CommentThreadStatus } }; -exports.TypeInfo.DashboardGroupEntryResponse.fields = { - dashboardScope: { - enumType: exports.TypeInfo.DashboardScope - }, - widgets: { - isArray: true, - typeInfo: exports.TypeInfo.Widget +exports.TypeInfo.GitPullRequestCompletionOptions.fields = { + mergeStrategy: { + enumType: exports.TypeInfo.GitPullRequestMergeStrategy } }; -exports.TypeInfo.DashboardResponse.fields = { - dashboardScope: { - enumType: exports.TypeInfo.DashboardScope +exports.TypeInfo.GitPullRequestIteration.fields = { + changeList: { + isArray: true, + typeInfo: exports.TypeInfo.GitPullRequestChange }, - widgets: { + commits: { isArray: true, - typeInfo: exports.TypeInfo.Widget + typeInfo: exports.TypeInfo.GitCommitRef + }, + commonRefCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + createdDate: { + isDate: true, + }, + push: { + typeInfo: exports.TypeInfo.GitPushRef + }, + reason: { + enumType: exports.TypeInfo.IterationReason + }, + sourceRefCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + targetRefCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + updatedDate: { + isDate: true, } }; -exports.TypeInfo.Widget.fields = { - dashboard: { - typeInfo: exports.TypeInfo.Dashboard +exports.TypeInfo.GitPullRequestIterationChanges.fields = { + changeEntries: { + isArray: true, + typeInfo: exports.TypeInfo.GitPullRequestChange } }; -exports.TypeInfo.WidgetMetadata.fields = { - supportedScopes: { +exports.TypeInfo.GitPullRequestQuery.fields = { + queries: { isArray: true, - enumType: exports.TypeInfo.WidgetScope + typeInfo: exports.TypeInfo.GitPullRequestQueryInput + }, +}; +exports.TypeInfo.GitPullRequestQueryInput.fields = { + type: { + enumType: exports.TypeInfo.GitPullRequestQueryType } }; -exports.TypeInfo.WidgetMetadataResponse.fields = { - widgetMetadata: { - typeInfo: exports.TypeInfo.WidgetMetadata +exports.TypeInfo.GitPullRequestSearchCriteria.fields = { + status: { + enumType: exports.TypeInfo.PullRequestStatus } }; -exports.TypeInfo.WidgetResponse.fields = { - dashboard: { - typeInfo: exports.TypeInfo.Dashboard +exports.TypeInfo.GitPullRequestStatus.fields = { + creationDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.GitStatusState + }, + updatedDate: { + isDate: true, } }; -exports.TypeInfo.WidgetsVersionedList.fields = { - widgets: { +exports.TypeInfo.GitPush.fields = { + commits: { isArray: true, - typeInfo: exports.TypeInfo.Widget + typeInfo: exports.TypeInfo.GitCommitRef + }, + date: { + isDate: true, + }, + repository: { + typeInfo: exports.TypeInfo.GitRepository } }; -exports.TypeInfo.WidgetTypesResponse.fields = { - widgetTypes: { +exports.TypeInfo.GitPushEventData.fields = { + commits: { isArray: true, - typeInfo: exports.TypeInfo.WidgetMetadata + typeInfo: exports.TypeInfo.GitCommit + }, + repository: { + typeInfo: exports.TypeInfo.GitRepository } }; - - -/***/ }), - -/***/ 7357: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const GalleryInterfaces = __nccwpck_require__(8905); -/** - * How the acquisition is assigned - */ -var AcquisitionAssignmentType; -(function (AcquisitionAssignmentType) { - AcquisitionAssignmentType[AcquisitionAssignmentType["None"] = 0] = "None"; - /** - * Just assign for me - */ - AcquisitionAssignmentType[AcquisitionAssignmentType["Me"] = 1] = "Me"; - /** - * Assign for all users in the account - */ - AcquisitionAssignmentType[AcquisitionAssignmentType["All"] = 2] = "All"; -})(AcquisitionAssignmentType = exports.AcquisitionAssignmentType || (exports.AcquisitionAssignmentType = {})); -var AcquisitionOperationState; -(function (AcquisitionOperationState) { - /** - * Not allowed to use this AcquisitionOperation - */ - AcquisitionOperationState[AcquisitionOperationState["Disallow"] = 0] = "Disallow"; - /** - * Allowed to use this AcquisitionOperation - */ - AcquisitionOperationState[AcquisitionOperationState["Allow"] = 1] = "Allow"; - /** - * Operation has already been completed and is no longer available - */ - AcquisitionOperationState[AcquisitionOperationState["Completed"] = 3] = "Completed"; -})(AcquisitionOperationState = exports.AcquisitionOperationState || (exports.AcquisitionOperationState = {})); -/** - * Set of different types of operations that can be requested. - */ -var AcquisitionOperationType; -(function (AcquisitionOperationType) { - /** - * Not yet used - */ - AcquisitionOperationType[AcquisitionOperationType["Get"] = 0] = "Get"; - /** - * Install this extension into the host provided - */ - AcquisitionOperationType[AcquisitionOperationType["Install"] = 1] = "Install"; - /** - * Buy licenses for this extension and install into the host provided - */ - AcquisitionOperationType[AcquisitionOperationType["Buy"] = 2] = "Buy"; - /** - * Try this extension - */ - AcquisitionOperationType[AcquisitionOperationType["Try"] = 3] = "Try"; - /** - * Request this extension for installation - */ - AcquisitionOperationType[AcquisitionOperationType["Request"] = 4] = "Request"; - /** - * No action found - */ - AcquisitionOperationType[AcquisitionOperationType["None"] = 5] = "None"; - /** - * Request admins for purchasing extension - */ - AcquisitionOperationType[AcquisitionOperationType["PurchaseRequest"] = 6] = "PurchaseRequest"; -})(AcquisitionOperationType = exports.AcquisitionOperationType || (exports.AcquisitionOperationType = {})); -/** - * Represents different ways of including contributions based on licensing - */ -var ContributionLicensingBehaviorType; -(function (ContributionLicensingBehaviorType) { - /** - * Default value - only include the contribution if the user is licensed for the extension - */ - ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfLicensed"] = 0] = "OnlyIfLicensed"; - /** - * Only include the contribution if the user is NOT licensed for the extension - */ - ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfUnlicensed"] = 1] = "OnlyIfUnlicensed"; - /** - * Always include the contribution regardless of whether or not the user is licensed for the extension - */ - ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["AlwaysInclude"] = 2] = "AlwaysInclude"; -})(ContributionLicensingBehaviorType = exports.ContributionLicensingBehaviorType || (exports.ContributionLicensingBehaviorType = {})); -/** - * The type of value used for a property - */ -var ContributionPropertyType; -(function (ContributionPropertyType) { - /** - * Contribution type is unknown (value may be anything) - */ - ContributionPropertyType[ContributionPropertyType["Unknown"] = 0] = "Unknown"; - /** - * Value is a string - */ - ContributionPropertyType[ContributionPropertyType["String"] = 1] = "String"; - /** - * Value is a Uri - */ - ContributionPropertyType[ContributionPropertyType["Uri"] = 2] = "Uri"; - /** - * Value is a GUID - */ - ContributionPropertyType[ContributionPropertyType["Guid"] = 4] = "Guid"; - /** - * Value is True or False - */ - ContributionPropertyType[ContributionPropertyType["Boolean"] = 8] = "Boolean"; - /** - * Value is an integer - */ - ContributionPropertyType[ContributionPropertyType["Integer"] = 16] = "Integer"; - /** - * Value is a double - */ - ContributionPropertyType[ContributionPropertyType["Double"] = 32] = "Double"; - /** - * Value is a DateTime object - */ - ContributionPropertyType[ContributionPropertyType["DateTime"] = 64] = "DateTime"; - /** - * Value is a generic Dictionary/JObject/property bag - */ - ContributionPropertyType[ContributionPropertyType["Dictionary"] = 128] = "Dictionary"; - /** - * Value is an array - */ - ContributionPropertyType[ContributionPropertyType["Array"] = 256] = "Array"; - /** - * Value is an arbitrary/custom object - */ - ContributionPropertyType[ContributionPropertyType["Object"] = 512] = "Object"; -})(ContributionPropertyType = exports.ContributionPropertyType || (exports.ContributionPropertyType = {})); -/** - * Options that control the contributions to include in a query - */ -var ContributionQueryOptions; -(function (ContributionQueryOptions) { - ContributionQueryOptions[ContributionQueryOptions["None"] = 0] = "None"; - /** - * Include the direct contributions that have the ids queried. - */ - ContributionQueryOptions[ContributionQueryOptions["IncludeSelf"] = 16] = "IncludeSelf"; - /** - * Include the contributions that directly target the contributions queried. - */ - ContributionQueryOptions[ContributionQueryOptions["IncludeChildren"] = 32] = "IncludeChildren"; - /** - * Include the contributions from the entire sub-tree targeting the contributions queried. - */ - ContributionQueryOptions[ContributionQueryOptions["IncludeSubTree"] = 96] = "IncludeSubTree"; - /** - * Include the contribution being queried as well as all contributions that target them recursively. - */ - ContributionQueryOptions[ContributionQueryOptions["IncludeAll"] = 112] = "IncludeAll"; - /** - * Some callers may want the entire tree back without constraint evaluation being performed. - */ - ContributionQueryOptions[ContributionQueryOptions["IgnoreConstraints"] = 256] = "IgnoreConstraints"; -})(ContributionQueryOptions = exports.ContributionQueryOptions || (exports.ContributionQueryOptions = {})); -/** - * Set of flags applied to extensions that are relevant to contribution consumers - */ -var ExtensionFlags; -(function (ExtensionFlags) { - /** - * A built-in extension is installed for all VSTS accounts by default - */ - ExtensionFlags[ExtensionFlags["BuiltIn"] = 1] = "BuiltIn"; - /** - * The extension comes from a fully-trusted publisher - */ - ExtensionFlags[ExtensionFlags["Trusted"] = 2] = "Trusted"; -})(ExtensionFlags = exports.ExtensionFlags || (exports.ExtensionFlags = {})); -/** - * Represents the state of an extension request - */ -var ExtensionRequestState; -(function (ExtensionRequestState) { - /** - * The request has been opened, but not yet responded to - */ - ExtensionRequestState[ExtensionRequestState["Open"] = 0] = "Open"; - /** - * The request was accepted (extension installed or license assigned) - */ - ExtensionRequestState[ExtensionRequestState["Accepted"] = 1] = "Accepted"; - /** - * The request was rejected (extension not installed or license not assigned) - */ - ExtensionRequestState[ExtensionRequestState["Rejected"] = 2] = "Rejected"; -})(ExtensionRequestState = exports.ExtensionRequestState || (exports.ExtensionRequestState = {})); -var ExtensionRequestUpdateType; -(function (ExtensionRequestUpdateType) { - ExtensionRequestUpdateType[ExtensionRequestUpdateType["Created"] = 1] = "Created"; - ExtensionRequestUpdateType[ExtensionRequestUpdateType["Approved"] = 2] = "Approved"; - ExtensionRequestUpdateType[ExtensionRequestUpdateType["Rejected"] = 3] = "Rejected"; - ExtensionRequestUpdateType[ExtensionRequestUpdateType["Deleted"] = 4] = "Deleted"; -})(ExtensionRequestUpdateType = exports.ExtensionRequestUpdateType || (exports.ExtensionRequestUpdateType = {})); -/** - * States of an extension Note: If you add value to this enum, you need to do 2 other things. First add the back compat enum in value src\Vssf\Sdk\Server\Contributions\InstalledExtensionMessage.cs. Second, you can not send the new value on the message bus. You need to remove it from the message bus event prior to being sent. - */ -var ExtensionStateFlags; -(function (ExtensionStateFlags) { - /** - * No flags set - */ - ExtensionStateFlags[ExtensionStateFlags["None"] = 0] = "None"; - /** - * Extension is disabled - */ - ExtensionStateFlags[ExtensionStateFlags["Disabled"] = 1] = "Disabled"; - /** - * Extension is a built in - */ - ExtensionStateFlags[ExtensionStateFlags["BuiltIn"] = 2] = "BuiltIn"; - /** - * Extension has multiple versions - */ - ExtensionStateFlags[ExtensionStateFlags["MultiVersion"] = 4] = "MultiVersion"; - /** - * Extension is not installed. This is for builtin extensions only and can not otherwise be set. - */ - ExtensionStateFlags[ExtensionStateFlags["UnInstalled"] = 8] = "UnInstalled"; - /** - * Error performing version check - */ - ExtensionStateFlags[ExtensionStateFlags["VersionCheckError"] = 16] = "VersionCheckError"; - /** - * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. - */ - ExtensionStateFlags[ExtensionStateFlags["Trusted"] = 32] = "Trusted"; - /** - * Extension is currently in an error state - */ - ExtensionStateFlags[ExtensionStateFlags["Error"] = 64] = "Error"; - /** - * Extension scopes have changed and the extension requires re-authorization - */ - ExtensionStateFlags[ExtensionStateFlags["NeedsReauthorization"] = 128] = "NeedsReauthorization"; - /** - * Error performing auto-upgrade. For example, if the new version has demands not supported the extension cannot be auto-upgraded. - */ - ExtensionStateFlags[ExtensionStateFlags["AutoUpgradeError"] = 256] = "AutoUpgradeError"; - /** - * Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported. - */ - ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning"; -})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {})); -var ExtensionUpdateType; -(function (ExtensionUpdateType) { - ExtensionUpdateType[ExtensionUpdateType["Installed"] = 1] = "Installed"; - ExtensionUpdateType[ExtensionUpdateType["Uninstalled"] = 2] = "Uninstalled"; - ExtensionUpdateType[ExtensionUpdateType["Enabled"] = 3] = "Enabled"; - ExtensionUpdateType[ExtensionUpdateType["Disabled"] = 4] = "Disabled"; - ExtensionUpdateType[ExtensionUpdateType["VersionUpdated"] = 5] = "VersionUpdated"; - ExtensionUpdateType[ExtensionUpdateType["ActionRequired"] = 6] = "ActionRequired"; - ExtensionUpdateType[ExtensionUpdateType["ActionResolved"] = 7] = "ActionResolved"; -})(ExtensionUpdateType = exports.ExtensionUpdateType || (exports.ExtensionUpdateType = {})); -/** - * Installation issue type (Warning, Error) - */ -var InstalledExtensionStateIssueType; -(function (InstalledExtensionStateIssueType) { - /** - * Represents an installation warning, for example an implicit demand not supported - */ - InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Warning"] = 0] = "Warning"; - /** - * Represents an installation error, for example an explicit demand not supported - */ - InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Error"] = 1] = "Error"; -})(InstalledExtensionStateIssueType = exports.InstalledExtensionStateIssueType || (exports.InstalledExtensionStateIssueType = {})); -exports.TypeInfo = { - AcquisitionAssignmentType: { - enumValues: { - "none": 0, - "me": 1, - "all": 2 - } - }, - AcquisitionOperation: {}, - AcquisitionOperationState: { - enumValues: { - "disallow": 0, - "allow": 1, - "completed": 3 - } - }, - AcquisitionOperationType: { - enumValues: { - "get": 0, - "install": 1, - "buy": 2, - "try": 3, - "request": 4, - "none": 5, - "purchaseRequest": 6 - } - }, - AcquisitionOptions: {}, - ContributionLicensingBehaviorType: { - enumValues: { - "onlyIfLicensed": 0, - "onlyIfUnlicensed": 1, - "alwaysInclude": 2 - } - }, - ContributionNodeQuery: {}, - ContributionPropertyDescription: {}, - ContributionPropertyType: { - enumValues: { - "unknown": 0, - "string": 1, - "uri": 2, - "guid": 4, - "boolean": 8, - "integer": 16, - "double": 32, - "dateTime": 64, - "dictionary": 128, - "array": 256, - "object": 512 - } - }, - ContributionQueryOptions: { - enumValues: { - "none": 0, - "includeSelf": 16, - "includeChildren": 32, - "includeSubTree": 96, - "includeAll": 112, - "ignoreConstraints": 256 - } - }, - ContributionType: {}, - ExtensionAcquisitionRequest: {}, - ExtensionAuditLog: {}, - ExtensionAuditLogEntry: {}, - ExtensionEvent: {}, - ExtensionFlags: { - enumValues: { - "builtIn": 1, - "trusted": 2 - } - }, - ExtensionLicensing: {}, - ExtensionManifest: {}, - ExtensionRequest: {}, - ExtensionRequestEvent: {}, - ExtensionRequestsEvent: {}, - ExtensionRequestState: { - enumValues: { - "open": 0, - "accepted": 1, - "rejected": 2 - } - }, - ExtensionRequestUpdateType: { - enumValues: { - "created": 1, - "approved": 2, - "rejected": 3, - "deleted": 4 - } - }, - ExtensionState: {}, - ExtensionStateFlags: { - enumValues: { - "none": 0, - "disabled": 1, - "builtIn": 2, - "multiVersion": 4, - "unInstalled": 8, - "versionCheckError": 16, - "trusted": 32, - "error": 64, - "needsReauthorization": 128, - "autoUpgradeError": 256, - "warning": 512 - } - }, - ExtensionUpdateType: { - enumValues: { - "installed": 1, - "uninstalled": 2, - "enabled": 3, - "disabled": 4, - "versionUpdated": 5, - "actionRequired": 6, - "actionResolved": 7 - } - }, - InstalledExtension: {}, - InstalledExtensionState: {}, - InstalledExtensionStateIssue: {}, - InstalledExtensionStateIssueType: { - enumValues: { - "warning": 0, - "error": 1 - } +exports.TypeInfo.GitPushRef.fields = { + date: { + isDate: true, + } +}; +exports.TypeInfo.GitPushSearchCriteria.fields = { + fromDate: { + isDate: true, }, - LicensingOverride: {}, - RequestedExtension: {}, + toDate: { + isDate: true, + } }; -exports.TypeInfo.AcquisitionOperation.fields = { - operationState: { - enumType: exports.TypeInfo.AcquisitionOperationState +exports.TypeInfo.GitQueryBranchStatsCriteria.fields = { + baseCommit: { + typeInfo: exports.TypeInfo.GitVersionDescriptor }, - operationType: { - enumType: exports.TypeInfo.AcquisitionOperationType + targetCommits: { + isArray: true, + typeInfo: exports.TypeInfo.GitVersionDescriptor } }; -exports.TypeInfo.AcquisitionOptions.fields = { - defaultOperation: { - typeInfo: exports.TypeInfo.AcquisitionOperation +exports.TypeInfo.GitQueryCommitsCriteria.fields = { + compareVersion: { + typeInfo: exports.TypeInfo.GitVersionDescriptor }, - operations: { - isArray: true, - typeInfo: exports.TypeInfo.AcquisitionOperation + historyMode: { + enumType: exports.TypeInfo.GitHistoryMode + }, + itemVersion: { + typeInfo: exports.TypeInfo.GitVersionDescriptor } }; -exports.TypeInfo.ContributionNodeQuery.fields = { - queryOptions: { - enumType: exports.TypeInfo.ContributionQueryOptions +exports.TypeInfo.GitQueryRefsCriteria.fields = { + searchType: { + enumType: exports.TypeInfo.GitRefSearchType } }; -exports.TypeInfo.ContributionPropertyDescription.fields = { +exports.TypeInfo.GitRef.fields = { + statuses: { + isArray: true, + typeInfo: exports.TypeInfo.GitStatus + } +}; +exports.TypeInfo.GitRefFavorite.fields = { type: { - enumType: exports.TypeInfo.ContributionPropertyType + enumType: exports.TypeInfo.RefFavoriteType } }; -exports.TypeInfo.ContributionType.fields = { - properties: { - isDictionary: true, - dictionaryValueTypeInfo: exports.TypeInfo.ContributionPropertyDescription +exports.TypeInfo.GitRefUpdateResult.fields = { + updateStatus: { + enumType: exports.TypeInfo.GitRefUpdateStatus } }; -exports.TypeInfo.ExtensionAcquisitionRequest.fields = { - assignmentType: { - enumType: exports.TypeInfo.AcquisitionAssignmentType +exports.TypeInfo.GitRepository.fields = { + parentRepository: { + typeInfo: exports.TypeInfo.GitRepositoryRef }, - operationType: { - enumType: exports.TypeInfo.AcquisitionOperationType + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; -exports.TypeInfo.ExtensionAuditLog.fields = { - entries: { - isArray: true, - typeInfo: exports.TypeInfo.ExtensionAuditLogEntry +exports.TypeInfo.GitRepositoryCreateOptions.fields = { + parentRepository: { + typeInfo: exports.TypeInfo.GitRepositoryRef + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; -exports.TypeInfo.ExtensionAuditLogEntry.fields = { - auditDate: { - isDate: true, +exports.TypeInfo.GitRepositoryRef.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; -exports.TypeInfo.ExtensionEvent.fields = { - extension: { - typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension - }, - updateType: { - enumType: exports.TypeInfo.ExtensionUpdateType +exports.TypeInfo.GitResolutionMergeContent.fields = { + mergeType: { + enumType: exports.TypeInfo.GitResolutionMergeType } }; -exports.TypeInfo.ExtensionLicensing.fields = { - overrides: { - isArray: true, - typeInfo: exports.TypeInfo.LicensingOverride +exports.TypeInfo.GitResolutionPathConflict.fields = { + action: { + enumType: exports.TypeInfo.GitResolutionPathConflictAction } }; -exports.TypeInfo.ExtensionManifest.fields = { - contributionTypes: { - isArray: true, - typeInfo: exports.TypeInfo.ContributionType +exports.TypeInfo.GitResolutionPickOneAction.fields = { + action: { + enumType: exports.TypeInfo.GitResolutionWhichAction + } +}; +exports.TypeInfo.GitResolutionRename1to2.fields = { + action: { + enumType: exports.TypeInfo.GitResolutionRename1to2Action }, - licensing: { - typeInfo: exports.TypeInfo.ExtensionLicensing + mergeType: { + enumType: exports.TypeInfo.GitResolutionMergeType } }; -exports.TypeInfo.ExtensionRequest.fields = { - requestDate: { +exports.TypeInfo.GitRevert.fields = { + detailedStatus: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail + }, + parameters: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitStatus.fields = { + creationDate: { isDate: true, }, - requestState: { - enumType: exports.TypeInfo.ExtensionRequestState + state: { + enumType: exports.TypeInfo.GitStatusState }, - resolveDate: { + updatedDate: { isDate: true, } }; -exports.TypeInfo.ExtensionRequestEvent.fields = { - extension: { - typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension +exports.TypeInfo.GitTargetVersionDescriptor.fields = { + targetVersionOptions: { + enumType: exports.TypeInfo.GitVersionOptions }, - request: { - typeInfo: exports.TypeInfo.ExtensionRequest + targetVersionType: { + enumType: exports.TypeInfo.GitVersionType }, - updateType: { - enumType: exports.TypeInfo.ExtensionRequestUpdateType + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType } }; -exports.TypeInfo.ExtensionRequestsEvent.fields = { - extension: { - typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension - }, - requests: { +exports.TypeInfo.GitTreeDiff.fields = { + diffEntries: { isArray: true, - typeInfo: exports.TypeInfo.ExtensionRequest - }, - updateType: { - enumType: exports.TypeInfo.ExtensionRequestUpdateType + typeInfo: exports.TypeInfo.GitTreeDiffEntry } }; -exports.TypeInfo.ExtensionState.fields = { - flags: { - enumType: exports.TypeInfo.ExtensionStateFlags +exports.TypeInfo.GitTreeDiffEntry.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType }, - installationIssues: { + objectType: { + enumType: exports.TypeInfo.GitObjectType + } +}; +exports.TypeInfo.GitTreeDiffResponse.fields = { + treeDiff: { + typeInfo: exports.TypeInfo.GitTreeDiff + } +}; +exports.TypeInfo.GitTreeEntryRef.fields = { + gitObjectType: { + enumType: exports.TypeInfo.GitObjectType + } +}; +exports.TypeInfo.GitTreeRef.fields = { + treeEntries: { isArray: true, - typeInfo: exports.TypeInfo.InstalledExtensionStateIssue - }, - lastUpdated: { + typeInfo: exports.TypeInfo.GitTreeEntryRef + } +}; +exports.TypeInfo.GitUserDate.fields = { + date: { isDate: true, + } +}; +exports.TypeInfo.GitVersionDescriptor.fields = { + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions }, - lastVersionCheck: { + versionType: { + enumType: exports.TypeInfo.GitVersionType + } +}; +exports.TypeInfo.HistoryEntry.fields = { + itemChangeType: { + enumType: exports.TypeInfo.VersionControlChangeType + } +}; +exports.TypeInfo.IncludedGitCommit.fields = { + commitTime: { isDate: true, } }; -exports.TypeInfo.InstalledExtension.fields = { - contributionTypes: { +exports.TypeInfo.ItemContent.fields = { + contentType: { + enumType: exports.TypeInfo.ItemContentType + } +}; +exports.TypeInfo.ItemDetailsOptions.fields = { + recursionLevel: { + enumType: exports.TypeInfo.VersionControlRecursionType + } +}; +exports.TypeInfo.LineDiffBlock.fields = { + changeType: { + enumType: exports.TypeInfo.LineDiffBlockChangeType + } +}; +exports.TypeInfo.SupportedIde.fields = { + ideType: { + enumType: exports.TypeInfo.SupportedIdeType + } +}; +exports.TypeInfo.TfvcBranch.fields = { + children: { isArray: true, - typeInfo: exports.TypeInfo.ContributionType + typeInfo: exports.TypeInfo.TfvcBranch }, - flags: { - enumType: exports.TypeInfo.ExtensionFlags + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcBranchRef.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType }, - installState: { - typeInfo: exports.TypeInfo.InstalledExtensionState + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.TfvcChangeset.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcChange }, - lastPublished: { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcChangesetRef.fields = { + createdDate: { isDate: true, + } +}; +exports.TypeInfo.TfvcCheckinEventData.fields = { + changeset: { + typeInfo: exports.TypeInfo.TfvcChangeset }, - licensing: { - typeInfo: exports.TypeInfo.ExtensionLicensing + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; -exports.TypeInfo.InstalledExtensionState.fields = { - flags: { - enumType: exports.TypeInfo.ExtensionStateFlags +exports.TypeInfo.TfvcHistoryEntry.fields = { + itemChangeType: { + enumType: exports.TypeInfo.VersionControlChangeType + } +}; +exports.TypeInfo.TfvcItem.fields = { + changeDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcItemDescriptor.fields = { + recursionLevel: { + enumType: exports.TypeInfo.VersionControlRecursionType }, - installationIssues: { - isArray: true, - typeInfo: exports.TypeInfo.InstalledExtensionStateIssue + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption }, - lastUpdated: { + versionType: { + enumType: exports.TypeInfo.TfvcVersionType + } +}; +exports.TypeInfo.TfvcItemPreviousHash.fields = { + changeDate: { isDate: true, } }; -exports.TypeInfo.InstalledExtensionStateIssue.fields = { - type: { - enumType: exports.TypeInfo.InstalledExtensionStateIssueType +exports.TypeInfo.TfvcItemRequestData.fields = { + itemDescriptors: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcItemDescriptor } }; -exports.TypeInfo.LicensingOverride.fields = { - behavior: { - enumType: exports.TypeInfo.ContributionLicensingBehaviorType +exports.TypeInfo.TfvcLabel.fields = { + items: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcItem + }, + modifiedDate: { + isDate: true, } }; -exports.TypeInfo.RequestedExtension.fields = { - extensionRequests: { +exports.TypeInfo.TfvcLabelRef.fields = { + modifiedDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcShelveset.fields = { + changes: { isArray: true, - typeInfo: exports.TypeInfo.ExtensionRequest + typeInfo: exports.TypeInfo.TfvcChange + }, + createdDate: { + isDate: true, } }; - - -/***/ }), - -/***/ 7278: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * The current state of a feature within a given scope - */ -var ContributedFeatureEnabledValue; -(function (ContributedFeatureEnabledValue) { - /** - * The state of the feature is not set for the specified scope - */ - ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Undefined"] = -1] = "Undefined"; - /** - * The feature is disabled at the specified scope - */ - ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Disabled"] = 0] = "Disabled"; - /** - * The feature is enabled at the specified scope - */ - ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Enabled"] = 1] = "Enabled"; -})(ContributedFeatureEnabledValue = exports.ContributedFeatureEnabledValue || (exports.ContributedFeatureEnabledValue = {})); -exports.TypeInfo = { - ContributedFeatureEnabledValue: { - enumValues: { - "undefined": -1, - "disabled": 0, - "enabled": 1 - } +exports.TypeInfo.TfvcShelvesetRef.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcVersionDescriptor.fields = { + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption }, - ContributedFeatureState: {}, - ContributedFeatureStateQuery: {}, + versionType: { + enumType: exports.TypeInfo.TfvcVersionType + } }; -exports.TypeInfo.ContributedFeatureState.fields = { - state: { - enumType: exports.TypeInfo.ContributedFeatureEnabledValue +exports.TypeInfo.UpdateRefsRequest.fields = { + updateMode: { + enumType: exports.TypeInfo.GitRefUpdateMode } }; -exports.TypeInfo.ContributedFeatureStateQuery.fields = { - featureStates: { - isDictionary: true, - dictionaryValueTypeInfo: exports.TypeInfo.ContributedFeatureState +exports.TypeInfo.VersionControlProjectInfo.fields = { + defaultSourceControlType: { + enumType: TfsCoreInterfaces.TypeInfo.SourceControlTypes + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; /***/ }), -/***/ 6110: -/***/ ((__unused_webpack_module, exports) => { +/***/ 13215: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; /* @@ -52218,120 +58235,88 @@ exports.TypeInfo.ContributedFeatureStateQuery.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Compression type for file stored in Blobstore - */ -var BlobCompressionType; -(function (BlobCompressionType) { - BlobCompressionType[BlobCompressionType["None"] = 0] = "None"; - BlobCompressionType[BlobCompressionType["GZip"] = 1] = "GZip"; -})(BlobCompressionType = exports.BlobCompressionType || (exports.BlobCompressionType = {})); -/** - * Status of a container item. - */ -var ContainerItemStatus; -(function (ContainerItemStatus) { - /** - * Item is created. - */ - ContainerItemStatus[ContainerItemStatus["Created"] = 1] = "Created"; - /** - * Item is a file pending for upload. - */ - ContainerItemStatus[ContainerItemStatus["PendingUpload"] = 2] = "PendingUpload"; -})(ContainerItemStatus = exports.ContainerItemStatus || (exports.ContainerItemStatus = {})); -/** - * Type of a container item. - */ -var ContainerItemType; -(function (ContainerItemType) { - /** - * Any item type. - */ - ContainerItemType[ContainerItemType["Any"] = 0] = "Any"; - /** - * Item is a folder which can have child items. - */ - ContainerItemType[ContainerItemType["Folder"] = 1] = "Folder"; - /** - * Item is a file which is stored in the file service. - */ - ContainerItemType[ContainerItemType["File"] = 2] = "File"; -})(ContainerItemType = exports.ContainerItemType || (exports.ContainerItemType = {})); -/** - * Options a container can have. - */ -var ContainerOptions; -(function (ContainerOptions) { - /** - * No option. - */ - ContainerOptions[ContainerOptions["None"] = 0] = "None"; -})(ContainerOptions = exports.ContainerOptions || (exports.ContainerOptions = {})); +const VSSInterfaces = __nccwpck_require__(94498); +var InheritLevel; +(function (InheritLevel) { + InheritLevel[InheritLevel["None"] = 0] = "None"; + InheritLevel[InheritLevel["Deployment"] = 1] = "Deployment"; + InheritLevel[InheritLevel["Account"] = 2] = "Account"; + InheritLevel[InheritLevel["Collection"] = 4] = "Collection"; + InheritLevel[InheritLevel["All"] = 7] = "All"; +})(InheritLevel = exports.InheritLevel || (exports.InheritLevel = {})); +var RelativeToSetting; +(function (RelativeToSetting) { + RelativeToSetting[RelativeToSetting["Context"] = 0] = "Context"; + RelativeToSetting[RelativeToSetting["WebApplication"] = 2] = "WebApplication"; + RelativeToSetting[RelativeToSetting["FullyQualified"] = 3] = "FullyQualified"; +})(RelativeToSetting = exports.RelativeToSetting || (exports.RelativeToSetting = {})); +var ServiceStatus; +(function (ServiceStatus) { + ServiceStatus[ServiceStatus["Assigned"] = 0] = "Assigned"; + ServiceStatus[ServiceStatus["Active"] = 1] = "Active"; + ServiceStatus[ServiceStatus["Moving"] = 2] = "Moving"; +})(ServiceStatus = exports.ServiceStatus || (exports.ServiceStatus = {})); exports.TypeInfo = { - BlobCompressionType: { + ConnectionData: {}, + InheritLevel: { enumValues: { "none": 0, - "gZip": 1 - } - }, - ContainerItemBlobReference: {}, - ContainerItemStatus: { - enumValues: { - "created": 1, - "pendingUpload": 2 + "deployment": 1, + "account": 2, + "collection": 4, + "all": 7 } }, - ContainerItemType: { + LocationServiceData: {}, + RelativeToSetting: { enumValues: { - "any": 0, - "folder": 1, - "file": 2 + "context": 0, + "webApplication": 2, + "fullyQualified": 3 } }, - ContainerOptions: { + ServiceDefinition: {}, + ServiceStatus: { enumValues: { - "none": 0 + "assigned": 0, + "active": 1, + "moving": 2 } }, - FileContainer: {}, - FileContainerItem: {}, -}; -exports.TypeInfo.ContainerItemBlobReference.fields = { - compressionType: { - enumType: exports.TypeInfo.BlobCompressionType - } }; -exports.TypeInfo.FileContainer.fields = { - dateCreated: { +exports.TypeInfo.ConnectionData.fields = { + deploymentType: { + enumType: VSSInterfaces.TypeInfo.DeploymentFlags + }, + lastUserAccess: { isDate: true, }, - options: { - enumType: exports.TypeInfo.ContainerOptions + locationServiceData: { + typeInfo: exports.TypeInfo.LocationServiceData } }; -exports.TypeInfo.FileContainerItem.fields = { - blobMetadata: { - typeInfo: exports.TypeInfo.ContainerItemBlobReference - }, - dateCreated: { - isDate: true, - }, - dateLastModified: { - isDate: true, +exports.TypeInfo.LocationServiceData.fields = { + serviceDefinitions: { + isArray: true, + typeInfo: exports.TypeInfo.ServiceDefinition + } +}; +exports.TypeInfo.ServiceDefinition.fields = { + inheritLevel: { + enumType: exports.TypeInfo.InheritLevel }, - itemType: { - enumType: exports.TypeInfo.ContainerItemType + relativeToSetting: { + enumType: exports.TypeInfo.RelativeToSetting }, status: { - enumType: exports.TypeInfo.ContainerItemStatus + enumType: exports.TypeInfo.ServiceStatus } }; /***/ }), -/***/ 8905: +/***/ 13044: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -52347,1456 +58332,1152 @@ exports.TypeInfo.FileContainerItem.fields = { Object.defineProperty(exports, "__esModule", ({ value: true })); /** - * How the acquisition is assigned - */ -var AcquisitionAssignmentType; -(function (AcquisitionAssignmentType) { - AcquisitionAssignmentType[AcquisitionAssignmentType["None"] = 0] = "None"; - /** - * Just assign for me - */ - AcquisitionAssignmentType[AcquisitionAssignmentType["Me"] = 1] = "Me"; - /** - * Assign for all users in the account - */ - AcquisitionAssignmentType[AcquisitionAssignmentType["All"] = 2] = "All"; -})(AcquisitionAssignmentType = exports.AcquisitionAssignmentType || (exports.AcquisitionAssignmentType = {})); -var AcquisitionOperationState; -(function (AcquisitionOperationState) { - /** - * Not allowed to use this AcquisitionOperation - */ - AcquisitionOperationState[AcquisitionOperationState["Disallow"] = 0] = "Disallow"; - /** - * Allowed to use this AcquisitionOperation - */ - AcquisitionOperationState[AcquisitionOperationState["Allow"] = 1] = "Allow"; - /** - * Operation has already been completed and is no longer available - */ - AcquisitionOperationState[AcquisitionOperationState["Completed"] = 3] = "Completed"; -})(AcquisitionOperationState = exports.AcquisitionOperationState || (exports.AcquisitionOperationState = {})); -/** - * Set of different types of operations that can be requested. - */ -var AcquisitionOperationType; -(function (AcquisitionOperationType) { - /** - * Not yet used - */ - AcquisitionOperationType[AcquisitionOperationType["Get"] = 0] = "Get"; - /** - * Install this extension into the host provided - */ - AcquisitionOperationType[AcquisitionOperationType["Install"] = 1] = "Install"; - /** - * Buy licenses for this extension and install into the host provided - */ - AcquisitionOperationType[AcquisitionOperationType["Buy"] = 2] = "Buy"; - /** - * Try this extension - */ - AcquisitionOperationType[AcquisitionOperationType["Try"] = 3] = "Try"; - /** - * Request this extension for installation - */ - AcquisitionOperationType[AcquisitionOperationType["Request"] = 4] = "Request"; - /** - * No action found - */ - AcquisitionOperationType[AcquisitionOperationType["None"] = 5] = "None"; - /** - * Request admins for purchasing extension - */ - AcquisitionOperationType[AcquisitionOperationType["PurchaseRequest"] = 6] = "PurchaseRequest"; -})(AcquisitionOperationType = exports.AcquisitionOperationType || (exports.AcquisitionOperationType = {})); -var ConcernCategory; -(function (ConcernCategory) { - ConcernCategory[ConcernCategory["General"] = 1] = "General"; - ConcernCategory[ConcernCategory["Abusive"] = 2] = "Abusive"; - ConcernCategory[ConcernCategory["Spam"] = 4] = "Spam"; -})(ConcernCategory = exports.ConcernCategory || (exports.ConcernCategory = {})); -var DraftPatchOperation; -(function (DraftPatchOperation) { - DraftPatchOperation[DraftPatchOperation["Publish"] = 1] = "Publish"; - DraftPatchOperation[DraftPatchOperation["Cancel"] = 2] = "Cancel"; -})(DraftPatchOperation = exports.DraftPatchOperation || (exports.DraftPatchOperation = {})); -var DraftStateType; -(function (DraftStateType) { - DraftStateType[DraftStateType["Unpublished"] = 1] = "Unpublished"; - DraftStateType[DraftStateType["Published"] = 2] = "Published"; - DraftStateType[DraftStateType["Cancelled"] = 3] = "Cancelled"; - DraftStateType[DraftStateType["Error"] = 4] = "Error"; -})(DraftStateType = exports.DraftStateType || (exports.DraftStateType = {})); -var ExtensionDeploymentTechnology; -(function (ExtensionDeploymentTechnology) { - ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Exe"] = 1] = "Exe"; - ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Msi"] = 2] = "Msi"; - ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Vsix"] = 3] = "Vsix"; - ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["ReferralLink"] = 4] = "ReferralLink"; -})(ExtensionDeploymentTechnology = exports.ExtensionDeploymentTechnology || (exports.ExtensionDeploymentTechnology = {})); -/** - * Type of event - */ -var ExtensionLifecycleEventType; -(function (ExtensionLifecycleEventType) { - ExtensionLifecycleEventType[ExtensionLifecycleEventType["Uninstall"] = 1] = "Uninstall"; - ExtensionLifecycleEventType[ExtensionLifecycleEventType["Install"] = 2] = "Install"; - ExtensionLifecycleEventType[ExtensionLifecycleEventType["Review"] = 3] = "Review"; - ExtensionLifecycleEventType[ExtensionLifecycleEventType["Acquisition"] = 4] = "Acquisition"; - ExtensionLifecycleEventType[ExtensionLifecycleEventType["Sales"] = 5] = "Sales"; - ExtensionLifecycleEventType[ExtensionLifecycleEventType["Other"] = 999] = "Other"; -})(ExtensionLifecycleEventType = exports.ExtensionLifecycleEventType || (exports.ExtensionLifecycleEventType = {})); -/** - * Set of flags that can be associated with a given permission over an extension - */ -var ExtensionPolicyFlags; -(function (ExtensionPolicyFlags) { - /** - * No permission - */ - ExtensionPolicyFlags[ExtensionPolicyFlags["None"] = 0] = "None"; - /** - * Permission on private extensions - */ - ExtensionPolicyFlags[ExtensionPolicyFlags["Private"] = 1] = "Private"; - /** - * Permission on public extensions - */ - ExtensionPolicyFlags[ExtensionPolicyFlags["Public"] = 2] = "Public"; - /** - * Permission in extensions that are in preview - */ - ExtensionPolicyFlags[ExtensionPolicyFlags["Preview"] = 4] = "Preview"; - /** - * Permission in released extensions - */ - ExtensionPolicyFlags[ExtensionPolicyFlags["Released"] = 8] = "Released"; - /** - * Permission in 1st party extensions - */ - ExtensionPolicyFlags[ExtensionPolicyFlags["FirstParty"] = 16] = "FirstParty"; - /** - * Mask that defines all permissions - */ - ExtensionPolicyFlags[ExtensionPolicyFlags["All"] = 31] = "All"; -})(ExtensionPolicyFlags = exports.ExtensionPolicyFlags || (exports.ExtensionPolicyFlags = {})); -/** - * Type of extension filters that are supported in the queries. - */ -var ExtensionQueryFilterType; -(function (ExtensionQueryFilterType) { - /** - * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["Tag"] = 1] = "Tag"; - /** - * The Values are an ExtensionName or fragment that is used to match other extension names. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["DisplayName"] = 2] = "DisplayName"; - /** - * The Filter is one or more tokens that define what scope to return private extensions for. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["Private"] = 3] = "Private"; - /** - * Retrieve a set of extensions based on their id's. The values should be the extension id's encoded as strings. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["Id"] = 4] = "Id"; - /** - * The category is unlike other filters. It is AND'd with the other filters instead of being a separate query. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["Category"] = 5] = "Category"; - /** - * Certain contribution types may be indexed to allow for query by type. User defined types can't be indexed at the moment. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["ContributionType"] = 6] = "ContributionType"; - /** - * Retrieve an set extension based on the name based identifier. This differs from the internal id (which is being deprecated). - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["Name"] = 7] = "Name"; - /** - * The InstallationTarget for an extension defines the target consumer for the extension. This may be something like VS, VSOnline, or VSCode - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTarget"] = 8] = "InstallationTarget"; - /** - * Query for featured extensions, no value is allowed when using the query type. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["Featured"] = 9] = "Featured"; - /** - * The SearchText provided by the user to search for extensions - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["SearchText"] = 10] = "SearchText"; - /** - * Query for extensions that are featured in their own category, The filterValue for this is name of category of extensions. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["FeaturedInCategory"] = 11] = "FeaturedInCategory"; - /** - * When retrieving extensions from a query, exclude the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be excluded. In case of multiple flags to be specified, a logical OR of the interger values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["ExcludeWithFlags"] = 12] = "ExcludeWithFlags"; - /** - * When retrieving extensions from a query, include the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["IncludeWithFlags"] = 13] = "IncludeWithFlags"; - /** - * Filter the extensions based on the LCID values applicable. Any extensions which are not having any LCID values will also be filtered. This is currently only supported for VS extensions. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["Lcid"] = 14] = "Lcid"; - /** - * Filter to provide the version of the installation target. This filter will be used along with InstallationTarget filter. The value should be a valid version string. Currently supported only if search text is provided. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTargetVersion"] = 15] = "InstallationTargetVersion"; - /** - * Filter type for specifying a range of installation target version. The filter will be used along with InstallationTarget filter. The value should be a pair of well formed version values separated by hyphen(-). Currently supported only if search text is provided. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTargetVersionRange"] = 16] = "InstallationTargetVersionRange"; - /** - * Filter type for specifying metadata key and value to be used for filtering. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["VsixMetadata"] = 17] = "VsixMetadata"; - /** - * Filter to get extensions published by a publisher having supplied internal name - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["PublisherName"] = 18] = "PublisherName"; - /** - * Filter to get extensions published by all publishers having supplied display name - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["PublisherDisplayName"] = 19] = "PublisherDisplayName"; - /** - * When retrieving extensions from a query, include the extensions which have a publisher having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter There should be at most one filter of this type. This only acts as a restrictive filter after. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["IncludeWithPublisherFlags"] = 20] = "IncludeWithPublisherFlags"; - /** - * Filter to get extensions shared with particular organization - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["OrganizationSharedWith"] = 21] = "OrganizationSharedWith"; - /** - * Filter to get VS IDE extensions by Product Architecture - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["ProductArchitecture"] = 22] = "ProductArchitecture"; - /** - * Filter to get VS Code extensions by target platform. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["TargetPlatform"] = 23] = "TargetPlatform"; - /** - * Retrieve an extension based on the extensionName. - */ - ExtensionQueryFilterType[ExtensionQueryFilterType["ExtensionName"] = 24] = "ExtensionName"; -})(ExtensionQueryFilterType = exports.ExtensionQueryFilterType || (exports.ExtensionQueryFilterType = {})); -/** - * Set of flags used to determine which set of information is retrieved when reading published extensions - */ -var ExtensionQueryFlags; -(function (ExtensionQueryFlags) { - /** - * None is used to retrieve only the basic extension details. - */ - ExtensionQueryFlags[ExtensionQueryFlags["None"] = 0] = "None"; - /** - * IncludeVersions will return version information for extensions returned - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeVersions"] = 1] = "IncludeVersions"; - /** - * IncludeFiles will return information about which files were found within the extension that were stored independent of the manifest. When asking for files, versions will be included as well since files are returned as a property of the versions. These files can be retrieved using the path to the file without requiring the entire manifest be downloaded. - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeFiles"] = 2] = "IncludeFiles"; - /** - * Include the Categories and Tags that were added to the extension definition. - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeCategoryAndTags"] = 4] = "IncludeCategoryAndTags"; - /** - * Include the details about which accounts the extension has been shared with if the extension is a private extension. - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeSharedAccounts"] = 8] = "IncludeSharedAccounts"; - /** - * Include properties associated with versions of the extension - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeVersionProperties"] = 16] = "IncludeVersionProperties"; - /** - * Excluding non-validated extensions will remove any extension versions that either are in the process of being validated or have failed validation. - */ - ExtensionQueryFlags[ExtensionQueryFlags["ExcludeNonValidated"] = 32] = "ExcludeNonValidated"; - /** - * Include the set of installation targets the extension has requested. - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeInstallationTargets"] = 64] = "IncludeInstallationTargets"; - /** - * Include the base uri for assets of this extension - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeAssetUri"] = 128] = "IncludeAssetUri"; - /** - * Include the statistics associated with this extension - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeStatistics"] = 256] = "IncludeStatistics"; - /** - * When retrieving versions from a query, only include the latest version of the extensions that matched. This is useful when the caller doesn't need all the published versions. It will save a significant size in the returned payload. - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeLatestVersionOnly"] = 512] = "IncludeLatestVersionOnly"; - /** - * This flag switches the asset uri to use GetAssetByName instead of CDN When this is used, values of base asset uri and base asset uri fallback are switched When this is used, source of asset files are pointed to Gallery service always even if CDN is available - */ - ExtensionQueryFlags[ExtensionQueryFlags["UseFallbackAssetUri"] = 1024] = "UseFallbackAssetUri"; - /** - * This flag is used to get all the metadata values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal. - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeMetadata"] = 2048] = "IncludeMetadata"; - /** - * This flag is used to indicate to return very small data for extension required by VS IDE. This flag is only compatible when querying is done by VS IDE - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeMinimalPayloadForVsIde"] = 4096] = "IncludeMinimalPayloadForVsIde"; - /** - * This flag is used to get Lcid values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeLcids"] = 8192] = "IncludeLcids"; - /** - * Include the details about which organizations the extension has been shared with if the extension is a private extension. - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeSharedOrganizations"] = 16384] = "IncludeSharedOrganizations"; - /** - * Include the details if an extension is in conflict list or not Currently being used for VSCode extensions. - */ - ExtensionQueryFlags[ExtensionQueryFlags["IncludeNameConflictInfo"] = 32768] = "IncludeNameConflictInfo"; - /** - * AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required. - */ - ExtensionQueryFlags[ExtensionQueryFlags["AllAttributes"] = 16863] = "AllAttributes"; -})(ExtensionQueryFlags = exports.ExtensionQueryFlags || (exports.ExtensionQueryFlags = {})); -var ExtensionStatisticOperation; -(function (ExtensionStatisticOperation) { - ExtensionStatisticOperation[ExtensionStatisticOperation["None"] = 0] = "None"; - ExtensionStatisticOperation[ExtensionStatisticOperation["Set"] = 1] = "Set"; - ExtensionStatisticOperation[ExtensionStatisticOperation["Increment"] = 2] = "Increment"; - ExtensionStatisticOperation[ExtensionStatisticOperation["Decrement"] = 3] = "Decrement"; - ExtensionStatisticOperation[ExtensionStatisticOperation["Delete"] = 4] = "Delete"; -})(ExtensionStatisticOperation = exports.ExtensionStatisticOperation || (exports.ExtensionStatisticOperation = {})); -/** - * Stats aggregation type - */ -var ExtensionStatsAggregateType; -(function (ExtensionStatsAggregateType) { - ExtensionStatsAggregateType[ExtensionStatsAggregateType["Daily"] = 1] = "Daily"; -})(ExtensionStatsAggregateType = exports.ExtensionStatsAggregateType || (exports.ExtensionStatsAggregateType = {})); -/** - * Set of flags that can be associated with a given extension version. These flags apply to a specific version of the extension. - */ -var ExtensionVersionFlags; -(function (ExtensionVersionFlags) { - /** - * No flags exist for this version. - */ - ExtensionVersionFlags[ExtensionVersionFlags["None"] = 0] = "None"; - /** - * The Validated flag for a version means the extension version has passed validation and can be used.. - */ - ExtensionVersionFlags[ExtensionVersionFlags["Validated"] = 1] = "Validated"; -})(ExtensionVersionFlags = exports.ExtensionVersionFlags || (exports.ExtensionVersionFlags = {})); -/** - * Type of event - */ -var NotificationTemplateType; -(function (NotificationTemplateType) { - /** - * Template type for Review Notification. - */ - NotificationTemplateType[NotificationTemplateType["ReviewNotification"] = 1] = "ReviewNotification"; - /** - * Template type for Qna Notification. - */ - NotificationTemplateType[NotificationTemplateType["QnaNotification"] = 2] = "QnaNotification"; - /** - * Template type for Customer Contact Notification. - */ - NotificationTemplateType[NotificationTemplateType["CustomerContactNotification"] = 3] = "CustomerContactNotification"; - /** - * Template type for Publisher Member Notification. - */ - NotificationTemplateType[NotificationTemplateType["PublisherMemberUpdateNotification"] = 4] = "PublisherMemberUpdateNotification"; -})(NotificationTemplateType = exports.NotificationTemplateType || (exports.NotificationTemplateType = {})); -/** - * PagingDirection is used to define which set direction to move the returned result set based on a previous query. - */ -var PagingDirection; -(function (PagingDirection) { - /** - * Backward will return results from earlier in the resultset. - */ - PagingDirection[PagingDirection["Backward"] = 1] = "Backward"; - /** - * Forward will return results from later in the resultset. - */ - PagingDirection[PagingDirection["Forward"] = 2] = "Forward"; -})(PagingDirection = exports.PagingDirection || (exports.PagingDirection = {})); -/** - * Set of flags that can be associated with a given extension. These flags apply to all versions of the extension and not to a specific version. + * Default delivery preference for group subscribers. Indicates how the subscriber should be notified. */ -var PublishedExtensionFlags; -(function (PublishedExtensionFlags) { - /** - * No flags exist for this extension. - */ - PublishedExtensionFlags[PublishedExtensionFlags["None"] = 0] = "None"; - /** - * The Disabled flag for an extension means the extension can't be changed and won't be used by consumers. The disabled flag is managed by the service and can't be supplied by the Extension Developers. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Disabled"] = 1] = "Disabled"; - /** - * BuiltIn Extension are available to all Tenants. An explicit registration is not required. This attribute is reserved and can't be supplied by Extension Developers. BuiltIn extensions are by definition Public. There is no need to set the public flag for extensions marked BuiltIn. - */ - PublishedExtensionFlags[PublishedExtensionFlags["BuiltIn"] = 2] = "BuiltIn"; - /** - * This extension has been validated by the service. The extension meets the requirements specified. This attribute is reserved and can't be supplied by the Extension Developers. Validation is a process that ensures that all contributions are well formed. They meet the requirements defined by the contribution type they are extending. Note this attribute will be updated asynchronously as the extension is validated by the developer of the contribution type. There will be restricted access to the extension while this process is performed. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Validated"] = 4] = "Validated"; - /** - * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Trusted"] = 8] = "Trusted"; - /** - * The Paid flag indicates that the commerce can be enabled for this extension. Publisher needs to setup Offer/Pricing plan in Azure. If Paid flag is set and a corresponding Offer is not available, the extension will automatically be marked as Preview. If the publisher intends to make the extension Paid in the future, it is mandatory to set the Preview flag. This is currently available only for VSTS extensions only. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Paid"] = 16] = "Paid"; - /** - * This extension registration is public, making its visibility open to the public. This means all tenants have the ability to install this extension. Without this flag the extension will be private and will need to be shared with the tenants that can install it. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Public"] = 256] = "Public"; - /** - * This extension has multiple versions active at one time and version discovery should be done using the defined "Version Discovery" protocol to determine the version available to a specific user or tenant. @TODO: Link to Version Discovery Protocol. - */ - PublishedExtensionFlags[PublishedExtensionFlags["MultiVersion"] = 512] = "MultiVersion"; - /** - * The system flag is reserved, and cant be used by publishers. - */ - PublishedExtensionFlags[PublishedExtensionFlags["System"] = 1024] = "System"; - /** - * The Preview flag indicates that the extension is still under preview (not yet of "release" quality). These extensions may be decorated differently in the gallery and may have different policies applied to them. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Preview"] = 2048] = "Preview"; - /** - * The Unpublished flag indicates that the extension can't be installed/downloaded. Users who have installed such an extension can continue to use the extension. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Unpublished"] = 4096] = "Unpublished"; - /** - * The Trial flag indicates that the extension is in Trial version. The flag is right now being used only with respect to Visual Studio extensions. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Trial"] = 8192] = "Trial"; - /** - * The Locked flag indicates that extension has been locked from Marketplace. Further updates/acquisitions are not allowed on the extension until this is present. This should be used along with making the extension private/unpublished. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Locked"] = 16384] = "Locked"; - /** - * This flag is set for extensions we want to hide from Marketplace home and search pages. This will be used to override the exposure of builtIn flags. - */ - PublishedExtensionFlags[PublishedExtensionFlags["Hidden"] = 32768] = "Hidden"; -})(PublishedExtensionFlags = exports.PublishedExtensionFlags || (exports.PublishedExtensionFlags = {})); -var PublisherFlags; -(function (PublisherFlags) { - /** - * This should never be returned, it is used to represent a publisher who's flags haven't changed during update calls. - */ - PublisherFlags[PublisherFlags["UnChanged"] = 1073741824] = "UnChanged"; - /** - * No flags exist for this publisher. - */ - PublisherFlags[PublisherFlags["None"] = 0] = "None"; - /** - * The Disabled flag for a publisher means the publisher can't be changed and won't be used by consumers, this extends to extensions owned by the publisher as well. The disabled flag is managed by the service and can't be supplied by the Extension Developers. - */ - PublisherFlags[PublisherFlags["Disabled"] = 1] = "Disabled"; - /** - * A verified publisher is one that Microsoft has done some review of and ensured the publisher meets a set of requirements. The requirements to become a verified publisher are not listed here. They can be found in public documentation (TBD). - */ - PublisherFlags[PublisherFlags["Verified"] = 2] = "Verified"; - /** - * A Certified publisher is one that is Microsoft verified and in addition meets a set of requirements for its published extensions. The requirements to become a certified publisher are not listed here. They can be found in public documentation (TBD). - */ - PublisherFlags[PublisherFlags["Certified"] = 4] = "Certified"; - /** - * This is the set of flags that can't be supplied by the developer and is managed by the service itself. - */ - PublisherFlags[PublisherFlags["ServiceFlags"] = 7] = "ServiceFlags"; -})(PublisherFlags = exports.PublisherFlags || (exports.PublisherFlags = {})); -var PublisherPermissions; -(function (PublisherPermissions) { - /** - * This gives the bearer the rights to read Publishers and Extensions. - */ - PublisherPermissions[PublisherPermissions["Read"] = 1] = "Read"; - /** - * This gives the bearer the rights to update, delete, and share Extensions (but not the ability to create them). - */ - PublisherPermissions[PublisherPermissions["UpdateExtension"] = 2] = "UpdateExtension"; +var DefaultGroupDeliveryPreference; +(function (DefaultGroupDeliveryPreference) { + DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["NoDelivery"] = -1] = "NoDelivery"; + DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["EachMember"] = 2] = "EachMember"; +})(DefaultGroupDeliveryPreference = exports.DefaultGroupDeliveryPreference || (exports.DefaultGroupDeliveryPreference = {})); +/** + * Describes the subscription evaluation operation status. + */ +var EvaluationOperationStatus; +(function (EvaluationOperationStatus) { /** - * This gives the bearer the rights to create new Publishers at the root of the namespace. + * The operation object does not have the status set. */ - PublisherPermissions[PublisherPermissions["CreatePublisher"] = 4] = "CreatePublisher"; + EvaluationOperationStatus[EvaluationOperationStatus["NotSet"] = 0] = "NotSet"; /** - * This gives the bearer the rights to create new Extensions within a publisher. + * The operation has been queued. */ - PublisherPermissions[PublisherPermissions["PublishExtension"] = 8] = "PublishExtension"; + EvaluationOperationStatus[EvaluationOperationStatus["Queued"] = 1] = "Queued"; /** - * Admin gives the bearer the rights to manage restricted attributes of Publishers and Extensions. + * The operation is in progress. */ - PublisherPermissions[PublisherPermissions["Admin"] = 16] = "Admin"; + EvaluationOperationStatus[EvaluationOperationStatus["InProgress"] = 2] = "InProgress"; /** - * TrustedPartner gives the bearer the rights to publish a extensions with restricted capabilities. + * The operation was cancelled by the user. */ - PublisherPermissions[PublisherPermissions["TrustedPartner"] = 32] = "TrustedPartner"; + EvaluationOperationStatus[EvaluationOperationStatus["Cancelled"] = 3] = "Cancelled"; /** - * PrivateRead is another form of read designed to allow higher privilege accessors the ability to read private extensions. + * The operation completed successfully. */ - PublisherPermissions[PublisherPermissions["PrivateRead"] = 64] = "PrivateRead"; + EvaluationOperationStatus[EvaluationOperationStatus["Succeeded"] = 4] = "Succeeded"; /** - * This gives the bearer the rights to delete any extension. + * The operation completed with a failure. */ - PublisherPermissions[PublisherPermissions["DeleteExtension"] = 128] = "DeleteExtension"; + EvaluationOperationStatus[EvaluationOperationStatus["Failed"] = 5] = "Failed"; /** - * This gives the bearer the rights edit the publisher settings. + * The operation timed out. */ - PublisherPermissions[PublisherPermissions["EditSettings"] = 256] = "EditSettings"; + EvaluationOperationStatus[EvaluationOperationStatus["TimedOut"] = 6] = "TimedOut"; /** - * This gives the bearer the rights to see all permissions on the publisher. + * The operation could not be found. */ - PublisherPermissions[PublisherPermissions["ViewPermissions"] = 512] = "ViewPermissions"; + EvaluationOperationStatus[EvaluationOperationStatus["NotFound"] = 7] = "NotFound"; +})(EvaluationOperationStatus = exports.EvaluationOperationStatus || (exports.EvaluationOperationStatus = {})); +/** + * Set of flags used to determine which set of information is retrieved when querying for event publishers + */ +var EventPublisherQueryFlags; +(function (EventPublisherQueryFlags) { + EventPublisherQueryFlags[EventPublisherQueryFlags["None"] = 0] = "None"; /** - * This gives the bearer the rights to assign permissions on the publisher. + * Include event types from the remote services too */ - PublisherPermissions[PublisherPermissions["ManagePermissions"] = 1024] = "ManagePermissions"; + EventPublisherQueryFlags[EventPublisherQueryFlags["IncludeRemoteServices"] = 2] = "IncludeRemoteServices"; +})(EventPublisherQueryFlags = exports.EventPublisherQueryFlags || (exports.EventPublisherQueryFlags = {})); +/** + * Set of flags used to determine which set of information is retrieved when querying for eventtypes + */ +var EventTypeQueryFlags; +(function (EventTypeQueryFlags) { + EventTypeQueryFlags[EventTypeQueryFlags["None"] = 0] = "None"; /** - * This gives the bearer the rights to delete the publisher. + * IncludeFields will include all fields and their types */ - PublisherPermissions[PublisherPermissions["DeletePublisher"] = 2048] = "DeletePublisher"; -})(PublisherPermissions = exports.PublisherPermissions || (exports.PublisherPermissions = {})); + EventTypeQueryFlags[EventTypeQueryFlags["IncludeFields"] = 1] = "IncludeFields"; +})(EventTypeQueryFlags = exports.EventTypeQueryFlags || (exports.EventTypeQueryFlags = {})); +var NotificationOperation; +(function (NotificationOperation) { + NotificationOperation[NotificationOperation["None"] = 0] = "None"; + NotificationOperation[NotificationOperation["SuspendUnprocessed"] = 1] = "SuspendUnprocessed"; +})(NotificationOperation = exports.NotificationOperation || (exports.NotificationOperation = {})); +var NotificationReasonType; +(function (NotificationReasonType) { + NotificationReasonType[NotificationReasonType["Unknown"] = 0] = "Unknown"; + NotificationReasonType[NotificationReasonType["Follows"] = 1] = "Follows"; + NotificationReasonType[NotificationReasonType["Personal"] = 2] = "Personal"; + NotificationReasonType[NotificationReasonType["PersonalAlias"] = 3] = "PersonalAlias"; + NotificationReasonType[NotificationReasonType["DirectMember"] = 4] = "DirectMember"; + NotificationReasonType[NotificationReasonType["IndirectMember"] = 5] = "IndirectMember"; + NotificationReasonType[NotificationReasonType["GroupAlias"] = 6] = "GroupAlias"; + NotificationReasonType[NotificationReasonType["SubscriptionAlias"] = 7] = "SubscriptionAlias"; + NotificationReasonType[NotificationReasonType["SingleRole"] = 8] = "SingleRole"; + NotificationReasonType[NotificationReasonType["DirectMemberGroupRole"] = 9] = "DirectMemberGroupRole"; + NotificationReasonType[NotificationReasonType["InDirectMemberGroupRole"] = 10] = "InDirectMemberGroupRole"; + NotificationReasonType[NotificationReasonType["AliasMemberGroupRole"] = 11] = "AliasMemberGroupRole"; +})(NotificationReasonType = exports.NotificationReasonType || (exports.NotificationReasonType = {})); +var NotificationStatisticType; +(function (NotificationStatisticType) { + NotificationStatisticType[NotificationStatisticType["NotificationBySubscription"] = 0] = "NotificationBySubscription"; + NotificationStatisticType[NotificationStatisticType["EventsByEventType"] = 1] = "EventsByEventType"; + NotificationStatisticType[NotificationStatisticType["NotificationByEventType"] = 2] = "NotificationByEventType"; + NotificationStatisticType[NotificationStatisticType["EventsByEventTypePerUser"] = 3] = "EventsByEventTypePerUser"; + NotificationStatisticType[NotificationStatisticType["NotificationByEventTypePerUser"] = 4] = "NotificationByEventTypePerUser"; + NotificationStatisticType[NotificationStatisticType["Events"] = 5] = "Events"; + NotificationStatisticType[NotificationStatisticType["Notifications"] = 6] = "Notifications"; + NotificationStatisticType[NotificationStatisticType["NotificationFailureBySubscription"] = 7] = "NotificationFailureBySubscription"; + NotificationStatisticType[NotificationStatisticType["UnprocessedRangeStart"] = 100] = "UnprocessedRangeStart"; + NotificationStatisticType[NotificationStatisticType["UnprocessedEventsByPublisher"] = 101] = "UnprocessedEventsByPublisher"; + NotificationStatisticType[NotificationStatisticType["UnprocessedEventDelayByPublisher"] = 102] = "UnprocessedEventDelayByPublisher"; + NotificationStatisticType[NotificationStatisticType["UnprocessedNotificationsByChannelByPublisher"] = 103] = "UnprocessedNotificationsByChannelByPublisher"; + NotificationStatisticType[NotificationStatisticType["UnprocessedNotificationDelayByChannelByPublisher"] = 104] = "UnprocessedNotificationDelayByChannelByPublisher"; + NotificationStatisticType[NotificationStatisticType["DelayRangeStart"] = 200] = "DelayRangeStart"; + NotificationStatisticType[NotificationStatisticType["TotalPipelineTime"] = 201] = "TotalPipelineTime"; + NotificationStatisticType[NotificationStatisticType["NotificationPipelineTime"] = 202] = "NotificationPipelineTime"; + NotificationStatisticType[NotificationStatisticType["EventPipelineTime"] = 203] = "EventPipelineTime"; + NotificationStatisticType[NotificationStatisticType["HourlyRangeStart"] = 1000] = "HourlyRangeStart"; + NotificationStatisticType[NotificationStatisticType["HourlyNotificationBySubscription"] = 1001] = "HourlyNotificationBySubscription"; + NotificationStatisticType[NotificationStatisticType["HourlyEventsByEventTypePerUser"] = 1002] = "HourlyEventsByEventTypePerUser"; + NotificationStatisticType[NotificationStatisticType["HourlyEvents"] = 1003] = "HourlyEvents"; + NotificationStatisticType[NotificationStatisticType["HourlyNotifications"] = 1004] = "HourlyNotifications"; + NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedEventsByPublisher"] = 1101] = "HourlyUnprocessedEventsByPublisher"; + NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedEventDelayByPublisher"] = 1102] = "HourlyUnprocessedEventDelayByPublisher"; + NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedNotificationsByChannelByPublisher"] = 1103] = "HourlyUnprocessedNotificationsByChannelByPublisher"; + NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedNotificationDelayByChannelByPublisher"] = 1104] = "HourlyUnprocessedNotificationDelayByChannelByPublisher"; + NotificationStatisticType[NotificationStatisticType["HourlyTotalPipelineTime"] = 1201] = "HourlyTotalPipelineTime"; + NotificationStatisticType[NotificationStatisticType["HourlyNotificationPipelineTime"] = 1202] = "HourlyNotificationPipelineTime"; + NotificationStatisticType[NotificationStatisticType["HourlyEventPipelineTime"] = 1203] = "HourlyEventPipelineTime"; +})(NotificationStatisticType = exports.NotificationStatisticType || (exports.NotificationStatisticType = {})); /** - * Set of flags used to define the attributes requested when a publisher is returned. Some API's allow the caller to specify the level of detail needed. + * Delivery preference for a subscriber. Indicates how the subscriber should be notified. */ -var PublisherQueryFlags; -(function (PublisherQueryFlags) { +var NotificationSubscriberDeliveryPreference; +(function (NotificationSubscriberDeliveryPreference) { /** - * None is used to retrieve only the basic publisher details. + * Do not send notifications by default. Note: notifications can still be delivered to this subscriber, for example via a custom subscription. */ - PublisherQueryFlags[PublisherQueryFlags["None"] = 0] = "None"; + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["NoDelivery"] = -1] = "NoDelivery"; /** - * Is used to include a list of basic extension details for all extensions published by the requested publisher. + * Deliver notifications to the subscriber's preferred email address. */ - PublisherQueryFlags[PublisherQueryFlags["IncludeExtensions"] = 1] = "IncludeExtensions"; + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["PreferredEmailAddress"] = 1] = "PreferredEmailAddress"; /** - * Is used to include email address of all the users who are marked as owners for the publisher + * Deliver notifications to each member of the group representing the subscriber. Only applicable when the subscriber is a group. */ - PublisherQueryFlags[PublisherQueryFlags["IncludeEmailAddress"] = 2] = "IncludeEmailAddress"; -})(PublisherQueryFlags = exports.PublisherQueryFlags || (exports.PublisherQueryFlags = {})); -/** - * Access definition for a RoleAssignment. - */ -var PublisherRoleAccess; -(function (PublisherRoleAccess) { + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["EachMember"] = 2] = "EachMember"; /** - * Access has been explicitly set. + * Use default */ - PublisherRoleAccess[PublisherRoleAccess["Assigned"] = 1] = "Assigned"; + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["UseDefault"] = 3] = "UseDefault"; +})(NotificationSubscriberDeliveryPreference = exports.NotificationSubscriberDeliveryPreference || (exports.NotificationSubscriberDeliveryPreference = {})); +var SubscriberFlags; +(function (SubscriberFlags) { + SubscriberFlags[SubscriberFlags["None"] = 0] = "None"; /** - * Access has been inherited from a higher scope. + * Subscriber's delivery preferences could be updated */ - PublisherRoleAccess[PublisherRoleAccess["Inherited"] = 2] = "Inherited"; -})(PublisherRoleAccess = exports.PublisherRoleAccess || (exports.PublisherRoleAccess = {})); -var PublisherState; -(function (PublisherState) { + SubscriberFlags[SubscriberFlags["DeliveryPreferencesEditable"] = 2] = "DeliveryPreferencesEditable"; /** - * No state exists for this publisher. + * Subscriber's delivery preferences supports email delivery */ - PublisherState[PublisherState["None"] = 0] = "None"; + SubscriberFlags[SubscriberFlags["SupportsPreferredEmailAddressDelivery"] = 4] = "SupportsPreferredEmailAddressDelivery"; /** - * This state indicates that publisher has applied for Marketplace verification (via UI) and still not been certified. This state would be reset once the publisher is verified. + * Subscriber's delivery preferences supports individual members delivery(group expansion) */ - PublisherState[PublisherState["VerificationPending"] = 1] = "VerificationPending"; + SubscriberFlags[SubscriberFlags["SupportsEachMemberDelivery"] = 8] = "SupportsEachMemberDelivery"; /** - * This state indicates that publisher has applied for Marketplace certification (via UI) and still not been certified. This state would be reset once the publisher is certified. + * Subscriber's delivery preferences supports no delivery */ - PublisherState[PublisherState["CertificationPending"] = 2] = "CertificationPending"; + SubscriberFlags[SubscriberFlags["SupportsNoDelivery"] = 16] = "SupportsNoDelivery"; /** - * This state indicates that publisher had applied for Marketplace certification (via UI) but his/her certification got rejected. This state would be reset if and when the publisher is certified. + * Subscriber is a user */ - PublisherState[PublisherState["CertificationRejected"] = 4] = "CertificationRejected"; + SubscriberFlags[SubscriberFlags["IsUser"] = 32] = "IsUser"; /** - * This state indicates that publisher was certified on the Marketplace, but his/her certification got revoked. This state would never be reset, even after publisher gets re-certified. It would indicate that the publisher certification was revoked at least once. + * Subscriber is a group */ - PublisherState[PublisherState["CertificationRevoked"] = 8] = "CertificationRevoked"; -})(PublisherState = exports.PublisherState || (exports.PublisherState = {})); + SubscriberFlags[SubscriberFlags["IsGroup"] = 64] = "IsGroup"; + /** + * Subscriber is a team + */ + SubscriberFlags[SubscriberFlags["IsTeam"] = 128] = "IsTeam"; +})(SubscriberFlags = exports.SubscriberFlags || (exports.SubscriberFlags = {})); +var SubscriptionFieldType; +(function (SubscriptionFieldType) { + SubscriptionFieldType[SubscriptionFieldType["String"] = 1] = "String"; + SubscriptionFieldType[SubscriptionFieldType["Integer"] = 2] = "Integer"; + SubscriptionFieldType[SubscriptionFieldType["DateTime"] = 3] = "DateTime"; + SubscriptionFieldType[SubscriptionFieldType["PlainText"] = 5] = "PlainText"; + SubscriptionFieldType[SubscriptionFieldType["Html"] = 7] = "Html"; + SubscriptionFieldType[SubscriptionFieldType["TreePath"] = 8] = "TreePath"; + SubscriptionFieldType[SubscriptionFieldType["History"] = 9] = "History"; + SubscriptionFieldType[SubscriptionFieldType["Double"] = 10] = "Double"; + SubscriptionFieldType[SubscriptionFieldType["Guid"] = 11] = "Guid"; + SubscriptionFieldType[SubscriptionFieldType["Boolean"] = 12] = "Boolean"; + SubscriptionFieldType[SubscriptionFieldType["Identity"] = 13] = "Identity"; + SubscriptionFieldType[SubscriptionFieldType["PicklistInteger"] = 14] = "PicklistInteger"; + SubscriptionFieldType[SubscriptionFieldType["PicklistString"] = 15] = "PicklistString"; + SubscriptionFieldType[SubscriptionFieldType["PicklistDouble"] = 16] = "PicklistDouble"; + SubscriptionFieldType[SubscriptionFieldType["TeamProject"] = 17] = "TeamProject"; +})(SubscriptionFieldType = exports.SubscriptionFieldType || (exports.SubscriptionFieldType = {})); /** - * Denotes the status of the QnA Item + * Read-only indicators that further describe the subscription. */ -var QnAItemStatus; -(function (QnAItemStatus) { - QnAItemStatus[QnAItemStatus["None"] = 0] = "None"; +var SubscriptionFlags; +(function (SubscriptionFlags) { /** - * The UserEditable flag indicates whether the item is editable by the logged in user. + * None */ - QnAItemStatus[QnAItemStatus["UserEditable"] = 1] = "UserEditable"; + SubscriptionFlags[SubscriptionFlags["None"] = 0] = "None"; /** - * The PublisherCreated flag indicates whether the item has been created by extension publisher. + * Subscription's subscriber is a group, not a user */ - QnAItemStatus[QnAItemStatus["PublisherCreated"] = 2] = "PublisherCreated"; -})(QnAItemStatus = exports.QnAItemStatus || (exports.QnAItemStatus = {})); -/** - * The status of a REST Api response status. - */ -var RestApiResponseStatus; -(function (RestApiResponseStatus) { + SubscriptionFlags[SubscriptionFlags["GroupSubscription"] = 1] = "GroupSubscription"; /** - * The operation is completed. + * Subscription is contributed and not persisted. This means certain fields of the subscription, like Filter, are read-only. */ - RestApiResponseStatus[RestApiResponseStatus["Completed"] = 0] = "Completed"; + SubscriptionFlags[SubscriptionFlags["ContributedSubscription"] = 2] = "ContributedSubscription"; /** - * The operation is failed. + * A user that is member of the subscription's subscriber group can opt in/out of the subscription. */ - RestApiResponseStatus[RestApiResponseStatus["Failed"] = 1] = "Failed"; + SubscriptionFlags[SubscriptionFlags["CanOptOut"] = 4] = "CanOptOut"; /** - * The operation is in progress. + * If the subscriber is a group, is it a team. */ - RestApiResponseStatus[RestApiResponseStatus["Inprogress"] = 2] = "Inprogress"; + SubscriptionFlags[SubscriptionFlags["TeamSubscription"] = 8] = "TeamSubscription"; /** - * The operation is in skipped. + * For role based subscriptions, there is an expectation that there will always be at least one actor that matches */ - RestApiResponseStatus[RestApiResponseStatus["Skipped"] = 3] = "Skipped"; -})(RestApiResponseStatus = exports.RestApiResponseStatus || (exports.RestApiResponseStatus = {})); -/** - * Type of operation - */ -var ReviewEventOperation; -(function (ReviewEventOperation) { - ReviewEventOperation[ReviewEventOperation["Create"] = 1] = "Create"; - ReviewEventOperation[ReviewEventOperation["Update"] = 2] = "Update"; - ReviewEventOperation[ReviewEventOperation["Delete"] = 3] = "Delete"; -})(ReviewEventOperation = exports.ReviewEventOperation || (exports.ReviewEventOperation = {})); + SubscriptionFlags[SubscriptionFlags["OneActorMatches"] = 16] = "OneActorMatches"; +})(SubscriptionFlags = exports.SubscriptionFlags || (exports.SubscriptionFlags = {})); /** - * Options to GetReviews query + * The permissions that a user has to a certain subscription */ -var ReviewFilterOptions; -(function (ReviewFilterOptions) { +var SubscriptionPermissions; +(function (SubscriptionPermissions) { /** - * No filtering, all reviews are returned (default option) + * None */ - ReviewFilterOptions[ReviewFilterOptions["None"] = 0] = "None"; + SubscriptionPermissions[SubscriptionPermissions["None"] = 0] = "None"; /** - * Filter out review items with empty review text + * full view of description, filters, etc. Not limited. */ - ReviewFilterOptions[ReviewFilterOptions["FilterEmptyReviews"] = 1] = "FilterEmptyReviews"; + SubscriptionPermissions[SubscriptionPermissions["View"] = 1] = "View"; /** - * Filter out review items with empty usernames + * update subscription */ - ReviewFilterOptions[ReviewFilterOptions["FilterEmptyUserNames"] = 2] = "FilterEmptyUserNames"; -})(ReviewFilterOptions = exports.ReviewFilterOptions || (exports.ReviewFilterOptions = {})); -/** - * Denotes the patch operation type - */ -var ReviewPatchOperation; -(function (ReviewPatchOperation) { + SubscriptionPermissions[SubscriptionPermissions["Edit"] = 2] = "Edit"; /** - * Flag a review + * delete subscription */ - ReviewPatchOperation[ReviewPatchOperation["FlagReview"] = 1] = "FlagReview"; + SubscriptionPermissions[SubscriptionPermissions["Delete"] = 4] = "Delete"; +})(SubscriptionPermissions = exports.SubscriptionPermissions || (exports.SubscriptionPermissions = {})); +/** + * Flags that influence the result set of a subscription query. + */ +var SubscriptionQueryFlags; +(function (SubscriptionQueryFlags) { + SubscriptionQueryFlags[SubscriptionQueryFlags["None"] = 0] = "None"; /** - * Update an existing review + * Include subscriptions with invalid subscribers. */ - ReviewPatchOperation[ReviewPatchOperation["UpdateReview"] = 2] = "UpdateReview"; + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeInvalidSubscriptions"] = 2] = "IncludeInvalidSubscriptions"; /** - * Submit a reply for a review + * Include subscriptions marked for deletion. */ - ReviewPatchOperation[ReviewPatchOperation["ReplyToReview"] = 3] = "ReplyToReview"; + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeDeletedSubscriptions"] = 4] = "IncludeDeletedSubscriptions"; /** - * Submit an admin response + * Include the full filter details with each subscription. */ - ReviewPatchOperation[ReviewPatchOperation["AdminResponseForReview"] = 4] = "AdminResponseForReview"; + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeFilterDetails"] = 8] = "IncludeFilterDetails"; /** - * Delete an Admin Reply + * For a subscription the caller does not have permission to view, return basic (non-confidential) information. */ - ReviewPatchOperation[ReviewPatchOperation["DeleteAdminReply"] = 5] = "DeleteAdminReply"; + SubscriptionQueryFlags[SubscriptionQueryFlags["AlwaysReturnBasicInformation"] = 16] = "AlwaysReturnBasicInformation"; /** - * Delete Publisher Reply + * Include system subscriptions. */ - ReviewPatchOperation[ReviewPatchOperation["DeletePublisherReply"] = 6] = "DeletePublisherReply"; -})(ReviewPatchOperation = exports.ReviewPatchOperation || (exports.ReviewPatchOperation = {})); -/** - * Type of event - */ -var ReviewResourceType; -(function (ReviewResourceType) { - ReviewResourceType[ReviewResourceType["Review"] = 1] = "Review"; - ReviewResourceType[ReviewResourceType["PublisherReply"] = 2] = "PublisherReply"; - ReviewResourceType[ReviewResourceType["AdminReply"] = 3] = "AdminReply"; -})(ReviewResourceType = exports.ReviewResourceType || (exports.ReviewResourceType = {})); + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeSystemSubscriptions"] = 32] = "IncludeSystemSubscriptions"; +})(SubscriptionQueryFlags = exports.SubscriptionQueryFlags || (exports.SubscriptionQueryFlags = {})); /** - * Defines the sort order that can be defined for Extensions query + * Subscription status values. A value greater than or equal to zero indicates the subscription is enabled. A negative value indicates the subscription is disabled. */ -var SortByType; -(function (SortByType) { +var SubscriptionStatus; +(function (SubscriptionStatus) { /** - * The results will be sorted by relevance in case search query is given, if no search query resutls will be provided as is + * Subscription is disabled because it generated a high volume of notifications. */ - SortByType[SortByType["Relevance"] = 0] = "Relevance"; + SubscriptionStatus[SubscriptionStatus["JailedByNotificationsVolume"] = -200] = "JailedByNotificationsVolume"; /** - * The results will be sorted as per Last Updated date of the extensions with recently updated at the top + * Subscription is disabled and will be deleted. */ - SortByType[SortByType["LastUpdatedDate"] = 1] = "LastUpdatedDate"; + SubscriptionStatus[SubscriptionStatus["PendingDeletion"] = -100] = "PendingDeletion"; /** - * Results will be sorted Alphabetically as per the title of the extension + * Subscription is disabled because of an Argument Exception while processing the subscription */ - SortByType[SortByType["Title"] = 2] = "Title"; + SubscriptionStatus[SubscriptionStatus["DisabledArgumentException"] = -12] = "DisabledArgumentException"; /** - * Results will be sorted Alphabetically as per Publisher title + * Subscription is disabled because the project is invalid */ - SortByType[SortByType["Publisher"] = 3] = "Publisher"; + SubscriptionStatus[SubscriptionStatus["DisabledProjectInvalid"] = -11] = "DisabledProjectInvalid"; /** - * Results will be sorted by Install Count + * Subscription is disabled because the identity does not have the appropriate permissions */ - SortByType[SortByType["InstallCount"] = 4] = "InstallCount"; + SubscriptionStatus[SubscriptionStatus["DisabledMissingPermissions"] = -10] = "DisabledMissingPermissions"; /** - * The results will be sorted as per Published date of the extensions + * Subscription is disabled service due to failures. */ - SortByType[SortByType["PublishedDate"] = 5] = "PublishedDate"; + SubscriptionStatus[SubscriptionStatus["DisabledFromProbation"] = -9] = "DisabledFromProbation"; /** - * The results will be sorted as per Average ratings of the extensions + * Subscription is disabled because the identity is no longer active */ - SortByType[SortByType["AverageRating"] = 6] = "AverageRating"; + SubscriptionStatus[SubscriptionStatus["DisabledInactiveIdentity"] = -8] = "DisabledInactiveIdentity"; /** - * The results will be sorted as per Trending Daily Score of the extensions + * Subscription is disabled because message queue is not supported. */ - SortByType[SortByType["TrendingDaily"] = 7] = "TrendingDaily"; + SubscriptionStatus[SubscriptionStatus["DisabledMessageQueueNotSupported"] = -7] = "DisabledMessageQueueNotSupported"; /** - * The results will be sorted as per Trending weekly Score of the extensions + * Subscription is disabled because its subscriber is unknown. */ - SortByType[SortByType["TrendingWeekly"] = 8] = "TrendingWeekly"; + SubscriptionStatus[SubscriptionStatus["DisabledMissingIdentity"] = -6] = "DisabledMissingIdentity"; /** - * The results will be sorted as per Trending monthly Score of the extensions + * Subscription is disabled because it has an invalid role expression. */ - SortByType[SortByType["TrendingMonthly"] = 9] = "TrendingMonthly"; + SubscriptionStatus[SubscriptionStatus["DisabledInvalidRoleExpression"] = -5] = "DisabledInvalidRoleExpression"; /** - * The results will be sorted as per ReleaseDate of the extensions (date on which the extension first went public) + * Subscription is disabled because it has an invalid filter expression. */ - SortByType[SortByType["ReleaseDate"] = 10] = "ReleaseDate"; + SubscriptionStatus[SubscriptionStatus["DisabledInvalidPathClause"] = -4] = "DisabledInvalidPathClause"; /** - * The results will be sorted as per Author defined in the VSix/Metadata. If not defined, publisher name is used This is specifically needed by VS IDE, other (new and old) clients are not encouraged to use this + * Subscription is disabled because it is a duplicate of a default subscription. */ - SortByType[SortByType["Author"] = 11] = "Author"; + SubscriptionStatus[SubscriptionStatus["DisabledAsDuplicateOfDefault"] = -3] = "DisabledAsDuplicateOfDefault"; /** - * The results will be sorted as per Weighted Rating of the extension. + * Subscription is disabled by an administrator, not the subscription's subscriber. */ - SortByType[SortByType["WeightedRating"] = 12] = "WeightedRating"; -})(SortByType = exports.SortByType || (exports.SortByType = {})); + SubscriptionStatus[SubscriptionStatus["DisabledByAdmin"] = -2] = "DisabledByAdmin"; + /** + * Subscription is disabled, typically by the owner of the subscription, and will not produce any notifications. + */ + SubscriptionStatus[SubscriptionStatus["Disabled"] = -1] = "Disabled"; + /** + * Subscription is active. + */ + SubscriptionStatus[SubscriptionStatus["Enabled"] = 0] = "Enabled"; + /** + * Subscription is active, but is on probation due to failed deliveries or other issues with the subscription. + */ + SubscriptionStatus[SubscriptionStatus["EnabledOnProbation"] = 1] = "EnabledOnProbation"; +})(SubscriptionStatus = exports.SubscriptionStatus || (exports.SubscriptionStatus = {})); /** - * Defines the sort order that can be defined for Extensions query + * Set of flags used to determine which set of templates is retrieved when querying for subscription templates */ -var SortOrderType; -(function (SortOrderType) { +var SubscriptionTemplateQueryFlags; +(function (SubscriptionTemplateQueryFlags) { + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["None"] = 0] = "None"; /** - * Results will be sorted in the default order as per the sorting type defined. The default varies for each type, e.g. for Relevance, default is Descending, for Title default is Ascending etc. + * Include user templates */ - SortOrderType[SortOrderType["Default"] = 0] = "Default"; + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUser"] = 1] = "IncludeUser"; /** - * The results will be sorted in Ascending order + * Include group templates */ - SortOrderType[SortOrderType["Ascending"] = 1] = "Ascending"; + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeGroup"] = 2] = "IncludeGroup"; /** - * The results will be sorted in Descending order + * Include user and group templates */ - SortOrderType[SortOrderType["Descending"] = 2] = "Descending"; -})(SortOrderType = exports.SortOrderType || (exports.SortOrderType = {})); -var VSCodeWebExtensionStatisicsType; -(function (VSCodeWebExtensionStatisicsType) { - VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Install"] = 1] = "Install"; - VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Update"] = 2] = "Update"; - VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Uninstall"] = 3] = "Uninstall"; -})(VSCodeWebExtensionStatisicsType = exports.VSCodeWebExtensionStatisicsType || (exports.VSCodeWebExtensionStatisicsType = {})); + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUserAndGroup"] = 4] = "IncludeUserAndGroup"; + /** + * Include the event type details like the fields and operators + */ + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeEventTypeInformation"] = 22] = "IncludeEventTypeInformation"; +})(SubscriptionTemplateQueryFlags = exports.SubscriptionTemplateQueryFlags || (exports.SubscriptionTemplateQueryFlags = {})); +var SubscriptionTemplateType; +(function (SubscriptionTemplateType) { + SubscriptionTemplateType[SubscriptionTemplateType["User"] = 0] = "User"; + SubscriptionTemplateType[SubscriptionTemplateType["Team"] = 1] = "Team"; + SubscriptionTemplateType[SubscriptionTemplateType["Both"] = 2] = "Both"; + SubscriptionTemplateType[SubscriptionTemplateType["None"] = 3] = "None"; +})(SubscriptionTemplateType = exports.SubscriptionTemplateType || (exports.SubscriptionTemplateType = {})); exports.TypeInfo = { - AcquisitionAssignmentType: { - enumValues: { - "none": 0, - "me": 1, - "all": 2 - } - }, - AcquisitionOperation: {}, - AcquisitionOperationState: { - enumValues: { - "disallow": 0, - "allow": 1, - "completed": 3 - } - }, - AcquisitionOperationType: { - enumValues: { - "get": 0, - "install": 1, - "buy": 2, - "try": 3, - "request": 4, - "none": 5, - "purchaseRequest": 6 - } - }, - AcquisitionOptions: {}, - AzureRestApiResponseModel: {}, - Concern: {}, - ConcernCategory: { - enumValues: { - "general": 1, - "abusive": 2, - "spam": 4 - } - }, - CustomerLastContact: {}, - CustomerSupportRequest: {}, - DraftPatchOperation: { + ActorNotificationReason: {}, + BatchNotificationOperation: {}, + DefaultGroupDeliveryPreference: { enumValues: { - "publish": 1, - "cancel": 2 + "noDelivery": -1, + "eachMember": 2 } }, - DraftStateType: { + EvaluationOperationStatus: { enumValues: { - "unpublished": 1, - "published": 2, + "notSet": 0, + "queued": 1, + "inProgress": 2, "cancelled": 3, - "error": 4 - } - }, - ExtensionAcquisitionRequest: {}, - ExtensionDailyStat: {}, - ExtensionDailyStats: {}, - ExtensionDeploymentTechnology: { - enumValues: { - "exe": 1, - "msi": 2, - "vsix": 3, - "referralLink": 4 - } - }, - ExtensionDraft: {}, - ExtensionDraftPatch: {}, - ExtensionEvent: {}, - ExtensionEvents: {}, - ExtensionFilterResult: {}, - ExtensionLifecycleEventType: { - enumValues: { - "uninstall": 1, - "install": 2, - "review": 3, - "acquisition": 4, - "sales": 5, - "other": 999 - } - }, - ExtensionPayload: {}, - ExtensionPolicy: {}, - ExtensionPolicyFlags: { - enumValues: { - "none": 0, - "private": 1, - "public": 2, - "preview": 4, - "released": 8, - "firstParty": 16, - "all": 31 - } - }, - ExtensionQuery: {}, - ExtensionQueryFilterType: { - enumValues: { - "tag": 1, - "displayName": 2, - "private": 3, - "id": 4, - "category": 5, - "contributionType": 6, - "name": 7, - "installationTarget": 8, - "featured": 9, - "searchText": 10, - "featuredInCategory": 11, - "excludeWithFlags": 12, - "includeWithFlags": 13, - "lcid": 14, - "installationTargetVersion": 15, - "installationTargetVersionRange": 16, - "vsixMetadata": 17, - "publisherName": 18, - "publisherDisplayName": 19, - "includeWithPublisherFlags": 20, - "organizationSharedWith": 21, - "productArchitecture": 22, - "targetPlatform": 23, - "extensionName": 24 + "succeeded": 4, + "failed": 5, + "timedOut": 6, + "notFound": 7 } }, - ExtensionQueryFlags: { + EventBacklogStatus: {}, + EventProcessingLog: {}, + EventPublisherQueryFlags: { enumValues: { "none": 0, - "includeVersions": 1, - "includeFiles": 2, - "includeCategoryAndTags": 4, - "includeSharedAccounts": 8, - "includeVersionProperties": 16, - "excludeNonValidated": 32, - "includeInstallationTargets": 64, - "includeAssetUri": 128, - "includeStatistics": 256, - "includeLatestVersionOnly": 512, - "useFallbackAssetUri": 1024, - "includeMetadata": 2048, - "includeMinimalPayloadForVsIde": 4096, - "includeLcids": 8192, - "includeSharedOrganizations": 16384, - "includeNameConflictInfo": 32768, - "allAttributes": 16863 + "includeRemoteServices": 2 } }, - ExtensionQueryResult: {}, - ExtensionStatisticOperation: { + EventTypeQueryFlags: { enumValues: { "none": 0, - "set": 1, - "increment": 2, - "decrement": 3, - "delete": 4 - } - }, - ExtensionStatisticUpdate: {}, - ExtensionStatsAggregateType: { - enumValues: { - "daily": 1 + "includeFields": 1 } }, - ExtensionVersion: {}, - ExtensionVersionFlags: { + INotificationDiagnosticLog: {}, + NotificationAdminSettings: {}, + NotificationAdminSettingsUpdateParameters: {}, + NotificationBacklogStatus: {}, + NotificationDeliveryLog: {}, + NotificationDiagnosticLog: {}, + NotificationEventBacklogStatus: {}, + NotificationEventField: {}, + NotificationEventFieldType: {}, + NotificationEventType: {}, + NotificationJobDiagnosticLog: {}, + NotificationOperation: { enumValues: { "none": 0, - "validated": 1 + "suspendUnprocessed": 1 } }, - NotificationsData: {}, - NotificationTemplateType: { + NotificationReason: {}, + NotificationReasonType: { enumValues: { - "reviewNotification": 1, - "qnaNotification": 2, - "customerContactNotification": 3, - "publisherMemberUpdateNotification": 4 + "unknown": 0, + "follows": 1, + "personal": 2, + "personalAlias": 3, + "directMember": 4, + "indirectMember": 5, + "groupAlias": 6, + "subscriptionAlias": 7, + "singleRole": 8, + "directMemberGroupRole": 9, + "inDirectMemberGroupRole": 10, + "aliasMemberGroupRole": 11 } }, - PagingDirection: { + NotificationStatistic: {}, + NotificationStatisticsQuery: {}, + NotificationStatisticsQueryConditions: {}, + NotificationStatisticType: { enumValues: { - "backward": 1, - "forward": 2 + "notificationBySubscription": 0, + "eventsByEventType": 1, + "notificationByEventType": 2, + "eventsByEventTypePerUser": 3, + "notificationByEventTypePerUser": 4, + "events": 5, + "notifications": 6, + "notificationFailureBySubscription": 7, + "unprocessedRangeStart": 100, + "unprocessedEventsByPublisher": 101, + "unprocessedEventDelayByPublisher": 102, + "unprocessedNotificationsByChannelByPublisher": 103, + "unprocessedNotificationDelayByChannelByPublisher": 104, + "delayRangeStart": 200, + "totalPipelineTime": 201, + "notificationPipelineTime": 202, + "eventPipelineTime": 203, + "hourlyRangeStart": 1000, + "hourlyNotificationBySubscription": 1001, + "hourlyEventsByEventTypePerUser": 1002, + "hourlyEvents": 1003, + "hourlyNotifications": 1004, + "hourlyUnprocessedEventsByPublisher": 1101, + "hourlyUnprocessedEventDelayByPublisher": 1102, + "hourlyUnprocessedNotificationsByChannelByPublisher": 1103, + "hourlyUnprocessedNotificationDelayByChannelByPublisher": 1104, + "hourlyTotalPipelineTime": 1201, + "hourlyNotificationPipelineTime": 1202, + "hourlyEventPipelineTime": 1203 } }, - PublishedExtension: {}, - PublishedExtensionFlags: { + NotificationSubscriber: {}, + NotificationSubscriberDeliveryPreference: { enumValues: { - "none": 0, - "disabled": 1, - "builtIn": 2, - "validated": 4, - "trusted": 8, - "paid": 16, - "public": 256, - "multiVersion": 512, - "system": 1024, - "preview": 2048, - "unpublished": 4096, - "trial": 8192, - "locked": 16384, - "hidden": 32768 + "noDelivery": -1, + "preferredEmailAddress": 1, + "eachMember": 2, + "useDefault": 3 } }, - Publisher: {}, - PublisherBase: {}, - PublisherFacts: {}, - PublisherFilterResult: {}, - PublisherFlags: { + NotificationSubscriberUpdateParameters: {}, + NotificationSubscription: {}, + NotificationSubscriptionTemplate: {}, + NotificationSubscriptionUpdateParameters: {}, + SubscriberFlags: { enumValues: { - "unChanged": 1073741824, "none": 0, - "disabled": 1, - "verified": 2, - "certified": 4, - "serviceFlags": 7 + "deliveryPreferencesEditable": 2, + "supportsPreferredEmailAddressDelivery": 4, + "supportsEachMemberDelivery": 8, + "supportsNoDelivery": 16, + "isUser": 32, + "isGroup": 64, + "isTeam": 128 } }, - PublisherPermissions: { + SubscriptionDiagnostics: {}, + SubscriptionEvaluationRequest: {}, + SubscriptionEvaluationResult: {}, + SubscriptionFieldType: { enumValues: { - "read": 1, - "updateExtension": 2, - "createPublisher": 4, - "publishExtension": 8, - "admin": 16, - "trustedPartner": 32, - "privateRead": 64, - "deleteExtension": 128, - "editSettings": 256, - "viewPermissions": 512, - "managePermissions": 1024, - "deletePublisher": 2048 + "string": 1, + "integer": 2, + "dateTime": 3, + "plainText": 5, + "html": 7, + "treePath": 8, + "history": 9, + "double": 10, + "guid": 11, + "boolean": 12, + "identity": 13, + "picklistInteger": 14, + "picklistString": 15, + "picklistDouble": 16, + "teamProject": 17 } }, - PublisherQuery: {}, - PublisherQueryFlags: { + SubscriptionFlags: { enumValues: { "none": 0, - "includeExtensions": 1, - "includeEmailAddress": 2 - } - }, - PublisherQueryResult: {}, - PublisherRoleAccess: { - enumValues: { - "assigned": 1, - "inherited": 2 + "groupSubscription": 1, + "contributedSubscription": 2, + "canOptOut": 4, + "teamSubscription": 8, + "oneActorMatches": 16 } }, - PublisherRoleAssignment: {}, - PublisherState: { + SubscriptionPermissions: { enumValues: { "none": 0, - "verificationPending": 1, - "certificationPending": 2, - "certificationRejected": 4, - "certificationRevoked": 8 + "view": 1, + "edit": 2, + "delete": 4 } }, - QnAItem: {}, - QnAItemStatus: { + SubscriptionQuery: {}, + SubscriptionQueryCondition: {}, + SubscriptionQueryFlags: { enumValues: { "none": 0, - "userEditable": 1, - "publisherCreated": 2 - } - }, - QueryFilter: {}, - Question: {}, - QuestionsResult: {}, - Response: {}, - RestApiResponseStatus: { - enumValues: { - "completed": 0, - "failed": 1, - "inprogress": 2, - "skipped": 3 + "includeInvalidSubscriptions": 2, + "includeDeletedSubscriptions": 4, + "includeFilterDetails": 8, + "alwaysReturnBasicInformation": 16, + "includeSystemSubscriptions": 32 } }, - RestApiResponseStatusModel: {}, - Review: {}, - ReviewEventOperation: { + SubscriptionStatus: { enumValues: { - "create": 1, - "update": 2, - "delete": 3 + "jailedByNotificationsVolume": -200, + "pendingDeletion": -100, + "disabledArgumentException": -12, + "disabledProjectInvalid": -11, + "disabledMissingPermissions": -10, + "disabledFromProbation": -9, + "disabledInactiveIdentity": -8, + "disabledMessageQueueNotSupported": -7, + "disabledMissingIdentity": -6, + "disabledInvalidRoleExpression": -5, + "disabledInvalidPathClause": -4, + "disabledAsDuplicateOfDefault": -3, + "disabledByAdmin": -2, + "disabled": -1, + "enabled": 0, + "enabledOnProbation": 1 } }, - ReviewEventProperties: {}, - ReviewFilterOptions: { + SubscriptionTemplateQueryFlags: { enumValues: { "none": 0, - "filterEmptyReviews": 1, - "filterEmptyUserNames": 2 - } - }, - ReviewPatch: {}, - ReviewPatchOperation: { - enumValues: { - "flagReview": 1, - "updateReview": 2, - "replyToReview": 3, - "adminResponseForReview": 4, - "deleteAdminReply": 5, - "deletePublisherReply": 6 - } - }, - ReviewReply: {}, - ReviewResourceType: { - enumValues: { - "review": 1, - "publisherReply": 2, - "adminReply": 3 - } - }, - ReviewsResult: {}, - SortByType: { - enumValues: { - "relevance": 0, - "lastUpdatedDate": 1, - "title": 2, - "publisher": 3, - "installCount": 4, - "publishedDate": 5, - "averageRating": 6, - "trendingDaily": 7, - "trendingWeekly": 8, - "trendingMonthly": 9, - "releaseDate": 10, - "author": 11, - "weightedRating": 12 - } - }, - SortOrderType: { - enumValues: { - "default": 0, - "ascending": 1, - "descending": 2 + "includeUser": 1, + "includeGroup": 2, + "includeUserAndGroup": 4, + "includeEventTypeInformation": 22 } }, - UserExtensionPolicy: {}, - UserReportedConcern: {}, - VSCodeWebExtensionStatisicsType: { + SubscriptionTemplateType: { enumValues: { - "install": 1, - "update": 2, - "uninstall": 3 + "user": 0, + "team": 1, + "both": 2, + "none": 3 } }, + SubscriptionTraceDiagnosticLog: {}, + SubscriptionTraceEventProcessingLog: {}, + SubscriptionTraceNotificationDeliveryLog: {}, + SubscriptionTracing: {}, }; -exports.TypeInfo.AcquisitionOperation.fields = { - operationState: { - enumType: exports.TypeInfo.AcquisitionOperationState - }, - operationType: { - enumType: exports.TypeInfo.AcquisitionOperationType - } -}; -exports.TypeInfo.AcquisitionOptions.fields = { - defaultOperation: { - typeInfo: exports.TypeInfo.AcquisitionOperation - }, - operations: { - isArray: true, - typeInfo: exports.TypeInfo.AcquisitionOperation +exports.TypeInfo.ActorNotificationReason.fields = { + notificationReasonType: { + enumType: exports.TypeInfo.NotificationReasonType } }; -exports.TypeInfo.AzureRestApiResponseModel.fields = { - operationStatus: { - typeInfo: exports.TypeInfo.RestApiResponseStatusModel +exports.TypeInfo.BatchNotificationOperation.fields = { + notificationOperation: { + enumType: exports.TypeInfo.NotificationOperation } }; -exports.TypeInfo.Concern.fields = { - category: { - enumType: exports.TypeInfo.ConcernCategory +exports.TypeInfo.EventBacklogStatus.fields = { + captureTime: { + isDate: true, }, - createdDate: { + lastEventBatchStartTime: { isDate: true, }, - status: { - enumType: exports.TypeInfo.QnAItemStatus + lastEventProcessedTime: { + isDate: true, }, - updatedDate: { + lastJobBatchStartTime: { isDate: true, - } -}; -exports.TypeInfo.CustomerLastContact.fields = { - lastContactDate: { + }, + lastJobProcessedTime: { + isDate: true, + }, + oldestPendingEventTime: { isDate: true, } }; -exports.TypeInfo.CustomerSupportRequest.fields = { - review: { - typeInfo: exports.TypeInfo.Review +exports.TypeInfo.EventProcessingLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, } }; -exports.TypeInfo.ExtensionAcquisitionRequest.fields = { - assignmentType: { - enumType: exports.TypeInfo.AcquisitionAssignmentType +exports.TypeInfo.INotificationDiagnosticLog.fields = { + endTime: { + isDate: true, }, - operationType: { - enumType: exports.TypeInfo.AcquisitionOperationType + startTime: { + isDate: true, } }; -exports.TypeInfo.ExtensionDailyStat.fields = { - statisticDate: { - isDate: true, +exports.TypeInfo.NotificationAdminSettings.fields = { + defaultGroupDeliveryPreference: { + enumType: exports.TypeInfo.DefaultGroupDeliveryPreference } }; -exports.TypeInfo.ExtensionDailyStats.fields = { - dailyStats: { - isArray: true, - typeInfo: exports.TypeInfo.ExtensionDailyStat +exports.TypeInfo.NotificationAdminSettingsUpdateParameters.fields = { + defaultGroupDeliveryPreference: { + enumType: exports.TypeInfo.DefaultGroupDeliveryPreference } }; -exports.TypeInfo.ExtensionDraft.fields = { - createdDate: { +exports.TypeInfo.NotificationBacklogStatus.fields = { + captureTime: { isDate: true, }, - draftState: { - enumType: exports.TypeInfo.DraftStateType + lastJobBatchStartTime: { + isDate: true, }, - lastUpdated: { + lastJobProcessedTime: { isDate: true, }, - payload: { - typeInfo: exports.TypeInfo.ExtensionPayload - } -}; -exports.TypeInfo.ExtensionDraftPatch.fields = { - operation: { - enumType: exports.TypeInfo.DraftPatchOperation + lastNotificationBatchStartTime: { + isDate: true, + }, + lastNotificationProcessedTime: { + isDate: true, + }, + oldestPendingNotificationTime: { + isDate: true, } }; -exports.TypeInfo.ExtensionEvent.fields = { - statisticDate: { +exports.TypeInfo.NotificationDeliveryLog.fields = { + endTime: { + isDate: true, + }, + startTime: { isDate: true, } }; -exports.TypeInfo.ExtensionEvents.fields = { - events: { - isDictionary: true, - dictionaryValueFieldInfo: { - isArray: true, - typeInfo: exports.TypeInfo.ExtensionEvent - } +exports.TypeInfo.NotificationDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, } }; -exports.TypeInfo.ExtensionFilterResult.fields = { - extensions: { +exports.TypeInfo.NotificationEventBacklogStatus.fields = { + eventBacklogStatus: { isArray: true, - typeInfo: exports.TypeInfo.PublishedExtension - } -}; -exports.TypeInfo.ExtensionPayload.fields = { - type: { - enumType: exports.TypeInfo.ExtensionDeploymentTechnology - } -}; -exports.TypeInfo.ExtensionPolicy.fields = { - install: { - enumType: exports.TypeInfo.ExtensionPolicyFlags + typeInfo: exports.TypeInfo.EventBacklogStatus }, - request: { - enumType: exports.TypeInfo.ExtensionPolicyFlags + notificationBacklogStatus: { + isArray: true, + typeInfo: exports.TypeInfo.NotificationBacklogStatus } }; -exports.TypeInfo.ExtensionQuery.fields = { - filters: { - isArray: true, - typeInfo: exports.TypeInfo.QueryFilter - }, - flags: { - enumType: exports.TypeInfo.ExtensionQueryFlags +exports.TypeInfo.NotificationEventField.fields = { + fieldType: { + typeInfo: exports.TypeInfo.NotificationEventFieldType } }; -exports.TypeInfo.ExtensionQueryResult.fields = { - results: { - isArray: true, - typeInfo: exports.TypeInfo.ExtensionFilterResult +exports.TypeInfo.NotificationEventFieldType.fields = { + subscriptionFieldType: { + enumType: exports.TypeInfo.SubscriptionFieldType } }; -exports.TypeInfo.ExtensionStatisticUpdate.fields = { - operation: { - enumType: exports.TypeInfo.ExtensionStatisticOperation +exports.TypeInfo.NotificationEventType.fields = { + fields: { + isDictionary: true, + dictionaryValueTypeInfo: exports.TypeInfo.NotificationEventField } }; -exports.TypeInfo.ExtensionVersion.fields = { - flags: { - enumType: exports.TypeInfo.ExtensionVersionFlags +exports.TypeInfo.NotificationJobDiagnosticLog.fields = { + endTime: { + isDate: true, }, - lastUpdated: { + startTime: { isDate: true, } }; -exports.TypeInfo.NotificationsData.fields = { - type: { - enumType: exports.TypeInfo.NotificationTemplateType +exports.TypeInfo.NotificationReason.fields = { + notificationReasonType: { + enumType: exports.TypeInfo.NotificationReasonType } }; -exports.TypeInfo.PublishedExtension.fields = { - deploymentType: { - enumType: exports.TypeInfo.ExtensionDeploymentTechnology - }, - flags: { - enumType: exports.TypeInfo.PublishedExtensionFlags - }, - lastUpdated: { +exports.TypeInfo.NotificationStatistic.fields = { + date: { isDate: true, }, - publishedDate: { + type: { + enumType: exports.TypeInfo.NotificationStatisticType + } +}; +exports.TypeInfo.NotificationStatisticsQuery.fields = { + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.NotificationStatisticsQueryConditions + } +}; +exports.TypeInfo.NotificationStatisticsQueryConditions.fields = { + endDate: { isDate: true, }, - publisher: { - typeInfo: exports.TypeInfo.PublisherFacts - }, - releaseDate: { + startDate: { isDate: true, }, - versions: { - isArray: true, - typeInfo: exports.TypeInfo.ExtensionVersion + type: { + enumType: exports.TypeInfo.NotificationStatisticType } }; -exports.TypeInfo.Publisher.fields = { - extensions: { - isArray: true, - typeInfo: exports.TypeInfo.PublishedExtension +exports.TypeInfo.NotificationSubscriber.fields = { + deliveryPreference: { + enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference }, flags: { - enumType: exports.TypeInfo.PublisherFlags - }, - lastUpdated: { - isDate: true, - }, - state: { - enumType: exports.TypeInfo.PublisherState + enumType: exports.TypeInfo.SubscriberFlags } }; -exports.TypeInfo.PublisherBase.fields = { - extensions: { - isArray: true, - typeInfo: exports.TypeInfo.PublishedExtension +exports.TypeInfo.NotificationSubscriberUpdateParameters.fields = { + deliveryPreference: { + enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference + } +}; +exports.TypeInfo.NotificationSubscription.fields = { + diagnostics: { + typeInfo: exports.TypeInfo.SubscriptionDiagnostics }, flags: { - enumType: exports.TypeInfo.PublisherFlags + enumType: exports.TypeInfo.SubscriptionFlags }, - lastUpdated: { + modifiedDate: { isDate: true, }, - state: { - enumType: exports.TypeInfo.PublisherState + permissions: { + enumType: exports.TypeInfo.SubscriptionPermissions + }, + status: { + enumType: exports.TypeInfo.SubscriptionStatus } }; -exports.TypeInfo.PublisherFacts.fields = { - flags: { - enumType: exports.TypeInfo.PublisherFlags +exports.TypeInfo.NotificationSubscriptionTemplate.fields = { + notificationEventInformation: { + typeInfo: exports.TypeInfo.NotificationEventType + }, + type: { + enumType: exports.TypeInfo.SubscriptionTemplateType } }; -exports.TypeInfo.PublisherFilterResult.fields = { - publishers: { - isArray: true, - typeInfo: exports.TypeInfo.Publisher +exports.TypeInfo.NotificationSubscriptionUpdateParameters.fields = { + status: { + enumType: exports.TypeInfo.SubscriptionStatus } }; -exports.TypeInfo.PublisherQuery.fields = { - filters: { - isArray: true, - typeInfo: exports.TypeInfo.QueryFilter +exports.TypeInfo.SubscriptionDiagnostics.fields = { + deliveryResults: { + typeInfo: exports.TypeInfo.SubscriptionTracing }, - flags: { - enumType: exports.TypeInfo.PublisherQueryFlags + deliveryTracing: { + typeInfo: exports.TypeInfo.SubscriptionTracing + }, + evaluationTracing: { + typeInfo: exports.TypeInfo.SubscriptionTracing } }; -exports.TypeInfo.PublisherQueryResult.fields = { - results: { +exports.TypeInfo.SubscriptionEvaluationRequest.fields = { + minEventsCreatedDate: { + isDate: true, + } +}; +exports.TypeInfo.SubscriptionEvaluationResult.fields = { + evaluationJobStatus: { + enumType: exports.TypeInfo.EvaluationOperationStatus + } +}; +exports.TypeInfo.SubscriptionQuery.fields = { + conditions: { isArray: true, - typeInfo: exports.TypeInfo.PublisherFilterResult + typeInfo: exports.TypeInfo.SubscriptionQueryCondition + }, + queryFlags: { + enumType: exports.TypeInfo.SubscriptionQueryFlags } }; -exports.TypeInfo.PublisherRoleAssignment.fields = { - access: { - enumType: exports.TypeInfo.PublisherRoleAccess +exports.TypeInfo.SubscriptionQueryCondition.fields = { + flags: { + enumType: exports.TypeInfo.SubscriptionFlags } }; -exports.TypeInfo.QnAItem.fields = { - createdDate: { +exports.TypeInfo.SubscriptionTraceDiagnosticLog.fields = { + endTime: { isDate: true, }, - status: { - enumType: exports.TypeInfo.QnAItemStatus - }, - updatedDate: { + startTime: { isDate: true, } }; -exports.TypeInfo.QueryFilter.fields = { - direction: { - enumType: exports.TypeInfo.PagingDirection +exports.TypeInfo.SubscriptionTraceEventProcessingLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, } }; -exports.TypeInfo.Question.fields = { - createdDate: { +exports.TypeInfo.SubscriptionTraceNotificationDeliveryLog.fields = { + endTime: { isDate: true, }, - responses: { - isArray: true, - typeInfo: exports.TypeInfo.Response - }, - status: { - enumType: exports.TypeInfo.QnAItemStatus - }, - updatedDate: { + startTime: { isDate: true, } }; -exports.TypeInfo.QuestionsResult.fields = { - questions: { - isArray: true, - typeInfo: exports.TypeInfo.Question +exports.TypeInfo.SubscriptionTracing.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, } }; -exports.TypeInfo.Response.fields = { + + +/***/ }), + +/***/ 88555: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Status of a policy which is running against a specific pull request. + */ +var PolicyEvaluationStatus; +(function (PolicyEvaluationStatus) { + /** + * The policy is either queued to run, or is waiting for some event before progressing. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Queued"] = 0] = "Queued"; + /** + * The policy is currently running. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Running"] = 1] = "Running"; + /** + * The policy has been fulfilled for this pull request. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Approved"] = 2] = "Approved"; + /** + * The policy has rejected this pull request. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Rejected"] = 3] = "Rejected"; + /** + * The policy does not apply to this pull request. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["NotApplicable"] = 4] = "NotApplicable"; + /** + * The policy has encountered an unexpected error. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Broken"] = 5] = "Broken"; +})(PolicyEvaluationStatus = exports.PolicyEvaluationStatus || (exports.PolicyEvaluationStatus = {})); +exports.TypeInfo = { + PolicyConfiguration: {}, + PolicyEvaluationRecord: {}, + PolicyEvaluationStatus: { + enumValues: { + "queued": 0, + "running": 1, + "approved": 2, + "rejected": 3, + "notApplicable": 4, + "broken": 5 + } + }, +}; +exports.TypeInfo.PolicyConfiguration.fields = { createdDate: { isDate: true, + } +}; +exports.TypeInfo.PolicyEvaluationRecord.fields = { + completedDate: { + isDate: true, }, - status: { - enumType: exports.TypeInfo.QnAItemStatus + configuration: { + typeInfo: exports.TypeInfo.PolicyConfiguration }, - updatedDate: { + startedDate: { isDate: true, - } -}; -exports.TypeInfo.RestApiResponseStatusModel.fields = { + }, status: { - enumType: exports.TypeInfo.RestApiResponseStatus + enumType: exports.TypeInfo.PolicyEvaluationStatus } }; -exports.TypeInfo.Review.fields = { - adminReply: { - typeInfo: exports.TypeInfo.ReviewReply + + +/***/ }), + +/***/ 40879: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var AvatarSize; +(function (AvatarSize) { + AvatarSize[AvatarSize["Small"] = 0] = "Small"; + AvatarSize[AvatarSize["Medium"] = 1] = "Medium"; + AvatarSize[AvatarSize["Large"] = 2] = "Large"; +})(AvatarSize = exports.AvatarSize || (exports.AvatarSize = {})); +exports.TypeInfo = { + AttributeDescriptor: { + fields: null }, - reply: { - typeInfo: exports.TypeInfo.ReviewReply + AttributesContainer: { + fields: null }, - updatedDate: { + Avatar: { + fields: null + }, + AvatarSize: { + enumValues: { + "small": 0, + "medium": 1, + "large": 2, + } + }, + CoreProfileAttribute: { + fields: null + }, + Country: { + fields: null + }, + CreateProfileContext: { + fields: null + }, + GeoRegion: { + fields: null + }, + Profile: { + fields: null + }, + ProfileAttribute: { + fields: null + }, + ProfileAttributeBase: { + fields: null + }, + ProfileRegion: { + fields: null + }, + ProfileRegions: { + fields: null + }, +}; +exports.TypeInfo.AttributeDescriptor.fields = {}; +exports.TypeInfo.AttributesContainer.fields = { + attributes: {}, +}; +exports.TypeInfo.Avatar.fields = { + size: { + enumType: exports.TypeInfo.AvatarSize + }, + timeStamp: { isDate: true, - } + }, }; -exports.TypeInfo.ReviewEventProperties.fields = { - eventOperation: { - enumType: exports.TypeInfo.ReviewEventOperation +exports.TypeInfo.CoreProfileAttribute.fields = { + descriptor: { + typeInfo: exports.TypeInfo.AttributeDescriptor }, - replyDate: { + timeStamp: { isDate: true, }, - resourceType: { - enumType: exports.TypeInfo.ReviewResourceType +}; +exports.TypeInfo.Country.fields = {}; +exports.TypeInfo.CreateProfileContext.fields = {}; +exports.TypeInfo.GeoRegion.fields = {}; +exports.TypeInfo.Profile.fields = { + applicationContainer: { + typeInfo: exports.TypeInfo.AttributesContainer }, - reviewDate: { + coreAttributes: {}, + timeStamp: { isDate: true, - } + }, }; -exports.TypeInfo.ReviewPatch.fields = { - operation: { - enumType: exports.TypeInfo.ReviewPatchOperation +exports.TypeInfo.ProfileAttribute.fields = { + descriptor: { + typeInfo: exports.TypeInfo.AttributeDescriptor }, - reportedConcern: { - typeInfo: exports.TypeInfo.UserReportedConcern + timeStamp: { + isDate: true, }, - reviewItem: { - typeInfo: exports.TypeInfo.Review - } }; -exports.TypeInfo.ReviewReply.fields = { - updatedDate: { +exports.TypeInfo.ProfileAttributeBase.fields = { + descriptor: { + typeInfo: exports.TypeInfo.AttributeDescriptor + }, + timeStamp: { + isDate: true, + }, +}; +exports.TypeInfo.ProfileRegion.fields = {}; +exports.TypeInfo.ProfileRegions.fields = { + regions: { + isArray: true, + typeInfo: exports.TypeInfo.ProfileRegion + }, +}; + + +/***/ }), + +/***/ 84323: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var AggregationType; +(function (AggregationType) { + AggregationType[AggregationType["Hourly"] = 0] = "Hourly"; + AggregationType[AggregationType["Daily"] = 1] = "Daily"; +})(AggregationType = exports.AggregationType || (exports.AggregationType = {})); +var ResultPhase; +(function (ResultPhase) { + ResultPhase[ResultPhase["Preliminary"] = 0] = "Preliminary"; + ResultPhase[ResultPhase["Full"] = 1] = "Full"; +})(ResultPhase = exports.ResultPhase || (exports.ResultPhase = {})); +exports.TypeInfo = { + AggregationType: { + enumValues: { + "hourly": 0, + "daily": 1 + } + }, + CodeChangeTrendItem: {}, + ProjectActivityMetrics: {}, + ProjectLanguageAnalytics: {}, + RepositoryActivityMetrics: {}, + RepositoryLanguageAnalytics: {}, + ResultPhase: { + enumValues: { + "preliminary": 0, + "full": 1 + } + }, +}; +exports.TypeInfo.CodeChangeTrendItem.fields = { + time: { isDate: true, } }; -exports.TypeInfo.ReviewsResult.fields = { - reviews: { +exports.TypeInfo.ProjectActivityMetrics.fields = { + codeChangesTrend: { isArray: true, - typeInfo: exports.TypeInfo.Review + typeInfo: exports.TypeInfo.CodeChangeTrendItem } }; -exports.TypeInfo.UserExtensionPolicy.fields = { - permissions: { - typeInfo: exports.TypeInfo.ExtensionPolicy +exports.TypeInfo.ProjectLanguageAnalytics.fields = { + repositoryLanguageAnalytics: { + isArray: true, + typeInfo: exports.TypeInfo.RepositoryLanguageAnalytics + }, + resultPhase: { + enumType: exports.TypeInfo.ResultPhase } }; -exports.TypeInfo.UserReportedConcern.fields = { - category: { - enumType: exports.TypeInfo.ConcernCategory +exports.TypeInfo.RepositoryActivityMetrics.fields = { + codeChangesTrend: { + isArray: true, + typeInfo: exports.TypeInfo.CodeChangeTrendItem + } +}; +exports.TypeInfo.RepositoryLanguageAnalytics.fields = { + resultPhase: { + enumType: exports.TypeInfo.ResultPhase }, - submittedDate: { + updatedTime: { isDate: true, } }; @@ -53804,7 +59485,7 @@ exports.TypeInfo.UserReportedConcern.fields = { /***/ }), -/***/ 9803: +/***/ 47421: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -53819,2433 +59500,2165 @@ exports.TypeInfo.UserReportedConcern.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const PolicyInterfaces = __nccwpck_require__(8555); -const TfsCoreInterfaces = __nccwpck_require__(3931); -/** - * The status of a comment thread. - */ -var CommentThreadStatus; -(function (CommentThreadStatus) { +const FormInputInterfaces = __nccwpck_require__(43627); +var AgentArtifactType; +(function (AgentArtifactType) { /** - * The thread status is unknown. + * Indicates XamlBuild artifact */ - CommentThreadStatus[CommentThreadStatus["Unknown"] = 0] = "Unknown"; + AgentArtifactType[AgentArtifactType["XamlBuild"] = 0] = "XamlBuild"; /** - * The thread status is active. + * Indicates Build artifact */ - CommentThreadStatus[CommentThreadStatus["Active"] = 1] = "Active"; + AgentArtifactType[AgentArtifactType["Build"] = 1] = "Build"; /** - * The thread status is resolved as fixed. + * Indicates Jenkins artifact */ - CommentThreadStatus[CommentThreadStatus["Fixed"] = 2] = "Fixed"; + AgentArtifactType[AgentArtifactType["Jenkins"] = 2] = "Jenkins"; /** - * The thread status is resolved as won't fix. + * Indicates FileShare artifact */ - CommentThreadStatus[CommentThreadStatus["WontFix"] = 3] = "WontFix"; + AgentArtifactType[AgentArtifactType["FileShare"] = 3] = "FileShare"; /** - * The thread status is closed. + * Indicates Nuget artifact */ - CommentThreadStatus[CommentThreadStatus["Closed"] = 4] = "Closed"; + AgentArtifactType[AgentArtifactType["Nuget"] = 4] = "Nuget"; /** - * The thread status is resolved as by design. + * Indicates TfsOnPrem artifact */ - CommentThreadStatus[CommentThreadStatus["ByDesign"] = 5] = "ByDesign"; + AgentArtifactType[AgentArtifactType["TfsOnPrem"] = 5] = "TfsOnPrem"; /** - * The thread status is pending. + * Indicates GitHub artifact */ - CommentThreadStatus[CommentThreadStatus["Pending"] = 6] = "Pending"; -})(CommentThreadStatus = exports.CommentThreadStatus || (exports.CommentThreadStatus = {})); -/** - * The type of a comment. - */ -var CommentType; -(function (CommentType) { + AgentArtifactType[AgentArtifactType["GitHub"] = 6] = "GitHub"; /** - * The comment type is not known. + * Indicates TFGit artifact */ - CommentType[CommentType["Unknown"] = 0] = "Unknown"; + AgentArtifactType[AgentArtifactType["TFGit"] = 7] = "TFGit"; /** - * This is a regular user comment. + * Indicates ExternalTfsBuild artifact */ - CommentType[CommentType["Text"] = 1] = "Text"; + AgentArtifactType[AgentArtifactType["ExternalTfsBuild"] = 8] = "ExternalTfsBuild"; /** - * The comment comes as a result of a code change. + * Indicates Custom artifact */ - CommentType[CommentType["CodeChange"] = 2] = "CodeChange"; + AgentArtifactType[AgentArtifactType["Custom"] = 9] = "Custom"; /** - * The comment represents a system message. + * Indicates Tfvc artifact */ - CommentType[CommentType["System"] = 3] = "System"; -})(CommentType = exports.CommentType || (exports.CommentType = {})); -/** - * Current status of the asynchronous operation. - */ -var GitAsyncOperationStatus; -(function (GitAsyncOperationStatus) { + AgentArtifactType[AgentArtifactType["Tfvc"] = 10] = "Tfvc"; +})(AgentArtifactType = exports.AgentArtifactType || (exports.AgentArtifactType = {})); +var ApprovalExecutionOrder; +(function (ApprovalExecutionOrder) { /** - * The operation is waiting in a queue and has not yet started. + * Approvals shown before gates. */ - GitAsyncOperationStatus[GitAsyncOperationStatus["Queued"] = 1] = "Queued"; + ApprovalExecutionOrder[ApprovalExecutionOrder["BeforeGates"] = 1] = "BeforeGates"; /** - * The operation is currently in progress. + * Approvals shown after successful execution of gates. */ - GitAsyncOperationStatus[GitAsyncOperationStatus["InProgress"] = 2] = "InProgress"; + ApprovalExecutionOrder[ApprovalExecutionOrder["AfterSuccessfulGates"] = 2] = "AfterSuccessfulGates"; /** - * The operation has completed. + * Approvals shown always after execution of gates. */ - GitAsyncOperationStatus[GitAsyncOperationStatus["Completed"] = 3] = "Completed"; + ApprovalExecutionOrder[ApprovalExecutionOrder["AfterGatesAlways"] = 4] = "AfterGatesAlways"; +})(ApprovalExecutionOrder = exports.ApprovalExecutionOrder || (exports.ApprovalExecutionOrder = {})); +var ApprovalFilters; +(function (ApprovalFilters) { /** - * The operation has failed. Check for an error message. + * No approvals or approval snapshots. */ - GitAsyncOperationStatus[GitAsyncOperationStatus["Failed"] = 4] = "Failed"; + ApprovalFilters[ApprovalFilters["None"] = 0] = "None"; /** - * The operation has been abandoned. + * Manual approval steps but no approval snapshots (Use with ApprovalSnapshots for snapshots). */ - GitAsyncOperationStatus[GitAsyncOperationStatus["Abandoned"] = 5] = "Abandoned"; -})(GitAsyncOperationStatus = exports.GitAsyncOperationStatus || (exports.GitAsyncOperationStatus = {})); -var GitAsyncRefOperationFailureStatus; -(function (GitAsyncRefOperationFailureStatus) { + ApprovalFilters[ApprovalFilters["ManualApprovals"] = 1] = "ManualApprovals"; /** - * No status + * Automated approval steps but no approval snapshots (Use with ApprovalSnapshots for snapshots). */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["None"] = 0] = "None"; + ApprovalFilters[ApprovalFilters["AutomatedApprovals"] = 2] = "AutomatedApprovals"; /** - * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + * No approval steps, but approval snapshots (Use with either ManualApprovals or AutomatedApprovals for approval steps). */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["InvalidRefName"] = 1] = "InvalidRefName"; + ApprovalFilters[ApprovalFilters["ApprovalSnapshots"] = 4] = "ApprovalSnapshots"; /** - * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + * All approval steps and approval snapshots. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["RefNameConflict"] = 2] = "RefNameConflict"; + ApprovalFilters[ApprovalFilters["All"] = 7] = "All"; +})(ApprovalFilters = exports.ApprovalFilters || (exports.ApprovalFilters = {})); +var ApprovalStatus; +(function (ApprovalStatus) { /** - * The ref update request could not be completed because the user lacks the permission to create a branch + * Indicates the approval does not have the status set. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["CreateBranchPermissionRequired"] = 3] = "CreateBranchPermissionRequired"; + ApprovalStatus[ApprovalStatus["Undefined"] = 0] = "Undefined"; /** - * The ref update request could not be completed because the user lacks write permissions required to write this ref + * Indicates the approval is pending. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["WritePermissionRequired"] = 4] = "WritePermissionRequired"; + ApprovalStatus[ApprovalStatus["Pending"] = 1] = "Pending"; /** - * Target branch was deleted after Git async operation started + * Indicates the approval is approved. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["TargetBranchDeleted"] = 5] = "TargetBranchDeleted"; + ApprovalStatus[ApprovalStatus["Approved"] = 2] = "Approved"; /** - * Git object is too large to materialize into memory + * Indicates the approval is rejected. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["GitObjectTooLarge"] = 6] = "GitObjectTooLarge"; + ApprovalStatus[ApprovalStatus["Rejected"] = 4] = "Rejected"; /** - * Identity who authorized the operation was not found + * Indicates the approval is reassigned. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["OperationIndentityNotFound"] = 7] = "OperationIndentityNotFound"; + ApprovalStatus[ApprovalStatus["Reassigned"] = 6] = "Reassigned"; /** - * Async operation was not found + * Indicates the approval is canceled. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["AsyncOperationNotFound"] = 8] = "AsyncOperationNotFound"; + ApprovalStatus[ApprovalStatus["Canceled"] = 7] = "Canceled"; /** - * Unexpected failure + * Indicates the approval is skipped. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["Other"] = 9] = "Other"; + ApprovalStatus[ApprovalStatus["Skipped"] = 8] = "Skipped"; +})(ApprovalStatus = exports.ApprovalStatus || (exports.ApprovalStatus = {})); +var ApprovalType; +(function (ApprovalType) { /** - * Initiator of async operation has signature with empty name or email + * Indicates the approval type does not set. */ - GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["EmptyCommitterSignature"] = 10] = "EmptyCommitterSignature"; -})(GitAsyncRefOperationFailureStatus = exports.GitAsyncRefOperationFailureStatus || (exports.GitAsyncRefOperationFailureStatus = {})); -/** - * The type of a merge conflict. - */ -var GitConflictType; -(function (GitConflictType) { + ApprovalType[ApprovalType["Undefined"] = 0] = "Undefined"; /** - * No conflict + * Indicates the approvals which executed before deployment. */ - GitConflictType[GitConflictType["None"] = 0] = "None"; + ApprovalType[ApprovalType["PreDeploy"] = 1] = "PreDeploy"; /** - * Added on source and target; content differs + * Indicates the approvals which executed after deployment. */ - GitConflictType[GitConflictType["AddAdd"] = 1] = "AddAdd"; + ApprovalType[ApprovalType["PostDeploy"] = 2] = "PostDeploy"; /** - * Added on source and rename destination on target + * Indicates all approvals. */ - GitConflictType[GitConflictType["AddRename"] = 2] = "AddRename"; + ApprovalType[ApprovalType["All"] = 3] = "All"; +})(ApprovalType = exports.ApprovalType || (exports.ApprovalType = {})); +var AuditAction; +(function (AuditAction) { /** - * Deleted on source and edited on target + * Indicates the audit add. */ - GitConflictType[GitConflictType["DeleteEdit"] = 3] = "DeleteEdit"; + AuditAction[AuditAction["Add"] = 1] = "Add"; /** - * Deleted on source and renamed on target + * Indicates the audit update. */ - GitConflictType[GitConflictType["DeleteRename"] = 4] = "DeleteRename"; + AuditAction[AuditAction["Update"] = 2] = "Update"; /** - * Path is a directory on source and a file on target + * Indicates the audit delete. */ - GitConflictType[GitConflictType["DirectoryFile"] = 5] = "DirectoryFile"; + AuditAction[AuditAction["Delete"] = 3] = "Delete"; /** - * Children of directory which has DirectoryFile or FileDirectory conflict + * Indicates the audit undelete. */ - GitConflictType[GitConflictType["DirectoryChild"] = 6] = "DirectoryChild"; + AuditAction[AuditAction["Undelete"] = 4] = "Undelete"; +})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); +var AuthorizationHeaderFor; +(function (AuthorizationHeaderFor) { + AuthorizationHeaderFor[AuthorizationHeaderFor["RevalidateApproverIdentity"] = 0] = "RevalidateApproverIdentity"; + AuthorizationHeaderFor[AuthorizationHeaderFor["OnBehalfOf"] = 1] = "OnBehalfOf"; +})(AuthorizationHeaderFor = exports.AuthorizationHeaderFor || (exports.AuthorizationHeaderFor = {})); +var ConditionType; +(function (ConditionType) { /** - * Edited on source and deleted on target + * The condition type is undefined. */ - GitConflictType[GitConflictType["EditDelete"] = 7] = "EditDelete"; + ConditionType[ConditionType["Undefined"] = 0] = "Undefined"; /** - * Edited on source and target; content differs + * The condition type is event. */ - GitConflictType[GitConflictType["EditEdit"] = 8] = "EditEdit"; + ConditionType[ConditionType["Event"] = 1] = "Event"; /** - * Path is a file on source and a directory on target + * The condition type is environment state. */ - GitConflictType[GitConflictType["FileDirectory"] = 9] = "FileDirectory"; + ConditionType[ConditionType["EnvironmentState"] = 2] = "EnvironmentState"; /** - * Same file renamed on both source and target; destination paths differ + * The condition type is artifact. */ - GitConflictType[GitConflictType["Rename1to2"] = 10] = "Rename1to2"; + ConditionType[ConditionType["Artifact"] = 4] = "Artifact"; +})(ConditionType = exports.ConditionType || (exports.ConditionType = {})); +var DeploymentAuthorizationOwner; +(function (DeploymentAuthorizationOwner) { + DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["Automatic"] = 0] = "Automatic"; + DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["DeploymentSubmitter"] = 1] = "DeploymentSubmitter"; + DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["FirstPreDeploymentApprover"] = 2] = "FirstPreDeploymentApprover"; +})(DeploymentAuthorizationOwner = exports.DeploymentAuthorizationOwner || (exports.DeploymentAuthorizationOwner = {})); +var DeploymentExpands; +(function (DeploymentExpands) { + DeploymentExpands[DeploymentExpands["All"] = 0] = "All"; + DeploymentExpands[DeploymentExpands["DeploymentOnly"] = 1] = "DeploymentOnly"; + DeploymentExpands[DeploymentExpands["Approvals"] = 2] = "Approvals"; + DeploymentExpands[DeploymentExpands["Artifacts"] = 4] = "Artifacts"; +})(DeploymentExpands = exports.DeploymentExpands || (exports.DeploymentExpands = {})); +var DeploymentOperationStatus; +(function (DeploymentOperationStatus) { /** - * Different files renamed to same destination path on both source and target + * The deployment operation status is undefined. */ - GitConflictType[GitConflictType["Rename2to1"] = 11] = "Rename2to1"; + DeploymentOperationStatus[DeploymentOperationStatus["Undefined"] = 0] = "Undefined"; /** - * Rename destination on source and new file on target + * The deployment operation status is queued. */ - GitConflictType[GitConflictType["RenameAdd"] = 12] = "RenameAdd"; + DeploymentOperationStatus[DeploymentOperationStatus["Queued"] = 1] = "Queued"; /** - * Renamed on source and deleted on target + * The deployment operation status is scheduled. */ - GitConflictType[GitConflictType["RenameDelete"] = 13] = "RenameDelete"; + DeploymentOperationStatus[DeploymentOperationStatus["Scheduled"] = 2] = "Scheduled"; /** - * Rename destination on both source and target; content differs + * The deployment operation status is pending. */ - GitConflictType[GitConflictType["RenameRename"] = 14] = "RenameRename"; -})(GitConflictType = exports.GitConflictType || (exports.GitConflictType = {})); -/** - * Represents the possible outcomes from a request to update a pull request conflict - */ -var GitConflictUpdateStatus; -(function (GitConflictUpdateStatus) { + DeploymentOperationStatus[DeploymentOperationStatus["Pending"] = 4] = "Pending"; /** - * Indicates that pull request conflict update request was completed successfully + * The deployment operation status is approved. */ - GitConflictUpdateStatus[GitConflictUpdateStatus["Succeeded"] = 0] = "Succeeded"; + DeploymentOperationStatus[DeploymentOperationStatus["Approved"] = 8] = "Approved"; /** - * Indicates that the update request did not fit the expected data contract + * The deployment operation status is rejected. */ - GitConflictUpdateStatus[GitConflictUpdateStatus["BadRequest"] = 1] = "BadRequest"; + DeploymentOperationStatus[DeploymentOperationStatus["Rejected"] = 16] = "Rejected"; /** - * Indicates that the requested resolution was not valid + * The deployment operation status is deferred. */ - GitConflictUpdateStatus[GitConflictUpdateStatus["InvalidResolution"] = 2] = "InvalidResolution"; + DeploymentOperationStatus[DeploymentOperationStatus["Deferred"] = 32] = "Deferred"; /** - * Indicates that the conflict in the update request was not a supported conflict type + * The deployment operation status is queued for agent. */ - GitConflictUpdateStatus[GitConflictUpdateStatus["UnsupportedConflictType"] = 3] = "UnsupportedConflictType"; + DeploymentOperationStatus[DeploymentOperationStatus["QueuedForAgent"] = 64] = "QueuedForAgent"; /** - * Indicates that the conflict could not be found + * The deployment operation status is phase in progress. */ - GitConflictUpdateStatus[GitConflictUpdateStatus["NotFound"] = 4] = "NotFound"; -})(GitConflictUpdateStatus = exports.GitConflictUpdateStatus || (exports.GitConflictUpdateStatus = {})); -/** - * Accepted types of version - */ -var GitHistoryMode; -(function (GitHistoryMode) { + DeploymentOperationStatus[DeploymentOperationStatus["PhaseInProgress"] = 128] = "PhaseInProgress"; /** - * The history mode used by `git log`. This is the default. + * The deployment operation status is phase succeeded. */ - GitHistoryMode[GitHistoryMode["SimplifiedHistory"] = 0] = "SimplifiedHistory"; + DeploymentOperationStatus[DeploymentOperationStatus["PhaseSucceeded"] = 256] = "PhaseSucceeded"; /** - * The history mode used by `git log --first-parent` + * The deployment operation status is phase partially succeeded. */ - GitHistoryMode[GitHistoryMode["FirstParent"] = 1] = "FirstParent"; + DeploymentOperationStatus[DeploymentOperationStatus["PhasePartiallySucceeded"] = 512] = "PhasePartiallySucceeded"; /** - * The history mode used by `git log --full-history` + * The deployment operation status is phase failed. */ - GitHistoryMode[GitHistoryMode["FullHistory"] = 2] = "FullHistory"; + DeploymentOperationStatus[DeploymentOperationStatus["PhaseFailed"] = 1024] = "PhaseFailed"; /** - * The history mode used by `git log --full-history --simplify-merges` + * The deployment operation status is canceled. */ - GitHistoryMode[GitHistoryMode["FullHistorySimplifyMerges"] = 3] = "FullHistorySimplifyMerges"; -})(GitHistoryMode = exports.GitHistoryMode || (exports.GitHistoryMode = {})); -var GitObjectType; -(function (GitObjectType) { - GitObjectType[GitObjectType["Bad"] = 0] = "Bad"; - GitObjectType[GitObjectType["Commit"] = 1] = "Commit"; - GitObjectType[GitObjectType["Tree"] = 2] = "Tree"; - GitObjectType[GitObjectType["Blob"] = 3] = "Blob"; - GitObjectType[GitObjectType["Tag"] = 4] = "Tag"; - GitObjectType[GitObjectType["Ext2"] = 5] = "Ext2"; - GitObjectType[GitObjectType["OfsDelta"] = 6] = "OfsDelta"; - GitObjectType[GitObjectType["RefDelta"] = 7] = "RefDelta"; -})(GitObjectType = exports.GitObjectType || (exports.GitObjectType = {})); -var GitPathActions; -(function (GitPathActions) { - GitPathActions[GitPathActions["None"] = 0] = "None"; - GitPathActions[GitPathActions["Edit"] = 1] = "Edit"; - GitPathActions[GitPathActions["Delete"] = 2] = "Delete"; - GitPathActions[GitPathActions["Add"] = 3] = "Add"; - GitPathActions[GitPathActions["Rename"] = 4] = "Rename"; -})(GitPathActions = exports.GitPathActions || (exports.GitPathActions = {})); -/** - * Enumeration of possible merge strategies which can be used to complete a pull request. - */ -var GitPullRequestMergeStrategy; -(function (GitPullRequestMergeStrategy) { + DeploymentOperationStatus[DeploymentOperationStatus["Canceled"] = 2048] = "Canceled"; /** - * A two-parent, no-fast-forward merge. The source branch is unchanged. This is the default behavior. + * The deployment operation status is phase canceled. */ - GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["NoFastForward"] = 1] = "NoFastForward"; + DeploymentOperationStatus[DeploymentOperationStatus["PhaseCanceled"] = 4096] = "PhaseCanceled"; /** - * Put all changes from the pull request into a single-parent commit. + * The deployment operation status is manualintervention pending. */ - GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["Squash"] = 2] = "Squash"; + DeploymentOperationStatus[DeploymentOperationStatus["ManualInterventionPending"] = 8192] = "ManualInterventionPending"; /** - * Rebase the source branch on top of the target branch HEAD commit, and fast-forward the target branch. The source branch is updated during the rebase operation. + * The deployment operation status is queued for pipeline. */ - GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["Rebase"] = 3] = "Rebase"; + DeploymentOperationStatus[DeploymentOperationStatus["QueuedForPipeline"] = 16384] = "QueuedForPipeline"; /** - * Rebase the source branch on top of the target branch HEAD commit, and create a two-parent, no-fast-forward merge. The source branch is updated during the rebase operation. + * The deployment operation status is cancelling. */ - GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["RebaseMerge"] = 4] = "RebaseMerge"; -})(GitPullRequestMergeStrategy = exports.GitPullRequestMergeStrategy || (exports.GitPullRequestMergeStrategy = {})); -/** - * Accepted types of pull request queries. - */ -var GitPullRequestQueryType; -(function (GitPullRequestQueryType) { + DeploymentOperationStatus[DeploymentOperationStatus["Cancelling"] = 32768] = "Cancelling"; /** - * No query type set. + * The deployment operation status is EvaluatingGates. */ - GitPullRequestQueryType[GitPullRequestQueryType["NotSet"] = 0] = "NotSet"; + DeploymentOperationStatus[DeploymentOperationStatus["EvaluatingGates"] = 65536] = "EvaluatingGates"; /** - * Search for pull requests that created the supplied merge commits. + * The deployment operation status is GateFailed. */ - GitPullRequestQueryType[GitPullRequestQueryType["LastMergeCommit"] = 1] = "LastMergeCommit"; + DeploymentOperationStatus[DeploymentOperationStatus["GateFailed"] = 131072] = "GateFailed"; /** - * Search for pull requests that merged the supplied commits. + * The deployment operation status is all. */ - GitPullRequestQueryType[GitPullRequestQueryType["Commit"] = 2] = "Commit"; -})(GitPullRequestQueryType = exports.GitPullRequestQueryType || (exports.GitPullRequestQueryType = {})); -var GitPullRequestReviewFileType; -(function (GitPullRequestReviewFileType) { - GitPullRequestReviewFileType[GitPullRequestReviewFileType["ChangeEntry"] = 0] = "ChangeEntry"; - GitPullRequestReviewFileType[GitPullRequestReviewFileType["Attachment"] = 1] = "Attachment"; -})(GitPullRequestReviewFileType = exports.GitPullRequestReviewFileType || (exports.GitPullRequestReviewFileType = {})); -/** - * Search type on ref name - */ -var GitRefSearchType; -(function (GitRefSearchType) { - GitRefSearchType[GitRefSearchType["Exact"] = 0] = "Exact"; - GitRefSearchType[GitRefSearchType["StartsWith"] = 1] = "StartsWith"; - GitRefSearchType[GitRefSearchType["Contains"] = 2] = "Contains"; -})(GitRefSearchType = exports.GitRefSearchType || (exports.GitRefSearchType = {})); -/** - * Enumerates the modes under which ref updates can be written to their repositories. - */ -var GitRefUpdateMode; -(function (GitRefUpdateMode) { + DeploymentOperationStatus[DeploymentOperationStatus["All"] = 258047] = "All"; +})(DeploymentOperationStatus = exports.DeploymentOperationStatus || (exports.DeploymentOperationStatus = {})); +var DeploymentReason; +(function (DeploymentReason) { + /** + * The deployment reason is none. + */ + DeploymentReason[DeploymentReason["None"] = 0] = "None"; + /** + * The deployment reason is manual. + */ + DeploymentReason[DeploymentReason["Manual"] = 1] = "Manual"; + /** + * The deployment reason is automated. + */ + DeploymentReason[DeploymentReason["Automated"] = 2] = "Automated"; + /** + * The deployment reason is scheduled. + */ + DeploymentReason[DeploymentReason["Scheduled"] = 4] = "Scheduled"; + /** + * The deployment reason is RedeployTrigger. + */ + DeploymentReason[DeploymentReason["RedeployTrigger"] = 8] = "RedeployTrigger"; +})(DeploymentReason = exports.DeploymentReason || (exports.DeploymentReason = {})); +var DeploymentsQueryType; +(function (DeploymentsQueryType) { + DeploymentsQueryType[DeploymentsQueryType["Regular"] = 1] = "Regular"; + DeploymentsQueryType[DeploymentsQueryType["FailingSince"] = 2] = "FailingSince"; +})(DeploymentsQueryType = exports.DeploymentsQueryType || (exports.DeploymentsQueryType = {})); +var DeploymentStatus; +(function (DeploymentStatus) { + /** + * The deployment status is undefined. + */ + DeploymentStatus[DeploymentStatus["Undefined"] = 0] = "Undefined"; + /** + * The deployment status is not deployed. + */ + DeploymentStatus[DeploymentStatus["NotDeployed"] = 1] = "NotDeployed"; + /** + * The deployment status is in progress. + */ + DeploymentStatus[DeploymentStatus["InProgress"] = 2] = "InProgress"; + /** + * The deployment status is succeeded. + */ + DeploymentStatus[DeploymentStatus["Succeeded"] = 4] = "Succeeded"; + /** + * The deployment status is partiallysucceeded. + */ + DeploymentStatus[DeploymentStatus["PartiallySucceeded"] = 8] = "PartiallySucceeded"; + /** + * The deployment status is failed. + */ + DeploymentStatus[DeploymentStatus["Failed"] = 16] = "Failed"; + /** + * The deployment status is all. + */ + DeploymentStatus[DeploymentStatus["All"] = 31] = "All"; +})(DeploymentStatus = exports.DeploymentStatus || (exports.DeploymentStatus = {})); +var DeployPhaseStatus; +(function (DeployPhaseStatus) { + /** + * Phase status not set. + */ + DeployPhaseStatus[DeployPhaseStatus["Undefined"] = 0] = "Undefined"; + /** + * Phase execution not started. + */ + DeployPhaseStatus[DeployPhaseStatus["NotStarted"] = 1] = "NotStarted"; + /** + * Phase execution in progress. + */ + DeployPhaseStatus[DeployPhaseStatus["InProgress"] = 2] = "InProgress"; + /** + * Phase execution partially succeeded. + */ + DeployPhaseStatus[DeployPhaseStatus["PartiallySucceeded"] = 4] = "PartiallySucceeded"; + /** + * Phase execution succeeded. + */ + DeployPhaseStatus[DeployPhaseStatus["Succeeded"] = 8] = "Succeeded"; + /** + * Phase execution failed. + */ + DeployPhaseStatus[DeployPhaseStatus["Failed"] = 16] = "Failed"; + /** + * Phase execution canceled. + */ + DeployPhaseStatus[DeployPhaseStatus["Canceled"] = 32] = "Canceled"; + /** + * Phase execution skipped. + */ + DeployPhaseStatus[DeployPhaseStatus["Skipped"] = 64] = "Skipped"; + /** + * Phase is in cancelling state. + */ + DeployPhaseStatus[DeployPhaseStatus["Cancelling"] = 128] = "Cancelling"; +})(DeployPhaseStatus = exports.DeployPhaseStatus || (exports.DeployPhaseStatus = {})); +var DeployPhaseTypes; +(function (DeployPhaseTypes) { + /** + * Phase type not defined. Don't use this. + */ + DeployPhaseTypes[DeployPhaseTypes["Undefined"] = 0] = "Undefined"; + /** + * Phase type which contains tasks executed on agent. + */ + DeployPhaseTypes[DeployPhaseTypes["AgentBasedDeployment"] = 1] = "AgentBasedDeployment"; + /** + * Phase type which contains tasks executed by server. + */ + DeployPhaseTypes[DeployPhaseTypes["RunOnServer"] = 2] = "RunOnServer"; + /** + * Phase type which contains tasks executed on deployment group machines. + */ + DeployPhaseTypes[DeployPhaseTypes["MachineGroupBasedDeployment"] = 4] = "MachineGroupBasedDeployment"; + /** + * Phase type which contains tasks which acts as Gates for the deployment to go forward. + */ + DeployPhaseTypes[DeployPhaseTypes["DeploymentGates"] = 8] = "DeploymentGates"; +})(DeployPhaseTypes = exports.DeployPhaseTypes || (exports.DeployPhaseTypes = {})); +var EnvironmentStatus; +(function (EnvironmentStatus) { + /** + * Environment status not set. + */ + EnvironmentStatus[EnvironmentStatus["Undefined"] = 0] = "Undefined"; + /** + * Environment is in not started state. + */ + EnvironmentStatus[EnvironmentStatus["NotStarted"] = 1] = "NotStarted"; + /** + * Environment is in progress state. + */ + EnvironmentStatus[EnvironmentStatus["InProgress"] = 2] = "InProgress"; + /** + * Environment is in succeeded state. + */ + EnvironmentStatus[EnvironmentStatus["Succeeded"] = 4] = "Succeeded"; + /** + * Environment is in canceled state. + */ + EnvironmentStatus[EnvironmentStatus["Canceled"] = 8] = "Canceled"; + /** + * Environment is in rejected state. + */ + EnvironmentStatus[EnvironmentStatus["Rejected"] = 16] = "Rejected"; + /** + * Environment is in queued state. + */ + EnvironmentStatus[EnvironmentStatus["Queued"] = 32] = "Queued"; + /** + * Environment is in scheduled state. + */ + EnvironmentStatus[EnvironmentStatus["Scheduled"] = 64] = "Scheduled"; + /** + * Environment is in partially succeeded state. + */ + EnvironmentStatus[EnvironmentStatus["PartiallySucceeded"] = 128] = "PartiallySucceeded"; +})(EnvironmentStatus = exports.EnvironmentStatus || (exports.EnvironmentStatus = {})); +var EnvironmentTriggerType; +(function (EnvironmentTriggerType) { + /** + * Environment trigger type undefined. + */ + EnvironmentTriggerType[EnvironmentTriggerType["Undefined"] = 0] = "Undefined"; + /** + * Environment trigger type is deployment group redeploy. + */ + EnvironmentTriggerType[EnvironmentTriggerType["DeploymentGroupRedeploy"] = 1] = "DeploymentGroupRedeploy"; /** - * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. + * Environment trigger type is Rollback. */ - GitRefUpdateMode[GitRefUpdateMode["BestEffort"] = 0] = "BestEffort"; + EnvironmentTriggerType[EnvironmentTriggerType["RollbackRedeploy"] = 2] = "RollbackRedeploy"; +})(EnvironmentTriggerType = exports.EnvironmentTriggerType || (exports.EnvironmentTriggerType = {})); +var FolderPathQueryOrder; +(function (FolderPathQueryOrder) { /** - * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. + * No order. */ - GitRefUpdateMode[GitRefUpdateMode["AllOrNone"] = 1] = "AllOrNone"; -})(GitRefUpdateMode = exports.GitRefUpdateMode || (exports.GitRefUpdateMode = {})); -/** - * Represents the possible outcomes from a request to update a ref in a repository. - */ -var GitRefUpdateStatus; -(function (GitRefUpdateStatus) { + FolderPathQueryOrder[FolderPathQueryOrder["None"] = 0] = "None"; /** - * Indicates that the ref update request was completed successfully. + * Order by folder name and path ascending. */ - GitRefUpdateStatus[GitRefUpdateStatus["Succeeded"] = 0] = "Succeeded"; + FolderPathQueryOrder[FolderPathQueryOrder["Ascending"] = 1] = "Ascending"; /** - * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. + * Order by folder name and path descending. */ - GitRefUpdateStatus[GitRefUpdateStatus["ForcePushRequired"] = 1] = "ForcePushRequired"; + FolderPathQueryOrder[FolderPathQueryOrder["Descending"] = 2] = "Descending"; +})(FolderPathQueryOrder = exports.FolderPathQueryOrder || (exports.FolderPathQueryOrder = {})); +var GateStatus; +(function (GateStatus) { /** - * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. + * The gate does not have the status set. */ - GitRefUpdateStatus[GitRefUpdateStatus["StaleOldObjectId"] = 2] = "StaleOldObjectId"; + GateStatus[GateStatus["None"] = 0] = "None"; /** - * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + * The gate is in pending state. */ - GitRefUpdateStatus[GitRefUpdateStatus["InvalidRefName"] = 3] = "InvalidRefName"; + GateStatus[GateStatus["Pending"] = 1] = "Pending"; /** - * The request was not processed + * The gate is currently in progress. */ - GitRefUpdateStatus[GitRefUpdateStatus["Unprocessed"] = 4] = "Unprocessed"; + GateStatus[GateStatus["InProgress"] = 2] = "InProgress"; /** - * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) + * The gate completed successfully. */ - GitRefUpdateStatus[GitRefUpdateStatus["UnresolvableToCommit"] = 5] = "UnresolvableToCommit"; + GateStatus[GateStatus["Succeeded"] = 4] = "Succeeded"; /** - * The ref update request could not be completed because the user lacks write permissions required to write this ref + * The gate execution failed. */ - GitRefUpdateStatus[GitRefUpdateStatus["WritePermissionRequired"] = 6] = "WritePermissionRequired"; + GateStatus[GateStatus["Failed"] = 8] = "Failed"; /** - * The ref update request could not be completed because the user lacks note creation permissions required to write this note + * The gate execution cancelled. */ - GitRefUpdateStatus[GitRefUpdateStatus["ManageNotePermissionRequired"] = 7] = "ManageNotePermissionRequired"; + GateStatus[GateStatus["Canceled"] = 16] = "Canceled"; +})(GateStatus = exports.GateStatus || (exports.GateStatus = {})); +var IssueSource; +(function (IssueSource) { + IssueSource[IssueSource["None"] = 0] = "None"; + IssueSource[IssueSource["User"] = 1] = "User"; + IssueSource[IssueSource["System"] = 2] = "System"; +})(IssueSource = exports.IssueSource || (exports.IssueSource = {})); +var MailSectionType; +(function (MailSectionType) { + MailSectionType[MailSectionType["Details"] = 0] = "Details"; + MailSectionType[MailSectionType["Environments"] = 1] = "Environments"; + MailSectionType[MailSectionType["Issues"] = 2] = "Issues"; + MailSectionType[MailSectionType["TestResults"] = 3] = "TestResults"; + MailSectionType[MailSectionType["WorkItems"] = 4] = "WorkItems"; + MailSectionType[MailSectionType["ReleaseInfo"] = 5] = "ReleaseInfo"; +})(MailSectionType = exports.MailSectionType || (exports.MailSectionType = {})); +/** + * Describes manual intervention status + */ +var ManualInterventionStatus; +(function (ManualInterventionStatus) { /** - * The ref update request could not be completed because the user lacks the permission to create a branch + * The manual intervention does not have the status set. */ - GitRefUpdateStatus[GitRefUpdateStatus["CreateBranchPermissionRequired"] = 8] = "CreateBranchPermissionRequired"; + ManualInterventionStatus[ManualInterventionStatus["Unknown"] = 0] = "Unknown"; /** - * The ref update request could not be completed because the user lacks the permission to create a tag + * The manual intervention is pending. */ - GitRefUpdateStatus[GitRefUpdateStatus["CreateTagPermissionRequired"] = 9] = "CreateTagPermissionRequired"; + ManualInterventionStatus[ManualInterventionStatus["Pending"] = 1] = "Pending"; /** - * The ref update could not be completed because it was rejected by the plugin. + * The manual intervention is rejected. */ - GitRefUpdateStatus[GitRefUpdateStatus["RejectedByPlugin"] = 10] = "RejectedByPlugin"; + ManualInterventionStatus[ManualInterventionStatus["Rejected"] = 2] = "Rejected"; /** - * The ref update could not be completed because the ref is locked by another user. + * The manual intervention is approved. */ - GitRefUpdateStatus[GitRefUpdateStatus["Locked"] = 11] = "Locked"; + ManualInterventionStatus[ManualInterventionStatus["Approved"] = 4] = "Approved"; /** - * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + * The manual intervention is canceled. */ - GitRefUpdateStatus[GitRefUpdateStatus["RefNameConflict"] = 12] = "RefNameConflict"; + ManualInterventionStatus[ManualInterventionStatus["Canceled"] = 8] = "Canceled"; +})(ManualInterventionStatus = exports.ManualInterventionStatus || (exports.ManualInterventionStatus = {})); +var ParallelExecutionTypes; +(function (ParallelExecutionTypes) { + ParallelExecutionTypes[ParallelExecutionTypes["None"] = 0] = "None"; + ParallelExecutionTypes[ParallelExecutionTypes["MultiConfiguration"] = 1] = "MultiConfiguration"; + ParallelExecutionTypes[ParallelExecutionTypes["MultiMachine"] = 2] = "MultiMachine"; +})(ParallelExecutionTypes = exports.ParallelExecutionTypes || (exports.ParallelExecutionTypes = {})); +var PipelineProcessTypes; +(function (PipelineProcessTypes) { + PipelineProcessTypes[PipelineProcessTypes["Designer"] = 1] = "Designer"; + PipelineProcessTypes[PipelineProcessTypes["Yaml"] = 2] = "Yaml"; +})(PipelineProcessTypes = exports.PipelineProcessTypes || (exports.PipelineProcessTypes = {})); +var PropertySelectorType; +(function (PropertySelectorType) { /** - * The ref update could not be completed because it was rejected by policy. + * Include in property selector. */ - GitRefUpdateStatus[GitRefUpdateStatus["RejectedByPolicy"] = 13] = "RejectedByPolicy"; + PropertySelectorType[PropertySelectorType["Inclusion"] = 0] = "Inclusion"; /** - * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. + * Exclude in property selector. */ - GitRefUpdateStatus[GitRefUpdateStatus["SucceededNonExistentRef"] = 14] = "SucceededNonExistentRef"; + PropertySelectorType[PropertySelectorType["Exclusion"] = 1] = "Exclusion"; +})(PropertySelectorType = exports.PropertySelectorType || (exports.PropertySelectorType = {})); +var PullRequestSystemType; +(function (PullRequestSystemType) { + PullRequestSystemType[PullRequestSystemType["None"] = 0] = "None"; + PullRequestSystemType[PullRequestSystemType["TfsGit"] = 1] = "TfsGit"; + PullRequestSystemType[PullRequestSystemType["GitHub"] = 2] = "GitHub"; +})(PullRequestSystemType = exports.PullRequestSystemType || (exports.PullRequestSystemType = {})); +var ReleaseDefinitionExpands; +(function (ReleaseDefinitionExpands) { /** - * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. + * Returns top level properties of object. */ - GitRefUpdateStatus[GitRefUpdateStatus["SucceededCorruptRef"] = 15] = "SucceededCorruptRef"; -})(GitRefUpdateStatus = exports.GitRefUpdateStatus || (exports.GitRefUpdateStatus = {})); -/** - * The type of a merge conflict. - */ -var GitResolutionError; -(function (GitResolutionError) { + ReleaseDefinitionExpands[ReleaseDefinitionExpands["None"] = 0] = "None"; /** - * No error + * Include environments in return object. */ - GitResolutionError[GitResolutionError["None"] = 0] = "None"; + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Environments"] = 2] = "Environments"; /** - * User set a blob id for resolving a content merge, but blob was not found in repo during application + * Include artifacts in return object. */ - GitResolutionError[GitResolutionError["MergeContentNotFound"] = 1] = "MergeContentNotFound"; + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Artifacts"] = 4] = "Artifacts"; /** - * Attempted to resolve a conflict by moving a file to another path, but path was already in use + * Include triggers in return object. */ - GitResolutionError[GitResolutionError["PathInUse"] = 2] = "PathInUse"; + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Triggers"] = 8] = "Triggers"; /** - * No error + * Include variables in return object. */ - GitResolutionError[GitResolutionError["InvalidPath"] = 3] = "InvalidPath"; + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Variables"] = 16] = "Variables"; /** - * GitResolutionAction was set to an unrecognized value + * Include tags in return object. */ - GitResolutionError[GitResolutionError["UnknownAction"] = 4] = "UnknownAction"; + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Tags"] = 32] = "Tags"; /** - * GitResolutionMergeType was set to an unrecognized value + * Include last release in return object. */ - GitResolutionError[GitResolutionError["UnknownMergeType"] = 5] = "UnknownMergeType"; + ReleaseDefinitionExpands[ReleaseDefinitionExpands["LastRelease"] = 64] = "LastRelease"; +})(ReleaseDefinitionExpands = exports.ReleaseDefinitionExpands || (exports.ReleaseDefinitionExpands = {})); +var ReleaseDefinitionQueryOrder; +(function (ReleaseDefinitionQueryOrder) { /** - * Any error for which a more specific code doesn't apply + * Return results based on release definition Id ascending order. */ - GitResolutionError[GitResolutionError["OtherError"] = 255] = "OtherError"; -})(GitResolutionError = exports.GitResolutionError || (exports.GitResolutionError = {})); -var GitResolutionMergeType; -(function (GitResolutionMergeType) { - GitResolutionMergeType[GitResolutionMergeType["Undecided"] = 0] = "Undecided"; - GitResolutionMergeType[GitResolutionMergeType["TakeSourceContent"] = 1] = "TakeSourceContent"; - GitResolutionMergeType[GitResolutionMergeType["TakeTargetContent"] = 2] = "TakeTargetContent"; - GitResolutionMergeType[GitResolutionMergeType["AutoMerged"] = 3] = "AutoMerged"; - GitResolutionMergeType[GitResolutionMergeType["UserMerged"] = 4] = "UserMerged"; -})(GitResolutionMergeType = exports.GitResolutionMergeType || (exports.GitResolutionMergeType = {})); -var GitResolutionPathConflictAction; -(function (GitResolutionPathConflictAction) { - GitResolutionPathConflictAction[GitResolutionPathConflictAction["Undecided"] = 0] = "Undecided"; - GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepSourceRenameTarget"] = 1] = "KeepSourceRenameTarget"; - GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepSourceDeleteTarget"] = 2] = "KeepSourceDeleteTarget"; - GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepTargetRenameSource"] = 3] = "KeepTargetRenameSource"; - GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepTargetDeleteSource"] = 4] = "KeepTargetDeleteSource"; -})(GitResolutionPathConflictAction = exports.GitResolutionPathConflictAction || (exports.GitResolutionPathConflictAction = {})); -var GitResolutionRename1to2Action; -(function (GitResolutionRename1to2Action) { - GitResolutionRename1to2Action[GitResolutionRename1to2Action["Undecided"] = 0] = "Undecided"; - GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepSourcePath"] = 1] = "KeepSourcePath"; - GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepTargetPath"] = 2] = "KeepTargetPath"; - GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepBothFiles"] = 3] = "KeepBothFiles"; -})(GitResolutionRename1to2Action = exports.GitResolutionRename1to2Action || (exports.GitResolutionRename1to2Action = {})); -/** - * Resolution status of a conflict. - */ -var GitResolutionStatus; -(function (GitResolutionStatus) { - GitResolutionStatus[GitResolutionStatus["Unresolved"] = 0] = "Unresolved"; - GitResolutionStatus[GitResolutionStatus["PartiallyResolved"] = 1] = "PartiallyResolved"; - GitResolutionStatus[GitResolutionStatus["Resolved"] = 2] = "Resolved"; -})(GitResolutionStatus = exports.GitResolutionStatus || (exports.GitResolutionStatus = {})); -var GitResolutionWhichAction; -(function (GitResolutionWhichAction) { - GitResolutionWhichAction[GitResolutionWhichAction["Undecided"] = 0] = "Undecided"; - GitResolutionWhichAction[GitResolutionWhichAction["PickSourceAction"] = 1] = "PickSourceAction"; - GitResolutionWhichAction[GitResolutionWhichAction["PickTargetAction"] = 2] = "PickTargetAction"; -})(GitResolutionWhichAction = exports.GitResolutionWhichAction || (exports.GitResolutionWhichAction = {})); -/** - * State of the status. - */ -var GitStatusState; -(function (GitStatusState) { + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["IdAscending"] = 0] = "IdAscending"; /** - * Status state not set. Default state. + * Return results based on release definition Id descending order. */ - GitStatusState[GitStatusState["NotSet"] = 0] = "NotSet"; + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["IdDescending"] = 1] = "IdDescending"; /** - * Status pending. + * Return results based on release definition name ascending order. */ - GitStatusState[GitStatusState["Pending"] = 1] = "Pending"; + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["NameAscending"] = 2] = "NameAscending"; /** - * Status succeeded. + * Return results based on release definition name descending order. */ - GitStatusState[GitStatusState["Succeeded"] = 2] = "Succeeded"; + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["NameDescending"] = 3] = "NameDescending"; +})(ReleaseDefinitionQueryOrder = exports.ReleaseDefinitionQueryOrder || (exports.ReleaseDefinitionQueryOrder = {})); +var ReleaseDefinitionSource; +(function (ReleaseDefinitionSource) { /** - * Status failed. + * Indicates ReleaseDefinition source not defined. */ - GitStatusState[GitStatusState["Failed"] = 3] = "Failed"; + ReleaseDefinitionSource[ReleaseDefinitionSource["Undefined"] = 0] = "Undefined"; /** - * Status with an error. + * Indicates ReleaseDefinition created using REST API. */ - GitStatusState[GitStatusState["Error"] = 4] = "Error"; + ReleaseDefinitionSource[ReleaseDefinitionSource["RestApi"] = 1] = "RestApi"; /** - * Status is not applicable to the target object. + * Indicates ReleaseDefinition created using UI. */ - GitStatusState[GitStatusState["NotApplicable"] = 5] = "NotApplicable"; -})(GitStatusState = exports.GitStatusState || (exports.GitStatusState = {})); -/** - * Accepted types of version options - */ -var GitVersionOptions; -(function (GitVersionOptions) { + ReleaseDefinitionSource[ReleaseDefinitionSource["UserInterface"] = 2] = "UserInterface"; /** - * Not specified + * Indicates ReleaseDefinition created from Ibiza. */ - GitVersionOptions[GitVersionOptions["None"] = 0] = "None"; + ReleaseDefinitionSource[ReleaseDefinitionSource["Ibiza"] = 4] = "Ibiza"; /** - * Commit that changed item prior to the current version + * Indicates ReleaseDefinition created from PortalExtension API. */ - GitVersionOptions[GitVersionOptions["PreviousChange"] = 1] = "PreviousChange"; + ReleaseDefinitionSource[ReleaseDefinitionSource["PortalExtensionApi"] = 8] = "PortalExtensionApi"; +})(ReleaseDefinitionSource = exports.ReleaseDefinitionSource || (exports.ReleaseDefinitionSource = {})); +var ReleaseEnvironmentExpands; +(function (ReleaseEnvironmentExpands) { /** - * First parent of commit (HEAD^) + * Return top level properties of object. */ - GitVersionOptions[GitVersionOptions["FirstParent"] = 2] = "FirstParent"; -})(GitVersionOptions = exports.GitVersionOptions || (exports.GitVersionOptions = {})); -/** - * Accepted types of version - */ -var GitVersionType; -(function (GitVersionType) { + ReleaseEnvironmentExpands[ReleaseEnvironmentExpands["None"] = 0] = "None"; /** - * Interpret the version as a branch name + * Expand environment with tasks. */ - GitVersionType[GitVersionType["Branch"] = 0] = "Branch"; + ReleaseEnvironmentExpands[ReleaseEnvironmentExpands["Tasks"] = 1] = "Tasks"; +})(ReleaseEnvironmentExpands = exports.ReleaseEnvironmentExpands || (exports.ReleaseEnvironmentExpands = {})); +var ReleaseExpands; +(function (ReleaseExpands) { + ReleaseExpands[ReleaseExpands["None"] = 0] = "None"; + ReleaseExpands[ReleaseExpands["Environments"] = 2] = "Environments"; + ReleaseExpands[ReleaseExpands["Artifacts"] = 4] = "Artifacts"; + ReleaseExpands[ReleaseExpands["Approvals"] = 8] = "Approvals"; + ReleaseExpands[ReleaseExpands["ManualInterventions"] = 16] = "ManualInterventions"; + ReleaseExpands[ReleaseExpands["Variables"] = 32] = "Variables"; + ReleaseExpands[ReleaseExpands["Tags"] = 64] = "Tags"; +})(ReleaseExpands = exports.ReleaseExpands || (exports.ReleaseExpands = {})); +var ReleaseQueryOrder; +(function (ReleaseQueryOrder) { /** - * Interpret the version as a tag name + * Return results in descending order. */ - GitVersionType[GitVersionType["Tag"] = 1] = "Tag"; + ReleaseQueryOrder[ReleaseQueryOrder["Descending"] = 0] = "Descending"; /** - * Interpret the version as a commit ID (SHA1) + * Return results in ascending order. */ - GitVersionType[GitVersionType["Commit"] = 2] = "Commit"; -})(GitVersionType = exports.GitVersionType || (exports.GitVersionType = {})); -var ItemContentType; -(function (ItemContentType) { - ItemContentType[ItemContentType["RawText"] = 0] = "RawText"; - ItemContentType[ItemContentType["Base64Encoded"] = 1] = "Base64Encoded"; -})(ItemContentType = exports.ItemContentType || (exports.ItemContentType = {})); -/** - * The reason for which the pull request iteration was created. - */ -var IterationReason; -(function (IterationReason) { - IterationReason[IterationReason["Push"] = 0] = "Push"; - IterationReason[IterationReason["ForcePush"] = 1] = "ForcePush"; - IterationReason[IterationReason["Create"] = 2] = "Create"; - IterationReason[IterationReason["Rebase"] = 4] = "Rebase"; - IterationReason[IterationReason["Unknown"] = 8] = "Unknown"; - IterationReason[IterationReason["Retarget"] = 16] = "Retarget"; - IterationReason[IterationReason["ResolveConflicts"] = 32] = "ResolveConflicts"; -})(IterationReason = exports.IterationReason || (exports.IterationReason = {})); -/** - * Type of change for a line diff block - */ -var LineDiffBlockChangeType; -(function (LineDiffBlockChangeType) { + ReleaseQueryOrder[ReleaseQueryOrder["Ascending"] = 1] = "Ascending"; +})(ReleaseQueryOrder = exports.ReleaseQueryOrder || (exports.ReleaseQueryOrder = {})); +var ReleaseReason; +(function (ReleaseReason) { /** - * No change - both the blocks are identical + * Indicates the release triggered reason not set. */ - LineDiffBlockChangeType[LineDiffBlockChangeType["None"] = 0] = "None"; + ReleaseReason[ReleaseReason["None"] = 0] = "None"; /** - * Lines were added to the block in the modified file + * Indicates the release triggered manually. */ - LineDiffBlockChangeType[LineDiffBlockChangeType["Add"] = 1] = "Add"; + ReleaseReason[ReleaseReason["Manual"] = 1] = "Manual"; /** - * Lines were deleted from the block in the original file + * Indicates the release triggered by continuous integration. */ - LineDiffBlockChangeType[LineDiffBlockChangeType["Delete"] = 2] = "Delete"; + ReleaseReason[ReleaseReason["ContinuousIntegration"] = 2] = "ContinuousIntegration"; /** - * Lines were modified + * Indicates the release triggered by schedule. */ - LineDiffBlockChangeType[LineDiffBlockChangeType["Edit"] = 3] = "Edit"; -})(LineDiffBlockChangeType = exports.LineDiffBlockChangeType || (exports.LineDiffBlockChangeType = {})); -/** - * The status of a pull request merge. - */ -var PullRequestAsyncStatus; -(function (PullRequestAsyncStatus) { + ReleaseReason[ReleaseReason["Schedule"] = 3] = "Schedule"; /** - * Status is not set. Default state. + * Indicates the release triggered by PullRequest. */ - PullRequestAsyncStatus[PullRequestAsyncStatus["NotSet"] = 0] = "NotSet"; + ReleaseReason[ReleaseReason["PullRequest"] = 4] = "PullRequest"; +})(ReleaseReason = exports.ReleaseReason || (exports.ReleaseReason = {})); +var ReleaseStatus; +(function (ReleaseStatus) { /** - * Pull request merge is queued. + * Release status not set. */ - PullRequestAsyncStatus[PullRequestAsyncStatus["Queued"] = 1] = "Queued"; + ReleaseStatus[ReleaseStatus["Undefined"] = 0] = "Undefined"; /** - * Pull request merge failed due to conflicts. + * Release is in draft state. */ - PullRequestAsyncStatus[PullRequestAsyncStatus["Conflicts"] = 2] = "Conflicts"; + ReleaseStatus[ReleaseStatus["Draft"] = 1] = "Draft"; /** - * Pull request merge succeeded. + * Release status is in active. */ - PullRequestAsyncStatus[PullRequestAsyncStatus["Succeeded"] = 3] = "Succeeded"; + ReleaseStatus[ReleaseStatus["Active"] = 2] = "Active"; /** - * Pull request merge rejected by policy. + * Release status is in abandoned. */ - PullRequestAsyncStatus[PullRequestAsyncStatus["RejectedByPolicy"] = 4] = "RejectedByPolicy"; + ReleaseStatus[ReleaseStatus["Abandoned"] = 4] = "Abandoned"; +})(ReleaseStatus = exports.ReleaseStatus || (exports.ReleaseStatus = {})); +var ReleaseTriggerType; +(function (ReleaseTriggerType) { /** - * Pull request merge failed. + * Release trigger type not set. */ - PullRequestAsyncStatus[PullRequestAsyncStatus["Failure"] = 5] = "Failure"; -})(PullRequestAsyncStatus = exports.PullRequestAsyncStatus || (exports.PullRequestAsyncStatus = {})); -/** - * The specific type of a pull request merge failure. - */ -var PullRequestMergeFailureType; -(function (PullRequestMergeFailureType) { + ReleaseTriggerType[ReleaseTriggerType["Undefined"] = 0] = "Undefined"; /** - * Type is not set. Default type. + * Artifact based release trigger. */ - PullRequestMergeFailureType[PullRequestMergeFailureType["None"] = 0] = "None"; + ReleaseTriggerType[ReleaseTriggerType["ArtifactSource"] = 1] = "ArtifactSource"; /** - * Pull request merge failure type unknown. + * Schedule based release trigger. */ - PullRequestMergeFailureType[PullRequestMergeFailureType["Unknown"] = 1] = "Unknown"; + ReleaseTriggerType[ReleaseTriggerType["Schedule"] = 2] = "Schedule"; /** - * Pull request merge failed due to case mismatch. + * Source repository based release trigger. */ - PullRequestMergeFailureType[PullRequestMergeFailureType["CaseSensitive"] = 2] = "CaseSensitive"; + ReleaseTriggerType[ReleaseTriggerType["SourceRepo"] = 3] = "SourceRepo"; /** - * Pull request merge failed due to an object being too large. + * Container image based release trigger. */ - PullRequestMergeFailureType[PullRequestMergeFailureType["ObjectTooLarge"] = 3] = "ObjectTooLarge"; -})(PullRequestMergeFailureType = exports.PullRequestMergeFailureType || (exports.PullRequestMergeFailureType = {})); -/** - * Status of a pull request. - */ -var PullRequestStatus; -(function (PullRequestStatus) { + ReleaseTriggerType[ReleaseTriggerType["ContainerImage"] = 4] = "ContainerImage"; /** - * Status not set. Default state. + * Package based release trigger. */ - PullRequestStatus[PullRequestStatus["NotSet"] = 0] = "NotSet"; + ReleaseTriggerType[ReleaseTriggerType["Package"] = 5] = "Package"; /** - * Pull request is active. + * Pull request based release trigger. */ - PullRequestStatus[PullRequestStatus["Active"] = 1] = "Active"; + ReleaseTriggerType[ReleaseTriggerType["PullRequest"] = 6] = "PullRequest"; +})(ReleaseTriggerType = exports.ReleaseTriggerType || (exports.ReleaseTriggerType = {})); +var ScheduleDays; +(function (ScheduleDays) { /** - * Pull request is abandoned. + * Scheduled day not set. */ - PullRequestStatus[PullRequestStatus["Abandoned"] = 2] = "Abandoned"; + ScheduleDays[ScheduleDays["None"] = 0] = "None"; /** - * Pull request is completed. + * Scheduled on Monday. */ - PullRequestStatus[PullRequestStatus["Completed"] = 3] = "Completed"; + ScheduleDays[ScheduleDays["Monday"] = 1] = "Monday"; /** - * Used in pull request search criteria to include all statuses. + * Scheduled on Tuesday. */ - PullRequestStatus[PullRequestStatus["All"] = 4] = "All"; -})(PullRequestStatus = exports.PullRequestStatus || (exports.PullRequestStatus = {})); -var RefFavoriteType; -(function (RefFavoriteType) { - RefFavoriteType[RefFavoriteType["Invalid"] = 0] = "Invalid"; - RefFavoriteType[RefFavoriteType["Folder"] = 1] = "Folder"; - RefFavoriteType[RefFavoriteType["Ref"] = 2] = "Ref"; -})(RefFavoriteType = exports.RefFavoriteType || (exports.RefFavoriteType = {})); -/** - * Enumeration that represents the types of IDEs supported. - */ -var SupportedIdeType; -(function (SupportedIdeType) { - SupportedIdeType[SupportedIdeType["Unknown"] = 0] = "Unknown"; - SupportedIdeType[SupportedIdeType["AndroidStudio"] = 1] = "AndroidStudio"; - SupportedIdeType[SupportedIdeType["AppCode"] = 2] = "AppCode"; - SupportedIdeType[SupportedIdeType["CLion"] = 3] = "CLion"; - SupportedIdeType[SupportedIdeType["DataGrip"] = 4] = "DataGrip"; - SupportedIdeType[SupportedIdeType["Eclipse"] = 13] = "Eclipse"; - SupportedIdeType[SupportedIdeType["IntelliJ"] = 5] = "IntelliJ"; - SupportedIdeType[SupportedIdeType["MPS"] = 6] = "MPS"; - SupportedIdeType[SupportedIdeType["PhpStorm"] = 7] = "PhpStorm"; - SupportedIdeType[SupportedIdeType["PyCharm"] = 8] = "PyCharm"; - SupportedIdeType[SupportedIdeType["RubyMine"] = 9] = "RubyMine"; - SupportedIdeType[SupportedIdeType["Tower"] = 10] = "Tower"; - SupportedIdeType[SupportedIdeType["VisualStudio"] = 11] = "VisualStudio"; - SupportedIdeType[SupportedIdeType["VSCode"] = 14] = "VSCode"; - SupportedIdeType[SupportedIdeType["WebStorm"] = 12] = "WebStorm"; -})(SupportedIdeType = exports.SupportedIdeType || (exports.SupportedIdeType = {})); -/** - * Options for Version handling. - */ -var TfvcVersionOption; -(function (TfvcVersionOption) { + ScheduleDays[ScheduleDays["Tuesday"] = 2] = "Tuesday"; /** - * None. + * Scheduled on Wednesday. */ - TfvcVersionOption[TfvcVersionOption["None"] = 0] = "None"; + ScheduleDays[ScheduleDays["Wednesday"] = 4] = "Wednesday"; /** - * Return the previous version. + * Scheduled on Thursday. */ - TfvcVersionOption[TfvcVersionOption["Previous"] = 1] = "Previous"; + ScheduleDays[ScheduleDays["Thursday"] = 8] = "Thursday"; /** - * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier. + * Scheduled on Friday. */ - TfvcVersionOption[TfvcVersionOption["UseRename"] = 2] = "UseRename"; -})(TfvcVersionOption = exports.TfvcVersionOption || (exports.TfvcVersionOption = {})); -/** - * Type of Version object - */ -var TfvcVersionType; -(function (TfvcVersionType) { + ScheduleDays[ScheduleDays["Friday"] = 16] = "Friday"; /** - * Version is treated as a ChangesetId. + * Scheduled on Saturday. */ - TfvcVersionType[TfvcVersionType["None"] = 0] = "None"; + ScheduleDays[ScheduleDays["Saturday"] = 32] = "Saturday"; /** - * Version is treated as a ChangesetId. + * Scheduled on Sunday. */ - TfvcVersionType[TfvcVersionType["Changeset"] = 1] = "Changeset"; + ScheduleDays[ScheduleDays["Sunday"] = 64] = "Sunday"; /** - * Version is treated as a Shelveset name and owner. + * Scheduled on all the days in week. */ - TfvcVersionType[TfvcVersionType["Shelveset"] = 2] = "Shelveset"; + ScheduleDays[ScheduleDays["All"] = 127] = "All"; +})(ScheduleDays = exports.ScheduleDays || (exports.ScheduleDays = {})); +var SenderType; +(function (SenderType) { + SenderType[SenderType["ServiceAccount"] = 1] = "ServiceAccount"; + SenderType[SenderType["RequestingUser"] = 2] = "RequestingUser"; +})(SenderType = exports.SenderType || (exports.SenderType = {})); +var SingleReleaseExpands; +(function (SingleReleaseExpands) { /** - * Version is treated as a Change. + * Return top level properties of object. */ - TfvcVersionType[TfvcVersionType["Change"] = 3] = "Change"; + SingleReleaseExpands[SingleReleaseExpands["None"] = 0] = "None"; /** - * Version is treated as a Date. + * Expand release with tasks. */ - TfvcVersionType[TfvcVersionType["Date"] = 4] = "Date"; + SingleReleaseExpands[SingleReleaseExpands["Tasks"] = 1] = "Tasks"; +})(SingleReleaseExpands = exports.SingleReleaseExpands || (exports.SingleReleaseExpands = {})); +var TaskStatus; +(function (TaskStatus) { /** - * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used. + * The task does not have the status set. */ - TfvcVersionType[TfvcVersionType["Latest"] = 5] = "Latest"; + TaskStatus[TaskStatus["Unknown"] = 0] = "Unknown"; /** - * Version will be treated as a Tip, if no version is defined latest will be used. + * The task is in pending status. */ - TfvcVersionType[TfvcVersionType["Tip"] = 6] = "Tip"; + TaskStatus[TaskStatus["Pending"] = 1] = "Pending"; /** - * Version will be treated as a MergeSource. + * The task is currently in progress. */ - TfvcVersionType[TfvcVersionType["MergeSource"] = 7] = "MergeSource"; -})(TfvcVersionType = exports.TfvcVersionType || (exports.TfvcVersionType = {})); -var VersionControlChangeType; -(function (VersionControlChangeType) { - VersionControlChangeType[VersionControlChangeType["None"] = 0] = "None"; - VersionControlChangeType[VersionControlChangeType["Add"] = 1] = "Add"; - VersionControlChangeType[VersionControlChangeType["Edit"] = 2] = "Edit"; - VersionControlChangeType[VersionControlChangeType["Encoding"] = 4] = "Encoding"; - VersionControlChangeType[VersionControlChangeType["Rename"] = 8] = "Rename"; - VersionControlChangeType[VersionControlChangeType["Delete"] = 16] = "Delete"; - VersionControlChangeType[VersionControlChangeType["Undelete"] = 32] = "Undelete"; - VersionControlChangeType[VersionControlChangeType["Branch"] = 64] = "Branch"; - VersionControlChangeType[VersionControlChangeType["Merge"] = 128] = "Merge"; - VersionControlChangeType[VersionControlChangeType["Lock"] = 256] = "Lock"; - VersionControlChangeType[VersionControlChangeType["Rollback"] = 512] = "Rollback"; - VersionControlChangeType[VersionControlChangeType["SourceRename"] = 1024] = "SourceRename"; - VersionControlChangeType[VersionControlChangeType["TargetRename"] = 2048] = "TargetRename"; - VersionControlChangeType[VersionControlChangeType["Property"] = 4096] = "Property"; - VersionControlChangeType[VersionControlChangeType["All"] = 8191] = "All"; -})(VersionControlChangeType = exports.VersionControlChangeType || (exports.VersionControlChangeType = {})); -var VersionControlRecursionType; -(function (VersionControlRecursionType) { + TaskStatus[TaskStatus["InProgress"] = 2] = "InProgress"; /** - * Only return the specified item. + * The task completed successfully. */ - VersionControlRecursionType[VersionControlRecursionType["None"] = 0] = "None"; + TaskStatus[TaskStatus["Success"] = 3] = "Success"; /** - * Return the specified item and its direct children. + * The task execution failed. */ - VersionControlRecursionType[VersionControlRecursionType["OneLevel"] = 1] = "OneLevel"; + TaskStatus[TaskStatus["Failure"] = 4] = "Failure"; /** - * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. + * The task execution canceled. */ - VersionControlRecursionType[VersionControlRecursionType["OneLevelPlusNestedEmptyFolders"] = 4] = "OneLevelPlusNestedEmptyFolders"; + TaskStatus[TaskStatus["Canceled"] = 5] = "Canceled"; /** - * Return specified item and all descendants + * The task execution skipped. */ - VersionControlRecursionType[VersionControlRecursionType["Full"] = 120] = "Full"; -})(VersionControlRecursionType = exports.VersionControlRecursionType || (exports.VersionControlRecursionType = {})); + TaskStatus[TaskStatus["Skipped"] = 6] = "Skipped"; + /** + * The task completed successfully. + */ + TaskStatus[TaskStatus["Succeeded"] = 7] = "Succeeded"; + /** + * The task execution failed. + */ + TaskStatus[TaskStatus["Failed"] = 8] = "Failed"; + /** + * The task execution partially succeeded. + */ + TaskStatus[TaskStatus["PartiallySucceeded"] = 9] = "PartiallySucceeded"; +})(TaskStatus = exports.TaskStatus || (exports.TaskStatus = {})); +var VariableGroupActionFilter; +(function (VariableGroupActionFilter) { + VariableGroupActionFilter[VariableGroupActionFilter["None"] = 0] = "None"; + VariableGroupActionFilter[VariableGroupActionFilter["Manage"] = 2] = "Manage"; + VariableGroupActionFilter[VariableGroupActionFilter["Use"] = 16] = "Use"; +})(VariableGroupActionFilter = exports.VariableGroupActionFilter || (exports.VariableGroupActionFilter = {})); +var YamlFileSourceTypes; +(function (YamlFileSourceTypes) { + YamlFileSourceTypes[YamlFileSourceTypes["None"] = 0] = "None"; + YamlFileSourceTypes[YamlFileSourceTypes["TFSGit"] = 1] = "TFSGit"; +})(YamlFileSourceTypes = exports.YamlFileSourceTypes || (exports.YamlFileSourceTypes = {})); exports.TypeInfo = { - Attachment: {}, - Change: {}, - ChangeList: {}, - Comment: {}, - CommentThread: {}, - CommentThreadStatus: { + AgentArtifactDefinition: {}, + AgentArtifactType: { enumValues: { - "unknown": 0, - "active": 1, - "fixed": 2, - "wontFix": 3, - "closed": 4, - "byDesign": 5, - "pending": 6 + "xamlBuild": 0, + "build": 1, + "jenkins": 2, + "fileShare": 3, + "nuget": 4, + "tfsOnPrem": 5, + "gitHub": 6, + "tfGit": 7, + "externalTfsBuild": 8, + "custom": 9, + "tfvc": 10 } }, - CommentType: { + AgentBasedDeployPhase: {}, + AgentDeploymentInput: {}, + ApprovalExecutionOrder: { enumValues: { - "unknown": 0, - "text": 1, - "codeChange": 2, - "system": 3 + "beforeGates": 1, + "afterSuccessfulGates": 2, + "afterGatesAlways": 4 } }, - FileDiff: {}, - GitAnnotatedTag: {}, - GitAsyncOperationStatus: { + ApprovalFilters: { enumValues: { - "queued": 1, - "inProgress": 2, - "completed": 3, - "failed": 4, - "abandoned": 5 + "none": 0, + "manualApprovals": 1, + "automatedApprovals": 2, + "approvalSnapshots": 4, + "all": 7 } }, - GitAsyncRefOperation: {}, - GitAsyncRefOperationDetail: {}, - GitAsyncRefOperationFailureStatus: { + ApprovalOptions: {}, + ApprovalStatus: { enumValues: { - "none": 0, - "invalidRefName": 1, - "refNameConflict": 2, - "createBranchPermissionRequired": 3, - "writePermissionRequired": 4, - "targetBranchDeleted": 5, - "gitObjectTooLarge": 6, - "operationIndentityNotFound": 7, - "asyncOperationNotFound": 8, - "other": 9, - "emptyCommitterSignature": 10 + "undefined": 0, + "pending": 1, + "approved": 2, + "rejected": 4, + "reassigned": 6, + "canceled": 7, + "skipped": 8 } }, - GitAsyncRefOperationParameters: {}, - GitAsyncRefOperationSource: {}, - GitBaseVersionDescriptor: {}, - GitBranchStats: {}, - GitChange: {}, - GitCherryPick: {}, - GitCommit: {}, - GitCommitChanges: {}, - GitCommitDiffs: {}, - GitCommitRef: {}, - GitCommitToCreate: {}, - GitConflict: {}, - GitConflictAddAdd: {}, - GitConflictAddRename: {}, - GitConflictDeleteEdit: {}, - GitConflictDeleteRename: {}, - GitConflictDirectoryFile: {}, - GitConflictEditDelete: {}, - GitConflictEditEdit: {}, - GitConflictFileDirectory: {}, - GitConflictRename1to2: {}, - GitConflictRename2to1: {}, - GitConflictRenameAdd: {}, - GitConflictRenameDelete: {}, - GitConflictRenameRename: {}, - GitConflictType: { + ApprovalType: { enumValues: { - "none": 0, - "addAdd": 1, - "addRename": 2, - "deleteEdit": 3, - "deleteRename": 4, - "directoryFile": 5, - "directoryChild": 6, - "editDelete": 7, - "editEdit": 8, - "fileDirectory": 9, - "rename1to2": 10, - "rename2to1": 11, - "renameAdd": 12, - "renameDelete": 13, - "renameRename": 14 + "undefined": 0, + "preDeploy": 1, + "postDeploy": 2, + "all": 3 } }, - GitConflictUpdateResult: {}, - GitConflictUpdateStatus: { + ArtifactContributionDefinition: {}, + ArtifactMetadata: {}, + ArtifactSourceTrigger: {}, + ArtifactTypeDefinition: {}, + ArtifactVersion: {}, + ArtifactVersionQueryResult: {}, + AuditAction: { enumValues: { - "succeeded": 0, - "badRequest": 1, - "invalidResolution": 2, - "unsupportedConflictType": 3, - "notFound": 4 + "add": 1, + "update": 2, + "delete": 3, + "undelete": 4 } }, - GitDeletedRepository: {}, - GitForkRef: {}, - GitForkSyncRequest: {}, - GitForkTeamProjectReference: {}, - GitHistoryMode: { + AuthorizationHeaderFor: { enumValues: { - "simplifiedHistory": 0, - "firstParent": 1, - "fullHistory": 2, - "fullHistorySimplifyMerges": 3 + "revalidateApproverIdentity": 0, + "onBehalfOf": 1 } }, - GitImportFailedEvent: {}, - GitImportRequest: {}, - GitImportSucceededEvent: {}, - GitItem: {}, - GitItemDescriptor: {}, - GitItemRequestData: {}, - GitLastChangeTreeItems: {}, - GitMerge: {}, - GitObject: {}, - GitObjectType: { + AutoTriggerIssue: {}, + AzureKeyVaultVariableGroupProviderData: {}, + AzureKeyVaultVariableValue: {}, + BuildVersion: {}, + Change: {}, + CodeRepositoryReference: {}, + Condition: {}, + ConditionType: { enumValues: { - "bad": 0, - "commit": 1, - "tree": 2, - "blob": 3, - "tag": 4, - "ext2": 5, - "ofsDelta": 6, - "refDelta": 7 + "undefined": 0, + "event": 1, + "environmentState": 2, + "artifact": 4 } }, - GitPathAction: {}, - GitPathActions: { + ContainerImageTrigger: {}, + ContinuousDeploymentTriggerIssue: {}, + Deployment: {}, + DeploymentApprovalCompletedEvent: {}, + DeploymentApprovalPendingEvent: {}, + DeploymentAttempt: {}, + DeploymentAuthorizationInfo: {}, + DeploymentAuthorizationOwner: { + enumValues: { + "automatic": 0, + "deploymentSubmitter": 1, + "firstPreDeploymentApprover": 2 + } + }, + DeploymentCompletedEvent: {}, + DeploymentExpands: { + enumValues: { + "all": 0, + "deploymentOnly": 1, + "approvals": 2, + "artifacts": 4 + } + }, + DeploymentJob: {}, + DeploymentManualInterventionPendingEvent: {}, + DeploymentOperationStatus: { + enumValues: { + "undefined": 0, + "queued": 1, + "scheduled": 2, + "pending": 4, + "approved": 8, + "rejected": 16, + "deferred": 32, + "queuedForAgent": 64, + "phaseInProgress": 128, + "phaseSucceeded": 256, + "phasePartiallySucceeded": 512, + "phaseFailed": 1024, + "canceled": 2048, + "phaseCanceled": 4096, + "manualInterventionPending": 8192, + "queuedForPipeline": 16384, + "cancelling": 32768, + "evaluatingGates": 65536, + "gateFailed": 131072, + "all": 258047 + } + }, + DeploymentQueryParameters: {}, + DeploymentReason: { enumValues: { "none": 0, - "edit": 1, - "delete": 2, - "add": 3, - "rename": 4 + "manual": 1, + "automated": 2, + "scheduled": 4, + "redeployTrigger": 8 } }, - GitPathToItemsCollection: {}, - GitPolicyConfigurationResponse: {}, - GitPullRequest: {}, - GitPullRequestChange: {}, - GitPullRequestCommentThread: {}, - GitPullRequestCompletionOptions: {}, - GitPullRequestIteration: {}, - GitPullRequestIterationChanges: {}, - GitPullRequestMergeStrategy: { + DeploymentsQueryType: { enumValues: { - "noFastForward": 1, - "squash": 2, - "rebase": 3, - "rebaseMerge": 4 + "regular": 1, + "failingSince": 2 } }, - GitPullRequestQuery: {}, - GitPullRequestQueryInput: {}, - GitPullRequestQueryType: { + DeploymentStartedEvent: {}, + DeploymentStatus: { enumValues: { - "notSet": 0, - "lastMergeCommit": 1, - "commit": 2 + "undefined": 0, + "notDeployed": 1, + "inProgress": 2, + "succeeded": 4, + "partiallySucceeded": 8, + "failed": 16, + "all": 31 } }, - GitPullRequestReviewFileType: { + DeployPhase: {}, + DeployPhaseStatus: { enumValues: { - "changeEntry": 0, - "attachment": 1 + "undefined": 0, + "notStarted": 1, + "inProgress": 2, + "partiallySucceeded": 4, + "succeeded": 8, + "failed": 16, + "canceled": 32, + "skipped": 64, + "cancelling": 128 } }, - GitPullRequestSearchCriteria: {}, - GitPullRequestStatus: {}, - GitPush: {}, - GitPushEventData: {}, - GitPushRef: {}, - GitPushSearchCriteria: {}, - GitQueryBranchStatsCriteria: {}, - GitQueryCommitsCriteria: {}, - GitQueryRefsCriteria: {}, - GitRef: {}, - GitRefFavorite: {}, - GitRefSearchType: { + DeployPhaseTypes: { enumValues: { - "exact": 0, - "startsWith": 1, - "contains": 2 + "undefined": 0, + "agentBasedDeployment": 1, + "runOnServer": 2, + "machineGroupBasedDeployment": 4, + "deploymentGates": 8 } }, - GitRefUpdateMode: { + EnvironmentStatus: { enumValues: { - "bestEffort": 0, - "allOrNone": 1 + "undefined": 0, + "notStarted": 1, + "inProgress": 2, + "succeeded": 4, + "canceled": 8, + "rejected": 16, + "queued": 32, + "scheduled": 64, + "partiallySucceeded": 128 } }, - GitRefUpdateResult: {}, - GitRefUpdateStatus: { + EnvironmentTrigger: {}, + EnvironmentTriggerType: { enumValues: { - "succeeded": 0, - "forcePushRequired": 1, - "staleOldObjectId": 2, - "invalidRefName": 3, - "unprocessed": 4, - "unresolvableToCommit": 5, - "writePermissionRequired": 6, - "manageNotePermissionRequired": 7, - "createBranchPermissionRequired": 8, - "createTagPermissionRequired": 9, - "rejectedByPlugin": 10, - "locked": 11, - "refNameConflict": 12, - "rejectedByPolicy": 13, - "succeededNonExistentRef": 14, - "succeededCorruptRef": 15 + "undefined": 0, + "deploymentGroupRedeploy": 1, + "rollbackRedeploy": 2 } }, - GitRepository: {}, - GitRepositoryCreateOptions: {}, - GitRepositoryRef: {}, - GitResolutionError: { + ExecutionInput: {}, + Folder: {}, + FolderPathQueryOrder: { enumValues: { "none": 0, - "mergeContentNotFound": 1, - "pathInUse": 2, - "invalidPath": 3, - "unknownAction": 4, - "unknownMergeType": 5, - "otherError": 255 + "ascending": 1, + "descending": 2 } }, - GitResolutionMergeContent: {}, - GitResolutionMergeType: { + GatesDeployPhase: {}, + GateStatus: { enumValues: { - "undecided": 0, - "takeSourceContent": 1, - "takeTargetContent": 2, - "autoMerged": 3, - "userMerged": 4 + "none": 0, + "pending": 1, + "inProgress": 2, + "succeeded": 4, + "failed": 8, + "canceled": 16 } }, - GitResolutionPathConflict: {}, - GitResolutionPathConflictAction: { + IgnoredGate: {}, + IssueSource: { enumValues: { - "undecided": 0, - "keepSourceRenameTarget": 1, - "keepSourceDeleteTarget": 2, - "keepTargetRenameSource": 3, - "keepTargetDeleteSource": 4 + "none": 0, + "user": 1, + "system": 2 } }, - GitResolutionPickOneAction: {}, - GitResolutionRename1to2: {}, - GitResolutionRename1to2Action: { + MachineGroupBasedDeployPhase: {}, + MailMessage: {}, + MailSectionType: { enumValues: { - "undecided": 0, - "keepSourcePath": 1, - "keepTargetPath": 2, - "keepBothFiles": 3 + "details": 0, + "environments": 1, + "issues": 2, + "testResults": 3, + "workItems": 4, + "releaseInfo": 5 } }, - GitResolutionStatus: { + ManualIntervention: {}, + ManualInterventionStatus: { enumValues: { - "unresolved": 0, - "partiallyResolved": 1, - "resolved": 2 + "unknown": 0, + "pending": 1, + "rejected": 2, + "approved": 4, + "canceled": 8 } }, - GitResolutionWhichAction: { + ManualInterventionUpdateMetadata: {}, + MultiConfigInput: {}, + MultiMachineInput: {}, + PackageTrigger: {}, + ParallelExecutionInputBase: {}, + ParallelExecutionTypes: { enumValues: { - "undecided": 0, - "pickSourceAction": 1, - "pickTargetAction": 2 + "none": 0, + "multiConfiguration": 1, + "multiMachine": 2 } }, - GitRevert: {}, - GitStatus: {}, - GitStatusState: { + PipelineProcess: {}, + PipelineProcessTypes: { enumValues: { - "notSet": 0, - "pending": 1, - "succeeded": 2, - "failed": 3, - "error": 4, - "notApplicable": 5 + "designer": 1, + "yaml": 2 + } + }, + PropertySelector: {}, + PropertySelectorType: { + enumValues: { + "inclusion": 0, + "exclusion": 1 + } + }, + PullRequestConfiguration: {}, + PullRequestSystemType: { + enumValues: { + "none": 0, + "tfsGit": 1, + "gitHub": 2 } }, - GitTargetVersionDescriptor: {}, - GitTreeDiff: {}, - GitTreeDiffEntry: {}, - GitTreeDiffResponse: {}, - GitTreeEntryRef: {}, - GitTreeRef: {}, - GitUserDate: {}, - GitVersionDescriptor: {}, - GitVersionOptions: { + PullRequestTrigger: {}, + Release: {}, + ReleaseAbandonedEvent: {}, + ReleaseApproval: {}, + ReleaseApprovalHistory: {}, + ReleaseApprovalPendingEvent: {}, + ReleaseCondition: {}, + ReleaseCreatedEvent: {}, + ReleaseDefinition: {}, + ReleaseDefinitionApprovals: {}, + ReleaseDefinitionEnvironment: {}, + ReleaseDefinitionEnvironmentTemplate: {}, + ReleaseDefinitionExpands: { enumValues: { "none": 0, - "previousChange": 1, - "firstParent": 2 + "environments": 2, + "artifacts": 4, + "triggers": 8, + "variables": 16, + "tags": 32, + "lastRelease": 64 } }, - GitVersionType: { + ReleaseDefinitionQueryOrder: { enumValues: { - "branch": 0, - "tag": 1, - "commit": 2 + "idAscending": 0, + "idDescending": 1, + "nameAscending": 2, + "nameDescending": 3 } }, - HistoryEntry: {}, - IncludedGitCommit: {}, - ItemContent: {}, - ItemContentType: { + ReleaseDefinitionRevision: {}, + ReleaseDefinitionSource: { enumValues: { - "rawText": 0, - "base64Encoded": 1 + "undefined": 0, + "restApi": 1, + "userInterface": 2, + "ibiza": 4, + "portalExtensionApi": 8 } }, - ItemDetailsOptions: {}, - IterationReason: { + ReleaseDefinitionSummary: {}, + ReleaseDeployPhase: {}, + ReleaseEnvironment: {}, + ReleaseEnvironmentCompletedEvent: {}, + ReleaseEnvironmentExpands: { enumValues: { - "push": 0, - "forcePush": 1, - "create": 2, - "rebase": 4, - "unknown": 8, - "retarget": 16, - "resolveConflicts": 32 + "none": 0, + "tasks": 1 } }, - LineDiffBlock: {}, - LineDiffBlockChangeType: { + ReleaseEnvironmentStatusUpdatedEvent: {}, + ReleaseEnvironmentUpdateMetadata: {}, + ReleaseExpands: { enumValues: { "none": 0, - "add": 1, - "delete": 2, - "edit": 3 + "environments": 2, + "artifacts": 4, + "approvals": 8, + "manualInterventions": 16, + "variables": 32, + "tags": 64 } }, - PullRequestAsyncStatus: { + ReleaseGates: {}, + ReleaseGatesPhase: {}, + ReleaseNotCreatedEvent: {}, + ReleaseQueryOrder: { enumValues: { - "notSet": 0, - "queued": 1, - "conflicts": 2, - "succeeded": 3, - "rejectedByPolicy": 4, - "failure": 5 + "descending": 0, + "ascending": 1 } }, - PullRequestMergeFailureType: { + ReleaseReason: { enumValues: { "none": 0, - "unknown": 1, - "caseSensitive": 2, - "objectTooLarge": 3 + "manual": 1, + "continuousIntegration": 2, + "schedule": 3, + "pullRequest": 4 } }, - PullRequestStatus: { + ReleaseReference: {}, + ReleaseRevision: {}, + ReleaseSchedule: {}, + ReleaseStartMetadata: {}, + ReleaseStatus: { enumValues: { - "notSet": 0, - "active": 1, - "abandoned": 2, - "completed": 3, - "all": 4 + "undefined": 0, + "draft": 1, + "active": 2, + "abandoned": 4 } }, - RefFavoriteType: { + ReleaseTask: {}, + ReleaseTaskAttachment: {}, + ReleaseTasksUpdatedEvent: {}, + ReleaseTriggerBase: {}, + ReleaseTriggerType: { enumValues: { - "invalid": 0, - "folder": 1, - "ref": 2 + "undefined": 0, + "artifactSource": 1, + "schedule": 2, + "sourceRepo": 3, + "containerImage": 4, + "package": 5, + "pullRequest": 6 } }, - SupportedIde: {}, - SupportedIdeType: { + ReleaseUpdatedEvent: {}, + ReleaseUpdateMetadata: {}, + RunOnServerDeployPhase: {}, + ScheduleDays: { enumValues: { - "unknown": 0, - "androidStudio": 1, - "appCode": 2, - "cLion": 3, - "dataGrip": 4, - "eclipse": 13, - "intelliJ": 5, - "mps": 6, - "phpStorm": 7, - "pyCharm": 8, - "rubyMine": 9, - "tower": 10, - "visualStudio": 11, - "vsCode": 14, - "webStorm": 12 + "none": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 4, + "thursday": 8, + "friday": 16, + "saturday": 32, + "sunday": 64, + "all": 127 } }, - TfvcBranch: {}, - TfvcBranchRef: {}, - TfvcChange: {}, - TfvcChangeset: {}, - TfvcChangesetRef: {}, - TfvcCheckinEventData: {}, - TfvcHistoryEntry: {}, - TfvcItem: {}, - TfvcItemDescriptor: {}, - TfvcItemPreviousHash: {}, - TfvcItemRequestData: {}, - TfvcLabel: {}, - TfvcLabelRef: {}, - TfvcShelveset: {}, - TfvcShelvesetRef: {}, - TfvcVersionDescriptor: {}, - TfvcVersionOption: { + ScheduledReleaseTrigger: {}, + SenderType: { enumValues: { - "none": 0, - "previous": 1, - "useRename": 2 + "serviceAccount": 1, + "requestingUser": 2 } }, - TfvcVersionType: { + ServerDeploymentInput: {}, + SingleReleaseExpands: { enumValues: { "none": 0, - "changeset": 1, - "shelveset": 2, - "change": 3, - "date": 4, - "latest": 5, - "tip": 6, - "mergeSource": 7 + "tasks": 1 } }, - UpdateRefsRequest: {}, - VersionControlChangeType: { + SourcePullRequestVersion: {}, + SourceRepoTrigger: {}, + SummaryMailSection: {}, + TaskStatus: { + enumValues: { + "unknown": 0, + "pending": 1, + "inProgress": 2, + "success": 3, + "failure": 4, + "canceled": 5, + "skipped": 6, + "succeeded": 7, + "failed": 8, + "partiallySucceeded": 9 + } + }, + VariableGroup: {}, + VariableGroupActionFilter: { enumValues: { "none": 0, - "add": 1, - "edit": 2, - "encoding": 4, - "rename": 8, - "delete": 16, - "undelete": 32, - "branch": 64, - "merge": 128, - "lock": 256, - "rollback": 512, - "sourceRename": 1024, - "targetRename": 2048, - "property": 4096, - "all": 8191 + "manage": 2, + "use": 16 } }, - VersionControlProjectInfo: {}, - VersionControlRecursionType: { + YamlFileSource: {}, + YamlFileSourceTypes: { enumValues: { "none": 0, - "oneLevel": 1, - "oneLevelPlusNestedEmptyFolders": 4, - "full": 120 + "tfsGit": 1 } }, + YamlPipelineProcess: {}, }; -exports.TypeInfo.Attachment.fields = { - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.Change.fields = { - changeType: { - enumType: exports.TypeInfo.VersionControlChangeType - }, - newContent: { - typeInfo: exports.TypeInfo.ItemContent +exports.TypeInfo.AgentArtifactDefinition.fields = { + artifactType: { + enumType: exports.TypeInfo.AgentArtifactType } }; -exports.TypeInfo.ChangeList.fields = { - changeCounts: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.VersionControlChangeType, - }, - creationDate: { - isDate: true, +exports.TypeInfo.AgentBasedDeployPhase.fields = { + deploymentInput: { + typeInfo: exports.TypeInfo.AgentDeploymentInput }, - sortDate: { - isDate: true, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes } }; -exports.TypeInfo.Comment.fields = { - commentType: { - enumType: exports.TypeInfo.CommentType - }, - lastContentUpdatedDate: { - isDate: true, - }, - lastUpdatedDate: { - isDate: true, - }, - publishedDate: { - isDate: true, +exports.TypeInfo.AgentDeploymentInput.fields = { + parallelExecution: { + typeInfo: exports.TypeInfo.ExecutionInput } }; -exports.TypeInfo.CommentThread.fields = { - comments: { - isArray: true, - typeInfo: exports.TypeInfo.Comment - }, - lastUpdatedDate: { - isDate: true, - }, - publishedDate: { - isDate: true, - }, - status: { - enumType: exports.TypeInfo.CommentThreadStatus +exports.TypeInfo.ApprovalOptions.fields = { + executionOrder: { + enumType: exports.TypeInfo.ApprovalExecutionOrder } }; -exports.TypeInfo.FileDiff.fields = { - lineDiffBlocks: { +exports.TypeInfo.ArtifactContributionDefinition.fields = { + inputDescriptors: { isArray: true, - typeInfo: exports.TypeInfo.LineDiffBlock + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor } }; -exports.TypeInfo.GitAnnotatedTag.fields = { - taggedBy: { - typeInfo: exports.TypeInfo.GitUserDate - }, - taggedObject: { - typeInfo: exports.TypeInfo.GitObject +exports.TypeInfo.ArtifactMetadata.fields = { + instanceReference: { + typeInfo: exports.TypeInfo.BuildVersion } }; -exports.TypeInfo.GitAsyncRefOperation.fields = { - detailedStatus: { - typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail - }, - parameters: { - typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters - }, - status: { - enumType: exports.TypeInfo.GitAsyncOperationStatus +exports.TypeInfo.ArtifactSourceTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType } }; -exports.TypeInfo.GitAsyncRefOperationDetail.fields = { - status: { - enumType: exports.TypeInfo.GitAsyncRefOperationFailureStatus +exports.TypeInfo.ArtifactTypeDefinition.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor } }; -exports.TypeInfo.GitAsyncRefOperationParameters.fields = { - repository: { - typeInfo: exports.TypeInfo.GitRepository +exports.TypeInfo.ArtifactVersion.fields = { + defaultVersion: { + typeInfo: exports.TypeInfo.BuildVersion }, - source: { - typeInfo: exports.TypeInfo.GitAsyncRefOperationSource + versions: { + isArray: true, + typeInfo: exports.TypeInfo.BuildVersion } }; -exports.TypeInfo.GitAsyncRefOperationSource.fields = { - commitList: { +exports.TypeInfo.ArtifactVersionQueryResult.fields = { + artifactVersions: { isArray: true, - typeInfo: exports.TypeInfo.GitCommitRef + typeInfo: exports.TypeInfo.ArtifactVersion } }; -exports.TypeInfo.GitBaseVersionDescriptor.fields = { - baseVersionOptions: { - enumType: exports.TypeInfo.GitVersionOptions - }, - baseVersionType: { - enumType: exports.TypeInfo.GitVersionType - }, - versionOptions: { - enumType: exports.TypeInfo.GitVersionOptions +exports.TypeInfo.AutoTriggerIssue.fields = { + issueSource: { + enumType: exports.TypeInfo.IssueSource }, - versionType: { - enumType: exports.TypeInfo.GitVersionType + releaseTriggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType } }; -exports.TypeInfo.GitBranchStats.fields = { - commit: { - typeInfo: exports.TypeInfo.GitCommitRef +exports.TypeInfo.AzureKeyVaultVariableGroupProviderData.fields = { + lastRefreshedOn: { + isDate: true, } }; -exports.TypeInfo.GitChange.fields = { - changeType: { - enumType: exports.TypeInfo.VersionControlChangeType - }, - newContent: { - typeInfo: exports.TypeInfo.ItemContent +exports.TypeInfo.AzureKeyVaultVariableValue.fields = { + expires: { + isDate: true, } }; -exports.TypeInfo.GitCherryPick.fields = { - detailedStatus: { - typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail - }, - parameters: { - typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters - }, - status: { - enumType: exports.TypeInfo.GitAsyncOperationStatus +exports.TypeInfo.BuildVersion.fields = { + sourcePullRequestVersion: { + typeInfo: exports.TypeInfo.SourcePullRequestVersion } }; -exports.TypeInfo.GitCommit.fields = { - author: { - typeInfo: exports.TypeInfo.GitUserDate - }, - changes: { - isArray: true, - typeInfo: exports.TypeInfo.GitChange - }, - committer: { - typeInfo: exports.TypeInfo.GitUserDate - }, - push: { - typeInfo: exports.TypeInfo.GitPushRef - }, - statuses: { - isArray: true, - typeInfo: exports.TypeInfo.GitStatus +exports.TypeInfo.Change.fields = { + timestamp: { + isDate: true, } }; -exports.TypeInfo.GitCommitChanges.fields = { - changes: { - isArray: true, - typeInfo: exports.TypeInfo.GitChange +exports.TypeInfo.CodeRepositoryReference.fields = { + systemType: { + enumType: exports.TypeInfo.PullRequestSystemType } }; -exports.TypeInfo.GitCommitDiffs.fields = { - changeCounts: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.VersionControlChangeType, - }, - changes: { - isArray: true, - typeInfo: exports.TypeInfo.GitChange +exports.TypeInfo.Condition.fields = { + conditionType: { + enumType: exports.TypeInfo.ConditionType } }; -exports.TypeInfo.GitCommitRef.fields = { - author: { - typeInfo: exports.TypeInfo.GitUserDate - }, - changes: { - isArray: true, - typeInfo: exports.TypeInfo.GitChange - }, - committer: { - typeInfo: exports.TypeInfo.GitUserDate - }, - push: { - typeInfo: exports.TypeInfo.GitPushRef - }, - statuses: { - isArray: true, - typeInfo: exports.TypeInfo.GitStatus +exports.TypeInfo.ContainerImageTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType } }; -exports.TypeInfo.GitCommitToCreate.fields = { - baseRef: { - typeInfo: exports.TypeInfo.GitRef +exports.TypeInfo.ContinuousDeploymentTriggerIssue.fields = { + issueSource: { + enumType: exports.TypeInfo.IssueSource }, - pathActions: { - isArray: true, - typeInfo: exports.TypeInfo.GitPathAction + releaseTriggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType } }; -exports.TypeInfo.GitConflict.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError - }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus - }, - resolvedDate: { +exports.TypeInfo.Deployment.fields = { + completedOn: { isDate: true, - } -}; -exports.TypeInfo.GitConflictAddAdd.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionMergeContent }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.Condition }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus + deploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus }, - resolvedDate: { + lastModifiedOn: { isDate: true, - } -}; -exports.TypeInfo.GitConflictAddRename.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPathConflict + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError + postDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus + preDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval }, - resolvedDate: { + queuedOn: { isDate: true, - } -}; -exports.TypeInfo.GitConflictDeleteEdit.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPickOneAction - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError + reason: { + enumType: exports.TypeInfo.DeploymentReason }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus + release: { + typeInfo: exports.TypeInfo.ReleaseReference }, - resolvedDate: { + scheduledDeploymentTime: { isDate: true, - } -}; -exports.TypeInfo.GitConflictDeleteRename.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPickOneAction - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError - }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus - }, - resolvedDate: { + startedOn: { isDate: true, } }; -exports.TypeInfo.GitConflictDirectoryFile.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPathConflict - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError - }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus - }, - resolvedDate: { - isDate: true, +exports.TypeInfo.DeploymentApprovalCompletedEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval }, - sourceTree: { - typeInfo: exports.TypeInfo.GitTreeRef + release: { + typeInfo: exports.TypeInfo.Release } }; -exports.TypeInfo.GitConflictEditDelete.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef +exports.TypeInfo.DeploymentApprovalPendingEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + approvalOptions: { + typeInfo: exports.TypeInfo.ApprovalOptions }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPickOneAction + completedApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError + deployment: { + typeInfo: exports.TypeInfo.Deployment }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus + pendingApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval }, - resolvedDate: { - isDate: true, + release: { + typeInfo: exports.TypeInfo.Release } }; -exports.TypeInfo.GitConflictEditEdit.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionMergeContent - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError - }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus +exports.TypeInfo.DeploymentAttempt.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask }, - resolvedDate: { + lastModifiedOn: { isDate: true, - } -}; -exports.TypeInfo.GitConflictFileDirectory.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + postDeploymentGates: { + typeInfo: exports.TypeInfo.ReleaseGates }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + preDeploymentGates: { + typeInfo: exports.TypeInfo.ReleaseGates }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPathConflict + queuedOn: { + isDate: true, }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError + reason: { + enumType: exports.TypeInfo.DeploymentReason }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus + releaseDeployPhases: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseDeployPhase }, - resolvedDate: { - isDate: true, + status: { + enumType: exports.TypeInfo.DeploymentStatus }, - targetTree: { - typeInfo: exports.TypeInfo.GitTreeRef + tasks: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTask } }; -exports.TypeInfo.GitConflictRename1to2.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionRename1to2 - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError - }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus - }, - resolvedDate: { - isDate: true, +exports.TypeInfo.DeploymentAuthorizationInfo.fields = { + authorizationHeaderFor: { + enumType: exports.TypeInfo.AuthorizationHeaderFor } }; -exports.TypeInfo.GitConflictRename2to1.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPathConflict - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError - }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus +exports.TypeInfo.DeploymentCompletedEvent.fields = { + deployment: { + typeInfo: exports.TypeInfo.Deployment }, - resolvedDate: { - isDate: true, + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment } }; -exports.TypeInfo.GitConflictRenameAdd.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPathConflict - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError - }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus +exports.TypeInfo.DeploymentJob.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask }, - resolvedDate: { - isDate: true, + tasks: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTask } }; -exports.TypeInfo.GitConflictRenameDelete.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef - }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionPickOneAction - }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError +exports.TypeInfo.DeploymentManualInterventionPendingEvent.fields = { + deployment: { + typeInfo: exports.TypeInfo.Deployment }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus + manualIntervention: { + typeInfo: exports.TypeInfo.ManualIntervention }, - resolvedDate: { - isDate: true, + release: { + typeInfo: exports.TypeInfo.Release } }; -exports.TypeInfo.GitConflictRenameRename.fields = { - conflictType: { - enumType: exports.TypeInfo.GitConflictType - }, - mergeBaseCommit: { - typeInfo: exports.TypeInfo.GitCommitRef +exports.TypeInfo.DeploymentQueryParameters.fields = { + deploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus }, - mergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + expands: { + enumType: exports.TypeInfo.DeploymentExpands }, - mergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + maxModifiedTime: { + isDate: true, }, - resolution: { - typeInfo: exports.TypeInfo.GitResolutionMergeContent + minModifiedTime: { + isDate: true, }, - resolutionError: { - enumType: exports.TypeInfo.GitResolutionError + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus }, - resolutionStatus: { - enumType: exports.TypeInfo.GitResolutionStatus + queryOrder: { + enumType: exports.TypeInfo.ReleaseQueryOrder }, - resolvedDate: { - isDate: true, + queryType: { + enumType: exports.TypeInfo.DeploymentsQueryType } }; -exports.TypeInfo.GitConflictUpdateResult.fields = { - updatedConflict: { - typeInfo: exports.TypeInfo.GitConflict +exports.TypeInfo.DeploymentStartedEvent.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment }, - updateStatus: { - enumType: exports.TypeInfo.GitConflictUpdateStatus + release: { + typeInfo: exports.TypeInfo.Release } }; -exports.TypeInfo.GitDeletedRepository.fields = { - createdDate: { - isDate: true, - }, - deletedDate: { - isDate: true, - }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference +exports.TypeInfo.DeployPhase.fields = { + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes } }; -exports.TypeInfo.GitForkRef.fields = { - repository: { - typeInfo: exports.TypeInfo.GitRepository - }, - statuses: { - isArray: true, - typeInfo: exports.TypeInfo.GitStatus +exports.TypeInfo.EnvironmentTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.EnvironmentTriggerType } }; -exports.TypeInfo.GitForkSyncRequest.fields = { - status: { - enumType: exports.TypeInfo.GitAsyncOperationStatus +exports.TypeInfo.ExecutionInput.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes } }; -exports.TypeInfo.GitForkTeamProjectReference.fields = { - lastUpdateTime: { +exports.TypeInfo.Folder.fields = { + createdOn: { isDate: true, }, - visibility: { - enumType: TfsCoreInterfaces.TypeInfo.ProjectVisibility + lastChangedDate: { + isDate: true, } }; -exports.TypeInfo.GitImportFailedEvent.fields = { - targetRepository: { - typeInfo: exports.TypeInfo.GitRepository +exports.TypeInfo.GatesDeployPhase.fields = { + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes } }; -exports.TypeInfo.GitImportRequest.fields = { - repository: { - typeInfo: exports.TypeInfo.GitRepository - }, - status: { - enumType: exports.TypeInfo.GitAsyncOperationStatus +exports.TypeInfo.IgnoredGate.fields = { + lastModifiedOn: { + isDate: true, } }; -exports.TypeInfo.GitImportSucceededEvent.fields = { - targetRepository: { - typeInfo: exports.TypeInfo.GitRepository +exports.TypeInfo.MachineGroupBasedDeployPhase.fields = { + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes } }; -exports.TypeInfo.GitItem.fields = { - gitObjectType: { - enumType: exports.TypeInfo.GitObjectType +exports.TypeInfo.MailMessage.fields = { + replyBy: { + isDate: true, }, - latestProcessedChange: { - typeInfo: exports.TypeInfo.GitCommitRef + sections: { + isArray: true, + enumType: exports.TypeInfo.MailSectionType + }, + senderType: { + enumType: exports.TypeInfo.SenderType } }; -exports.TypeInfo.GitItemDescriptor.fields = { - recursionLevel: { - enumType: exports.TypeInfo.VersionControlRecursionType +exports.TypeInfo.ManualIntervention.fields = { + createdOn: { + isDate: true, }, - versionOptions: { - enumType: exports.TypeInfo.GitVersionOptions + modifiedOn: { + isDate: true, }, - versionType: { - enumType: exports.TypeInfo.GitVersionType + status: { + enumType: exports.TypeInfo.ManualInterventionStatus } }; -exports.TypeInfo.GitItemRequestData.fields = { - itemDescriptors: { - isArray: true, - typeInfo: exports.TypeInfo.GitItemDescriptor +exports.TypeInfo.ManualInterventionUpdateMetadata.fields = { + status: { + enumType: exports.TypeInfo.ManualInterventionStatus } }; -exports.TypeInfo.GitLastChangeTreeItems.fields = { - commits: { - isArray: true, - typeInfo: exports.TypeInfo.GitCommitRef - }, - lastExploredTime: { - isDate: true, +exports.TypeInfo.MultiConfigInput.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes } }; -exports.TypeInfo.GitMerge.fields = { - status: { - enumType: exports.TypeInfo.GitAsyncOperationStatus +exports.TypeInfo.MultiMachineInput.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes } }; -exports.TypeInfo.GitObject.fields = { - objectType: { - enumType: exports.TypeInfo.GitObjectType +exports.TypeInfo.PackageTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType } }; -exports.TypeInfo.GitPathAction.fields = { - action: { - enumType: exports.TypeInfo.GitPathActions +exports.TypeInfo.ParallelExecutionInputBase.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes } }; -exports.TypeInfo.GitPathToItemsCollection.fields = { - items: { - isDictionary: true, - dictionaryValueFieldInfo: { - isArray: true, - typeInfo: exports.TypeInfo.GitItem - } +exports.TypeInfo.PipelineProcess.fields = { + type: { + enumType: exports.TypeInfo.PipelineProcessTypes + } +}; +exports.TypeInfo.PropertySelector.fields = { + selectorType: { + enumType: exports.TypeInfo.PropertySelectorType } }; -exports.TypeInfo.GitPolicyConfigurationResponse.fields = { - policyConfigurations: { - isArray: true, - typeInfo: PolicyInterfaces.TypeInfo.PolicyConfiguration +exports.TypeInfo.PullRequestConfiguration.fields = { + codeRepositoryReference: { + typeInfo: exports.TypeInfo.CodeRepositoryReference } }; -exports.TypeInfo.GitPullRequest.fields = { - closedDate: { +exports.TypeInfo.PullRequestTrigger.fields = { + pullRequestConfiguration: { + typeInfo: exports.TypeInfo.PullRequestConfiguration + }, + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.Release.fields = { + createdOn: { isDate: true, }, - commits: { + environments: { isArray: true, - typeInfo: exports.TypeInfo.GitCommitRef - }, - completionOptions: { - typeInfo: exports.TypeInfo.GitPullRequestCompletionOptions - }, - completionQueueTime: { - isDate: true, + typeInfo: exports.TypeInfo.ReleaseEnvironment }, - creationDate: { + modifiedOn: { isDate: true, }, - forkSource: { - typeInfo: exports.TypeInfo.GitForkRef - }, - lastMergeCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + reason: { + enumType: exports.TypeInfo.ReleaseReason }, - lastMergeSourceCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + status: { + enumType: exports.TypeInfo.ReleaseStatus }, - lastMergeTargetCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + variableGroups: { + isArray: true, + typeInfo: exports.TypeInfo.VariableGroup + } +}; +exports.TypeInfo.ReleaseAbandonedEvent.fields = { + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseApproval.fields = { + approvalType: { + enumType: exports.TypeInfo.ApprovalType }, - mergeFailureType: { - enumType: exports.TypeInfo.PullRequestMergeFailureType + createdOn: { + isDate: true, }, - mergeStatus: { - enumType: exports.TypeInfo.PullRequestAsyncStatus + history: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApprovalHistory }, - repository: { - typeInfo: exports.TypeInfo.GitRepository + modifiedOn: { + isDate: true, }, status: { - enumType: exports.TypeInfo.PullRequestStatus + enumType: exports.TypeInfo.ApprovalStatus } }; -exports.TypeInfo.GitPullRequestChange.fields = { - changeType: { - enumType: exports.TypeInfo.VersionControlChangeType +exports.TypeInfo.ReleaseApprovalHistory.fields = { + createdOn: { + isDate: true, }, - newContent: { - typeInfo: exports.TypeInfo.ItemContent + modifiedOn: { + isDate: true, } }; -exports.TypeInfo.GitPullRequestCommentThread.fields = { - comments: { +exports.TypeInfo.ReleaseApprovalPendingEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval + }, + approvalOptions: { + typeInfo: exports.TypeInfo.ApprovalOptions + }, + completedApprovals: { isArray: true, - typeInfo: exports.TypeInfo.Comment + typeInfo: exports.TypeInfo.ReleaseApproval }, - lastUpdatedDate: { - isDate: true, + deployment: { + typeInfo: exports.TypeInfo.Deployment }, - publishedDate: { - isDate: true, + environments: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseEnvironment }, - status: { - enumType: exports.TypeInfo.CommentThreadStatus + pendingApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval } }; -exports.TypeInfo.GitPullRequestCompletionOptions.fields = { - mergeStrategy: { - enumType: exports.TypeInfo.GitPullRequestMergeStrategy +exports.TypeInfo.ReleaseCondition.fields = { + conditionType: { + enumType: exports.TypeInfo.ConditionType } }; -exports.TypeInfo.GitPullRequestIteration.fields = { - changeList: { - isArray: true, - typeInfo: exports.TypeInfo.GitPullRequestChange +exports.TypeInfo.ReleaseCreatedEvent.fields = { + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseDefinition.fields = { + createdOn: { + isDate: true, }, - commits: { + environments: { isArray: true, - typeInfo: exports.TypeInfo.GitCommitRef + typeInfo: exports.TypeInfo.ReleaseDefinitionEnvironment }, - commonRefCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + lastRelease: { + typeInfo: exports.TypeInfo.ReleaseReference }, - createdDate: { + modifiedOn: { isDate: true, }, - push: { - typeInfo: exports.TypeInfo.GitPushRef - }, - reason: { - enumType: exports.TypeInfo.IterationReason - }, - sourceRefCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + pipelineProcess: { + typeInfo: exports.TypeInfo.PipelineProcess }, - targetRefCommit: { - typeInfo: exports.TypeInfo.GitCommitRef + source: { + enumType: exports.TypeInfo.ReleaseDefinitionSource }, - updatedDate: { - isDate: true, + triggers: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTriggerBase } }; -exports.TypeInfo.GitPullRequestIterationChanges.fields = { - changeEntries: { - isArray: true, - typeInfo: exports.TypeInfo.GitPullRequestChange +exports.TypeInfo.ReleaseDefinitionApprovals.fields = { + approvalOptions: { + typeInfo: exports.TypeInfo.ApprovalOptions } }; -exports.TypeInfo.GitPullRequestQuery.fields = { - queries: { +exports.TypeInfo.ReleaseDefinitionEnvironment.fields = { + conditions: { isArray: true, - typeInfo: exports.TypeInfo.GitPullRequestQueryInput + typeInfo: exports.TypeInfo.Condition }, -}; -exports.TypeInfo.GitPullRequestQueryInput.fields = { - type: { - enumType: exports.TypeInfo.GitPullRequestQueryType + deployPhases: { + isArray: true, + typeInfo: exports.TypeInfo.DeployPhase + }, + environmentTriggers: { + isArray: true, + typeInfo: exports.TypeInfo.EnvironmentTrigger + }, + postDeployApprovals: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + preDeployApprovals: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseSchedule } }; -exports.TypeInfo.GitPullRequestSearchCriteria.fields = { - status: { - enumType: exports.TypeInfo.PullRequestStatus +exports.TypeInfo.ReleaseDefinitionEnvironmentTemplate.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseDefinitionEnvironment } }; -exports.TypeInfo.GitPullRequestStatus.fields = { - creationDate: { +exports.TypeInfo.ReleaseDefinitionRevision.fields = { + changedDate: { isDate: true, }, - state: { - enumType: exports.TypeInfo.GitStatusState - }, - updatedDate: { - isDate: true, + changeType: { + enumType: exports.TypeInfo.AuditAction } }; -exports.TypeInfo.GitPush.fields = { - commits: { +exports.TypeInfo.ReleaseDefinitionSummary.fields = { + releases: { isArray: true, - typeInfo: exports.TypeInfo.GitCommitRef + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseDeployPhase.fields = { + deploymentJobs: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentJob }, - date: { + manualInterventions: { + isArray: true, + typeInfo: exports.TypeInfo.ManualIntervention + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + }, + startedOn: { isDate: true, }, - repository: { - typeInfo: exports.TypeInfo.GitRepository + status: { + enumType: exports.TypeInfo.DeployPhaseStatus } }; -exports.TypeInfo.GitPushEventData.fields = { - commits: { +exports.TypeInfo.ReleaseEnvironment.fields = { + conditions: { isArray: true, - typeInfo: exports.TypeInfo.GitCommit + typeInfo: exports.TypeInfo.ReleaseCondition }, - repository: { - typeInfo: exports.TypeInfo.GitRepository - } -}; -exports.TypeInfo.GitPushRef.fields = { - date: { + createdOn: { isDate: true, - } -}; -exports.TypeInfo.GitPushSearchCriteria.fields = { - fromDate: { + }, + deployPhasesSnapshot: { + isArray: true, + typeInfo: exports.TypeInfo.DeployPhase + }, + deploySteps: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentAttempt + }, + modifiedOn: { isDate: true, }, - toDate: { + nextScheduledUtcTime: { isDate: true, - } -}; -exports.TypeInfo.GitQueryBranchStatsCriteria.fields = { - baseCommit: { - typeInfo: exports.TypeInfo.GitVersionDescriptor }, - targetCommits: { + postApprovalsSnapshot: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + postDeployApprovals: { isArray: true, - typeInfo: exports.TypeInfo.GitVersionDescriptor - } -}; -exports.TypeInfo.GitQueryCommitsCriteria.fields = { - compareVersion: { - typeInfo: exports.TypeInfo.GitVersionDescriptor + typeInfo: exports.TypeInfo.ReleaseApproval }, - historyMode: { - enumType: exports.TypeInfo.GitHistoryMode + preApprovalsSnapshot: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals }, - itemVersion: { - typeInfo: exports.TypeInfo.GitVersionDescriptor - } -}; -exports.TypeInfo.GitQueryRefsCriteria.fields = { - searchType: { - enumType: exports.TypeInfo.GitRefSearchType - } -}; -exports.TypeInfo.GitRef.fields = { - statuses: { + preDeployApprovals: { isArray: true, - typeInfo: exports.TypeInfo.GitStatus - } -}; -exports.TypeInfo.GitRefFavorite.fields = { - type: { - enumType: exports.TypeInfo.RefFavoriteType - } -}; -exports.TypeInfo.GitRefUpdateResult.fields = { - updateStatus: { - enumType: exports.TypeInfo.GitRefUpdateStatus - } -}; -exports.TypeInfo.GitRepository.fields = { - parentRepository: { - typeInfo: exports.TypeInfo.GitRepositoryRef + typeInfo: exports.TypeInfo.ReleaseApproval }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - } -}; -exports.TypeInfo.GitRepositoryCreateOptions.fields = { - parentRepository: { - typeInfo: exports.TypeInfo.GitRepositoryRef + scheduledDeploymentTime: { + isDate: true, }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - } -}; -exports.TypeInfo.GitRepositoryRef.fields = { - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - } -}; -exports.TypeInfo.GitResolutionMergeContent.fields = { - mergeType: { - enumType: exports.TypeInfo.GitResolutionMergeType - } -}; -exports.TypeInfo.GitResolutionPathConflict.fields = { - action: { - enumType: exports.TypeInfo.GitResolutionPathConflictAction + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseSchedule + }, + status: { + enumType: exports.TypeInfo.EnvironmentStatus + }, + variableGroups: { + isArray: true, + typeInfo: exports.TypeInfo.VariableGroup } }; -exports.TypeInfo.GitResolutionPickOneAction.fields = { - action: { - enumType: exports.TypeInfo.GitResolutionWhichAction +exports.TypeInfo.ReleaseEnvironmentCompletedEvent.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment + }, + reason: { + enumType: exports.TypeInfo.DeploymentReason } }; -exports.TypeInfo.GitResolutionRename1to2.fields = { - action: { - enumType: exports.TypeInfo.GitResolutionRename1to2Action +exports.TypeInfo.ReleaseEnvironmentStatusUpdatedEvent.fields = { + environmentStatus: { + enumType: exports.TypeInfo.EnvironmentStatus }, - mergeType: { - enumType: exports.TypeInfo.GitResolutionMergeType + latestDeploymentOperationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + latestDeploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus } }; -exports.TypeInfo.GitRevert.fields = { - detailedStatus: { - typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail - }, - parameters: { - typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters +exports.TypeInfo.ReleaseEnvironmentUpdateMetadata.fields = { + scheduledDeploymentTime: { + isDate: true, }, status: { - enumType: exports.TypeInfo.GitAsyncOperationStatus + enumType: exports.TypeInfo.EnvironmentStatus } }; -exports.TypeInfo.GitStatus.fields = { - creationDate: { - isDate: true, +exports.TypeInfo.ReleaseGates.fields = { + deploymentJobs: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentJob }, - state: { - enumType: exports.TypeInfo.GitStatusState + ignoredGates: { + isArray: true, + typeInfo: exports.TypeInfo.IgnoredGate }, - updatedDate: { + lastModifiedOn: { isDate: true, - } -}; -exports.TypeInfo.GitTargetVersionDescriptor.fields = { - targetVersionOptions: { - enumType: exports.TypeInfo.GitVersionOptions }, - targetVersionType: { - enumType: exports.TypeInfo.GitVersionType + stabilizationCompletedOn: { + isDate: true, }, - versionOptions: { - enumType: exports.TypeInfo.GitVersionOptions + startedOn: { + isDate: true, }, - versionType: { - enumType: exports.TypeInfo.GitVersionType + status: { + enumType: exports.TypeInfo.GateStatus + }, + succeedingSince: { + isDate: true, } }; -exports.TypeInfo.GitTreeDiff.fields = { - diffEntries: { +exports.TypeInfo.ReleaseGatesPhase.fields = { + deploymentJobs: { isArray: true, - typeInfo: exports.TypeInfo.GitTreeDiffEntry - } -}; -exports.TypeInfo.GitTreeDiffEntry.fields = { - changeType: { - enumType: exports.TypeInfo.VersionControlChangeType + typeInfo: exports.TypeInfo.DeploymentJob }, - objectType: { - enumType: exports.TypeInfo.GitObjectType - } -}; -exports.TypeInfo.GitTreeDiffResponse.fields = { - treeDiff: { - typeInfo: exports.TypeInfo.GitTreeDiff - } -}; -exports.TypeInfo.GitTreeEntryRef.fields = { - gitObjectType: { - enumType: exports.TypeInfo.GitObjectType - } -}; -exports.TypeInfo.GitTreeRef.fields = { - treeEntries: { + ignoredGates: { isArray: true, - typeInfo: exports.TypeInfo.GitTreeEntryRef - } -}; -exports.TypeInfo.GitUserDate.fields = { - date: { + typeInfo: exports.TypeInfo.IgnoredGate + }, + manualInterventions: { + isArray: true, + typeInfo: exports.TypeInfo.ManualIntervention + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + }, + stabilizationCompletedOn: { isDate: true, - } -}; -exports.TypeInfo.GitVersionDescriptor.fields = { - versionOptions: { - enumType: exports.TypeInfo.GitVersionOptions }, - versionType: { - enumType: exports.TypeInfo.GitVersionType - } -}; -exports.TypeInfo.HistoryEntry.fields = { - itemChangeType: { - enumType: exports.TypeInfo.VersionControlChangeType - } -}; -exports.TypeInfo.IncludedGitCommit.fields = { - commitTime: { + startedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.DeployPhaseStatus + }, + succeedingSince: { isDate: true, } }; -exports.TypeInfo.ItemContent.fields = { - contentType: { - enumType: exports.TypeInfo.ItemContentType +exports.TypeInfo.ReleaseNotCreatedEvent.fields = { + releaseReason: { + enumType: exports.TypeInfo.ReleaseReason } }; -exports.TypeInfo.ItemDetailsOptions.fields = { - recursionLevel: { - enumType: exports.TypeInfo.VersionControlRecursionType +exports.TypeInfo.ReleaseReference.fields = { + createdOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.ReleaseReason } }; -exports.TypeInfo.LineDiffBlock.fields = { - changeType: { - enumType: exports.TypeInfo.LineDiffBlockChangeType +exports.TypeInfo.ReleaseRevision.fields = { + changedDate: { + isDate: true, } }; -exports.TypeInfo.SupportedIde.fields = { - ideType: { - enumType: exports.TypeInfo.SupportedIdeType +exports.TypeInfo.ReleaseSchedule.fields = { + daysToRelease: { + enumType: exports.TypeInfo.ScheduleDays } }; -exports.TypeInfo.TfvcBranch.fields = { - children: { +exports.TypeInfo.ReleaseStartMetadata.fields = { + artifacts: { isArray: true, - typeInfo: exports.TypeInfo.TfvcBranch + typeInfo: exports.TypeInfo.ArtifactMetadata }, - createdDate: { - isDate: true, + reason: { + enumType: exports.TypeInfo.ReleaseReason } }; -exports.TypeInfo.TfvcBranchRef.fields = { - createdDate: { +exports.TypeInfo.ReleaseTask.fields = { + dateEnded: { isDate: true, - } -}; -exports.TypeInfo.TfvcChange.fields = { - changeType: { - enumType: exports.TypeInfo.VersionControlChangeType }, - newContent: { - typeInfo: exports.TypeInfo.ItemContent - } -}; -exports.TypeInfo.TfvcChangeset.fields = { - changes: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcChange + dateStarted: { + isDate: true, }, - createdDate: { + finishTime: { isDate: true, + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.TaskStatus } }; -exports.TypeInfo.TfvcChangesetRef.fields = { - createdDate: { +exports.TypeInfo.ReleaseTaskAttachment.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { isDate: true, } }; -exports.TypeInfo.TfvcCheckinEventData.fields = { - changeset: { - typeInfo: exports.TypeInfo.TfvcChangeset +exports.TypeInfo.ReleaseTasksUpdatedEvent.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + tasks: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTask } }; -exports.TypeInfo.TfvcHistoryEntry.fields = { - itemChangeType: { - enumType: exports.TypeInfo.VersionControlChangeType +exports.TypeInfo.ReleaseTriggerBase.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType } }; -exports.TypeInfo.TfvcItem.fields = { - changeDate: { - isDate: true, +exports.TypeInfo.ReleaseUpdatedEvent.fields = { + release: { + typeInfo: exports.TypeInfo.Release } }; -exports.TypeInfo.TfvcItemDescriptor.fields = { - recursionLevel: { - enumType: exports.TypeInfo.VersionControlRecursionType - }, - versionOption: { - enumType: exports.TypeInfo.TfvcVersionOption - }, - versionType: { - enumType: exports.TypeInfo.TfvcVersionType +exports.TypeInfo.ReleaseUpdateMetadata.fields = { + status: { + enumType: exports.TypeInfo.ReleaseStatus } }; -exports.TypeInfo.TfvcItemPreviousHash.fields = { - changeDate: { - isDate: true, +exports.TypeInfo.RunOnServerDeployPhase.fields = { + deploymentInput: { + typeInfo: exports.TypeInfo.ServerDeploymentInput + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes } }; -exports.TypeInfo.TfvcItemRequestData.fields = { - itemDescriptors: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcItemDescriptor +exports.TypeInfo.ScheduledReleaseTrigger.fields = { + schedule: { + typeInfo: exports.TypeInfo.ReleaseSchedule + }, + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType } }; -exports.TypeInfo.TfvcLabel.fields = { - items: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcItem - }, - modifiedDate: { - isDate: true, +exports.TypeInfo.ServerDeploymentInput.fields = { + parallelExecution: { + typeInfo: exports.TypeInfo.ExecutionInput } }; -exports.TypeInfo.TfvcLabelRef.fields = { - modifiedDate: { +exports.TypeInfo.SourcePullRequestVersion.fields = { + pullRequestMergedAt: { isDate: true, } }; -exports.TypeInfo.TfvcShelveset.fields = { - changes: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcChange - }, - createdDate: { - isDate: true, +exports.TypeInfo.SourceRepoTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType } }; -exports.TypeInfo.TfvcShelvesetRef.fields = { - createdDate: { - isDate: true, +exports.TypeInfo.SummaryMailSection.fields = { + sectionType: { + enumType: exports.TypeInfo.MailSectionType } }; -exports.TypeInfo.TfvcVersionDescriptor.fields = { - versionOption: { - enumType: exports.TypeInfo.TfvcVersionOption +exports.TypeInfo.VariableGroup.fields = { + createdOn: { + isDate: true, }, - versionType: { - enumType: exports.TypeInfo.TfvcVersionType + modifiedOn: { + isDate: true, } }; -exports.TypeInfo.UpdateRefsRequest.fields = { - updateMode: { - enumType: exports.TypeInfo.GitRefUpdateMode +exports.TypeInfo.YamlFileSource.fields = { + type: { + enumType: exports.TypeInfo.YamlFileSourceTypes } }; -exports.TypeInfo.VersionControlProjectInfo.fields = { - defaultSourceControlType: { - enumType: TfsCoreInterfaces.TypeInfo.SourceControlTypes +exports.TypeInfo.YamlPipelineProcess.fields = { + fileSource: { + typeInfo: exports.TypeInfo.YamlFileSource }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + type: { + enumType: exports.TypeInfo.PipelineProcessTypes } }; /***/ }), -/***/ 3215: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 6573: +/***/ ((__unused_webpack_module, exports) => { "use strict"; /* @@ -56259,89 +61672,37 @@ exports.TypeInfo.VersionControlProjectInfo.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const VSSInterfaces = __nccwpck_require__(4498); -var InheritLevel; -(function (InheritLevel) { - InheritLevel[InheritLevel["None"] = 0] = "None"; - InheritLevel[InheritLevel["Deployment"] = 1] = "Deployment"; - InheritLevel[InheritLevel["Account"] = 2] = "Account"; - InheritLevel[InheritLevel["Collection"] = 4] = "Collection"; - InheritLevel[InheritLevel["All"] = 7] = "All"; -})(InheritLevel = exports.InheritLevel || (exports.InheritLevel = {})); -var RelativeToSetting; -(function (RelativeToSetting) { - RelativeToSetting[RelativeToSetting["Context"] = 0] = "Context"; - RelativeToSetting[RelativeToSetting["WebApplication"] = 2] = "WebApplication"; - RelativeToSetting[RelativeToSetting["FullyQualified"] = 3] = "FullyQualified"; -})(RelativeToSetting = exports.RelativeToSetting || (exports.RelativeToSetting = {})); -var ServiceStatus; -(function (ServiceStatus) { - ServiceStatus[ServiceStatus["Assigned"] = 0] = "Assigned"; - ServiceStatus[ServiceStatus["Active"] = 1] = "Active"; - ServiceStatus[ServiceStatus["Moving"] = 2] = "Moving"; -})(ServiceStatus = exports.ServiceStatus || (exports.ServiceStatus = {})); +var RoleAccess; +(function (RoleAccess) { + /** + * Access has been explicitly set. + */ + RoleAccess[RoleAccess["Assigned"] = 1] = "Assigned"; + /** + * Access has been inherited from a higher scope. + */ + RoleAccess[RoleAccess["Inherited"] = 2] = "Inherited"; +})(RoleAccess = exports.RoleAccess || (exports.RoleAccess = {})); exports.TypeInfo = { - ConnectionData: {}, - InheritLevel: { - enumValues: { - "none": 0, - "deployment": 1, - "account": 2, - "collection": 4, - "all": 7 - } - }, - LocationServiceData: {}, - RelativeToSetting: { - enumValues: { - "context": 0, - "webApplication": 2, - "fullyQualified": 3 - } - }, - ServiceDefinition: {}, - ServiceStatus: { + RoleAccess: { enumValues: { - "assigned": 0, - "active": 1, - "moving": 2 + "assigned": 1, + "inherited": 2 } }, + RoleAssignment: {}, }; -exports.TypeInfo.ConnectionData.fields = { - deploymentType: { - enumType: VSSInterfaces.TypeInfo.DeploymentFlags - }, - lastUserAccess: { - isDate: true, - }, - locationServiceData: { - typeInfo: exports.TypeInfo.LocationServiceData - } -}; -exports.TypeInfo.LocationServiceData.fields = { - serviceDefinitions: { - isArray: true, - typeInfo: exports.TypeInfo.ServiceDefinition - } -}; -exports.TypeInfo.ServiceDefinition.fields = { - inheritLevel: { - enumType: exports.TypeInfo.InheritLevel - }, - relativeToSetting: { - enumType: exports.TypeInfo.RelativeToSetting +exports.TypeInfo.RoleAssignment.fields = { + access: { + enumType: exports.TypeInfo.RoleAccess }, - status: { - enumType: exports.TypeInfo.ServiceStatus - } }; /***/ }), -/***/ 3044: -/***/ ((__unused_webpack_module, exports) => { +/***/ 69565: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; /* @@ -56355,3377 +61716,4120 @@ exports.TypeInfo.ServiceDefinition.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Default delivery preference for group subscribers. Indicates how the subscriber should be notified. - */ -var DefaultGroupDeliveryPreference; -(function (DefaultGroupDeliveryPreference) { - DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["NoDelivery"] = -1] = "NoDelivery"; - DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["EachMember"] = 2] = "EachMember"; -})(DefaultGroupDeliveryPreference = exports.DefaultGroupDeliveryPreference || (exports.DefaultGroupDeliveryPreference = {})); -/** - * Describes the subscription evaluation operation status. - */ -var EvaluationOperationStatus; -(function (EvaluationOperationStatus) { - /** - * The operation object does not have the status set. - */ - EvaluationOperationStatus[EvaluationOperationStatus["NotSet"] = 0] = "NotSet"; - /** - * The operation has been queued. - */ - EvaluationOperationStatus[EvaluationOperationStatus["Queued"] = 1] = "Queued"; - /** - * The operation is in progress. - */ - EvaluationOperationStatus[EvaluationOperationStatus["InProgress"] = 2] = "InProgress"; +const FormInputInterfaces = __nccwpck_require__(43627); +var AadLoginPromptOption; +(function (AadLoginPromptOption) { /** - * The operation was cancelled by the user. + * Do not provide a prompt option */ - EvaluationOperationStatus[EvaluationOperationStatus["Cancelled"] = 3] = "Cancelled"; + AadLoginPromptOption[AadLoginPromptOption["NoOption"] = 0] = "NoOption"; /** - * The operation completed successfully. + * Force the user to login again. */ - EvaluationOperationStatus[EvaluationOperationStatus["Succeeded"] = 4] = "Succeeded"; + AadLoginPromptOption[AadLoginPromptOption["Login"] = 1] = "Login"; /** - * The operation completed with a failure. + * Force the user to select which account they are logging in with instead of automatically picking the user up from the session state. NOTE: This does not work for switching between the variants of a dual-homed user. */ - EvaluationOperationStatus[EvaluationOperationStatus["Failed"] = 5] = "Failed"; + AadLoginPromptOption[AadLoginPromptOption["SelectAccount"] = 2] = "SelectAccount"; /** - * The operation timed out. + * Force the user to login again. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login. */ - EvaluationOperationStatus[EvaluationOperationStatus["TimedOut"] = 6] = "TimedOut"; + AadLoginPromptOption[AadLoginPromptOption["FreshLogin"] = 3] = "FreshLogin"; /** - * The operation could not be found. + * Force the user to login again with mfa. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login, if MFA is required. */ - EvaluationOperationStatus[EvaluationOperationStatus["NotFound"] = 7] = "NotFound"; -})(EvaluationOperationStatus = exports.EvaluationOperationStatus || (exports.EvaluationOperationStatus = {})); + AadLoginPromptOption[AadLoginPromptOption["FreshLoginWithMfa"] = 4] = "FreshLoginWithMfa"; +})(AadLoginPromptOption = exports.AadLoginPromptOption || (exports.AadLoginPromptOption = {})); +var AuditAction; +(function (AuditAction) { + AuditAction[AuditAction["Add"] = 1] = "Add"; + AuditAction[AuditAction["Update"] = 2] = "Update"; + AuditAction[AuditAction["Delete"] = 3] = "Delete"; + AuditAction[AuditAction["Undelete"] = 4] = "Undelete"; +})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); +var DemandSourceType; +(function (DemandSourceType) { + DemandSourceType[DemandSourceType["Task"] = 0] = "Task"; + DemandSourceType[DemandSourceType["Feature"] = 1] = "Feature"; +})(DemandSourceType = exports.DemandSourceType || (exports.DemandSourceType = {})); /** - * Set of flags used to determine which set of information is retrieved when querying for event publishers + * This is useful in getting a list of deployment groups, filtered for which caller has permissions to take a particular action. */ -var EventPublisherQueryFlags; -(function (EventPublisherQueryFlags) { - EventPublisherQueryFlags[EventPublisherQueryFlags["None"] = 0] = "None"; +var DeploymentGroupActionFilter; +(function (DeploymentGroupActionFilter) { /** - * Include event types from the remote services too + * All deployment groups. */ - EventPublisherQueryFlags[EventPublisherQueryFlags["IncludeRemoteServices"] = 2] = "IncludeRemoteServices"; -})(EventPublisherQueryFlags = exports.EventPublisherQueryFlags || (exports.EventPublisherQueryFlags = {})); -/** - * Set of flags used to determine which set of information is retrieved when querying for eventtypes - */ -var EventTypeQueryFlags; -(function (EventTypeQueryFlags) { - EventTypeQueryFlags[EventTypeQueryFlags["None"] = 0] = "None"; + DeploymentGroupActionFilter[DeploymentGroupActionFilter["None"] = 0] = "None"; /** - * IncludeFields will include all fields and their types + * Only deployment groups for which caller has **manage** permission. */ - EventTypeQueryFlags[EventTypeQueryFlags["IncludeFields"] = 1] = "IncludeFields"; -})(EventTypeQueryFlags = exports.EventTypeQueryFlags || (exports.EventTypeQueryFlags = {})); -var NotificationOperation; -(function (NotificationOperation) { - NotificationOperation[NotificationOperation["None"] = 0] = "None"; - NotificationOperation[NotificationOperation["SuspendUnprocessed"] = 1] = "SuspendUnprocessed"; -})(NotificationOperation = exports.NotificationOperation || (exports.NotificationOperation = {})); -var NotificationReasonType; -(function (NotificationReasonType) { - NotificationReasonType[NotificationReasonType["Unknown"] = 0] = "Unknown"; - NotificationReasonType[NotificationReasonType["Follows"] = 1] = "Follows"; - NotificationReasonType[NotificationReasonType["Personal"] = 2] = "Personal"; - NotificationReasonType[NotificationReasonType["PersonalAlias"] = 3] = "PersonalAlias"; - NotificationReasonType[NotificationReasonType["DirectMember"] = 4] = "DirectMember"; - NotificationReasonType[NotificationReasonType["IndirectMember"] = 5] = "IndirectMember"; - NotificationReasonType[NotificationReasonType["GroupAlias"] = 6] = "GroupAlias"; - NotificationReasonType[NotificationReasonType["SubscriptionAlias"] = 7] = "SubscriptionAlias"; - NotificationReasonType[NotificationReasonType["SingleRole"] = 8] = "SingleRole"; - NotificationReasonType[NotificationReasonType["DirectMemberGroupRole"] = 9] = "DirectMemberGroupRole"; - NotificationReasonType[NotificationReasonType["InDirectMemberGroupRole"] = 10] = "InDirectMemberGroupRole"; - NotificationReasonType[NotificationReasonType["AliasMemberGroupRole"] = 11] = "AliasMemberGroupRole"; -})(NotificationReasonType = exports.NotificationReasonType || (exports.NotificationReasonType = {})); -var NotificationStatisticType; -(function (NotificationStatisticType) { - NotificationStatisticType[NotificationStatisticType["NotificationBySubscription"] = 0] = "NotificationBySubscription"; - NotificationStatisticType[NotificationStatisticType["EventsByEventType"] = 1] = "EventsByEventType"; - NotificationStatisticType[NotificationStatisticType["NotificationByEventType"] = 2] = "NotificationByEventType"; - NotificationStatisticType[NotificationStatisticType["EventsByEventTypePerUser"] = 3] = "EventsByEventTypePerUser"; - NotificationStatisticType[NotificationStatisticType["NotificationByEventTypePerUser"] = 4] = "NotificationByEventTypePerUser"; - NotificationStatisticType[NotificationStatisticType["Events"] = 5] = "Events"; - NotificationStatisticType[NotificationStatisticType["Notifications"] = 6] = "Notifications"; - NotificationStatisticType[NotificationStatisticType["NotificationFailureBySubscription"] = 7] = "NotificationFailureBySubscription"; - NotificationStatisticType[NotificationStatisticType["UnprocessedRangeStart"] = 100] = "UnprocessedRangeStart"; - NotificationStatisticType[NotificationStatisticType["UnprocessedEventsByPublisher"] = 101] = "UnprocessedEventsByPublisher"; - NotificationStatisticType[NotificationStatisticType["UnprocessedEventDelayByPublisher"] = 102] = "UnprocessedEventDelayByPublisher"; - NotificationStatisticType[NotificationStatisticType["UnprocessedNotificationsByChannelByPublisher"] = 103] = "UnprocessedNotificationsByChannelByPublisher"; - NotificationStatisticType[NotificationStatisticType["UnprocessedNotificationDelayByChannelByPublisher"] = 104] = "UnprocessedNotificationDelayByChannelByPublisher"; - NotificationStatisticType[NotificationStatisticType["DelayRangeStart"] = 200] = "DelayRangeStart"; - NotificationStatisticType[NotificationStatisticType["TotalPipelineTime"] = 201] = "TotalPipelineTime"; - NotificationStatisticType[NotificationStatisticType["NotificationPipelineTime"] = 202] = "NotificationPipelineTime"; - NotificationStatisticType[NotificationStatisticType["EventPipelineTime"] = 203] = "EventPipelineTime"; - NotificationStatisticType[NotificationStatisticType["HourlyRangeStart"] = 1000] = "HourlyRangeStart"; - NotificationStatisticType[NotificationStatisticType["HourlyNotificationBySubscription"] = 1001] = "HourlyNotificationBySubscription"; - NotificationStatisticType[NotificationStatisticType["HourlyEventsByEventTypePerUser"] = 1002] = "HourlyEventsByEventTypePerUser"; - NotificationStatisticType[NotificationStatisticType["HourlyEvents"] = 1003] = "HourlyEvents"; - NotificationStatisticType[NotificationStatisticType["HourlyNotifications"] = 1004] = "HourlyNotifications"; - NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedEventsByPublisher"] = 1101] = "HourlyUnprocessedEventsByPublisher"; - NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedEventDelayByPublisher"] = 1102] = "HourlyUnprocessedEventDelayByPublisher"; - NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedNotificationsByChannelByPublisher"] = 1103] = "HourlyUnprocessedNotificationsByChannelByPublisher"; - NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedNotificationDelayByChannelByPublisher"] = 1104] = "HourlyUnprocessedNotificationDelayByChannelByPublisher"; - NotificationStatisticType[NotificationStatisticType["HourlyTotalPipelineTime"] = 1201] = "HourlyTotalPipelineTime"; - NotificationStatisticType[NotificationStatisticType["HourlyNotificationPipelineTime"] = 1202] = "HourlyNotificationPipelineTime"; - NotificationStatisticType[NotificationStatisticType["HourlyEventPipelineTime"] = 1203] = "HourlyEventPipelineTime"; -})(NotificationStatisticType = exports.NotificationStatisticType || (exports.NotificationStatisticType = {})); -/** - * Delivery preference for a subscriber. Indicates how the subscriber should be notified. - */ -var NotificationSubscriberDeliveryPreference; -(function (NotificationSubscriberDeliveryPreference) { + DeploymentGroupActionFilter[DeploymentGroupActionFilter["Manage"] = 2] = "Manage"; /** - * Do not send notifications by default. Note: notifications can still be delivered to this subscriber, for example via a custom subscription. + * Only deployment groups for which caller has **use** permission. */ - NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["NoDelivery"] = -1] = "NoDelivery"; + DeploymentGroupActionFilter[DeploymentGroupActionFilter["Use"] = 16] = "Use"; +})(DeploymentGroupActionFilter = exports.DeploymentGroupActionFilter || (exports.DeploymentGroupActionFilter = {})); +/** + * Properties to be included or expanded in deployment group objects. This is useful when getting a single or list of deployment grouops. + */ +var DeploymentGroupExpands; +(function (DeploymentGroupExpands) { /** - * Deliver notifications to the subscriber's preferred email address. + * No additional properties. */ - NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["PreferredEmailAddress"] = 1] = "PreferredEmailAddress"; + DeploymentGroupExpands[DeploymentGroupExpands["None"] = 0] = "None"; /** - * Deliver notifications to each member of the group representing the subscriber. Only applicable when the subscriber is a group. + * Deprecated: Include all the deployment targets. */ - NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["EachMember"] = 2] = "EachMember"; + DeploymentGroupExpands[DeploymentGroupExpands["Machines"] = 2] = "Machines"; /** - * Use default + * Include unique list of tags across all deployment targets. */ - NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["UseDefault"] = 3] = "UseDefault"; -})(NotificationSubscriberDeliveryPreference = exports.NotificationSubscriberDeliveryPreference || (exports.NotificationSubscriberDeliveryPreference = {})); -var SubscriberFlags; -(function (SubscriberFlags) { - SubscriberFlags[SubscriberFlags["None"] = 0] = "None"; + DeploymentGroupExpands[DeploymentGroupExpands["Tags"] = 4] = "Tags"; +})(DeploymentGroupExpands = exports.DeploymentGroupExpands || (exports.DeploymentGroupExpands = {})); +var DeploymentMachineExpands; +(function (DeploymentMachineExpands) { + DeploymentMachineExpands[DeploymentMachineExpands["None"] = 0] = "None"; + DeploymentMachineExpands[DeploymentMachineExpands["Capabilities"] = 2] = "Capabilities"; + DeploymentMachineExpands[DeploymentMachineExpands["AssignedRequest"] = 4] = "AssignedRequest"; +})(DeploymentMachineExpands = exports.DeploymentMachineExpands || (exports.DeploymentMachineExpands = {})); +/** + * Properties to be included or expanded in deployment pool summary objects. This is useful when getting a single or list of deployment pool summaries. + */ +var DeploymentPoolSummaryExpands; +(function (DeploymentPoolSummaryExpands) { /** - * Subscriber's delivery preferences could be updated + * No additional properties */ - SubscriberFlags[SubscriberFlags["DeliveryPreferencesEditable"] = 2] = "DeliveryPreferencesEditable"; + DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["None"] = 0] = "None"; /** - * Subscriber's delivery preferences supports email delivery + * Include deployment groups referring to the deployment pool. */ - SubscriberFlags[SubscriberFlags["SupportsPreferredEmailAddressDelivery"] = 4] = "SupportsPreferredEmailAddressDelivery"; + DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["DeploymentGroups"] = 2] = "DeploymentGroups"; /** - * Subscriber's delivery preferences supports individual members delivery(group expansion) + * Include Resource referring to the deployment pool. */ - SubscriberFlags[SubscriberFlags["SupportsEachMemberDelivery"] = 8] = "SupportsEachMemberDelivery"; + DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["Resource"] = 4] = "Resource"; +})(DeploymentPoolSummaryExpands = exports.DeploymentPoolSummaryExpands || (exports.DeploymentPoolSummaryExpands = {})); +/** + * Properties to be included or expanded in deployment target objects. This is useful when getting a single or list of deployment targets. + */ +var DeploymentTargetExpands; +(function (DeploymentTargetExpands) { /** - * Subscriber's delivery preferences supports no delivery + * No additional properties. */ - SubscriberFlags[SubscriberFlags["SupportsNoDelivery"] = 16] = "SupportsNoDelivery"; + DeploymentTargetExpands[DeploymentTargetExpands["None"] = 0] = "None"; /** - * Subscriber is a user + * Include capabilities of the deployment agent. */ - SubscriberFlags[SubscriberFlags["IsUser"] = 32] = "IsUser"; + DeploymentTargetExpands[DeploymentTargetExpands["Capabilities"] = 2] = "Capabilities"; /** - * Subscriber is a group + * Include the job request assigned to the deployment agent. */ - SubscriberFlags[SubscriberFlags["IsGroup"] = 64] = "IsGroup"; + DeploymentTargetExpands[DeploymentTargetExpands["AssignedRequest"] = 4] = "AssignedRequest"; /** - * Subscriber is a team + * Include the last completed job request of the deployment agent. */ - SubscriberFlags[SubscriberFlags["IsTeam"] = 128] = "IsTeam"; -})(SubscriberFlags = exports.SubscriberFlags || (exports.SubscriberFlags = {})); -var SubscriptionFieldType; -(function (SubscriptionFieldType) { - SubscriptionFieldType[SubscriptionFieldType["String"] = 1] = "String"; - SubscriptionFieldType[SubscriptionFieldType["Integer"] = 2] = "Integer"; - SubscriptionFieldType[SubscriptionFieldType["DateTime"] = 3] = "DateTime"; - SubscriptionFieldType[SubscriptionFieldType["PlainText"] = 5] = "PlainText"; - SubscriptionFieldType[SubscriptionFieldType["Html"] = 7] = "Html"; - SubscriptionFieldType[SubscriptionFieldType["TreePath"] = 8] = "TreePath"; - SubscriptionFieldType[SubscriptionFieldType["History"] = 9] = "History"; - SubscriptionFieldType[SubscriptionFieldType["Double"] = 10] = "Double"; - SubscriptionFieldType[SubscriptionFieldType["Guid"] = 11] = "Guid"; - SubscriptionFieldType[SubscriptionFieldType["Boolean"] = 12] = "Boolean"; - SubscriptionFieldType[SubscriptionFieldType["Identity"] = 13] = "Identity"; - SubscriptionFieldType[SubscriptionFieldType["PicklistInteger"] = 14] = "PicklistInteger"; - SubscriptionFieldType[SubscriptionFieldType["PicklistString"] = 15] = "PicklistString"; - SubscriptionFieldType[SubscriptionFieldType["PicklistDouble"] = 16] = "PicklistDouble"; - SubscriptionFieldType[SubscriptionFieldType["TeamProject"] = 17] = "TeamProject"; -})(SubscriptionFieldType = exports.SubscriptionFieldType || (exports.SubscriptionFieldType = {})); -/** - * Read-only indicators that further describe the subscription. - */ -var SubscriptionFlags; -(function (SubscriptionFlags) { + DeploymentTargetExpands[DeploymentTargetExpands["LastCompletedRequest"] = 8] = "LastCompletedRequest"; +})(DeploymentTargetExpands = exports.DeploymentTargetExpands || (exports.DeploymentTargetExpands = {})); +var ElasticAgentState; +(function (ElasticAgentState) { + ElasticAgentState[ElasticAgentState["None"] = 0] = "None"; + ElasticAgentState[ElasticAgentState["Enabled"] = 1] = "Enabled"; + ElasticAgentState[ElasticAgentState["Online"] = 2] = "Online"; + ElasticAgentState[ElasticAgentState["Assigned"] = 4] = "Assigned"; +})(ElasticAgentState = exports.ElasticAgentState || (exports.ElasticAgentState = {})); +var ElasticComputeState; +(function (ElasticComputeState) { + ElasticComputeState[ElasticComputeState["None"] = 0] = "None"; + ElasticComputeState[ElasticComputeState["Healthy"] = 1] = "Healthy"; + ElasticComputeState[ElasticComputeState["Creating"] = 2] = "Creating"; + ElasticComputeState[ElasticComputeState["Deleting"] = 3] = "Deleting"; + ElasticComputeState[ElasticComputeState["Failed"] = 4] = "Failed"; + ElasticComputeState[ElasticComputeState["Stopped"] = 5] = "Stopped"; + ElasticComputeState[ElasticComputeState["Reimaging"] = 6] = "Reimaging"; +})(ElasticComputeState = exports.ElasticComputeState || (exports.ElasticComputeState = {})); +var ElasticNodeState; +(function (ElasticNodeState) { + ElasticNodeState[ElasticNodeState["None"] = 0] = "None"; + ElasticNodeState[ElasticNodeState["New"] = 1] = "New"; + ElasticNodeState[ElasticNodeState["CreatingCompute"] = 2] = "CreatingCompute"; + ElasticNodeState[ElasticNodeState["StartingAgent"] = 3] = "StartingAgent"; + ElasticNodeState[ElasticNodeState["Idle"] = 4] = "Idle"; + ElasticNodeState[ElasticNodeState["Assigned"] = 5] = "Assigned"; + ElasticNodeState[ElasticNodeState["Offline"] = 6] = "Offline"; + ElasticNodeState[ElasticNodeState["PendingReimage"] = 7] = "PendingReimage"; + ElasticNodeState[ElasticNodeState["PendingDelete"] = 8] = "PendingDelete"; + ElasticNodeState[ElasticNodeState["Saved"] = 9] = "Saved"; + ElasticNodeState[ElasticNodeState["DeletingCompute"] = 10] = "DeletingCompute"; + ElasticNodeState[ElasticNodeState["Deleted"] = 11] = "Deleted"; + ElasticNodeState[ElasticNodeState["Lost"] = 12] = "Lost"; + ElasticNodeState[ElasticNodeState["ReimagingCompute"] = 13] = "ReimagingCompute"; + ElasticNodeState[ElasticNodeState["RestartingAgent"] = 14] = "RestartingAgent"; + ElasticNodeState[ElasticNodeState["FailedToStartPendingDelete"] = 15] = "FailedToStartPendingDelete"; + ElasticNodeState[ElasticNodeState["FailedToRestartPendingDelete"] = 16] = "FailedToRestartPendingDelete"; + ElasticNodeState[ElasticNodeState["FailedVMPendingDelete"] = 17] = "FailedVMPendingDelete"; + ElasticNodeState[ElasticNodeState["AssignedPendingDelete"] = 18] = "AssignedPendingDelete"; +})(ElasticNodeState = exports.ElasticNodeState || (exports.ElasticNodeState = {})); +var ElasticPoolState; +(function (ElasticPoolState) { /** - * None + * Online and healthy */ - SubscriptionFlags[SubscriptionFlags["None"] = 0] = "None"; + ElasticPoolState[ElasticPoolState["Online"] = 0] = "Online"; + ElasticPoolState[ElasticPoolState["Offline"] = 1] = "Offline"; + ElasticPoolState[ElasticPoolState["Unhealthy"] = 2] = "Unhealthy"; + ElasticPoolState[ElasticPoolState["New"] = 3] = "New"; +})(ElasticPoolState = exports.ElasticPoolState || (exports.ElasticPoolState = {})); +/** + * This is useful in getting a list of Environments, filtered for which caller has permissions to take a particular action. + */ +var EnvironmentActionFilter; +(function (EnvironmentActionFilter) { /** - * Subscription's subscriber is a group, not a user + * All environments for which user has **view** permission. */ - SubscriptionFlags[SubscriptionFlags["GroupSubscription"] = 1] = "GroupSubscription"; + EnvironmentActionFilter[EnvironmentActionFilter["None"] = 0] = "None"; /** - * Subscription is contributed and not persisted. This means certain fields of the subscription, like Filter, are read-only. + * Only environments for which caller has **manage** permission. */ - SubscriptionFlags[SubscriptionFlags["ContributedSubscription"] = 2] = "ContributedSubscription"; + EnvironmentActionFilter[EnvironmentActionFilter["Manage"] = 2] = "Manage"; /** - * A user that is member of the subscription's subscriber group can opt in/out of the subscription. + * Only environments for which caller has **use** permission. */ - SubscriptionFlags[SubscriptionFlags["CanOptOut"] = 4] = "CanOptOut"; + EnvironmentActionFilter[EnvironmentActionFilter["Use"] = 16] = "Use"; +})(EnvironmentActionFilter = exports.EnvironmentActionFilter || (exports.EnvironmentActionFilter = {})); +/** + * Properties to be included or expanded in environment objects. This is useful when getting a single environment. + */ +var EnvironmentExpands; +(function (EnvironmentExpands) { /** - * If the subscriber is a group, is it a team. + * No additional properties */ - SubscriptionFlags[SubscriptionFlags["TeamSubscription"] = 8] = "TeamSubscription"; + EnvironmentExpands[EnvironmentExpands["None"] = 0] = "None"; /** - * For role based subscriptions, there is an expectation that there will always be at least one actor that matches + * Include resource references referring to the environment. */ - SubscriptionFlags[SubscriptionFlags["OneActorMatches"] = 16] = "OneActorMatches"; -})(SubscriptionFlags = exports.SubscriptionFlags || (exports.SubscriptionFlags = {})); + EnvironmentExpands[EnvironmentExpands["ResourceReferences"] = 1] = "ResourceReferences"; +})(EnvironmentExpands = exports.EnvironmentExpands || (exports.EnvironmentExpands = {})); /** - * The permissions that a user has to a certain subscription + * EnvironmentResourceType. */ -var SubscriptionPermissions; -(function (SubscriptionPermissions) { - /** - * None - */ - SubscriptionPermissions[SubscriptionPermissions["None"] = 0] = "None"; +var EnvironmentResourceType; +(function (EnvironmentResourceType) { + EnvironmentResourceType[EnvironmentResourceType["Undefined"] = 0] = "Undefined"; /** - * full view of description, filters, etc. Not limited. + * Unknown resource type */ - SubscriptionPermissions[SubscriptionPermissions["View"] = 1] = "View"; + EnvironmentResourceType[EnvironmentResourceType["Generic"] = 1] = "Generic"; /** - * update subscription + * Virtual machine resource type */ - SubscriptionPermissions[SubscriptionPermissions["Edit"] = 2] = "Edit"; + EnvironmentResourceType[EnvironmentResourceType["VirtualMachine"] = 2] = "VirtualMachine"; /** - * delete subscription + * Kubernetes resource type */ - SubscriptionPermissions[SubscriptionPermissions["Delete"] = 4] = "Delete"; -})(SubscriptionPermissions = exports.SubscriptionPermissions || (exports.SubscriptionPermissions = {})); + EnvironmentResourceType[EnvironmentResourceType["Kubernetes"] = 4] = "Kubernetes"; +})(EnvironmentResourceType = exports.EnvironmentResourceType || (exports.EnvironmentResourceType = {})); +var ExclusiveLockType; +(function (ExclusiveLockType) { + ExclusiveLockType[ExclusiveLockType["RunLatest"] = 0] = "RunLatest"; + ExclusiveLockType[ExclusiveLockType["Sequential"] = 1] = "Sequential"; +})(ExclusiveLockType = exports.ExclusiveLockType || (exports.ExclusiveLockType = {})); /** - * Flags that influence the result set of a subscription query. + * The type of issue based on severity. */ -var SubscriptionQueryFlags; -(function (SubscriptionQueryFlags) { - SubscriptionQueryFlags[SubscriptionQueryFlags["None"] = 0] = "None"; - /** - * Include subscriptions with invalid subscribers. - */ - SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeInvalidSubscriptions"] = 2] = "IncludeInvalidSubscriptions"; +var IssueType; +(function (IssueType) { + IssueType[IssueType["Error"] = 1] = "Error"; + IssueType[IssueType["Warning"] = 2] = "Warning"; +})(IssueType = exports.IssueType || (exports.IssueType = {})); +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["Error"] = 0] = "Error"; + LogLevel[LogLevel["Warning"] = 1] = "Warning"; + LogLevel[LogLevel["Info"] = 2] = "Info"; +})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); +var MachineGroupActionFilter; +(function (MachineGroupActionFilter) { + MachineGroupActionFilter[MachineGroupActionFilter["None"] = 0] = "None"; + MachineGroupActionFilter[MachineGroupActionFilter["Manage"] = 2] = "Manage"; + MachineGroupActionFilter[MachineGroupActionFilter["Use"] = 16] = "Use"; +})(MachineGroupActionFilter = exports.MachineGroupActionFilter || (exports.MachineGroupActionFilter = {})); +var MaskType; +(function (MaskType) { + MaskType[MaskType["Variable"] = 1] = "Variable"; + MaskType[MaskType["Regex"] = 2] = "Regex"; +})(MaskType = exports.MaskType || (exports.MaskType = {})); +var OperatingSystemType; +(function (OperatingSystemType) { + OperatingSystemType[OperatingSystemType["Windows"] = 0] = "Windows"; + OperatingSystemType[OperatingSystemType["Linux"] = 1] = "Linux"; +})(OperatingSystemType = exports.OperatingSystemType || (exports.OperatingSystemType = {})); +var OperationType; +(function (OperationType) { + OperationType[OperationType["ConfigurationJob"] = 0] = "ConfigurationJob"; + OperationType[OperationType["SizingJob"] = 1] = "SizingJob"; + OperationType[OperationType["IncreaseCapacity"] = 2] = "IncreaseCapacity"; + OperationType[OperationType["Reimage"] = 3] = "Reimage"; + OperationType[OperationType["DeleteVMs"] = 4] = "DeleteVMs"; +})(OperationType = exports.OperationType || (exports.OperationType = {})); +var PlanGroupStatus; +(function (PlanGroupStatus) { + PlanGroupStatus[PlanGroupStatus["Running"] = 1] = "Running"; + PlanGroupStatus[PlanGroupStatus["Queued"] = 2] = "Queued"; + PlanGroupStatus[PlanGroupStatus["All"] = 3] = "All"; +})(PlanGroupStatus = exports.PlanGroupStatus || (exports.PlanGroupStatus = {})); +var PlanGroupStatusFilter; +(function (PlanGroupStatusFilter) { + PlanGroupStatusFilter[PlanGroupStatusFilter["Running"] = 1] = "Running"; + PlanGroupStatusFilter[PlanGroupStatusFilter["Queued"] = 2] = "Queued"; + PlanGroupStatusFilter[PlanGroupStatusFilter["All"] = 3] = "All"; +})(PlanGroupStatusFilter = exports.PlanGroupStatusFilter || (exports.PlanGroupStatusFilter = {})); +var ResourceLockStatus; +(function (ResourceLockStatus) { + ResourceLockStatus[ResourceLockStatus["Queued"] = 0] = "Queued"; + ResourceLockStatus[ResourceLockStatus["InUse"] = 1] = "InUse"; + ResourceLockStatus[ResourceLockStatus["Finished"] = 2] = "Finished"; + ResourceLockStatus[ResourceLockStatus["TimedOut"] = 3] = "TimedOut"; + ResourceLockStatus[ResourceLockStatus["Canceled"] = 4] = "Canceled"; + ResourceLockStatus[ResourceLockStatus["Abandoned"] = 5] = "Abandoned"; + ResourceLockStatus[ResourceLockStatus["WaitingOnChecks"] = 6] = "WaitingOnChecks"; +})(ResourceLockStatus = exports.ResourceLockStatus || (exports.ResourceLockStatus = {})); +var SecureFileActionFilter; +(function (SecureFileActionFilter) { + SecureFileActionFilter[SecureFileActionFilter["None"] = 0] = "None"; + SecureFileActionFilter[SecureFileActionFilter["Manage"] = 2] = "Manage"; + SecureFileActionFilter[SecureFileActionFilter["Use"] = 16] = "Use"; +})(SecureFileActionFilter = exports.SecureFileActionFilter || (exports.SecureFileActionFilter = {})); +/** + * This is useful in getting a list of deployment targets, filtered by the result of their last job. + */ +var TaskAgentJobResultFilter; +(function (TaskAgentJobResultFilter) { /** - * Include subscriptions marked for deletion. + * Only those deployment targets on which last job failed (**Abandoned**, **Canceled**, **Failed**, **Skipped**). */ - SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeDeletedSubscriptions"] = 4] = "IncludeDeletedSubscriptions"; + TaskAgentJobResultFilter[TaskAgentJobResultFilter["Failed"] = 1] = "Failed"; /** - * Include the full filter details with each subscription. + * Only those deployment targets on which last job Passed (**Succeeded**, **Succeeded with issues**). */ - SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeFilterDetails"] = 8] = "IncludeFilterDetails"; + TaskAgentJobResultFilter[TaskAgentJobResultFilter["Passed"] = 2] = "Passed"; /** - * For a subscription the caller does not have permission to view, return basic (non-confidential) information. + * Only those deployment targets that never executed a job. */ - SubscriptionQueryFlags[SubscriptionQueryFlags["AlwaysReturnBasicInformation"] = 16] = "AlwaysReturnBasicInformation"; + TaskAgentJobResultFilter[TaskAgentJobResultFilter["NeverDeployed"] = 4] = "NeverDeployed"; /** - * Include system subscriptions. + * All deployment targets. */ - SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeSystemSubscriptions"] = 32] = "IncludeSystemSubscriptions"; -})(SubscriptionQueryFlags = exports.SubscriptionQueryFlags || (exports.SubscriptionQueryFlags = {})); + TaskAgentJobResultFilter[TaskAgentJobResultFilter["All"] = 7] = "All"; +})(TaskAgentJobResultFilter = exports.TaskAgentJobResultFilter || (exports.TaskAgentJobResultFilter = {})); +var TaskAgentJobStepType; +(function (TaskAgentJobStepType) { + TaskAgentJobStepType[TaskAgentJobStepType["Task"] = 1] = "Task"; + TaskAgentJobStepType[TaskAgentJobStepType["Action"] = 2] = "Action"; +})(TaskAgentJobStepType = exports.TaskAgentJobStepType || (exports.TaskAgentJobStepType = {})); /** - * Subscription status values. A value greater than or equal to zero indicates the subscription is enabled. A negative value indicates the subscription is disabled. + * Filters pools based on whether the calling user has permission to use or manage the pool. */ -var SubscriptionStatus; -(function (SubscriptionStatus) { +var TaskAgentPoolActionFilter; +(function (TaskAgentPoolActionFilter) { + TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["None"] = 0] = "None"; + TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["Manage"] = 2] = "Manage"; + TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["Use"] = 16] = "Use"; +})(TaskAgentPoolActionFilter = exports.TaskAgentPoolActionFilter || (exports.TaskAgentPoolActionFilter = {})); +var TaskAgentPoolMaintenanceJobResult; +(function (TaskAgentPoolMaintenanceJobResult) { + TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Succeeded"] = 1] = "Succeeded"; + TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Failed"] = 2] = "Failed"; + TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Canceled"] = 4] = "Canceled"; +})(TaskAgentPoolMaintenanceJobResult = exports.TaskAgentPoolMaintenanceJobResult || (exports.TaskAgentPoolMaintenanceJobResult = {})); +var TaskAgentPoolMaintenanceJobStatus; +(function (TaskAgentPoolMaintenanceJobStatus) { + TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["InProgress"] = 1] = "InProgress"; + TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Completed"] = 2] = "Completed"; + TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Cancelling"] = 4] = "Cancelling"; + TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Queued"] = 8] = "Queued"; +})(TaskAgentPoolMaintenanceJobStatus = exports.TaskAgentPoolMaintenanceJobStatus || (exports.TaskAgentPoolMaintenanceJobStatus = {})); +var TaskAgentPoolMaintenanceScheduleDays; +(function (TaskAgentPoolMaintenanceScheduleDays) { /** - * Subscription is disabled because it generated a high volume of notifications. + * Do not run. */ - SubscriptionStatus[SubscriptionStatus["JailedByNotificationsVolume"] = -200] = "JailedByNotificationsVolume"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["None"] = 0] = "None"; /** - * Subscription is disabled and will be deleted. + * Run on Monday. */ - SubscriptionStatus[SubscriptionStatus["PendingDeletion"] = -100] = "PendingDeletion"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Monday"] = 1] = "Monday"; /** - * Subscription is disabled because of an Argument Exception while processing the subscription + * Run on Tuesday. */ - SubscriptionStatus[SubscriptionStatus["DisabledArgumentException"] = -12] = "DisabledArgumentException"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Tuesday"] = 2] = "Tuesday"; /** - * Subscription is disabled because the project is invalid + * Run on Wednesday. */ - SubscriptionStatus[SubscriptionStatus["DisabledProjectInvalid"] = -11] = "DisabledProjectInvalid"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Wednesday"] = 4] = "Wednesday"; /** - * Subscription is disabled because the identity does not have the appropriate permissions + * Run on Thursday. */ - SubscriptionStatus[SubscriptionStatus["DisabledMissingPermissions"] = -10] = "DisabledMissingPermissions"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Thursday"] = 8] = "Thursday"; /** - * Subscription is disabled service due to failures. + * Run on Friday. */ - SubscriptionStatus[SubscriptionStatus["DisabledFromProbation"] = -9] = "DisabledFromProbation"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Friday"] = 16] = "Friday"; /** - * Subscription is disabled because the identity is no longer active + * Run on Saturday. */ - SubscriptionStatus[SubscriptionStatus["DisabledInactiveIdentity"] = -8] = "DisabledInactiveIdentity"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Saturday"] = 32] = "Saturday"; /** - * Subscription is disabled because message queue is not supported. + * Run on Sunday. */ - SubscriptionStatus[SubscriptionStatus["DisabledMessageQueueNotSupported"] = -7] = "DisabledMessageQueueNotSupported"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Sunday"] = 64] = "Sunday"; /** - * Subscription is disabled because its subscriber is unknown. + * Run on all days of the week. */ - SubscriptionStatus[SubscriptionStatus["DisabledMissingIdentity"] = -6] = "DisabledMissingIdentity"; + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["All"] = 127] = "All"; +})(TaskAgentPoolMaintenanceScheduleDays = exports.TaskAgentPoolMaintenanceScheduleDays || (exports.TaskAgentPoolMaintenanceScheduleDays = {})); +/** + * Additional settings and descriptors for a TaskAgentPool + */ +var TaskAgentPoolOptions; +(function (TaskAgentPoolOptions) { + TaskAgentPoolOptions[TaskAgentPoolOptions["None"] = 0] = "None"; /** - * Subscription is disabled because it has an invalid role expression. + * TaskAgentPool backed by the Elastic pool service */ - SubscriptionStatus[SubscriptionStatus["DisabledInvalidRoleExpression"] = -5] = "DisabledInvalidRoleExpression"; + TaskAgentPoolOptions[TaskAgentPoolOptions["ElasticPool"] = 1] = "ElasticPool"; /** - * Subscription is disabled because it has an invalid filter expression. + * Set to true if agents are re-imaged after each TaskAgentJobRequest */ - SubscriptionStatus[SubscriptionStatus["DisabledInvalidPathClause"] = -4] = "DisabledInvalidPathClause"; + TaskAgentPoolOptions[TaskAgentPoolOptions["SingleUseAgents"] = 2] = "SingleUseAgents"; /** - * Subscription is disabled because it is a duplicate of a default subscription. + * Set to true if agents are held for investigation after a TaskAgentJobRequest failure */ - SubscriptionStatus[SubscriptionStatus["DisabledAsDuplicateOfDefault"] = -3] = "DisabledAsDuplicateOfDefault"; + TaskAgentPoolOptions[TaskAgentPoolOptions["PreserveAgentOnJobFailure"] = 4] = "PreserveAgentOnJobFailure"; +})(TaskAgentPoolOptions = exports.TaskAgentPoolOptions || (exports.TaskAgentPoolOptions = {})); +/** + * The type of agent pool. + */ +var TaskAgentPoolType; +(function (TaskAgentPoolType) { /** - * Subscription is disabled by an administrator, not the subscription's subscriber. + * A typical pool of task agents */ - SubscriptionStatus[SubscriptionStatus["DisabledByAdmin"] = -2] = "DisabledByAdmin"; + TaskAgentPoolType[TaskAgentPoolType["Automation"] = 1] = "Automation"; /** - * Subscription is disabled, typically by the owner of the subscription, and will not produce any notifications. + * A deployment pool */ - SubscriptionStatus[SubscriptionStatus["Disabled"] = -1] = "Disabled"; + TaskAgentPoolType[TaskAgentPoolType["Deployment"] = 2] = "Deployment"; +})(TaskAgentPoolType = exports.TaskAgentPoolType || (exports.TaskAgentPoolType = {})); +/** + * Filters queues based on whether the calling user has permission to use or manage the queue. + */ +var TaskAgentQueueActionFilter; +(function (TaskAgentQueueActionFilter) { + TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["None"] = 0] = "None"; + TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["Manage"] = 2] = "Manage"; + TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["Use"] = 16] = "Use"; +})(TaskAgentQueueActionFilter = exports.TaskAgentQueueActionFilter || (exports.TaskAgentQueueActionFilter = {})); +var TaskAgentRequestUpdateOptions; +(function (TaskAgentRequestUpdateOptions) { + TaskAgentRequestUpdateOptions[TaskAgentRequestUpdateOptions["None"] = 0] = "None"; + TaskAgentRequestUpdateOptions[TaskAgentRequestUpdateOptions["BumpRequestToTop"] = 1] = "BumpRequestToTop"; +})(TaskAgentRequestUpdateOptions = exports.TaskAgentRequestUpdateOptions || (exports.TaskAgentRequestUpdateOptions = {})); +var TaskAgentStatus; +(function (TaskAgentStatus) { + TaskAgentStatus[TaskAgentStatus["Offline"] = 1] = "Offline"; + TaskAgentStatus[TaskAgentStatus["Online"] = 2] = "Online"; +})(TaskAgentStatus = exports.TaskAgentStatus || (exports.TaskAgentStatus = {})); +/** + * This is useful in getting a list of deployment targets, filtered by the deployment agent status. + */ +var TaskAgentStatusFilter; +(function (TaskAgentStatusFilter) { /** - * Subscription is active. + * Only deployment targets that are offline. */ - SubscriptionStatus[SubscriptionStatus["Enabled"] = 0] = "Enabled"; + TaskAgentStatusFilter[TaskAgentStatusFilter["Offline"] = 1] = "Offline"; /** - * Subscription is active, but is on probation due to failed deliveries or other issues with the subscription. + * Only deployment targets that are online. */ - SubscriptionStatus[SubscriptionStatus["EnabledOnProbation"] = 1] = "EnabledOnProbation"; -})(SubscriptionStatus = exports.SubscriptionStatus || (exports.SubscriptionStatus = {})); + TaskAgentStatusFilter[TaskAgentStatusFilter["Online"] = 2] = "Online"; + /** + * All deployment targets. + */ + TaskAgentStatusFilter[TaskAgentStatusFilter["All"] = 3] = "All"; +})(TaskAgentStatusFilter = exports.TaskAgentStatusFilter || (exports.TaskAgentStatusFilter = {})); +var TaskAgentUpdateReasonType; +(function (TaskAgentUpdateReasonType) { + TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["Manual"] = 1] = "Manual"; + TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["MinAgentVersionRequired"] = 2] = "MinAgentVersionRequired"; + TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["Downgrade"] = 3] = "Downgrade"; +})(TaskAgentUpdateReasonType = exports.TaskAgentUpdateReasonType || (exports.TaskAgentUpdateReasonType = {})); +var TaskCommandMode; +(function (TaskCommandMode) { + TaskCommandMode[TaskCommandMode["Any"] = 0] = "Any"; + TaskCommandMode[TaskCommandMode["Restricted"] = 1] = "Restricted"; +})(TaskCommandMode = exports.TaskCommandMode || (exports.TaskCommandMode = {})); +var TaskDefinitionStatus; +(function (TaskDefinitionStatus) { + TaskDefinitionStatus[TaskDefinitionStatus["Preinstalled"] = 1] = "Preinstalled"; + TaskDefinitionStatus[TaskDefinitionStatus["ReceivedInstallOrUpdate"] = 2] = "ReceivedInstallOrUpdate"; + TaskDefinitionStatus[TaskDefinitionStatus["Installed"] = 3] = "Installed"; + TaskDefinitionStatus[TaskDefinitionStatus["ReceivedUninstall"] = 4] = "ReceivedUninstall"; + TaskDefinitionStatus[TaskDefinitionStatus["Uninstalled"] = 5] = "Uninstalled"; + TaskDefinitionStatus[TaskDefinitionStatus["RequestedUpdate"] = 6] = "RequestedUpdate"; + TaskDefinitionStatus[TaskDefinitionStatus["Updated"] = 7] = "Updated"; + TaskDefinitionStatus[TaskDefinitionStatus["AlreadyUpToDate"] = 8] = "AlreadyUpToDate"; + TaskDefinitionStatus[TaskDefinitionStatus["InlineUpdateReceived"] = 9] = "InlineUpdateReceived"; +})(TaskDefinitionStatus = exports.TaskDefinitionStatus || (exports.TaskDefinitionStatus = {})); +var TaskGroupExpands; +(function (TaskGroupExpands) { + TaskGroupExpands[TaskGroupExpands["None"] = 0] = "None"; + TaskGroupExpands[TaskGroupExpands["Tasks"] = 2] = "Tasks"; +})(TaskGroupExpands = exports.TaskGroupExpands || (exports.TaskGroupExpands = {})); /** - * Set of flags used to determine which set of templates is retrieved when querying for subscription templates + * Specifies the desired ordering of taskGroups. */ -var SubscriptionTemplateQueryFlags; -(function (SubscriptionTemplateQueryFlags) { - SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["None"] = 0] = "None"; +var TaskGroupQueryOrder; +(function (TaskGroupQueryOrder) { /** - * Include user templates + * Order by createdon ascending. */ - SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUser"] = 1] = "IncludeUser"; + TaskGroupQueryOrder[TaskGroupQueryOrder["CreatedOnAscending"] = 0] = "CreatedOnAscending"; /** - * Include group templates + * Order by createdon descending. */ - SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeGroup"] = 2] = "IncludeGroup"; + TaskGroupQueryOrder[TaskGroupQueryOrder["CreatedOnDescending"] = 1] = "CreatedOnDescending"; +})(TaskGroupQueryOrder = exports.TaskGroupQueryOrder || (exports.TaskGroupQueryOrder = {})); +var TaskOrchestrationItemType; +(function (TaskOrchestrationItemType) { + TaskOrchestrationItemType[TaskOrchestrationItemType["Container"] = 0] = "Container"; + TaskOrchestrationItemType[TaskOrchestrationItemType["Job"] = 1] = "Job"; +})(TaskOrchestrationItemType = exports.TaskOrchestrationItemType || (exports.TaskOrchestrationItemType = {})); +var TaskOrchestrationPlanState; +(function (TaskOrchestrationPlanState) { + TaskOrchestrationPlanState[TaskOrchestrationPlanState["InProgress"] = 1] = "InProgress"; + TaskOrchestrationPlanState[TaskOrchestrationPlanState["Queued"] = 2] = "Queued"; + TaskOrchestrationPlanState[TaskOrchestrationPlanState["Completed"] = 4] = "Completed"; + TaskOrchestrationPlanState[TaskOrchestrationPlanState["Throttled"] = 8] = "Throttled"; +})(TaskOrchestrationPlanState = exports.TaskOrchestrationPlanState || (exports.TaskOrchestrationPlanState = {})); +/** + * The result of an operation tracked by a timeline record. + */ +var TaskResult; +(function (TaskResult) { + TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; + TaskResult[TaskResult["SucceededWithIssues"] = 1] = "SucceededWithIssues"; + TaskResult[TaskResult["Failed"] = 2] = "Failed"; + TaskResult[TaskResult["Canceled"] = 3] = "Canceled"; + TaskResult[TaskResult["Skipped"] = 4] = "Skipped"; + TaskResult[TaskResult["Abandoned"] = 5] = "Abandoned"; +})(TaskResult = exports.TaskResult || (exports.TaskResult = {})); +/** + * The state of the timeline record. + */ +var TimelineRecordState; +(function (TimelineRecordState) { + TimelineRecordState[TimelineRecordState["Pending"] = 0] = "Pending"; + TimelineRecordState[TimelineRecordState["InProgress"] = 1] = "InProgress"; + TimelineRecordState[TimelineRecordState["Completed"] = 2] = "Completed"; +})(TimelineRecordState = exports.TimelineRecordState || (exports.TimelineRecordState = {})); +var VariableGroupActionFilter; +(function (VariableGroupActionFilter) { + VariableGroupActionFilter[VariableGroupActionFilter["None"] = 0] = "None"; + VariableGroupActionFilter[VariableGroupActionFilter["Manage"] = 2] = "Manage"; + VariableGroupActionFilter[VariableGroupActionFilter["Use"] = 16] = "Use"; +})(VariableGroupActionFilter = exports.VariableGroupActionFilter || (exports.VariableGroupActionFilter = {})); +/** + * Specifies the desired ordering of variableGroups. + */ +var VariableGroupQueryOrder; +(function (VariableGroupQueryOrder) { /** - * Include user and group templates + * Order by id ascending. */ - SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUserAndGroup"] = 4] = "IncludeUserAndGroup"; + VariableGroupQueryOrder[VariableGroupQueryOrder["IdAscending"] = 0] = "IdAscending"; /** - * Include the event type details like the fields and operators + * Order by id descending. */ - SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeEventTypeInformation"] = 22] = "IncludeEventTypeInformation"; -})(SubscriptionTemplateQueryFlags = exports.SubscriptionTemplateQueryFlags || (exports.SubscriptionTemplateQueryFlags = {})); -var SubscriptionTemplateType; -(function (SubscriptionTemplateType) { - SubscriptionTemplateType[SubscriptionTemplateType["User"] = 0] = "User"; - SubscriptionTemplateType[SubscriptionTemplateType["Team"] = 1] = "Team"; - SubscriptionTemplateType[SubscriptionTemplateType["Both"] = 2] = "Both"; - SubscriptionTemplateType[SubscriptionTemplateType["None"] = 3] = "None"; -})(SubscriptionTemplateType = exports.SubscriptionTemplateType || (exports.SubscriptionTemplateType = {})); + VariableGroupQueryOrder[VariableGroupQueryOrder["IdDescending"] = 1] = "IdDescending"; +})(VariableGroupQueryOrder = exports.VariableGroupQueryOrder || (exports.VariableGroupQueryOrder = {})); exports.TypeInfo = { - ActorNotificationReason: {}, - BatchNotificationOperation: {}, - DefaultGroupDeliveryPreference: { + AadLoginPromptOption: { enumValues: { - "noDelivery": -1, - "eachMember": 2 + "noOption": 0, + "login": 1, + "selectAccount": 2, + "freshLogin": 3, + "freshLoginWithMfa": 4 } }, - EvaluationOperationStatus: { + AgentChangeEvent: {}, + AgentJobRequestMessage: {}, + AgentPoolEvent: {}, + AgentQueueEvent: {}, + AgentQueuesEvent: {}, + AuditAction: { enumValues: { - "notSet": 0, - "queued": 1, - "inProgress": 2, - "cancelled": 3, - "succeeded": 4, - "failed": 5, - "timedOut": 6, - "notFound": 7 + "add": 1, + "update": 2, + "delete": 3, + "undelete": 4 } }, - EventBacklogStatus: {}, - EventProcessingLog: {}, - EventPublisherQueryFlags: { + AzureKeyVaultVariableGroupProviderData: {}, + AzureKeyVaultVariableValue: {}, + DemandMinimumVersion: {}, + DemandSource: {}, + DemandSourceType: { + enumValues: { + "task": 0, + "feature": 1 + } + }, + DeploymentGroup: {}, + DeploymentGroupActionFilter: { enumValues: { "none": 0, - "includeRemoteServices": 2 + "manage": 2, + "use": 16 } }, - EventTypeQueryFlags: { + DeploymentGroupExpands: { enumValues: { "none": 0, - "includeFields": 1 + "machines": 2, + "tags": 4 } }, - INotificationDiagnosticLog: {}, - NotificationAdminSettings: {}, - NotificationAdminSettingsUpdateParameters: {}, - NotificationBacklogStatus: {}, - NotificationDeliveryLog: {}, - NotificationDiagnosticLog: {}, - NotificationEventBacklogStatus: {}, - NotificationEventField: {}, - NotificationEventFieldType: {}, - NotificationEventType: {}, - NotificationJobDiagnosticLog: {}, - NotificationOperation: { + DeploymentGroupMetrics: {}, + DeploymentGroupReference: {}, + DeploymentMachine: {}, + DeploymentMachineChangedData: {}, + DeploymentMachineExpands: { enumValues: { "none": 0, - "suspendUnprocessed": 1 + "capabilities": 2, + "assignedRequest": 4 } }, - NotificationReason: {}, - NotificationReasonType: { + DeploymentMachineGroup: {}, + DeploymentMachineGroupReference: {}, + DeploymentMachinesChangeEvent: {}, + DeploymentPoolSummary: {}, + DeploymentPoolSummaryExpands: { enumValues: { - "unknown": 0, - "follows": 1, - "personal": 2, - "personalAlias": 3, - "directMember": 4, - "indirectMember": 5, - "groupAlias": 6, - "subscriptionAlias": 7, - "singleRole": 8, - "directMemberGroupRole": 9, - "inDirectMemberGroupRole": 10, - "aliasMemberGroupRole": 11 + "none": 0, + "deploymentGroups": 2, + "resource": 4 } }, - NotificationStatistic: {}, - NotificationStatisticsQuery: {}, - NotificationStatisticsQueryConditions: {}, - NotificationStatisticType: { + DeploymentTargetExpands: { enumValues: { - "notificationBySubscription": 0, - "eventsByEventType": 1, - "notificationByEventType": 2, - "eventsByEventTypePerUser": 3, - "notificationByEventTypePerUser": 4, - "events": 5, - "notifications": 6, - "notificationFailureBySubscription": 7, - "unprocessedRangeStart": 100, - "unprocessedEventsByPublisher": 101, - "unprocessedEventDelayByPublisher": 102, - "unprocessedNotificationsByChannelByPublisher": 103, - "unprocessedNotificationDelayByChannelByPublisher": 104, - "delayRangeStart": 200, - "totalPipelineTime": 201, - "notificationPipelineTime": 202, - "eventPipelineTime": 203, - "hourlyRangeStart": 1000, - "hourlyNotificationBySubscription": 1001, - "hourlyEventsByEventTypePerUser": 1002, - "hourlyEvents": 1003, - "hourlyNotifications": 1004, - "hourlyUnprocessedEventsByPublisher": 1101, - "hourlyUnprocessedEventDelayByPublisher": 1102, - "hourlyUnprocessedNotificationsByChannelByPublisher": 1103, - "hourlyUnprocessedNotificationDelayByChannelByPublisher": 1104, - "hourlyTotalPipelineTime": 1201, - "hourlyNotificationPipelineTime": 1202, - "hourlyEventPipelineTime": 1203 + "none": 0, + "capabilities": 2, + "assignedRequest": 4, + "lastCompletedRequest": 8 } }, - NotificationSubscriber: {}, - NotificationSubscriberDeliveryPreference: { + ElasticAgentState: { enumValues: { - "noDelivery": -1, - "preferredEmailAddress": 1, - "eachMember": 2, - "useDefault": 3 + "none": 0, + "enabled": 1, + "online": 2, + "assigned": 4 } }, - NotificationSubscriberUpdateParameters: {}, - NotificationSubscription: {}, - NotificationSubscriptionTemplate: {}, - NotificationSubscriptionUpdateParameters: {}, - SubscriberFlags: { + ElasticComputeState: { enumValues: { "none": 0, - "deliveryPreferencesEditable": 2, - "supportsPreferredEmailAddressDelivery": 4, - "supportsEachMemberDelivery": 8, - "supportsNoDelivery": 16, - "isUser": 32, - "isGroup": 64, - "isTeam": 128 + "healthy": 1, + "creating": 2, + "deleting": 3, + "failed": 4, + "stopped": 5, + "reimaging": 6 } }, - SubscriptionDiagnostics: {}, - SubscriptionEvaluationRequest: {}, - SubscriptionEvaluationResult: {}, - SubscriptionFieldType: { + ElasticNode: {}, + ElasticNodeSettings: {}, + ElasticNodeState: { enumValues: { - "string": 1, - "integer": 2, - "dateTime": 3, - "plainText": 5, - "html": 7, - "treePath": 8, - "history": 9, - "double": 10, - "guid": 11, - "boolean": 12, - "identity": 13, - "picklistInteger": 14, - "picklistString": 15, - "picklistDouble": 16, - "teamProject": 17 + "none": 0, + "new": 1, + "creatingCompute": 2, + "startingAgent": 3, + "idle": 4, + "assigned": 5, + "offline": 6, + "pendingReimage": 7, + "pendingDelete": 8, + "saved": 9, + "deletingCompute": 10, + "deleted": 11, + "lost": 12, + "reimagingCompute": 13, + "restartingAgent": 14, + "failedToStartPendingDelete": 15, + "failedToRestartPendingDelete": 16, + "failedVMPendingDelete": 17, + "assignedPendingDelete": 18 } }, - SubscriptionFlags: { + ElasticPool: {}, + ElasticPoolCreationResult: {}, + ElasticPoolLog: {}, + ElasticPoolSettings: {}, + ElasticPoolState: { + enumValues: { + "online": 0, + "offline": 1, + "unhealthy": 2, + "new": 3 + } + }, + EnvironmentActionFilter: { enumValues: { "none": 0, - "groupSubscription": 1, - "contributedSubscription": 2, - "canOptOut": 4, - "teamSubscription": 8, - "oneActorMatches": 16 + "manage": 2, + "use": 16 } }, - SubscriptionPermissions: { + EnvironmentDeploymentExecutionRecord: {}, + EnvironmentExpands: { enumValues: { "none": 0, - "view": 1, - "edit": 2, - "delete": 4 + "resourceReferences": 1 } }, - SubscriptionQuery: {}, - SubscriptionQueryCondition: {}, - SubscriptionQueryFlags: { + EnvironmentInstance: {}, + EnvironmentResource: {}, + EnvironmentResourceDeploymentExecutionRecord: {}, + EnvironmentResourceReference: {}, + EnvironmentResourceType: { + enumValues: { + "undefined": 0, + "generic": 1, + "virtualMachine": 2, + "kubernetes": 4 + } + }, + ExclusiveLockType: { + enumValues: { + "runLatest": 0, + "sequential": 1 + } + }, + Issue: {}, + IssueType: { + enumValues: { + "error": 1, + "warning": 2 + } + }, + JobAssignedEvent: {}, + JobCompletedEvent: {}, + JobEnvironment: {}, + JobRequestMessage: {}, + KubernetesResource: {}, + LogLevel: { + enumValues: { + "error": 0, + "warning": 1, + "info": 2 + } + }, + MachineGroupActionFilter: { enumValues: { "none": 0, - "includeInvalidSubscriptions": 2, - "includeDeletedSubscriptions": 4, - "includeFilterDetails": 8, - "alwaysReturnBasicInformation": 16, - "includeSystemSubscriptions": 32 + "manage": 2, + "use": 16 } }, - SubscriptionStatus: { + MaskHint: {}, + MaskType: { enumValues: { - "jailedByNotificationsVolume": -200, - "pendingDeletion": -100, - "disabledArgumentException": -12, - "disabledProjectInvalid": -11, - "disabledMissingPermissions": -10, - "disabledFromProbation": -9, - "disabledInactiveIdentity": -8, - "disabledMessageQueueNotSupported": -7, - "disabledMissingIdentity": -6, - "disabledInvalidRoleExpression": -5, - "disabledInvalidPathClause": -4, - "disabledAsDuplicateOfDefault": -3, - "disabledByAdmin": -2, - "disabled": -1, - "enabled": 0, - "enabledOnProbation": 1 + "variable": 1, + "regex": 2 } }, - SubscriptionTemplateQueryFlags: { + OperatingSystemType: { + enumValues: { + "windows": 0, + "linux": 1 + } + }, + OperationType: { + enumValues: { + "configurationJob": 0, + "sizingJob": 1, + "increaseCapacity": 2, + "reimage": 3, + "deleteVMs": 4 + } + }, + PackageMetadata: {}, + PlanEnvironment: {}, + PlanGroupStatus: { + enumValues: { + "running": 1, + "queued": 2, + "all": 3 + } + }, + PlanGroupStatusFilter: { + enumValues: { + "running": 1, + "queued": 2, + "all": 3 + } + }, + ResourceLockRequest: {}, + ResourceLockStatus: { + enumValues: { + "queued": 0, + "inUse": 1, + "finished": 2, + "timedOut": 3, + "canceled": 4, + "abandoned": 5, + "waitingOnChecks": 6 + } + }, + ResourceUsage: {}, + SecureFile: {}, + SecureFileActionFilter: { enumValues: { "none": 0, - "includeUser": 1, - "includeGroup": 2, - "includeUserAndGroup": 4, - "includeEventTypeInformation": 22 + "manage": 2, + "use": 16 + } + }, + SecureFileEvent: {}, + ServerTaskRequestMessage: {}, + ServiceEndpointAuthenticationScheme: {}, + ServiceEndpointExecutionData: {}, + ServiceEndpointExecutionRecord: {}, + ServiceEndpointExecutionRecordsInput: {}, + ServiceEndpointRequestResult: {}, + ServiceEndpointType: {}, + TaskAgent: {}, + TaskAgentCloudRequest: {}, + TaskAgentCloudType: {}, + TaskAgentDowngrade: {}, + TaskAgentJob: {}, + TaskAgentJobRequest: {}, + TaskAgentJobResultFilter: { + enumValues: { + "failed": 1, + "passed": 2, + "neverDeployed": 4, + "all": 7 + } + }, + TaskAgentJobStep: {}, + TaskAgentJobStepType: { + enumValues: { + "task": 1, + "action": 2 + } + }, + TaskAgentManualUpdate: {}, + TaskAgentMinAgentVersionRequiredUpdate: {}, + TaskAgentPool: {}, + TaskAgentPoolActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + TaskAgentPoolMaintenanceDefinition: {}, + TaskAgentPoolMaintenanceJob: {}, + TaskAgentPoolMaintenanceJobResult: { + enumValues: { + "succeeded": 1, + "failed": 2, + "canceled": 4 + } + }, + TaskAgentPoolMaintenanceJobStatus: { + enumValues: { + "inProgress": 1, + "completed": 2, + "cancelling": 4, + "queued": 8 + } + }, + TaskAgentPoolMaintenanceJobTargetAgent: {}, + TaskAgentPoolMaintenanceSchedule: {}, + TaskAgentPoolMaintenanceScheduleDays: { + enumValues: { + "none": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 4, + "thursday": 8, + "friday": 16, + "saturday": 32, + "sunday": 64, + "all": 127 + } + }, + TaskAgentPoolOptions: { + enumValues: { + "none": 0, + "elasticPool": 1, + "singleUseAgents": 2, + "preserveAgentOnJobFailure": 4 + } + }, + TaskAgentPoolReference: {}, + TaskAgentPoolStatus: {}, + TaskAgentPoolSummary: {}, + TaskAgentPoolType: { + enumValues: { + "automation": 1, + "deployment": 2 + } + }, + TaskAgentQueue: {}, + TaskAgentQueueActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + TaskAgentReference: {}, + TaskAgentRequestUpdateOptions: { + enumValues: { + "none": 0, + "bumpRequestToTop": 1 + } + }, + TaskAgentSession: {}, + TaskAgentStatus: { + enumValues: { + "offline": 1, + "online": 2 + } + }, + TaskAgentStatusFilter: { + enumValues: { + "offline": 1, + "online": 2, + "all": 3 + } + }, + TaskAgentUpdate: {}, + TaskAgentUpdateReason: {}, + TaskAgentUpdateReasonType: { + enumValues: { + "manual": 1, + "minAgentVersionRequired": 2, + "downgrade": 3 + } + }, + TaskAttachment: {}, + TaskCommandMode: { + enumValues: { + "any": 0, + "restricted": 1 + } + }, + TaskCommandRestrictions: {}, + TaskCompletedEvent: {}, + TaskDefinition: {}, + TaskDefinitionStatus: { + enumValues: { + "preinstalled": 1, + "receivedInstallOrUpdate": 2, + "installed": 3, + "receivedUninstall": 4, + "uninstalled": 5, + "requestedUpdate": 6, + "updated": 7, + "alreadyUpToDate": 8, + "inlineUpdateReceived": 9 + } + }, + TaskGroup: {}, + TaskGroupExpands: { + enumValues: { + "none": 0, + "tasks": 2 + } + }, + TaskGroupQueryOrder: { + enumValues: { + "createdOnAscending": 0, + "createdOnDescending": 1 + } + }, + TaskGroupRevision: {}, + TaskLog: {}, + TaskOrchestrationContainer: {}, + TaskOrchestrationItem: {}, + TaskOrchestrationItemType: { + enumValues: { + "container": 0, + "job": 1 + } + }, + TaskOrchestrationJob: {}, + TaskOrchestrationPlan: {}, + TaskOrchestrationPlanGroup: {}, + TaskOrchestrationPlanGroupsQueueMetrics: {}, + TaskOrchestrationPlanState: { + enumValues: { + "inProgress": 1, + "queued": 2, + "completed": 4, + "throttled": 8 + } + }, + TaskOrchestrationQueuedPlan: {}, + TaskOrchestrationQueuedPlanGroup: {}, + TaskRestrictions: {}, + TaskResult: { + enumValues: { + "succeeded": 0, + "succeededWithIssues": 1, + "failed": 2, + "canceled": 3, + "skipped": 4, + "abandoned": 5 + } + }, + Timeline: {}, + TimelineRecord: {}, + TimelineRecordState: { + enumValues: { + "pending": 0, + "inProgress": 1, + "completed": 2 + } + }, + VariableGroup: {}, + VariableGroupActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + VariableGroupQueryOrder: { + enumValues: { + "idAscending": 0, + "idDescending": 1 } }, - SubscriptionTemplateType: { - enumValues: { - "user": 0, - "team": 1, - "both": 2, - "none": 3 - } + VirtualMachine: {}, + VirtualMachineGroup: {}, + VirtualMachineResource: {}, + VirtualMachineResourceCreateParameters: {}, +}; +exports.TypeInfo.AgentChangeEvent.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + timeStamp: { + isDate: true, + } +}; +exports.TypeInfo.AgentJobRequestMessage.fields = { + environment: { + typeInfo: exports.TypeInfo.JobEnvironment + }, + lockedUntil: { + isDate: true, + } +}; +exports.TypeInfo.AgentPoolEvent.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPool + } +}; +exports.TypeInfo.AgentQueueEvent.fields = { + queue: { + typeInfo: exports.TypeInfo.TaskAgentQueue + } +}; +exports.TypeInfo.AgentQueuesEvent.fields = { + queues: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentQueue + } +}; +exports.TypeInfo.AzureKeyVaultVariableGroupProviderData.fields = { + lastRefreshedOn: { + isDate: true, + } +}; +exports.TypeInfo.AzureKeyVaultVariableValue.fields = { + expires: { + isDate: true, + } +}; +exports.TypeInfo.DemandMinimumVersion.fields = { + source: { + typeInfo: exports.TypeInfo.DemandSource + } +}; +exports.TypeInfo.DemandSource.fields = { + sourceType: { + enumType: exports.TypeInfo.DemandSourceType + } +}; +exports.TypeInfo.DeploymentGroup.fields = { + machines: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentMachine + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.DeploymentGroupMetrics.fields = { + deploymentGroup: { + typeInfo: exports.TypeInfo.DeploymentGroupReference + } +}; +exports.TypeInfo.DeploymentGroupReference.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.DeploymentMachine.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + } +}; +exports.TypeInfo.DeploymentMachineChangedData.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + } +}; +exports.TypeInfo.DeploymentMachineGroup.fields = { + machines: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentMachine }, - SubscriptionTraceDiagnosticLog: {}, - SubscriptionTraceEventProcessingLog: {}, - SubscriptionTraceNotificationDeliveryLog: {}, - SubscriptionTracing: {}, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } }; -exports.TypeInfo.ActorNotificationReason.fields = { - notificationReasonType: { - enumType: exports.TypeInfo.NotificationReasonType +exports.TypeInfo.DeploymentMachineGroupReference.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference } }; -exports.TypeInfo.BatchNotificationOperation.fields = { - notificationOperation: { - enumType: exports.TypeInfo.NotificationOperation +exports.TypeInfo.DeploymentMachinesChangeEvent.fields = { + machineGroupReference: { + typeInfo: exports.TypeInfo.DeploymentGroupReference + }, + machines: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentMachineChangedData } }; -exports.TypeInfo.EventBacklogStatus.fields = { - captureTime: { - isDate: true, +exports.TypeInfo.DeploymentPoolSummary.fields = { + deploymentGroups: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentGroupReference }, - lastEventBatchStartTime: { - isDate: true, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference }, - lastEventProcessedTime: { - isDate: true, + resource: { + typeInfo: exports.TypeInfo.EnvironmentResourceReference + } +}; +exports.TypeInfo.ElasticNode.fields = { + agentState: { + enumType: exports.TypeInfo.ElasticAgentState }, - lastJobBatchStartTime: { - isDate: true, + computeState: { + enumType: exports.TypeInfo.ElasticComputeState }, - lastJobProcessedTime: { - isDate: true, + desiredState: { + enumType: exports.TypeInfo.ElasticNodeState }, - oldestPendingEventTime: { + state: { + enumType: exports.TypeInfo.ElasticNodeState + }, + stateChangedOn: { isDate: true, } }; -exports.TypeInfo.EventProcessingLog.fields = { - endTime: { +exports.TypeInfo.ElasticNodeSettings.fields = { + state: { + enumType: exports.TypeInfo.ElasticNodeState + } +}; +exports.TypeInfo.ElasticPool.fields = { + offlineSince: { isDate: true, }, - startTime: { - isDate: true, + osType: { + enumType: exports.TypeInfo.OperatingSystemType + }, + state: { + enumType: exports.TypeInfo.ElasticPoolState } }; -exports.TypeInfo.INotificationDiagnosticLog.fields = { - endTime: { - isDate: true, +exports.TypeInfo.ElasticPoolCreationResult.fields = { + agentPool: { + typeInfo: exports.TypeInfo.TaskAgentPool }, - startTime: { - isDate: true, + agentQueue: { + typeInfo: exports.TypeInfo.TaskAgentQueue + }, + elasticPool: { + typeInfo: exports.TypeInfo.ElasticPool } }; -exports.TypeInfo.NotificationAdminSettings.fields = { - defaultGroupDeliveryPreference: { - enumType: exports.TypeInfo.DefaultGroupDeliveryPreference +exports.TypeInfo.ElasticPoolLog.fields = { + level: { + enumType: exports.TypeInfo.LogLevel + }, + operation: { + enumType: exports.TypeInfo.OperationType + }, + timestamp: { + isDate: true, } }; -exports.TypeInfo.NotificationAdminSettingsUpdateParameters.fields = { - defaultGroupDeliveryPreference: { - enumType: exports.TypeInfo.DefaultGroupDeliveryPreference +exports.TypeInfo.ElasticPoolSettings.fields = { + osType: { + enumType: exports.TypeInfo.OperatingSystemType } }; -exports.TypeInfo.NotificationBacklogStatus.fields = { - captureTime: { +exports.TypeInfo.EnvironmentDeploymentExecutionRecord.fields = { + finishTime: { isDate: true, }, - lastJobBatchStartTime: { + queueTime: { isDate: true, }, - lastJobProcessedTime: { - isDate: true, + result: { + enumType: exports.TypeInfo.TaskResult }, - lastNotificationBatchStartTime: { + startTime: { isDate: true, - }, - lastNotificationProcessedTime: { + } +}; +exports.TypeInfo.EnvironmentInstance.fields = { + createdOn: { isDate: true, }, - oldestPendingNotificationTime: { + lastModifiedOn: { isDate: true, + }, + resources: { + isArray: true, + typeInfo: exports.TypeInfo.EnvironmentResourceReference } }; -exports.TypeInfo.NotificationDeliveryLog.fields = { - endTime: { +exports.TypeInfo.EnvironmentResource.fields = { + createdOn: { isDate: true, }, - startTime: { + lastModifiedOn: { isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType } }; -exports.TypeInfo.NotificationDiagnosticLog.fields = { - endTime: { +exports.TypeInfo.EnvironmentResourceDeploymentExecutionRecord.fields = { + finishTime: { isDate: true, }, + result: { + enumType: exports.TypeInfo.TaskResult + }, startTime: { isDate: true, } }; -exports.TypeInfo.NotificationEventBacklogStatus.fields = { - eventBacklogStatus: { - isArray: true, - typeInfo: exports.TypeInfo.EventBacklogStatus - }, - notificationBacklogStatus: { - isArray: true, - typeInfo: exports.TypeInfo.NotificationBacklogStatus +exports.TypeInfo.EnvironmentResourceReference.fields = { + type: { + enumType: exports.TypeInfo.EnvironmentResourceType } }; -exports.TypeInfo.NotificationEventField.fields = { - fieldType: { - typeInfo: exports.TypeInfo.NotificationEventFieldType +exports.TypeInfo.Issue.fields = { + type: { + enumType: exports.TypeInfo.IssueType } }; -exports.TypeInfo.NotificationEventFieldType.fields = { - subscriptionFieldType: { - enumType: exports.TypeInfo.SubscriptionFieldType +exports.TypeInfo.JobAssignedEvent.fields = { + request: { + typeInfo: exports.TypeInfo.TaskAgentJobRequest } }; -exports.TypeInfo.NotificationEventType.fields = { - fields: { - isDictionary: true, - dictionaryValueTypeInfo: exports.TypeInfo.NotificationEventField +exports.TypeInfo.JobCompletedEvent.fields = { + result: { + enumType: exports.TypeInfo.TaskResult } }; -exports.TypeInfo.NotificationJobDiagnosticLog.fields = { - endTime: { - isDate: true, +exports.TypeInfo.JobEnvironment.fields = { + mask: { + isArray: true, + typeInfo: exports.TypeInfo.MaskHint }, - startTime: { - isDate: true, + secureFiles: { + isArray: true, + typeInfo: exports.TypeInfo.SecureFile } }; -exports.TypeInfo.NotificationReason.fields = { - notificationReasonType: { - enumType: exports.TypeInfo.NotificationReasonType +exports.TypeInfo.JobRequestMessage.fields = { + environment: { + typeInfo: exports.TypeInfo.JobEnvironment } }; -exports.TypeInfo.NotificationStatistic.fields = { - date: { +exports.TypeInfo.KubernetesResource.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { isDate: true, }, type: { - enumType: exports.TypeInfo.NotificationStatisticType + enumType: exports.TypeInfo.EnvironmentResourceType } }; -exports.TypeInfo.NotificationStatisticsQuery.fields = { - conditions: { +exports.TypeInfo.MaskHint.fields = { + type: { + enumType: exports.TypeInfo.MaskType + } +}; +exports.TypeInfo.PackageMetadata.fields = { + createdOn: { + isDate: true, + } +}; +exports.TypeInfo.PlanEnvironment.fields = { + mask: { isArray: true, - typeInfo: exports.TypeInfo.NotificationStatisticsQueryConditions + typeInfo: exports.TypeInfo.MaskHint } }; -exports.TypeInfo.NotificationStatisticsQueryConditions.fields = { - endDate: { +exports.TypeInfo.ResourceLockRequest.fields = { + assignTime: { isDate: true, }, - startDate: { + finishTime: { isDate: true, }, - type: { - enumType: exports.TypeInfo.NotificationStatisticType - } -}; -exports.TypeInfo.NotificationSubscriber.fields = { - deliveryPreference: { - enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference + lockType: { + enumType: exports.TypeInfo.ExclusiveLockType }, - flags: { - enumType: exports.TypeInfo.SubscriberFlags + queueTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ResourceLockStatus } }; -exports.TypeInfo.NotificationSubscriberUpdateParameters.fields = { - deliveryPreference: { - enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference +exports.TypeInfo.ResourceUsage.fields = { + runningRequests: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentJobRequest } }; -exports.TypeInfo.NotificationSubscription.fields = { - diagnostics: { - typeInfo: exports.TypeInfo.SubscriptionDiagnostics - }, - flags: { - enumType: exports.TypeInfo.SubscriptionFlags - }, - modifiedDate: { +exports.TypeInfo.SecureFile.fields = { + createdOn: { isDate: true, }, - permissions: { - enumType: exports.TypeInfo.SubscriptionPermissions - }, - status: { - enumType: exports.TypeInfo.SubscriptionStatus + modifiedOn: { + isDate: true, } }; -exports.TypeInfo.NotificationSubscriptionTemplate.fields = { - notificationEventInformation: { - typeInfo: exports.TypeInfo.NotificationEventType +exports.TypeInfo.SecureFileEvent.fields = { + secureFiles: { + isArray: true, + typeInfo: exports.TypeInfo.SecureFile + } +}; +exports.TypeInfo.ServerTaskRequestMessage.fields = { + environment: { + typeInfo: exports.TypeInfo.JobEnvironment }, - type: { - enumType: exports.TypeInfo.SubscriptionTemplateType + taskDefinition: { + typeInfo: exports.TypeInfo.TaskDefinition } }; -exports.TypeInfo.NotificationSubscriptionUpdateParameters.fields = { - status: { - enumType: exports.TypeInfo.SubscriptionStatus +exports.TypeInfo.ServiceEndpointAuthenticationScheme.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor } }; -exports.TypeInfo.SubscriptionDiagnostics.fields = { - deliveryResults: { - typeInfo: exports.TypeInfo.SubscriptionTracing +exports.TypeInfo.ServiceEndpointExecutionData.fields = { + finishTime: { + isDate: true, }, - deliveryTracing: { - typeInfo: exports.TypeInfo.SubscriptionTracing + result: { + enumType: exports.TypeInfo.TaskResult }, - evaluationTracing: { - typeInfo: exports.TypeInfo.SubscriptionTracing + startTime: { + isDate: true, } }; -exports.TypeInfo.SubscriptionEvaluationRequest.fields = { - minEventsCreatedDate: { - isDate: true, +exports.TypeInfo.ServiceEndpointExecutionRecord.fields = { + data: { + typeInfo: exports.TypeInfo.ServiceEndpointExecutionData } }; -exports.TypeInfo.SubscriptionEvaluationResult.fields = { - evaluationJobStatus: { - enumType: exports.TypeInfo.EvaluationOperationStatus +exports.TypeInfo.ServiceEndpointExecutionRecordsInput.fields = { + data: { + typeInfo: exports.TypeInfo.ServiceEndpointExecutionData } }; -exports.TypeInfo.SubscriptionQuery.fields = { - conditions: { +exports.TypeInfo.ServiceEndpointRequestResult.fields = {}; +exports.TypeInfo.ServiceEndpointType.fields = { + authenticationSchemes: { isArray: true, - typeInfo: exports.TypeInfo.SubscriptionQueryCondition + typeInfo: exports.TypeInfo.ServiceEndpointAuthenticationScheme }, - queryFlags: { - enumType: exports.TypeInfo.SubscriptionQueryFlags - } -}; -exports.TypeInfo.SubscriptionQueryCondition.fields = { - flags: { - enumType: exports.TypeInfo.SubscriptionFlags + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor } }; -exports.TypeInfo.SubscriptionTraceDiagnosticLog.fields = { - endTime: { +exports.TypeInfo.TaskAgent.fields = { + assignedAgentCloudRequest: { + typeInfo: exports.TypeInfo.TaskAgentCloudRequest + }, + assignedRequest: { + typeInfo: exports.TypeInfo.TaskAgentJobRequest + }, + createdOn: { isDate: true, }, - startTime: { + lastCompletedRequest: { + typeInfo: exports.TypeInfo.TaskAgentJobRequest + }, + pendingUpdate: { + typeInfo: exports.TypeInfo.TaskAgentUpdate + }, + status: { + enumType: exports.TypeInfo.TaskAgentStatus + }, + statusChangedOn: { isDate: true, } }; -exports.TypeInfo.SubscriptionTraceEventProcessingLog.fields = { - endTime: { +exports.TypeInfo.TaskAgentCloudRequest.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgentReference + }, + agentConnectedTime: { isDate: true, }, - startTime: { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + provisionedTime: { isDate: true, - } -}; -exports.TypeInfo.SubscriptionTraceNotificationDeliveryLog.fields = { - endTime: { + }, + provisionRequestTime: { isDate: true, }, - startTime: { + releaseRequestTime: { isDate: true, } }; -exports.TypeInfo.SubscriptionTracing.fields = { - endDate: { +exports.TypeInfo.TaskAgentCloudType.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.TaskAgentDowngrade.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType + } +}; +exports.TypeInfo.TaskAgentJob.fields = { + steps: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentJobStep + } +}; +exports.TypeInfo.TaskAgentJobRequest.fields = { + assignTime: { isDate: true, }, - startDate: { + finishTime: { + isDate: true, + }, + lockedUntil: { isDate: true, + }, + matchedAgents: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentReference + }, + queueTime: { + isDate: true, + }, + receiveTime: { + isDate: true, + }, + reservedAgent: { + typeInfo: exports.TypeInfo.TaskAgentReference + }, + result: { + enumType: exports.TypeInfo.TaskResult } }; - - -/***/ }), - -/***/ 8555: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Status of a policy which is running against a specific pull request. - */ -var PolicyEvaluationStatus; -(function (PolicyEvaluationStatus) { - /** - * The policy is either queued to run, or is waiting for some event before progressing. - */ - PolicyEvaluationStatus[PolicyEvaluationStatus["Queued"] = 0] = "Queued"; - /** - * The policy is currently running. - */ - PolicyEvaluationStatus[PolicyEvaluationStatus["Running"] = 1] = "Running"; - /** - * The policy has been fulfilled for this pull request. - */ - PolicyEvaluationStatus[PolicyEvaluationStatus["Approved"] = 2] = "Approved"; - /** - * The policy has rejected this pull request. - */ - PolicyEvaluationStatus[PolicyEvaluationStatus["Rejected"] = 3] = "Rejected"; - /** - * The policy does not apply to this pull request. - */ - PolicyEvaluationStatus[PolicyEvaluationStatus["NotApplicable"] = 4] = "NotApplicable"; - /** - * The policy has encountered an unexpected error. - */ - PolicyEvaluationStatus[PolicyEvaluationStatus["Broken"] = 5] = "Broken"; -})(PolicyEvaluationStatus = exports.PolicyEvaluationStatus || (exports.PolicyEvaluationStatus = {})); -exports.TypeInfo = { - PolicyConfiguration: {}, - PolicyEvaluationRecord: {}, - PolicyEvaluationStatus: { - enumValues: { - "queued": 0, - "running": 1, - "approved": 2, - "rejected": 3, - "notApplicable": 4, - "broken": 5 - } - }, +exports.TypeInfo.TaskAgentJobStep.fields = { + type: { + enumType: exports.TypeInfo.TaskAgentJobStepType + } }; -exports.TypeInfo.PolicyConfiguration.fields = { - createdDate: { - isDate: true, +exports.TypeInfo.TaskAgentManualUpdate.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType } }; -exports.TypeInfo.PolicyEvaluationRecord.fields = { - completedDate: { +exports.TypeInfo.TaskAgentMinAgentVersionRequiredUpdate.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType + } +}; +exports.TypeInfo.TaskAgentPool.fields = { + createdOn: { isDate: true, }, - configuration: { - typeInfo: exports.TypeInfo.PolicyConfiguration - }, - startedDate: { - isDate: true, + options: { + enumType: exports.TypeInfo.TaskAgentPoolOptions }, - status: { - enumType: exports.TypeInfo.PolicyEvaluationStatus + poolType: { + enumType: exports.TypeInfo.TaskAgentPoolType } }; - - -/***/ }), - -/***/ 879: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* -* --------------------------------------------------------- -* Copyright(C) Microsoft Corporation. All rights reserved. -* --------------------------------------------------------- -* -* --------------------------------------------------------- -* Generated file, DO NOT EDIT -* --------------------------------------------------------- -*/ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var AvatarSize; -(function (AvatarSize) { - AvatarSize[AvatarSize["Small"] = 0] = "Small"; - AvatarSize[AvatarSize["Medium"] = 1] = "Medium"; - AvatarSize[AvatarSize["Large"] = 2] = "Large"; -})(AvatarSize = exports.AvatarSize || (exports.AvatarSize = {})); -exports.TypeInfo = { - AttributeDescriptor: { - fields: null +exports.TypeInfo.TaskAgentPoolMaintenanceDefinition.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference }, - AttributesContainer: { - fields: null + scheduleSetting: { + typeInfo: exports.TypeInfo.TaskAgentPoolMaintenanceSchedule + } +}; +exports.TypeInfo.TaskAgentPoolMaintenanceJob.fields = { + finishTime: { + isDate: true, }, - Avatar: { - fields: null + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference }, - AvatarSize: { - enumValues: { - "small": 0, - "medium": 1, - "large": 2, - } + queueTime: { + isDate: true, }, - CoreProfileAttribute: { - fields: null + result: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobResult }, - Country: { - fields: null + startTime: { + isDate: true, }, - CreateProfileContext: { - fields: null + status: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobStatus }, - GeoRegion: { - fields: null + targetAgents: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentPoolMaintenanceJobTargetAgent + } +}; +exports.TypeInfo.TaskAgentPoolMaintenanceJobTargetAgent.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgentReference }, - Profile: { - fields: null + result: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobResult }, - ProfileAttribute: { - fields: null + status: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobStatus + } +}; +exports.TypeInfo.TaskAgentPoolMaintenanceSchedule.fields = { + daysToBuild: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceScheduleDays + } +}; +exports.TypeInfo.TaskAgentPoolReference.fields = { + options: { + enumType: exports.TypeInfo.TaskAgentPoolOptions }, - ProfileAttributeBase: { - fields: null + poolType: { + enumType: exports.TypeInfo.TaskAgentPoolType + } +}; +exports.TypeInfo.TaskAgentPoolStatus.fields = { + options: { + enumType: exports.TypeInfo.TaskAgentPoolOptions }, - ProfileRegion: { - fields: null + poolType: { + enumType: exports.TypeInfo.TaskAgentPoolType + } +}; +exports.TypeInfo.TaskAgentPoolSummary.fields = { + deploymentGroups: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentGroupReference }, - ProfileRegions: { - fields: null + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference }, + queues: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentQueue + } }; -exports.TypeInfo.AttributeDescriptor.fields = {}; -exports.TypeInfo.AttributesContainer.fields = { - attributes: {}, +exports.TypeInfo.TaskAgentQueue.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } }; -exports.TypeInfo.Avatar.fields = { - size: { - enumType: exports.TypeInfo.AvatarSize +exports.TypeInfo.TaskAgentReference.fields = { + status: { + enumType: exports.TypeInfo.TaskAgentStatus + } +}; +exports.TypeInfo.TaskAgentSession.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgentReference + } +}; +exports.TypeInfo.TaskAgentUpdate.fields = { + reason: { + typeInfo: exports.TypeInfo.TaskAgentUpdateReason }, - timeStamp: { + requestTime: { isDate: true, - }, + } }; -exports.TypeInfo.CoreProfileAttribute.fields = { - descriptor: { - typeInfo: exports.TypeInfo.AttributeDescriptor - }, - timeStamp: { +exports.TypeInfo.TaskAgentUpdateReason.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType + } +}; +exports.TypeInfo.TaskAttachment.fields = { + createdOn: { isDate: true, }, + lastChangedOn: { + isDate: true, + } }; -exports.TypeInfo.Country.fields = {}; -exports.TypeInfo.CreateProfileContext.fields = {}; -exports.TypeInfo.GeoRegion.fields = {}; -exports.TypeInfo.Profile.fields = { - applicationContainer: { - typeInfo: exports.TypeInfo.AttributesContainer +exports.TypeInfo.TaskCommandRestrictions.fields = { + mode: { + enumType: exports.TypeInfo.TaskCommandMode + } +}; +exports.TypeInfo.TaskCompletedEvent.fields = { + result: { + enumType: exports.TypeInfo.TaskResult + } +}; +exports.TypeInfo.TaskDefinition.fields = { + restrictions: { + typeInfo: exports.TypeInfo.TaskRestrictions + } +}; +exports.TypeInfo.TaskGroup.fields = { + createdOn: { + isDate: true, }, - coreAttributes: {}, - timeStamp: { + modifiedOn: { isDate: true, }, + restrictions: { + typeInfo: exports.TypeInfo.TaskRestrictions + } }; -exports.TypeInfo.ProfileAttribute.fields = { - descriptor: { - typeInfo: exports.TypeInfo.AttributeDescriptor - }, - timeStamp: { +exports.TypeInfo.TaskGroupRevision.fields = { + changedDate: { isDate: true, }, + changeType: { + enumType: exports.TypeInfo.AuditAction + } }; -exports.TypeInfo.ProfileAttributeBase.fields = { - descriptor: { - typeInfo: exports.TypeInfo.AttributeDescriptor - }, - timeStamp: { +exports.TypeInfo.TaskLog.fields = { + createdOn: { isDate: true, }, + lastChangedOn: { + isDate: true, + } }; -exports.TypeInfo.ProfileRegion.fields = {}; -exports.TypeInfo.ProfileRegions.fields = { - regions: { +exports.TypeInfo.TaskOrchestrationContainer.fields = { + children: { isArray: true, - typeInfo: exports.TypeInfo.ProfileRegion + typeInfo: exports.TypeInfo.TaskOrchestrationItem }, + itemType: { + enumType: exports.TypeInfo.TaskOrchestrationItemType + }, + rollback: { + typeInfo: exports.TypeInfo.TaskOrchestrationContainer + } }; - - -/***/ }), - -/***/ 4323: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var AggregationType; -(function (AggregationType) { - AggregationType[AggregationType["Hourly"] = 0] = "Hourly"; - AggregationType[AggregationType["Daily"] = 1] = "Daily"; -})(AggregationType = exports.AggregationType || (exports.AggregationType = {})); -var ResultPhase; -(function (ResultPhase) { - ResultPhase[ResultPhase["Preliminary"] = 0] = "Preliminary"; - ResultPhase[ResultPhase["Full"] = 1] = "Full"; -})(ResultPhase = exports.ResultPhase || (exports.ResultPhase = {})); -exports.TypeInfo = { - AggregationType: { - enumValues: { - "hourly": 0, - "daily": 1 - } +exports.TypeInfo.TaskOrchestrationItem.fields = { + itemType: { + enumType: exports.TypeInfo.TaskOrchestrationItemType + } +}; +exports.TypeInfo.TaskOrchestrationJob.fields = { + itemType: { + enumType: exports.TypeInfo.TaskOrchestrationItemType + } +}; +exports.TypeInfo.TaskOrchestrationPlan.fields = { + environment: { + typeInfo: exports.TypeInfo.PlanEnvironment }, - CodeChangeTrendItem: {}, - ProjectActivityMetrics: {}, - ProjectLanguageAnalytics: {}, - RepositoryActivityMetrics: {}, - RepositoryLanguageAnalytics: {}, - ResultPhase: { - enumValues: { - "preliminary": 0, - "full": 1 - } + finishTime: { + isDate: true, }, -}; -exports.TypeInfo.CodeChangeTrendItem.fields = { - time: { + implementation: { + typeInfo: exports.TypeInfo.TaskOrchestrationContainer + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { isDate: true, + }, + state: { + enumType: exports.TypeInfo.TaskOrchestrationPlanState } }; -exports.TypeInfo.ProjectActivityMetrics.fields = { - codeChangesTrend: { +exports.TypeInfo.TaskOrchestrationPlanGroup.fields = { + runningRequests: { isArray: true, - typeInfo: exports.TypeInfo.CodeChangeTrendItem + typeInfo: exports.TypeInfo.TaskAgentJobRequest } }; -exports.TypeInfo.ProjectLanguageAnalytics.fields = { - repositoryLanguageAnalytics: { - isArray: true, - typeInfo: exports.TypeInfo.RepositoryLanguageAnalytics +exports.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics.fields = { + status: { + enumType: exports.TypeInfo.PlanGroupStatus + } +}; +exports.TypeInfo.TaskOrchestrationQueuedPlan.fields = { + assignTime: { + isDate: true, }, - resultPhase: { - enumType: exports.TypeInfo.ResultPhase + queueTime: { + isDate: true, } }; -exports.TypeInfo.RepositoryActivityMetrics.fields = { - codeChangesTrend: { +exports.TypeInfo.TaskOrchestrationQueuedPlanGroup.fields = { + plans: { isArray: true, - typeInfo: exports.TypeInfo.CodeChangeTrendItem + typeInfo: exports.TypeInfo.TaskOrchestrationQueuedPlan } }; -exports.TypeInfo.RepositoryLanguageAnalytics.fields = { - resultPhase: { - enumType: exports.TypeInfo.ResultPhase - }, - updatedTime: { - isDate: true, +exports.TypeInfo.TaskRestrictions.fields = { + commands: { + typeInfo: exports.TypeInfo.TaskCommandRestrictions } }; - - -/***/ }), - -/***/ 7421: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const FormInputInterfaces = __nccwpck_require__(3627); -var AgentArtifactType; -(function (AgentArtifactType) { - /** - * Indicates XamlBuild artifact - */ - AgentArtifactType[AgentArtifactType["XamlBuild"] = 0] = "XamlBuild"; - /** - * Indicates Build artifact - */ - AgentArtifactType[AgentArtifactType["Build"] = 1] = "Build"; - /** - * Indicates Jenkins artifact - */ - AgentArtifactType[AgentArtifactType["Jenkins"] = 2] = "Jenkins"; - /** - * Indicates FileShare artifact - */ - AgentArtifactType[AgentArtifactType["FileShare"] = 3] = "FileShare"; - /** - * Indicates Nuget artifact - */ - AgentArtifactType[AgentArtifactType["Nuget"] = 4] = "Nuget"; - /** - * Indicates TfsOnPrem artifact - */ - AgentArtifactType[AgentArtifactType["TfsOnPrem"] = 5] = "TfsOnPrem"; - /** - * Indicates GitHub artifact - */ - AgentArtifactType[AgentArtifactType["GitHub"] = 6] = "GitHub"; - /** - * Indicates TFGit artifact - */ - AgentArtifactType[AgentArtifactType["TFGit"] = 7] = "TFGit"; - /** - * Indicates ExternalTfsBuild artifact - */ - AgentArtifactType[AgentArtifactType["ExternalTfsBuild"] = 8] = "ExternalTfsBuild"; - /** - * Indicates Custom artifact - */ - AgentArtifactType[AgentArtifactType["Custom"] = 9] = "Custom"; - /** - * Indicates Tfvc artifact - */ - AgentArtifactType[AgentArtifactType["Tfvc"] = 10] = "Tfvc"; -})(AgentArtifactType = exports.AgentArtifactType || (exports.AgentArtifactType = {})); -var ApprovalExecutionOrder; -(function (ApprovalExecutionOrder) { - /** - * Approvals shown before gates. - */ - ApprovalExecutionOrder[ApprovalExecutionOrder["BeforeGates"] = 1] = "BeforeGates"; - /** - * Approvals shown after successful execution of gates. - */ - ApprovalExecutionOrder[ApprovalExecutionOrder["AfterSuccessfulGates"] = 2] = "AfterSuccessfulGates"; - /** - * Approvals shown always after execution of gates. - */ - ApprovalExecutionOrder[ApprovalExecutionOrder["AfterGatesAlways"] = 4] = "AfterGatesAlways"; -})(ApprovalExecutionOrder = exports.ApprovalExecutionOrder || (exports.ApprovalExecutionOrder = {})); -var ApprovalFilters; -(function (ApprovalFilters) { - /** - * No approvals or approval snapshots. - */ - ApprovalFilters[ApprovalFilters["None"] = 0] = "None"; - /** - * Manual approval steps but no approval snapshots (Use with ApprovalSnapshots for snapshots). - */ - ApprovalFilters[ApprovalFilters["ManualApprovals"] = 1] = "ManualApprovals"; - /** - * Automated approval steps but no approval snapshots (Use with ApprovalSnapshots for snapshots). - */ - ApprovalFilters[ApprovalFilters["AutomatedApprovals"] = 2] = "AutomatedApprovals"; - /** - * No approval steps, but approval snapshots (Use with either ManualApprovals or AutomatedApprovals for approval steps). - */ - ApprovalFilters[ApprovalFilters["ApprovalSnapshots"] = 4] = "ApprovalSnapshots"; - /** - * All approval steps and approval snapshots. - */ - ApprovalFilters[ApprovalFilters["All"] = 7] = "All"; -})(ApprovalFilters = exports.ApprovalFilters || (exports.ApprovalFilters = {})); -var ApprovalStatus; -(function (ApprovalStatus) { - /** - * Indicates the approval does not have the status set. - */ - ApprovalStatus[ApprovalStatus["Undefined"] = 0] = "Undefined"; - /** - * Indicates the approval is pending. - */ - ApprovalStatus[ApprovalStatus["Pending"] = 1] = "Pending"; - /** - * Indicates the approval is approved. - */ - ApprovalStatus[ApprovalStatus["Approved"] = 2] = "Approved"; +exports.TypeInfo.Timeline.fields = { + lastChangedOn: { + isDate: true, + }, + records: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord + } +}; +exports.TypeInfo.TimelineRecord.fields = { + finishTime: { + isDate: true, + }, + issues: { + isArray: true, + typeInfo: exports.TypeInfo.Issue + }, + lastModified: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TimelineRecordState + } +}; +exports.TypeInfo.VariableGroup.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.VirtualMachine.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + } +}; +exports.TypeInfo.VirtualMachineGroup.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +exports.TypeInfo.VirtualMachineResource.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + }, + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +exports.TypeInfo.VirtualMachineResourceCreateParameters.fields = { + virtualMachineResource: { + typeInfo: exports.TypeInfo.VirtualMachineResource + } +}; + + +/***/ }), + +/***/ 93047: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const SystemData = __nccwpck_require__(64652); +const TfsCoreInterfaces = __nccwpck_require__(73931); +/** + * The types of test attachments. + */ +var AttachmentType; +(function (AttachmentType) { /** - * Indicates the approval is rejected. + * Attachment type GeneralAttachment , use this as default type unless you have other type. */ - ApprovalStatus[ApprovalStatus["Rejected"] = 4] = "Rejected"; + AttachmentType[AttachmentType["GeneralAttachment"] = 0] = "GeneralAttachment"; + AttachmentType[AttachmentType["AfnStrip"] = 1] = "AfnStrip"; + AttachmentType[AttachmentType["BugFilingData"] = 2] = "BugFilingData"; /** - * Indicates the approval is reassigned. + * Attachment type CodeCoverage. */ - ApprovalStatus[ApprovalStatus["Reassigned"] = 6] = "Reassigned"; + AttachmentType[AttachmentType["CodeCoverage"] = 3] = "CodeCoverage"; + AttachmentType[AttachmentType["IntermediateCollectorData"] = 4] = "IntermediateCollectorData"; + AttachmentType[AttachmentType["RunConfig"] = 5] = "RunConfig"; + AttachmentType[AttachmentType["TestImpactDetails"] = 6] = "TestImpactDetails"; + AttachmentType[AttachmentType["TmiTestRunDeploymentFiles"] = 7] = "TmiTestRunDeploymentFiles"; + AttachmentType[AttachmentType["TmiTestRunReverseDeploymentFiles"] = 8] = "TmiTestRunReverseDeploymentFiles"; + AttachmentType[AttachmentType["TmiTestResultDetail"] = 9] = "TmiTestResultDetail"; + AttachmentType[AttachmentType["TmiTestRunSummary"] = 10] = "TmiTestRunSummary"; /** - * Indicates the approval is canceled. + * Attachment type ConsoleLog. */ - ApprovalStatus[ApprovalStatus["Canceled"] = 7] = "Canceled"; + AttachmentType[AttachmentType["ConsoleLog"] = 11] = "ConsoleLog"; +})(AttachmentType = exports.AttachmentType || (exports.AttachmentType = {})); +/** + * Enum of type Clone Operation Type. + */ +var CloneOperationState; +(function (CloneOperationState) { /** - * Indicates the approval is skipped. + * value for Failed State */ - ApprovalStatus[ApprovalStatus["Skipped"] = 8] = "Skipped"; -})(ApprovalStatus = exports.ApprovalStatus || (exports.ApprovalStatus = {})); -var ApprovalType; -(function (ApprovalType) { + CloneOperationState[CloneOperationState["Failed"] = 2] = "Failed"; /** - * Indicates the approval type does not set. + * value for Inprogress state */ - ApprovalType[ApprovalType["Undefined"] = 0] = "Undefined"; + CloneOperationState[CloneOperationState["InProgress"] = 1] = "InProgress"; /** - * Indicates the approvals which executed before deployment. + * Value for Queued State */ - ApprovalType[ApprovalType["PreDeploy"] = 1] = "PreDeploy"; + CloneOperationState[CloneOperationState["Queued"] = 0] = "Queued"; /** - * Indicates the approvals which executed after deployment. + * value for Success state */ - ApprovalType[ApprovalType["PostDeploy"] = 2] = "PostDeploy"; + CloneOperationState[CloneOperationState["Succeeded"] = 3] = "Succeeded"; +})(CloneOperationState = exports.CloneOperationState || (exports.CloneOperationState = {})); +/** + * Used to choose which coverage data is returned by a QueryXXXCoverage() call. + */ +var CoverageQueryFlags; +(function (CoverageQueryFlags) { /** - * Indicates all approvals. + * If set, the Coverage.Modules property will be populated. */ - ApprovalType[ApprovalType["All"] = 3] = "All"; -})(ApprovalType = exports.ApprovalType || (exports.ApprovalType = {})); -var AuditAction; -(function (AuditAction) { + CoverageQueryFlags[CoverageQueryFlags["Modules"] = 1] = "Modules"; /** - * Indicates the audit add. + * If set, the ModuleCoverage.Functions properties will be populated. */ - AuditAction[AuditAction["Add"] = 1] = "Add"; + CoverageQueryFlags[CoverageQueryFlags["Functions"] = 2] = "Functions"; /** - * Indicates the audit update. + * If set, the ModuleCoverage.CoverageData field will be populated. */ - AuditAction[AuditAction["Update"] = 2] = "Update"; + CoverageQueryFlags[CoverageQueryFlags["BlockData"] = 4] = "BlockData"; +})(CoverageQueryFlags = exports.CoverageQueryFlags || (exports.CoverageQueryFlags = {})); +var CoverageStatus; +(function (CoverageStatus) { + CoverageStatus[CoverageStatus["Covered"] = 0] = "Covered"; + CoverageStatus[CoverageStatus["NotCovered"] = 1] = "NotCovered"; + CoverageStatus[CoverageStatus["PartiallyCovered"] = 2] = "PartiallyCovered"; +})(CoverageStatus = exports.CoverageStatus || (exports.CoverageStatus = {})); +/** + * Represents status of code coverage summary for a build + */ +var CoverageSummaryStatus; +(function (CoverageSummaryStatus) { /** - * Indicates the audit delete. + * No coverage status */ - AuditAction[AuditAction["Delete"] = 3] = "Delete"; + CoverageSummaryStatus[CoverageSummaryStatus["None"] = 0] = "None"; /** - * Indicates the audit undelete. + * The summary evaluation is in progress */ - AuditAction[AuditAction["Undelete"] = 4] = "Undelete"; -})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); -var AuthorizationHeaderFor; -(function (AuthorizationHeaderFor) { - AuthorizationHeaderFor[AuthorizationHeaderFor["RevalidateApproverIdentity"] = 0] = "RevalidateApproverIdentity"; - AuthorizationHeaderFor[AuthorizationHeaderFor["OnBehalfOf"] = 1] = "OnBehalfOf"; -})(AuthorizationHeaderFor = exports.AuthorizationHeaderFor || (exports.AuthorizationHeaderFor = {})); -var ConditionType; -(function (ConditionType) { + CoverageSummaryStatus[CoverageSummaryStatus["InProgress"] = 1] = "InProgress"; /** - * The condition type is undefined. + * The summary evaluation for the previous request is completed. Summary can change in future */ - ConditionType[ConditionType["Undefined"] = 0] = "Undefined"; + CoverageSummaryStatus[CoverageSummaryStatus["Completed"] = 2] = "Completed"; /** - * The condition type is event. + * The summary evaluation is finalized and won't change */ - ConditionType[ConditionType["Event"] = 1] = "Event"; + CoverageSummaryStatus[CoverageSummaryStatus["Finalized"] = 3] = "Finalized"; /** - * The condition type is environment state. + * The summary evaluation is pending */ - ConditionType[ConditionType["EnvironmentState"] = 2] = "EnvironmentState"; + CoverageSummaryStatus[CoverageSummaryStatus["Pending"] = 4] = "Pending"; /** - * The condition type is artifact. + * Summary evaluation may be ongoing but another merge has been requested. */ - ConditionType[ConditionType["Artifact"] = 4] = "Artifact"; -})(ConditionType = exports.ConditionType || (exports.ConditionType = {})); -var DeploymentAuthorizationOwner; -(function (DeploymentAuthorizationOwner) { - DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["Automatic"] = 0] = "Automatic"; - DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["DeploymentSubmitter"] = 1] = "DeploymentSubmitter"; - DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["FirstPreDeploymentApprover"] = 2] = "FirstPreDeploymentApprover"; -})(DeploymentAuthorizationOwner = exports.DeploymentAuthorizationOwner || (exports.DeploymentAuthorizationOwner = {})); -var DeploymentExpands; -(function (DeploymentExpands) { - DeploymentExpands[DeploymentExpands["All"] = 0] = "All"; - DeploymentExpands[DeploymentExpands["DeploymentOnly"] = 1] = "DeploymentOnly"; - DeploymentExpands[DeploymentExpands["Approvals"] = 2] = "Approvals"; - DeploymentExpands[DeploymentExpands["Artifacts"] = 4] = "Artifacts"; -})(DeploymentExpands = exports.DeploymentExpands || (exports.DeploymentExpands = {})); -var DeploymentOperationStatus; -(function (DeploymentOperationStatus) { + CoverageSummaryStatus[CoverageSummaryStatus["UpdateRequestQueued"] = 5] = "UpdateRequestQueued"; +})(CoverageSummaryStatus = exports.CoverageSummaryStatus || (exports.CoverageSummaryStatus = {})); +var CustomTestFieldScope; +(function (CustomTestFieldScope) { + CustomTestFieldScope[CustomTestFieldScope["None"] = 0] = "None"; + CustomTestFieldScope[CustomTestFieldScope["TestRun"] = 1] = "TestRun"; + CustomTestFieldScope[CustomTestFieldScope["TestResult"] = 2] = "TestResult"; + CustomTestFieldScope[CustomTestFieldScope["System"] = 4] = "System"; + CustomTestFieldScope[CustomTestFieldScope["All"] = 7] = "All"; +})(CustomTestFieldScope = exports.CustomTestFieldScope || (exports.CustomTestFieldScope = {})); +var CustomTestFieldType; +(function (CustomTestFieldType) { + CustomTestFieldType[CustomTestFieldType["Bit"] = 2] = "Bit"; + CustomTestFieldType[CustomTestFieldType["DateTime"] = 4] = "DateTime"; + CustomTestFieldType[CustomTestFieldType["Int"] = 8] = "Int"; + CustomTestFieldType[CustomTestFieldType["Float"] = 6] = "Float"; + CustomTestFieldType[CustomTestFieldType["String"] = 12] = "String"; + CustomTestFieldType[CustomTestFieldType["Guid"] = 14] = "Guid"; +})(CustomTestFieldType = exports.CustomTestFieldType || (exports.CustomTestFieldType = {})); +var FlakyDetectionType; +(function (FlakyDetectionType) { /** - * The deployment operation status is undefined. + * Custom defines manual detection type. */ - DeploymentOperationStatus[DeploymentOperationStatus["Undefined"] = 0] = "Undefined"; + FlakyDetectionType[FlakyDetectionType["Custom"] = 1] = "Custom"; /** - * The deployment operation status is queued. + * Defines System detection type. */ - DeploymentOperationStatus[DeploymentOperationStatus["Queued"] = 1] = "Queued"; + FlakyDetectionType[FlakyDetectionType["System"] = 2] = "System"; +})(FlakyDetectionType = exports.FlakyDetectionType || (exports.FlakyDetectionType = {})); +/** + * Test summary metrics. + */ +var Metrics; +(function (Metrics) { /** - * The deployment operation status is scheduled. + * To get results of all matrix. */ - DeploymentOperationStatus[DeploymentOperationStatus["Scheduled"] = 2] = "Scheduled"; + Metrics[Metrics["All"] = 1] = "All"; /** - * The deployment operation status is pending. + * Get results summary by results outcome */ - DeploymentOperationStatus[DeploymentOperationStatus["Pending"] = 4] = "Pending"; + Metrics[Metrics["ResultSummary"] = 2] = "ResultSummary"; /** - * The deployment operation status is approved. + * Get results analysis which include failure analysis, increase/decrease in results count analysis. */ - DeploymentOperationStatus[DeploymentOperationStatus["Approved"] = 8] = "Approved"; + Metrics[Metrics["ResultsAnalysis"] = 3] = "ResultsAnalysis"; /** - * The deployment operation status is rejected. + * Get runs summary */ - DeploymentOperationStatus[DeploymentOperationStatus["Rejected"] = 16] = "Rejected"; + Metrics[Metrics["RunSummary"] = 4] = "RunSummary"; +})(Metrics = exports.Metrics || (exports.Metrics = {})); +var OperationType; +(function (OperationType) { + OperationType[OperationType["Add"] = 1] = "Add"; + OperationType[OperationType["Delete"] = 2] = "Delete"; +})(OperationType = exports.OperationType || (exports.OperationType = {})); +/** + * Additional details with test result + */ +var ResultDetails; +(function (ResultDetails) { /** - * The deployment operation status is deferred. + * Core fields of test result. Core fields includes State, Outcome, Priority, AutomatedTestName, AutomatedTestStorage, Comments, ErrorMessage etc. */ - DeploymentOperationStatus[DeploymentOperationStatus["Deferred"] = 32] = "Deferred"; + ResultDetails[ResultDetails["None"] = 0] = "None"; /** - * The deployment operation status is queued for agent. + * Test iteration details in a test result. */ - DeploymentOperationStatus[DeploymentOperationStatus["QueuedForAgent"] = 64] = "QueuedForAgent"; + ResultDetails[ResultDetails["Iterations"] = 1] = "Iterations"; /** - * The deployment operation status is phase in progress. + * Workitems associated with a test result. */ - DeploymentOperationStatus[DeploymentOperationStatus["PhaseInProgress"] = 128] = "PhaseInProgress"; + ResultDetails[ResultDetails["WorkItems"] = 2] = "WorkItems"; /** - * The deployment operation status is phase succeeded. + * Subresults in a test result. */ - DeploymentOperationStatus[DeploymentOperationStatus["PhaseSucceeded"] = 256] = "PhaseSucceeded"; + ResultDetails[ResultDetails["SubResults"] = 4] = "SubResults"; /** - * The deployment operation status is phase partially succeeded. + * Point and plan detail in a test result. */ - DeploymentOperationStatus[DeploymentOperationStatus["PhasePartiallySucceeded"] = 512] = "PhasePartiallySucceeded"; + ResultDetails[ResultDetails["Point"] = 8] = "Point"; +})(ResultDetails = exports.ResultDetails || (exports.ResultDetails = {})); +/** + * Hierarchy type of the result/subresults. + */ +var ResultGroupType; +(function (ResultGroupType) { /** - * The deployment operation status is phase failed. + * Leaf node of test result. */ - DeploymentOperationStatus[DeploymentOperationStatus["PhaseFailed"] = 1024] = "PhaseFailed"; + ResultGroupType[ResultGroupType["None"] = 0] = "None"; /** - * The deployment operation status is canceled. + * Hierarchy type of test result. */ - DeploymentOperationStatus[DeploymentOperationStatus["Canceled"] = 2048] = "Canceled"; + ResultGroupType[ResultGroupType["Rerun"] = 1] = "Rerun"; /** - * The deployment operation status is phase canceled. + * Hierarchy type of test result. */ - DeploymentOperationStatus[DeploymentOperationStatus["PhaseCanceled"] = 4096] = "PhaseCanceled"; + ResultGroupType[ResultGroupType["DataDriven"] = 2] = "DataDriven"; /** - * The deployment operation status is manualintervention pending. + * Hierarchy type of test result. */ - DeploymentOperationStatus[DeploymentOperationStatus["ManualInterventionPending"] = 8192] = "ManualInterventionPending"; + ResultGroupType[ResultGroupType["OrderedTest"] = 3] = "OrderedTest"; /** - * The deployment operation status is queued for pipeline. + * Unknown hierarchy type. */ - DeploymentOperationStatus[DeploymentOperationStatus["QueuedForPipeline"] = 16384] = "QueuedForPipeline"; + ResultGroupType[ResultGroupType["Generic"] = 4] = "Generic"; +})(ResultGroupType = exports.ResultGroupType || (exports.ResultGroupType = {})); +var ResultMetadata; +(function (ResultMetadata) { /** - * The deployment operation status is cancelling. + * Rerun metadata */ - DeploymentOperationStatus[DeploymentOperationStatus["Cancelling"] = 32768] = "Cancelling"; + ResultMetadata[ResultMetadata["Rerun"] = 1] = "Rerun"; /** - * The deployment operation status is EvaluatingGates. + * Flaky metadata */ - DeploymentOperationStatus[DeploymentOperationStatus["EvaluatingGates"] = 65536] = "EvaluatingGates"; + ResultMetadata[ResultMetadata["Flaky"] = 2] = "Flaky"; +})(ResultMetadata = exports.ResultMetadata || (exports.ResultMetadata = {})); +/** + * Additional details with test result metadata + */ +var ResultMetaDataDetails; +(function (ResultMetaDataDetails) { /** - * The deployment operation status is GateFailed. + * Core fields of test result metadata. */ - DeploymentOperationStatus[DeploymentOperationStatus["GateFailed"] = 131072] = "GateFailed"; + ResultMetaDataDetails[ResultMetaDataDetails["None"] = 0] = "None"; /** - * The deployment operation status is all. + * Test FlakyIdentifiers details in test result metadata. */ - DeploymentOperationStatus[DeploymentOperationStatus["All"] = 258047] = "All"; -})(DeploymentOperationStatus = exports.DeploymentOperationStatus || (exports.DeploymentOperationStatus = {})); -var DeploymentReason; -(function (DeploymentReason) { + ResultMetaDataDetails[ResultMetaDataDetails["FlakyIdentifiers"] = 1] = "FlakyIdentifiers"; +})(ResultMetaDataDetails = exports.ResultMetaDataDetails || (exports.ResultMetaDataDetails = {})); +/** + * The top level entity that is being cloned as part of a Clone operation + */ +var ResultObjectType; +(function (ResultObjectType) { /** - * The deployment reason is none. + * Suite Clone */ - DeploymentReason[DeploymentReason["None"] = 0] = "None"; + ResultObjectType[ResultObjectType["TestSuite"] = 0] = "TestSuite"; /** - * The deployment reason is manual. + * Plan Clone */ - DeploymentReason[DeploymentReason["Manual"] = 1] = "Manual"; + ResultObjectType[ResultObjectType["TestPlan"] = 1] = "TestPlan"; +})(ResultObjectType = exports.ResultObjectType || (exports.ResultObjectType = {})); +var RunType; +(function (RunType) { /** - * The deployment reason is automated. + * Only used during an update to preserve the existing value. */ - DeploymentReason[DeploymentReason["Automated"] = 2] = "Automated"; + RunType[RunType["Unspecified"] = 0] = "Unspecified"; /** - * The deployment reason is scheduled. + * Normal test run. */ - DeploymentReason[DeploymentReason["Scheduled"] = 4] = "Scheduled"; + RunType[RunType["Normal"] = 1] = "Normal"; /** - * The deployment reason is RedeployTrigger. + * Test run created for the blocked result when a test point is blocked. */ - DeploymentReason[DeploymentReason["RedeployTrigger"] = 8] = "RedeployTrigger"; -})(DeploymentReason = exports.DeploymentReason || (exports.DeploymentReason = {})); -var DeploymentsQueryType; -(function (DeploymentsQueryType) { - DeploymentsQueryType[DeploymentsQueryType["Regular"] = 1] = "Regular"; - DeploymentsQueryType[DeploymentsQueryType["FailingSince"] = 2] = "FailingSince"; -})(DeploymentsQueryType = exports.DeploymentsQueryType || (exports.DeploymentsQueryType = {})); -var DeploymentStatus; -(function (DeploymentStatus) { + RunType[RunType["Blocking"] = 2] = "Blocking"; /** - * The deployment status is undefined. + * Test run created from Web. */ - DeploymentStatus[DeploymentStatus["Undefined"] = 0] = "Undefined"; + RunType[RunType["Web"] = 4] = "Web"; /** - * The deployment status is not deployed. + * Run initiated from web through MTR */ - DeploymentStatus[DeploymentStatus["NotDeployed"] = 1] = "NotDeployed"; + RunType[RunType["MtrRunInitiatedFromWeb"] = 8] = "MtrRunInitiatedFromWeb"; /** - * The deployment status is in progress. + * These test run would require DTL environment. These could be either of automated or manual test run. */ - DeploymentStatus[DeploymentStatus["InProgress"] = 2] = "InProgress"; + RunType[RunType["RunWithDtlEnv"] = 16] = "RunWithDtlEnv"; /** - * The deployment status is succeeded. + * These test run may or may not have published test results but it will have summary like total test, passed test, failed test etc. These are automated tests. */ - DeploymentStatus[DeploymentStatus["Succeeded"] = 4] = "Succeeded"; + RunType[RunType["NoConfigRun"] = 32] = "NoConfigRun"; +})(RunType = exports.RunType || (exports.RunType = {})); +var Service; +(function (Service) { + Service[Service["Any"] = 0] = "Any"; + Service[Service["Tcm"] = 1] = "Tcm"; + Service[Service["Tfs"] = 2] = "Tfs"; +})(Service = exports.Service || (exports.Service = {})); +/** + * Option to get details in response + */ +var SuiteExpand; +(function (SuiteExpand) { /** - * The deployment status is partiallysucceeded. + * Include children in response. */ - DeploymentStatus[DeploymentStatus["PartiallySucceeded"] = 8] = "PartiallySucceeded"; + SuiteExpand[SuiteExpand["Children"] = 1] = "Children"; /** - * The deployment status is failed. + * Include default testers in response. */ - DeploymentStatus[DeploymentStatus["Failed"] = 16] = "Failed"; + SuiteExpand[SuiteExpand["DefaultTesters"] = 2] = "DefaultTesters"; +})(SuiteExpand = exports.SuiteExpand || (exports.SuiteExpand = {})); +var TCMServiceDataMigrationStatus; +(function (TCMServiceDataMigrationStatus) { /** - * The deployment status is all. + * Migration Not Started */ - DeploymentStatus[DeploymentStatus["All"] = 31] = "All"; -})(DeploymentStatus = exports.DeploymentStatus || (exports.DeploymentStatus = {})); -var DeployPhaseStatus; -(function (DeployPhaseStatus) { + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["NotStarted"] = 0] = "NotStarted"; /** - * Phase status not set. + * Migration InProgress */ - DeployPhaseStatus[DeployPhaseStatus["Undefined"] = 0] = "Undefined"; + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["InProgress"] = 1] = "InProgress"; /** - * Phase execution not started. + * Migration Completed */ - DeployPhaseStatus[DeployPhaseStatus["NotStarted"] = 1] = "NotStarted"; + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["Completed"] = 2] = "Completed"; /** - * Phase execution in progress. + * Migration Failed */ - DeployPhaseStatus[DeployPhaseStatus["InProgress"] = 2] = "InProgress"; + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["Failed"] = 3] = "Failed"; +})(TCMServiceDataMigrationStatus = exports.TCMServiceDataMigrationStatus || (exports.TCMServiceDataMigrationStatus = {})); +/** + * Represents the state of an ITestConfiguration object. + */ +var TestConfigurationState; +(function (TestConfigurationState) { /** - * Phase execution partially succeeded. + * The configuration can be used for new test runs. */ - DeployPhaseStatus[DeployPhaseStatus["PartiallySucceeded"] = 4] = "PartiallySucceeded"; + TestConfigurationState[TestConfigurationState["Active"] = 1] = "Active"; /** - * Phase execution succeeded. + * The configuration has been retired and should not be used for new test runs. */ - DeployPhaseStatus[DeployPhaseStatus["Succeeded"] = 8] = "Succeeded"; + TestConfigurationState[TestConfigurationState["Inactive"] = 2] = "Inactive"; +})(TestConfigurationState = exports.TestConfigurationState || (exports.TestConfigurationState = {})); +/** + * Test Log Context + */ +var TestLogScope; +(function (TestLogScope) { /** - * Phase execution failed. + * Log file is associated with Run, result, subresult */ - DeployPhaseStatus[DeployPhaseStatus["Failed"] = 16] = "Failed"; + TestLogScope[TestLogScope["Run"] = 0] = "Run"; /** - * Phase execution canceled. + * Log File associated with Build */ - DeployPhaseStatus[DeployPhaseStatus["Canceled"] = 32] = "Canceled"; + TestLogScope[TestLogScope["Build"] = 1] = "Build"; /** - * Phase execution skipped. + * Log File associated with Release */ - DeployPhaseStatus[DeployPhaseStatus["Skipped"] = 64] = "Skipped"; + TestLogScope[TestLogScope["Release"] = 2] = "Release"; +})(TestLogScope = exports.TestLogScope || (exports.TestLogScope = {})); +/** + * Test Log Status codes. + */ +var TestLogStatusCode; +(function (TestLogStatusCode) { /** - * Phase is in cancelling state. + * Operation is successful */ - DeployPhaseStatus[DeployPhaseStatus["Cancelling"] = 128] = "Cancelling"; -})(DeployPhaseStatus = exports.DeployPhaseStatus || (exports.DeployPhaseStatus = {})); -var DeployPhaseTypes; -(function (DeployPhaseTypes) { + TestLogStatusCode[TestLogStatusCode["Success"] = 0] = "Success"; /** - * Phase type not defined. Don't use this. + * Operation failed */ - DeployPhaseTypes[DeployPhaseTypes["Undefined"] = 0] = "Undefined"; + TestLogStatusCode[TestLogStatusCode["Failed"] = 1] = "Failed"; /** - * Phase type which contains tasks executed on agent. + * Operation failed due to file already exist */ - DeployPhaseTypes[DeployPhaseTypes["AgentBasedDeployment"] = 1] = "AgentBasedDeployment"; + TestLogStatusCode[TestLogStatusCode["FileAlreadyExists"] = 2] = "FileAlreadyExists"; /** - * Phase type which contains tasks executed by server. + * Invalid input provided by user */ - DeployPhaseTypes[DeployPhaseTypes["RunOnServer"] = 2] = "RunOnServer"; + TestLogStatusCode[TestLogStatusCode["InvalidInput"] = 3] = "InvalidInput"; /** - * Phase type which contains tasks executed on deployment group machines. + * Invalid file name provided by user */ - DeployPhaseTypes[DeployPhaseTypes["MachineGroupBasedDeployment"] = 4] = "MachineGroupBasedDeployment"; + TestLogStatusCode[TestLogStatusCode["InvalidFileName"] = 4] = "InvalidFileName"; /** - * Phase type which contains tasks which acts as Gates for the deployment to go forward. + * Error occurred while operating on container */ - DeployPhaseTypes[DeployPhaseTypes["DeploymentGates"] = 8] = "DeploymentGates"; -})(DeployPhaseTypes = exports.DeployPhaseTypes || (exports.DeployPhaseTypes = {})); -var EnvironmentStatus; -(function (EnvironmentStatus) { + TestLogStatusCode[TestLogStatusCode["InvalidContainer"] = 5] = "InvalidContainer"; /** - * Environment status not set. + * Blob Transfer Error */ - EnvironmentStatus[EnvironmentStatus["Undefined"] = 0] = "Undefined"; + TestLogStatusCode[TestLogStatusCode["TransferFailed"] = 6] = "TransferFailed"; /** - * Environment is in not started state. + * TestLogStore feature is not enabled */ - EnvironmentStatus[EnvironmentStatus["NotStarted"] = 1] = "NotStarted"; + TestLogStatusCode[TestLogStatusCode["FeatureDisabled"] = 7] = "FeatureDisabled"; /** - * Environment is in progress state. + * Build for which operation is requested does not exist */ - EnvironmentStatus[EnvironmentStatus["InProgress"] = 2] = "InProgress"; + TestLogStatusCode[TestLogStatusCode["BuildDoesNotExist"] = 8] = "BuildDoesNotExist"; /** - * Environment is in succeeded state. + * Run for which operation is requested does not exist */ - EnvironmentStatus[EnvironmentStatus["Succeeded"] = 4] = "Succeeded"; + TestLogStatusCode[TestLogStatusCode["RunDoesNotExist"] = 9] = "RunDoesNotExist"; /** - * Environment is in canceled state. + * Container cannot be created */ - EnvironmentStatus[EnvironmentStatus["Canceled"] = 8] = "Canceled"; + TestLogStatusCode[TestLogStatusCode["ContainerNotCreated"] = 10] = "ContainerNotCreated"; /** - * Environment is in rejected state. + * Api is not supported */ - EnvironmentStatus[EnvironmentStatus["Rejected"] = 16] = "Rejected"; + TestLogStatusCode[TestLogStatusCode["APINotSupported"] = 11] = "APINotSupported"; /** - * Environment is in queued state. + * File size is greater than the limitation */ - EnvironmentStatus[EnvironmentStatus["Queued"] = 32] = "Queued"; + TestLogStatusCode[TestLogStatusCode["FileSizeExceeds"] = 12] = "FileSizeExceeds"; /** - * Environment is in scheduled state. + * Container is not found for which operation is requested */ - EnvironmentStatus[EnvironmentStatus["Scheduled"] = 64] = "Scheduled"; + TestLogStatusCode[TestLogStatusCode["ContainerNotFound"] = 13] = "ContainerNotFound"; /** - * Environment is in partially succeeded state. + * File cannot be found */ - EnvironmentStatus[EnvironmentStatus["PartiallySucceeded"] = 128] = "PartiallySucceeded"; -})(EnvironmentStatus = exports.EnvironmentStatus || (exports.EnvironmentStatus = {})); -var EnvironmentTriggerType; -(function (EnvironmentTriggerType) { + TestLogStatusCode[TestLogStatusCode["FileNotFound"] = 14] = "FileNotFound"; /** - * Environment trigger type undefined. + * Directory cannot be found */ - EnvironmentTriggerType[EnvironmentTriggerType["Undefined"] = 0] = "Undefined"; + TestLogStatusCode[TestLogStatusCode["DirectoryNotFound"] = 15] = "DirectoryNotFound"; /** - * Environment trigger type is deployment group redeploy. + * Storage capacity exceeded */ - EnvironmentTriggerType[EnvironmentTriggerType["DeploymentGroupRedeploy"] = 1] = "DeploymentGroupRedeploy"; + TestLogStatusCode[TestLogStatusCode["StorageCapacityExceeded"] = 16] = "StorageCapacityExceeded"; +})(TestLogStatusCode = exports.TestLogStatusCode || (exports.TestLogStatusCode = {})); +/** + * Specifies set of possible log store endpoint type. + */ +var TestLogStoreEndpointType; +(function (TestLogStoreEndpointType) { /** - * Environment trigger type is Rollback. + * Endpoint type is scoped to root */ - EnvironmentTriggerType[EnvironmentTriggerType["RollbackRedeploy"] = 2] = "RollbackRedeploy"; -})(EnvironmentTriggerType = exports.EnvironmentTriggerType || (exports.EnvironmentTriggerType = {})); -var FolderPathQueryOrder; -(function (FolderPathQueryOrder) { + TestLogStoreEndpointType[TestLogStoreEndpointType["Root"] = 1] = "Root"; /** - * No order. + * Endpoint type is scoped to file */ - FolderPathQueryOrder[FolderPathQueryOrder["None"] = 0] = "None"; + TestLogStoreEndpointType[TestLogStoreEndpointType["File"] = 2] = "File"; +})(TestLogStoreEndpointType = exports.TestLogStoreEndpointType || (exports.TestLogStoreEndpointType = {})); +/** + * Specifies set of possible operation type on log store. + */ +var TestLogStoreOperationType; +(function (TestLogStoreOperationType) { /** - * Order by folder name and path ascending. + * Operation is scoped to read data only. */ - FolderPathQueryOrder[FolderPathQueryOrder["Ascending"] = 1] = "Ascending"; + TestLogStoreOperationType[TestLogStoreOperationType["Read"] = 1] = "Read"; /** - * Order by folder name and path descending. + * Operation is scoped to create data only. */ - FolderPathQueryOrder[FolderPathQueryOrder["Descending"] = 2] = "Descending"; -})(FolderPathQueryOrder = exports.FolderPathQueryOrder || (exports.FolderPathQueryOrder = {})); -var GateStatus; -(function (GateStatus) { + TestLogStoreOperationType[TestLogStoreOperationType["Create"] = 2] = "Create"; /** - * The gate does not have the status set. + * Operation is scoped to read and create data. */ - GateStatus[GateStatus["None"] = 0] = "None"; + TestLogStoreOperationType[TestLogStoreOperationType["ReadAndCreate"] = 3] = "ReadAndCreate"; +})(TestLogStoreOperationType = exports.TestLogStoreOperationType || (exports.TestLogStoreOperationType = {})); +/** + * Test Log Types + */ +var TestLogType; +(function (TestLogType) { /** - * The gate is in pending state. + * Any gereric attachment. */ - GateStatus[GateStatus["Pending"] = 1] = "Pending"; + TestLogType[TestLogType["GeneralAttachment"] = 1] = "GeneralAttachment"; /** - * The gate is currently in progress. + * Code Coverage files */ - GateStatus[GateStatus["InProgress"] = 2] = "InProgress"; + TestLogType[TestLogType["CodeCoverage"] = 2] = "CodeCoverage"; /** - * The gate completed successfully. + * Test Impact details. */ - GateStatus[GateStatus["Succeeded"] = 4] = "Succeeded"; + TestLogType[TestLogType["TestImpact"] = 3] = "TestImpact"; /** - * The gate execution failed. + * Temporary files */ - GateStatus[GateStatus["Failed"] = 8] = "Failed"; + TestLogType[TestLogType["Intermediate"] = 4] = "Intermediate"; /** - * The gate execution cancelled. + * Subresult Attachment */ - GateStatus[GateStatus["Canceled"] = 16] = "Canceled"; -})(GateStatus = exports.GateStatus || (exports.GateStatus = {})); -var IssueSource; -(function (IssueSource) { - IssueSource[IssueSource["None"] = 0] = "None"; - IssueSource[IssueSource["User"] = 1] = "User"; - IssueSource[IssueSource["System"] = 2] = "System"; -})(IssueSource = exports.IssueSource || (exports.IssueSource = {})); -var MailSectionType; -(function (MailSectionType) { - MailSectionType[MailSectionType["Details"] = 0] = "Details"; - MailSectionType[MailSectionType["Environments"] = 1] = "Environments"; - MailSectionType[MailSectionType["Issues"] = 2] = "Issues"; - MailSectionType[MailSectionType["TestResults"] = 3] = "TestResults"; - MailSectionType[MailSectionType["WorkItems"] = 4] = "WorkItems"; - MailSectionType[MailSectionType["ReleaseInfo"] = 5] = "ReleaseInfo"; -})(MailSectionType = exports.MailSectionType || (exports.MailSectionType = {})); + TestLogType[TestLogType["System"] = 5] = "System"; +})(TestLogType = exports.TestLogType || (exports.TestLogType = {})); /** - * Describes manual intervention status + * Valid TestOutcome values. */ -var ManualInterventionStatus; -(function (ManualInterventionStatus) { - /** - * The manual intervention does not have the status set. - */ - ManualInterventionStatus[ManualInterventionStatus["Unknown"] = 0] = "Unknown"; - /** - * The manual intervention is pending. - */ - ManualInterventionStatus[ManualInterventionStatus["Pending"] = 1] = "Pending"; - /** - * The manual intervention is rejected. - */ - ManualInterventionStatus[ManualInterventionStatus["Rejected"] = 2] = "Rejected"; +var TestOutcome; +(function (TestOutcome) { /** - * The manual intervention is approved. + * Only used during an update to preserve the existing value. */ - ManualInterventionStatus[ManualInterventionStatus["Approved"] = 4] = "Approved"; + TestOutcome[TestOutcome["Unspecified"] = 0] = "Unspecified"; /** - * The manual intervention is canceled. + * Test has not been completed, or the test type does not report pass/failure. */ - ManualInterventionStatus[ManualInterventionStatus["Canceled"] = 8] = "Canceled"; -})(ManualInterventionStatus = exports.ManualInterventionStatus || (exports.ManualInterventionStatus = {})); -var ParallelExecutionTypes; -(function (ParallelExecutionTypes) { - ParallelExecutionTypes[ParallelExecutionTypes["None"] = 0] = "None"; - ParallelExecutionTypes[ParallelExecutionTypes["MultiConfiguration"] = 1] = "MultiConfiguration"; - ParallelExecutionTypes[ParallelExecutionTypes["MultiMachine"] = 2] = "MultiMachine"; -})(ParallelExecutionTypes = exports.ParallelExecutionTypes || (exports.ParallelExecutionTypes = {})); -var PipelineProcessTypes; -(function (PipelineProcessTypes) { - PipelineProcessTypes[PipelineProcessTypes["Designer"] = 1] = "Designer"; - PipelineProcessTypes[PipelineProcessTypes["Yaml"] = 2] = "Yaml"; -})(PipelineProcessTypes = exports.PipelineProcessTypes || (exports.PipelineProcessTypes = {})); -var PropertySelectorType; -(function (PropertySelectorType) { + TestOutcome[TestOutcome["None"] = 1] = "None"; /** - * Include in property selector. + * Test was executed w/o any issues. */ - PropertySelectorType[PropertySelectorType["Inclusion"] = 0] = "Inclusion"; + TestOutcome[TestOutcome["Passed"] = 2] = "Passed"; /** - * Exclude in property selector. + * Test was executed, but there were issues. Issues may involve exceptions or failed assertions. */ - PropertySelectorType[PropertySelectorType["Exclusion"] = 1] = "Exclusion"; -})(PropertySelectorType = exports.PropertySelectorType || (exports.PropertySelectorType = {})); -var PullRequestSystemType; -(function (PullRequestSystemType) { - PullRequestSystemType[PullRequestSystemType["None"] = 0] = "None"; - PullRequestSystemType[PullRequestSystemType["TfsGit"] = 1] = "TfsGit"; - PullRequestSystemType[PullRequestSystemType["GitHub"] = 2] = "GitHub"; -})(PullRequestSystemType = exports.PullRequestSystemType || (exports.PullRequestSystemType = {})); -var ReleaseDefinitionExpands; -(function (ReleaseDefinitionExpands) { + TestOutcome[TestOutcome["Failed"] = 3] = "Failed"; /** - * Returns top level properties of object. + * Test has completed, but we can't say if it passed or failed. May be used for aborted tests... */ - ReleaseDefinitionExpands[ReleaseDefinitionExpands["None"] = 0] = "None"; + TestOutcome[TestOutcome["Inconclusive"] = 4] = "Inconclusive"; /** - * Include environments in return object. + * The test timed out */ - ReleaseDefinitionExpands[ReleaseDefinitionExpands["Environments"] = 2] = "Environments"; + TestOutcome[TestOutcome["Timeout"] = 5] = "Timeout"; /** - * Include artifacts in return object. + * Test was aborted. This was not caused by a user gesture, but rather by a framework decision. */ - ReleaseDefinitionExpands[ReleaseDefinitionExpands["Artifacts"] = 4] = "Artifacts"; + TestOutcome[TestOutcome["Aborted"] = 6] = "Aborted"; /** - * Include triggers in return object. + * Test had it chance for been executed but was not, as ITestElement.IsRunnable == false. */ - ReleaseDefinitionExpands[ReleaseDefinitionExpands["Triggers"] = 8] = "Triggers"; + TestOutcome[TestOutcome["Blocked"] = 7] = "Blocked"; /** - * Include variables in return object. + * Test was not executed. This was caused by a user gesture - e.g. user hit stop button. */ - ReleaseDefinitionExpands[ReleaseDefinitionExpands["Variables"] = 16] = "Variables"; + TestOutcome[TestOutcome["NotExecuted"] = 8] = "NotExecuted"; /** - * Include tags in return object. + * To be used by Run level results. This is not a failure. */ - ReleaseDefinitionExpands[ReleaseDefinitionExpands["Tags"] = 32] = "Tags"; + TestOutcome[TestOutcome["Warning"] = 9] = "Warning"; /** - * Include last release in return object. + * There was a system error while we were trying to execute a test. */ - ReleaseDefinitionExpands[ReleaseDefinitionExpands["LastRelease"] = 64] = "LastRelease"; -})(ReleaseDefinitionExpands = exports.ReleaseDefinitionExpands || (exports.ReleaseDefinitionExpands = {})); -var ReleaseDefinitionQueryOrder; -(function (ReleaseDefinitionQueryOrder) { + TestOutcome[TestOutcome["Error"] = 10] = "Error"; /** - * Return results based on release definition Id ascending order. + * Test is Not Applicable for execution. */ - ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["IdAscending"] = 0] = "IdAscending"; + TestOutcome[TestOutcome["NotApplicable"] = 11] = "NotApplicable"; /** - * Return results based on release definition Id descending order. + * Test is paused. */ - ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["IdDescending"] = 1] = "IdDescending"; + TestOutcome[TestOutcome["Paused"] = 12] = "Paused"; /** - * Return results based on release definition name ascending order. + * Test is currently executing. Added this for TCM charts */ - ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["NameAscending"] = 2] = "NameAscending"; + TestOutcome[TestOutcome["InProgress"] = 13] = "InProgress"; /** - * Return results based on release definition name descending order. + * Test is not impacted. Added fot TIA. */ - ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["NameDescending"] = 3] = "NameDescending"; -})(ReleaseDefinitionQueryOrder = exports.ReleaseDefinitionQueryOrder || (exports.ReleaseDefinitionQueryOrder = {})); -var ReleaseDefinitionSource; -(function (ReleaseDefinitionSource) { + TestOutcome[TestOutcome["NotImpacted"] = 14] = "NotImpacted"; + TestOutcome[TestOutcome["MaxValue"] = 14] = "MaxValue"; +})(TestOutcome = exports.TestOutcome || (exports.TestOutcome = {})); +var TestPointState; +(function (TestPointState) { /** - * Indicates ReleaseDefinition source not defined. + * Default */ - ReleaseDefinitionSource[ReleaseDefinitionSource["Undefined"] = 0] = "Undefined"; + TestPointState[TestPointState["None"] = 0] = "None"; /** - * Indicates ReleaseDefinition created using REST API. + * The test point needs to be executed in order for the test pass to be considered complete. Either the test has not been run before or the previous run failed. */ - ReleaseDefinitionSource[ReleaseDefinitionSource["RestApi"] = 1] = "RestApi"; + TestPointState[TestPointState["Ready"] = 1] = "Ready"; /** - * Indicates ReleaseDefinition created using UI. + * The test has passed successfully and does not need to be re-run for the test pass to be considered complete. */ - ReleaseDefinitionSource[ReleaseDefinitionSource["UserInterface"] = 2] = "UserInterface"; + TestPointState[TestPointState["Completed"] = 2] = "Completed"; /** - * Indicates ReleaseDefinition created from Ibiza. + * The test point needs to be executed but is not able to. */ - ReleaseDefinitionSource[ReleaseDefinitionSource["Ibiza"] = 4] = "Ibiza"; + TestPointState[TestPointState["NotReady"] = 3] = "NotReady"; /** - * Indicates ReleaseDefinition created from PortalExtension API. + * The test is being executed. */ - ReleaseDefinitionSource[ReleaseDefinitionSource["PortalExtensionApi"] = 8] = "PortalExtensionApi"; -})(ReleaseDefinitionSource = exports.ReleaseDefinitionSource || (exports.ReleaseDefinitionSource = {})); -var ReleaseEnvironmentExpands; -(function (ReleaseEnvironmentExpands) { + TestPointState[TestPointState["InProgress"] = 4] = "InProgress"; + TestPointState[TestPointState["MaxValue"] = 4] = "MaxValue"; +})(TestPointState = exports.TestPointState || (exports.TestPointState = {})); +/** + * Group by for results + */ +var TestResultGroupBy; +(function (TestResultGroupBy) { /** - * Return top level properties of object. + * Group the results by branches */ - ReleaseEnvironmentExpands[ReleaseEnvironmentExpands["None"] = 0] = "None"; + TestResultGroupBy[TestResultGroupBy["Branch"] = 1] = "Branch"; /** - * Expand environment with tasks. + * Group the results by environment */ - ReleaseEnvironmentExpands[ReleaseEnvironmentExpands["Tasks"] = 1] = "Tasks"; -})(ReleaseEnvironmentExpands = exports.ReleaseEnvironmentExpands || (exports.ReleaseEnvironmentExpands = {})); -var ReleaseExpands; -(function (ReleaseExpands) { - ReleaseExpands[ReleaseExpands["None"] = 0] = "None"; - ReleaseExpands[ReleaseExpands["Environments"] = 2] = "Environments"; - ReleaseExpands[ReleaseExpands["Artifacts"] = 4] = "Artifacts"; - ReleaseExpands[ReleaseExpands["Approvals"] = 8] = "Approvals"; - ReleaseExpands[ReleaseExpands["ManualInterventions"] = 16] = "ManualInterventions"; - ReleaseExpands[ReleaseExpands["Variables"] = 32] = "Variables"; - ReleaseExpands[ReleaseExpands["Tags"] = 64] = "Tags"; -})(ReleaseExpands = exports.ReleaseExpands || (exports.ReleaseExpands = {})); -var ReleaseQueryOrder; -(function (ReleaseQueryOrder) { + TestResultGroupBy[TestResultGroupBy["Environment"] = 2] = "Environment"; +})(TestResultGroupBy = exports.TestResultGroupBy || (exports.TestResultGroupBy = {})); +var TestResultsContextType; +(function (TestResultsContextType) { + TestResultsContextType[TestResultsContextType["Build"] = 1] = "Build"; + TestResultsContextType[TestResultsContextType["Release"] = 2] = "Release"; + TestResultsContextType[TestResultsContextType["Pipeline"] = 3] = "Pipeline"; +})(TestResultsContextType = exports.TestResultsContextType || (exports.TestResultsContextType = {})); +var TestResultsSettingsType; +(function (TestResultsSettingsType) { /** - * Return results in descending order. + * Returns All Test Settings. */ - ReleaseQueryOrder[ReleaseQueryOrder["Descending"] = 0] = "Descending"; + TestResultsSettingsType[TestResultsSettingsType["All"] = 1] = "All"; /** - * Return results in ascending order. + * Returns Flaky Test Settings. */ - ReleaseQueryOrder[ReleaseQueryOrder["Ascending"] = 1] = "Ascending"; -})(ReleaseQueryOrder = exports.ReleaseQueryOrder || (exports.ReleaseQueryOrder = {})); -var ReleaseReason; -(function (ReleaseReason) { + TestResultsSettingsType[TestResultsSettingsType["Flaky"] = 2] = "Flaky"; /** - * Indicates the release triggered reason not set. + * Returns whether to log new tests or not */ - ReleaseReason[ReleaseReason["None"] = 0] = "None"; + TestResultsSettingsType[TestResultsSettingsType["NewTestLogging"] = 3] = "NewTestLogging"; +})(TestResultsSettingsType = exports.TestResultsSettingsType || (exports.TestResultsSettingsType = {})); +/** + * The types of outcomes for test run. + */ +var TestRunOutcome; +(function (TestRunOutcome) { /** - * Indicates the release triggered manually. + * Run with zero failed tests and has at least one impacted test */ - ReleaseReason[ReleaseReason["Manual"] = 1] = "Manual"; + TestRunOutcome[TestRunOutcome["Passed"] = 0] = "Passed"; /** - * Indicates the release triggered by continuous integration. + * Run with at-least one failed test. */ - ReleaseReason[ReleaseReason["ContinuousIntegration"] = 2] = "ContinuousIntegration"; + TestRunOutcome[TestRunOutcome["Failed"] = 1] = "Failed"; /** - * Indicates the release triggered by schedule. + * Run with no impacted tests. */ - ReleaseReason[ReleaseReason["Schedule"] = 3] = "Schedule"; + TestRunOutcome[TestRunOutcome["NotImpacted"] = 2] = "NotImpacted"; /** - * Indicates the release triggered by PullRequest. + * Runs with All tests in other category. */ - ReleaseReason[ReleaseReason["PullRequest"] = 4] = "PullRequest"; -})(ReleaseReason = exports.ReleaseReason || (exports.ReleaseReason = {})); -var ReleaseStatus; -(function (ReleaseStatus) { + TestRunOutcome[TestRunOutcome["Others"] = 3] = "Others"; +})(TestRunOutcome = exports.TestRunOutcome || (exports.TestRunOutcome = {})); +/** + * The types of publish context for run. + */ +var TestRunPublishContext; +(function (TestRunPublishContext) { /** - * Release status not set. + * Run is published for Build Context. */ - ReleaseStatus[ReleaseStatus["Undefined"] = 0] = "Undefined"; + TestRunPublishContext[TestRunPublishContext["Build"] = 1] = "Build"; /** - * Release is in draft state. + * Run is published for Release Context. */ - ReleaseStatus[ReleaseStatus["Draft"] = 1] = "Draft"; + TestRunPublishContext[TestRunPublishContext["Release"] = 2] = "Release"; /** - * Release status is in active. + * Run is published for any Context. */ - ReleaseStatus[ReleaseStatus["Active"] = 2] = "Active"; + TestRunPublishContext[TestRunPublishContext["All"] = 3] = "All"; +})(TestRunPublishContext = exports.TestRunPublishContext || (exports.TestRunPublishContext = {})); +/** + * The types of states for test run. + */ +var TestRunState; +(function (TestRunState) { /** - * Release status is in abandoned. + * Only used during an update to preserve the existing value. */ - ReleaseStatus[ReleaseStatus["Abandoned"] = 4] = "Abandoned"; -})(ReleaseStatus = exports.ReleaseStatus || (exports.ReleaseStatus = {})); -var ReleaseTriggerType; -(function (ReleaseTriggerType) { + TestRunState[TestRunState["Unspecified"] = 0] = "Unspecified"; /** - * Release trigger type not set. + * The run is still being created. No tests have started yet. */ - ReleaseTriggerType[ReleaseTriggerType["Undefined"] = 0] = "Undefined"; + TestRunState[TestRunState["NotStarted"] = 1] = "NotStarted"; /** - * Artifact based release trigger. + * Tests are running. */ - ReleaseTriggerType[ReleaseTriggerType["ArtifactSource"] = 1] = "ArtifactSource"; + TestRunState[TestRunState["InProgress"] = 2] = "InProgress"; /** - * Schedule based release trigger. + * All tests have completed or been skipped. */ - ReleaseTriggerType[ReleaseTriggerType["Schedule"] = 2] = "Schedule"; + TestRunState[TestRunState["Completed"] = 3] = "Completed"; /** - * Source repository based release trigger. + * Run is stopped and remaining tests have been aborted */ - ReleaseTriggerType[ReleaseTriggerType["SourceRepo"] = 3] = "SourceRepo"; + TestRunState[TestRunState["Aborted"] = 4] = "Aborted"; /** - * Container image based release trigger. + * Run is currently initializing This is a legacy state and should not be used any more */ - ReleaseTriggerType[ReleaseTriggerType["ContainerImage"] = 4] = "ContainerImage"; + TestRunState[TestRunState["Waiting"] = 5] = "Waiting"; /** - * Package based release trigger. + * Run requires investigation because of a test point failure This is a legacy state and should not be used any more */ - ReleaseTriggerType[ReleaseTriggerType["Package"] = 5] = "Package"; + TestRunState[TestRunState["NeedsInvestigation"] = 6] = "NeedsInvestigation"; +})(TestRunState = exports.TestRunState || (exports.TestRunState = {})); +/** + * The types of sub states for test run. It gives the user more info about the test run beyond the high level test run state + */ +var TestRunSubstate; +(function (TestRunSubstate) { /** - * Pull request based release trigger. + * Run with noState. */ - ReleaseTriggerType[ReleaseTriggerType["PullRequest"] = 6] = "PullRequest"; -})(ReleaseTriggerType = exports.ReleaseTriggerType || (exports.ReleaseTriggerType = {})); -var ScheduleDays; -(function (ScheduleDays) { + TestRunSubstate[TestRunSubstate["None"] = 0] = "None"; /** - * Scheduled day not set. + * Run state while Creating Environment. */ - ScheduleDays[ScheduleDays["None"] = 0] = "None"; + TestRunSubstate[TestRunSubstate["CreatingEnvironment"] = 1] = "CreatingEnvironment"; /** - * Scheduled on Monday. + * Run state while Running Tests. */ - ScheduleDays[ScheduleDays["Monday"] = 1] = "Monday"; + TestRunSubstate[TestRunSubstate["RunningTests"] = 2] = "RunningTests"; /** - * Scheduled on Tuesday. + * Run state while Creating Environment. */ - ScheduleDays[ScheduleDays["Tuesday"] = 2] = "Tuesday"; + TestRunSubstate[TestRunSubstate["CanceledByUser"] = 3] = "CanceledByUser"; /** - * Scheduled on Wednesday. + * Run state when it is Aborted By the System. */ - ScheduleDays[ScheduleDays["Wednesday"] = 4] = "Wednesday"; + TestRunSubstate[TestRunSubstate["AbortedBySystem"] = 4] = "AbortedBySystem"; /** - * Scheduled on Thursday. + * Run state when run has timedOut. */ - ScheduleDays[ScheduleDays["Thursday"] = 8] = "Thursday"; + TestRunSubstate[TestRunSubstate["TimedOut"] = 5] = "TimedOut"; /** - * Scheduled on Friday. + * Run state while Pending Analysis. */ - ScheduleDays[ScheduleDays["Friday"] = 16] = "Friday"; + TestRunSubstate[TestRunSubstate["PendingAnalysis"] = 6] = "PendingAnalysis"; /** - * Scheduled on Saturday. + * Run state after being Analysed. */ - ScheduleDays[ScheduleDays["Saturday"] = 32] = "Saturday"; + TestRunSubstate[TestRunSubstate["Analyzed"] = 7] = "Analyzed"; /** - * Scheduled on Sunday. + * Run state when cancellation is in Progress. */ - ScheduleDays[ScheduleDays["Sunday"] = 64] = "Sunday"; + TestRunSubstate[TestRunSubstate["CancellationInProgress"] = 8] = "CancellationInProgress"; +})(TestRunSubstate = exports.TestRunSubstate || (exports.TestRunSubstate = {})); +/** + * Represents the source from which the test session was created + */ +var TestSessionSource; +(function (TestSessionSource) { /** - * Scheduled on all the days in week. + * Source of test session uncertain as it is stale */ - ScheduleDays[ScheduleDays["All"] = 127] = "All"; -})(ScheduleDays = exports.ScheduleDays || (exports.ScheduleDays = {})); -var SenderType; -(function (SenderType) { - SenderType[SenderType["ServiceAccount"] = 1] = "ServiceAccount"; - SenderType[SenderType["RequestingUser"] = 2] = "RequestingUser"; -})(SenderType = exports.SenderType || (exports.SenderType = {})); -var SingleReleaseExpands; -(function (SingleReleaseExpands) { + TestSessionSource[TestSessionSource["Unknown"] = 0] = "Unknown"; /** - * Return top level properties of object. + * The session was created from Microsoft Test Manager exploratory desktop tool. */ - SingleReleaseExpands[SingleReleaseExpands["None"] = 0] = "None"; + TestSessionSource[TestSessionSource["XTDesktop"] = 1] = "XTDesktop"; /** - * Expand release with tasks. + * The session was created from feedback client. */ - SingleReleaseExpands[SingleReleaseExpands["Tasks"] = 1] = "Tasks"; -})(SingleReleaseExpands = exports.SingleReleaseExpands || (exports.SingleReleaseExpands = {})); -var TaskStatus; -(function (TaskStatus) { + TestSessionSource[TestSessionSource["FeedbackDesktop"] = 2] = "FeedbackDesktop"; /** - * The task does not have the status set. + * The session was created from browser extension. */ - TaskStatus[TaskStatus["Unknown"] = 0] = "Unknown"; + TestSessionSource[TestSessionSource["XTWeb"] = 3] = "XTWeb"; /** - * The task is in pending status. + * The session was created from browser extension. */ - TaskStatus[TaskStatus["Pending"] = 1] = "Pending"; + TestSessionSource[TestSessionSource["FeedbackWeb"] = 4] = "FeedbackWeb"; /** - * The task is currently in progress. + * The session was created from web access using Microsoft Test Manager exploratory desktop tool. */ - TaskStatus[TaskStatus["InProgress"] = 2] = "InProgress"; + TestSessionSource[TestSessionSource["XTDesktop2"] = 5] = "XTDesktop2"; /** - * The task completed successfully. + * To show sessions from all supported sources. */ - TaskStatus[TaskStatus["Success"] = 3] = "Success"; + TestSessionSource[TestSessionSource["SessionInsightsForAll"] = 6] = "SessionInsightsForAll"; +})(TestSessionSource = exports.TestSessionSource || (exports.TestSessionSource = {})); +/** + * Represents the state of the test session. + */ +var TestSessionState; +(function (TestSessionState) { /** - * The task execution failed. + * Only used during an update to preserve the existing value. */ - TaskStatus[TaskStatus["Failure"] = 4] = "Failure"; + TestSessionState[TestSessionState["Unspecified"] = 0] = "Unspecified"; /** - * The task execution canceled. + * The session is still being created. */ - TaskStatus[TaskStatus["Canceled"] = 5] = "Canceled"; + TestSessionState[TestSessionState["NotStarted"] = 1] = "NotStarted"; /** - * The task execution skipped. + * The session is running. */ - TaskStatus[TaskStatus["Skipped"] = 6] = "Skipped"; + TestSessionState[TestSessionState["InProgress"] = 2] = "InProgress"; /** - * The task completed successfully. + * The session has paused. */ - TaskStatus[TaskStatus["Succeeded"] = 7] = "Succeeded"; + TestSessionState[TestSessionState["Paused"] = 3] = "Paused"; /** - * The task execution failed. + * The session has completed. */ - TaskStatus[TaskStatus["Failed"] = 8] = "Failed"; + TestSessionState[TestSessionState["Completed"] = 4] = "Completed"; /** - * The task execution partially succeeded. + * This is required for Feedback session which are declined */ - TaskStatus[TaskStatus["PartiallySucceeded"] = 9] = "PartiallySucceeded"; -})(TaskStatus = exports.TaskStatus || (exports.TaskStatus = {})); -var VariableGroupActionFilter; -(function (VariableGroupActionFilter) { - VariableGroupActionFilter[VariableGroupActionFilter["None"] = 0] = "None"; - VariableGroupActionFilter[VariableGroupActionFilter["Manage"] = 2] = "Manage"; - VariableGroupActionFilter[VariableGroupActionFilter["Use"] = 16] = "Use"; -})(VariableGroupActionFilter = exports.VariableGroupActionFilter || (exports.VariableGroupActionFilter = {})); -var YamlFileSourceTypes; -(function (YamlFileSourceTypes) { - YamlFileSourceTypes[YamlFileSourceTypes["None"] = 0] = "None"; - YamlFileSourceTypes[YamlFileSourceTypes["TFSGit"] = 1] = "TFSGit"; -})(YamlFileSourceTypes = exports.YamlFileSourceTypes || (exports.YamlFileSourceTypes = {})); + TestSessionState[TestSessionState["Declined"] = 5] = "Declined"; +})(TestSessionState = exports.TestSessionState || (exports.TestSessionState = {})); exports.TypeInfo = { - AgentArtifactDefinition: {}, - AgentArtifactType: { + AfnStrip: {}, + AggregatedDataForResultTrend: {}, + AggregatedResultDetailsByOutcome: {}, + AggregatedResultsAnalysis: {}, + AggregatedResultsByOutcome: {}, + AggregatedRunsByOutcome: {}, + AggregatedRunsByState: {}, + AttachmentType: { enumValues: { - "xamlBuild": 0, - "build": 1, - "jenkins": 2, - "fileShare": 3, - "nuget": 4, - "tfsOnPrem": 5, - "gitHub": 6, - "tfGit": 7, - "externalTfsBuild": 8, - "custom": 9, - "tfvc": 10 + "generalAttachment": 0, + "afnStrip": 1, + "bugFilingData": 2, + "codeCoverage": 3, + "intermediateCollectorData": 4, + "runConfig": 5, + "testImpactDetails": 6, + "tmiTestRunDeploymentFiles": 7, + "tmiTestRunReverseDeploymentFiles": 8, + "tmiTestResultDetail": 9, + "tmiTestRunSummary": 10, + "consoleLog": 11 } }, - AgentBasedDeployPhase: {}, - AgentDeploymentInput: {}, - ApprovalExecutionOrder: { + BatchResponse: {}, + BuildConfiguration: {}, + BuildCoverage: {}, + BuildReference2: {}, + BulkResultUpdateRequest: {}, + CloneOperationInformation: {}, + CloneOperationState: { enumValues: { - "beforeGates": 1, - "afterSuccessfulGates": 2, - "afterGatesAlways": 4 + "failed": 2, + "inProgress": 1, + "queued": 0, + "succeeded": 3 } }, - ApprovalFilters: { + CodeCoverageSummary: {}, + Coverage2: {}, + CoverageQueryFlags: { enumValues: { - "none": 0, - "manualApprovals": 1, - "automatedApprovals": 2, - "approvalSnapshots": 4, - "all": 7 + "modules": 1, + "functions": 2, + "blockData": 4 } }, - ApprovalOptions: {}, - ApprovalStatus: { + CoverageStatus: { enumValues: { - "undefined": 0, - "pending": 1, - "approved": 2, - "rejected": 4, - "reassigned": 6, - "canceled": 7, - "skipped": 8 + "covered": 0, + "notCovered": 1, + "partiallyCovered": 2 } }, - ApprovalType: { + CoverageSummaryStatus: { enumValues: { - "undefined": 0, - "preDeploy": 1, - "postDeploy": 2, - "all": 3 + "none": 0, + "inProgress": 1, + "completed": 2, + "finalized": 3, + "pending": 4, + "updateRequestQueued": 5 } }, - ArtifactContributionDefinition: {}, - ArtifactMetadata: {}, - ArtifactSourceTrigger: {}, - ArtifactTypeDefinition: {}, - ArtifactVersion: {}, - ArtifactVersionQueryResult: {}, - AuditAction: { + CreateTestMessageLogEntryRequest: {}, + CreateTestResultsRequest: {}, + CreateTestRunRequest: {}, + CustomTestFieldDefinition: {}, + CustomTestFieldScope: { enumValues: { - "add": 1, - "update": 2, - "delete": 3, - "undelete": 4 + "none": 0, + "testRun": 1, + "testResult": 2, + "system": 4, + "all": 7 } }, - AuthorizationHeaderFor: { + CustomTestFieldType: { enumValues: { - "revalidateApproverIdentity": 0, - "onBehalfOf": 1 + "bit": 2, + "dateTime": 4, + "int": 8, + "float": 6, + "string": 12, + "guid": 14 } }, - AutoTriggerIssue: {}, - AzureKeyVaultVariableGroupProviderData: {}, - AzureKeyVaultVariableValue: {}, - BuildVersion: {}, - Change: {}, - CodeRepositoryReference: {}, - Condition: {}, - ConditionType: { + DatedTestFieldData: {}, + FailingSince: {}, + FetchTestResultsResponse: {}, + FlakyDetection: {}, + FlakyDetectionType: { enumValues: { - "undefined": 0, - "event": 1, - "environmentState": 2, - "artifact": 4 + "custom": 1, + "system": 2 } }, - ContainerImageTrigger: {}, - ContinuousDeploymentTriggerIssue: {}, - Deployment: {}, - DeploymentApprovalCompletedEvent: {}, - DeploymentApprovalPendingEvent: {}, - DeploymentAttempt: {}, - DeploymentAuthorizationInfo: {}, - DeploymentAuthorizationOwner: { + FlakySettings: {}, + LastResultDetails: {}, + LegacyBuildConfiguration: {}, + LegacyReleaseReference: {}, + LegacyTestCaseResult: {}, + LegacyTestRun: {}, + LegacyTestSettings: {}, + Metrics: { enumValues: { - "automatic": 0, - "deploymentSubmitter": 1, - "firstPreDeploymentApprover": 2 + "all": 1, + "resultSummary": 2, + "resultsAnalysis": 3, + "runSummary": 4 } }, - DeploymentCompletedEvent: {}, - DeploymentExpands: { + OperationType: { enumValues: { - "all": 0, - "deploymentOnly": 1, - "approvals": 2, - "artifacts": 4 + "add": 1, + "delete": 2 } }, - DeploymentJob: {}, - DeploymentManualInterventionPendingEvent: {}, - DeploymentOperationStatus: { + PipelineTestMetrics: {}, + PointLastResult: {}, + PointsResults2: {}, + QueryTestActionResultResponse: {}, + ReleaseReference: {}, + ReleaseReference2: {}, + RequirementsToTestsMapping2: {}, + Response: {}, + ResultDetails: { enumValues: { - "undefined": 0, - "queued": 1, - "scheduled": 2, - "pending": 4, - "approved": 8, - "rejected": 16, - "deferred": 32, - "queuedForAgent": 64, - "phaseInProgress": 128, - "phaseSucceeded": 256, - "phasePartiallySucceeded": 512, - "phaseFailed": 1024, - "canceled": 2048, - "phaseCanceled": 4096, - "manualInterventionPending": 8192, - "queuedForPipeline": 16384, - "cancelling": 32768, - "evaluatingGates": 65536, - "gateFailed": 131072, - "all": 258047 + "none": 0, + "iterations": 1, + "workItems": 2, + "subResults": 4, + "point": 8 } }, - DeploymentQueryParameters: {}, - DeploymentReason: { + ResultGroupType: { enumValues: { "none": 0, - "manual": 1, - "automated": 2, - "scheduled": 4, - "redeployTrigger": 8 + "rerun": 1, + "dataDriven": 2, + "orderedTest": 3, + "generic": 4 } }, - DeploymentsQueryType: { + ResultMetadata: { enumValues: { - "regular": 1, - "failingSince": 2 + "rerun": 1, + "flaky": 2 } }, - DeploymentStartedEvent: {}, - DeploymentStatus: { + ResultMetaDataDetails: { enumValues: { - "undefined": 0, - "notDeployed": 1, - "inProgress": 2, - "succeeded": 4, - "partiallySucceeded": 8, - "failed": 16, - "all": 31 + "none": 0, + "flakyIdentifiers": 1 } }, - DeployPhase: {}, - DeployPhaseStatus: { + ResultObjectType: { enumValues: { - "undefined": 0, - "notStarted": 1, - "inProgress": 2, - "partiallySucceeded": 4, - "succeeded": 8, - "failed": 16, - "canceled": 32, - "skipped": 64, - "cancelling": 128 + "testSuite": 0, + "testPlan": 1 } }, - DeployPhaseTypes: { + ResultRetentionSettings: {}, + ResultsByQueryResponse: {}, + ResultsFilter: {}, + ResultsSummaryByOutcome: {}, + ResultSummary: {}, + ResultUpdateRequest: {}, + ResultUpdateRequestModel: {}, + ResultUpdateResponse: {}, + RunCreateModel: {}, + RunStatistic: {}, + RunSummary: {}, + RunSummaryModel: {}, + RunType: { enumValues: { - "undefined": 0, - "agentBasedDeployment": 1, - "runOnServer": 2, - "machineGroupBasedDeployment": 4, - "deploymentGates": 8 + "unspecified": 0, + "normal": 1, + "blocking": 2, + "web": 4, + "mtrRunInitiatedFromWeb": 8, + "runWithDtlEnv": 16, + "noConfigRun": 32 } }, - EnvironmentStatus: { + RunUpdateModel: {}, + Service: { enumValues: { - "undefined": 0, - "notStarted": 1, - "inProgress": 2, - "succeeded": 4, - "canceled": 8, - "rejected": 16, - "queued": 32, - "scheduled": 64, - "partiallySucceeded": 128 + "any": 0, + "tcm": 1, + "tfs": 2 } }, - EnvironmentTrigger: {}, - EnvironmentTriggerType: { + SuiteExpand: { enumValues: { - "undefined": 0, - "deploymentGroupRedeploy": 1, - "rollbackRedeploy": 2 + "children": 1, + "defaultTesters": 2 } }, - ExecutionInput: {}, - Folder: {}, - FolderPathQueryOrder: { + TCMServiceDataMigrationStatus: { enumValues: { - "none": 0, - "ascending": 1, - "descending": 2 + "notStarted": 0, + "inProgress": 1, + "completed": 2, + "failed": 3 } }, - GatesDeployPhase: {}, - GateStatus: { + TestActionResult: {}, + TestActionResult2: {}, + TestActionResultModel: {}, + TestAttachment: {}, + TestAuthoringDetails: {}, + TestCaseReference2: {}, + TestCaseResult: {}, + TestConfiguration: {}, + TestConfigurationState: { enumValues: { - "none": 0, - "pending": 1, - "inProgress": 2, - "succeeded": 4, - "failed": 8, - "canceled": 16 + "active": 1, + "inactive": 2 } }, - IgnoredGate: {}, - IssueSource: { + TestExecutionReportData: {}, + TestExtensionField: {}, + TestExtensionFieldDetails: {}, + TestFailuresAnalysis: {}, + TestHistoryQuery: {}, + TestIterationDetailsModel: {}, + TestLog: {}, + TestLogReference: {}, + TestLogScope: { enumValues: { - "none": 0, - "user": 1, - "system": 2 + "run": 0, + "build": 1, + "release": 2 } }, - MachineGroupBasedDeployPhase: {}, - MailMessage: {}, - MailSectionType: { + TestLogStatus: {}, + TestLogStatusCode: { enumValues: { - "details": 0, - "environments": 1, - "issues": 2, - "testResults": 3, - "workItems": 4, - "releaseInfo": 5 + "success": 0, + "failed": 1, + "fileAlreadyExists": 2, + "invalidInput": 3, + "invalidFileName": 4, + "invalidContainer": 5, + "transferFailed": 6, + "featureDisabled": 7, + "buildDoesNotExist": 8, + "runDoesNotExist": 9, + "containerNotCreated": 10, + "apiNotSupported": 11, + "fileSizeExceeds": 12, + "containerNotFound": 13, + "fileNotFound": 14, + "directoryNotFound": 15, + "storageCapacityExceeded": 16 } }, - ManualIntervention: {}, - ManualInterventionStatus: { + TestLogStoreAttachment: {}, + TestLogStoreEndpointDetails: {}, + TestLogStoreEndpointType: { enumValues: { - "unknown": 0, - "pending": 1, - "rejected": 2, - "approved": 4, - "canceled": 8 + "root": 1, + "file": 2 } }, - ManualInterventionUpdateMetadata: {}, - MultiConfigInput: {}, - MultiMachineInput: {}, - PackageTrigger: {}, - ParallelExecutionInputBase: {}, - ParallelExecutionTypes: { + TestLogStoreOperationType: { enumValues: { - "none": 0, - "multiConfiguration": 1, - "multiMachine": 2 + "read": 1, + "create": 2, + "readAndCreate": 3 } }, - PipelineProcess: {}, - PipelineProcessTypes: { + TestLogType: { enumValues: { - "designer": 1, - "yaml": 2 + "generalAttachment": 1, + "codeCoverage": 2, + "testImpact": 3, + "intermediate": 4, + "system": 5 } }, - PropertySelector: {}, - PropertySelectorType: { + TestMessageLogDetails: {}, + TestMessageLogEntry: {}, + TestMessageLogEntry2: {}, + TestOutcome: { enumValues: { - "inclusion": 0, - "exclusion": 1 + "unspecified": 0, + "none": 1, + "passed": 2, + "failed": 3, + "inconclusive": 4, + "timeout": 5, + "aborted": 6, + "blocked": 7, + "notExecuted": 8, + "warning": 9, + "error": 10, + "notApplicable": 11, + "paused": 12, + "inProgress": 13, + "notImpacted": 14, + "maxValue": 14 } }, - PullRequestConfiguration: {}, - PullRequestSystemType: { + TestParameter2: {}, + TestPlan: {}, + TestPlanCloneRequest: {}, + TestPlanHubData: {}, + TestPlansWithSelection: {}, + TestPoint: {}, + TestPointReference: {}, + TestPointsEvent: {}, + TestPointsQuery: {}, + TestPointState: { enumValues: { "none": 0, - "tfsGit": 1, - "gitHub": 2 + "ready": 1, + "completed": 2, + "notReady": 3, + "inProgress": 4, + "maxValue": 4 } }, - PullRequestTrigger: {}, - Release: {}, - ReleaseAbandonedEvent: {}, - ReleaseApproval: {}, - ReleaseApprovalHistory: {}, - ReleaseApprovalPendingEvent: {}, - ReleaseCondition: {}, - ReleaseCreatedEvent: {}, - ReleaseDefinition: {}, - ReleaseDefinitionApprovals: {}, - ReleaseDefinitionEnvironment: {}, - ReleaseDefinitionEnvironmentTemplate: {}, - ReleaseDefinitionExpands: { + TestPointsUpdatedEvent: {}, + TestResult2: {}, + TestResultAcrossProjectResponse: {}, + TestResultAttachment: {}, + TestResultGroupBy: { enumValues: { - "none": 0, - "environments": 2, - "artifacts": 4, - "triggers": 8, - "variables": 16, - "tags": 32, - "lastRelease": 64 + "branch": 1, + "environment": 2 } }, - ReleaseDefinitionQueryOrder: { + TestResultHistory: {}, + TestResultHistoryDetailsForGroup: {}, + TestResultHistoryForGroup: {}, + TestResultModelBase: {}, + TestResultReset2: {}, + TestResultsContext: {}, + TestResultsContextType: { enumValues: { - "idAscending": 0, - "idDescending": 1, - "nameAscending": 2, - "nameDescending": 3 + "build": 1, + "release": 2, + "pipeline": 3 } }, - ReleaseDefinitionRevision: {}, - ReleaseDefinitionSource: { + TestResultsDetails: {}, + TestResultsDetailsForGroup: {}, + TestResultsEx2: {}, + TestResultsQuery: {}, + TestResultsSettings: {}, + TestResultsSettingsType: { enumValues: { - "undefined": 0, - "restApi": 1, - "userInterface": 2, - "ibiza": 4, - "portalExtensionApi": 8 + "all": 1, + "flaky": 2, + "newTestLogging": 3 } }, - ReleaseDefinitionSummary: {}, - ReleaseDeployPhase: {}, - ReleaseEnvironment: {}, - ReleaseEnvironmentCompletedEvent: {}, - ReleaseEnvironmentExpands: { + TestResultSummary: {}, + TestResultsUpdateSettings: {}, + TestResultsWithWatermark: {}, + TestResultTrendFilter: {}, + TestRun: {}, + TestRun2: {}, + TestRunCanceledEvent: {}, + TestRunCreatedEvent: {}, + TestRunEvent: {}, + TestRunEx2: {}, + TestRunOutcome: { enumValues: { - "none": 0, - "tasks": 1 + "passed": 0, + "failed": 1, + "notImpacted": 2, + "others": 3 } }, - ReleaseEnvironmentStatusUpdatedEvent: {}, - ReleaseEnvironmentUpdateMetadata: {}, - ReleaseExpands: { + TestRunPublishContext: { enumValues: { - "none": 0, - "environments": 2, - "artifacts": 4, - "approvals": 8, - "manualInterventions": 16, - "variables": 32, - "tags": 64 + "build": 1, + "release": 2, + "all": 3 } }, - ReleaseGates: {}, - ReleaseGatesPhase: {}, - ReleaseNotCreatedEvent: {}, - ReleaseQueryOrder: { + TestRunStartedEvent: {}, + TestRunState: { enumValues: { - "descending": 0, - "ascending": 1 + "unspecified": 0, + "notStarted": 1, + "inProgress": 2, + "completed": 3, + "aborted": 4, + "waiting": 5, + "needsInvestigation": 6 } }, - ReleaseReason: { + TestRunStatistic: {}, + TestRunSubstate: { enumValues: { "none": 0, - "manual": 1, - "continuousIntegration": 2, - "schedule": 3, - "pullRequest": 4 + "creatingEnvironment": 1, + "runningTests": 2, + "canceledByUser": 3, + "abortedBySystem": 4, + "timedOut": 5, + "pendingAnalysis": 6, + "analyzed": 7, + "cancellationInProgress": 8 } }, - ReleaseReference: {}, - ReleaseRevision: {}, - ReleaseSchedule: {}, - ReleaseStartMetadata: {}, - ReleaseStatus: { + TestRunSummary2: {}, + TestRunWithDtlEnvEvent: {}, + TestSession: {}, + TestSessionExploredWorkItemReference: {}, + TestSessionSource: { enumValues: { - "undefined": 0, - "draft": 1, - "active": 2, - "abandoned": 4 + "unknown": 0, + "xtDesktop": 1, + "feedbackDesktop": 2, + "xtWeb": 3, + "feedbackWeb": 4, + "xtDesktop2": 5, + "sessionInsightsForAll": 6 } }, - ReleaseTask: {}, - ReleaseTaskAttachment: {}, - ReleaseTasksUpdatedEvent: {}, - ReleaseTriggerBase: {}, - ReleaseTriggerType: { + TestSessionState: { enumValues: { - "undefined": 0, - "artifactSource": 1, - "schedule": 2, - "sourceRepo": 3, - "containerImage": 4, - "package": 5, - "pullRequest": 6 + "unspecified": 0, + "notStarted": 1, + "inProgress": 2, + "paused": 3, + "completed": 4, + "declined": 5 } }, - ReleaseUpdatedEvent: {}, - ReleaseUpdateMetadata: {}, - RunOnServerDeployPhase: {}, - ScheduleDays: { - enumValues: { - "none": 0, - "monday": 1, - "tuesday": 2, - "wednesday": 4, - "thursday": 8, - "friday": 16, - "saturday": 32, - "sunday": 64, - "all": 127 - } + TestSettings2: {}, + TestSubResult: {}, + TestSuite: {}, + TestSummaryForWorkItem: {}, + UpdatedProperties: {}, + UpdateTestRunRequest: {}, + UpdateTestRunResponse: {}, + WorkItemToTestLinks: {}, +}; +exports.TypeInfo.AfnStrip.fields = { + creationDate: { + isDate: true, + } +}; +exports.TypeInfo.AggregatedDataForResultTrend.fields = { + resultsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome }, - ScheduledReleaseTrigger: {}, - SenderType: { - enumValues: { - "serviceAccount": 1, - "requestingUser": 2 - } + runSummaryByState: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunState, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByState }, - ServerDeploymentInput: {}, - SingleReleaseExpands: { - enumValues: { - "none": 0, - "tasks": 1 - } + testResultsContext: { + typeInfo: exports.TypeInfo.TestResultsContext + } +}; +exports.TypeInfo.AggregatedResultDetailsByOutcome.fields = { + outcome: { + enumType: exports.TypeInfo.TestOutcome + } +}; +exports.TypeInfo.AggregatedResultsAnalysis.fields = { + notReportedResultsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome }, - SourcePullRequestVersion: {}, - SourceRepoTrigger: {}, - SummaryMailSection: {}, - TaskStatus: { - enumValues: { - "unknown": 0, - "pending": 1, - "inProgress": 2, - "success": 3, - "failure": 4, - "canceled": 5, - "skipped": 6, - "succeeded": 7, - "failed": 8, - "partiallySucceeded": 9 - } + previousContext: { + typeInfo: exports.TypeInfo.TestResultsContext }, - VariableGroup: {}, - VariableGroupActionFilter: { - enumValues: { - "none": 0, - "manage": 2, - "use": 16 - } + resultsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome }, - YamlFileSource: {}, - YamlFileSourceTypes: { - enumValues: { - "none": 0, - "tfsGit": 1 - } + runSummaryByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByOutcome }, - YamlPipelineProcess: {}, + runSummaryByState: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunState, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByState + } }; -exports.TypeInfo.AgentArtifactDefinition.fields = { - artifactType: { - enumType: exports.TypeInfo.AgentArtifactType +exports.TypeInfo.AggregatedResultsByOutcome.fields = { + outcome: { + enumType: exports.TypeInfo.TestOutcome } }; -exports.TypeInfo.AgentBasedDeployPhase.fields = { - deploymentInput: { - typeInfo: exports.TypeInfo.AgentDeploymentInput +exports.TypeInfo.AggregatedRunsByOutcome.fields = { + outcome: { + enumType: exports.TypeInfo.TestRunOutcome + } +}; +exports.TypeInfo.AggregatedRunsByState.fields = { + resultsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome }, - phaseType: { - enumType: exports.TypeInfo.DeployPhaseTypes + state: { + enumType: exports.TypeInfo.TestRunState } }; -exports.TypeInfo.AgentDeploymentInput.fields = { - parallelExecution: { - typeInfo: exports.TypeInfo.ExecutionInput +exports.TypeInfo.BatchResponse.fields = { + responses: { + isArray: true, + typeInfo: exports.TypeInfo.Response + }, +}; +exports.TypeInfo.BuildConfiguration.fields = { + creationDate: { + isDate: true, } }; -exports.TypeInfo.ApprovalOptions.fields = { - executionOrder: { - enumType: exports.TypeInfo.ApprovalExecutionOrder +exports.TypeInfo.BuildCoverage.fields = { + configuration: { + typeInfo: exports.TypeInfo.BuildConfiguration } }; -exports.TypeInfo.ArtifactContributionDefinition.fields = { - inputDescriptors: { +exports.TypeInfo.BuildReference2.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.BulkResultUpdateRequest.fields = { + requests: { isArray: true, - typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + typeInfo: exports.TypeInfo.ResultUpdateRequest } }; -exports.TypeInfo.ArtifactMetadata.fields = { - instanceReference: { - typeInfo: exports.TypeInfo.BuildVersion +exports.TypeInfo.CloneOperationInformation.fields = { + completionDate: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + resultObjectType: { + enumType: exports.TypeInfo.ResultObjectType + }, + state: { + enumType: exports.TypeInfo.CloneOperationState } }; -exports.TypeInfo.ArtifactSourceTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType +exports.TypeInfo.CodeCoverageSummary.fields = { + status: { + enumType: exports.TypeInfo.CoverageSummaryStatus } }; -exports.TypeInfo.ArtifactTypeDefinition.fields = { - inputDescriptors: { +exports.TypeInfo.Coverage2.fields = { + dateCreated: { + isDate: true, + }, + dateModified: { + isDate: true, + } +}; +exports.TypeInfo.CreateTestMessageLogEntryRequest.fields = { + testMessageLogEntry: { isArray: true, - typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + typeInfo: exports.TypeInfo.TestMessageLogEntry } }; -exports.TypeInfo.ArtifactVersion.fields = { - defaultVersion: { - typeInfo: exports.TypeInfo.BuildVersion +exports.TypeInfo.CreateTestResultsRequest.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.CreateTestRunRequest.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.LegacyTestCaseResult }, - versions: { + testRun: { + typeInfo: exports.TypeInfo.LegacyTestRun + }, + testSettings: { + typeInfo: exports.TypeInfo.LegacyTestSettings + } +}; +exports.TypeInfo.CustomTestFieldDefinition.fields = { + fieldType: { + enumType: exports.TypeInfo.CustomTestFieldType + }, + scope: { + enumType: exports.TypeInfo.CustomTestFieldScope + } +}; +exports.TypeInfo.DatedTestFieldData.fields = { + date: { + isDate: true, + } +}; +exports.TypeInfo.FailingSince.fields = { + date: { + isDate: true, + }, + release: { + typeInfo: exports.TypeInfo.ReleaseReference + } +}; +exports.TypeInfo.FetchTestResultsResponse.fields = { + actionResults: { isArray: true, - typeInfo: exports.TypeInfo.BuildVersion + typeInfo: exports.TypeInfo.TestActionResult + }, + attachments: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultAttachment + }, + results: { + isArray: true, + typeInfo: exports.TypeInfo.LegacyTestCaseResult } }; -exports.TypeInfo.ArtifactVersionQueryResult.fields = { - artifactVersions: { +exports.TypeInfo.FlakyDetection.fields = { + flakyDetectionType: { + enumType: exports.TypeInfo.FlakyDetectionType + } +}; +exports.TypeInfo.FlakySettings.fields = { + flakyDetection: { + typeInfo: exports.TypeInfo.FlakyDetection + } +}; +exports.TypeInfo.LastResultDetails.fields = { + dateCompleted: { + isDate: true, + } +}; +exports.TypeInfo.LegacyBuildConfiguration.fields = { + completedDate: { + isDate: true, + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.LegacyReleaseReference.fields = { + environmentCreationDate: { + isDate: true, + }, + releaseCreationDate: { + isDate: true, + } +}; +exports.TypeInfo.LegacyTestCaseResult.fields = { + buildReference: { + typeInfo: exports.TypeInfo.LegacyBuildConfiguration + }, + creationDate: { + isDate: true, + }, + customFields: { isArray: true, - typeInfo: exports.TypeInfo.ArtifactVersion + typeInfo: exports.TypeInfo.TestExtensionField + }, + dateCompleted: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + failingSince: { + typeInfo: exports.TypeInfo.FailingSince + }, + lastUpdated: { + isDate: true, + }, + releaseReference: { + typeInfo: exports.TypeInfo.LegacyReleaseReference + }, + resultGroupType: { + enumType: exports.TypeInfo.ResultGroupType + }, + stackTrace: { + typeInfo: exports.TypeInfo.TestExtensionField } }; -exports.TypeInfo.AutoTriggerIssue.fields = { - issueSource: { - enumType: exports.TypeInfo.IssueSource +exports.TypeInfo.LegacyTestRun.fields = { + buildReference: { + typeInfo: exports.TypeInfo.LegacyBuildConfiguration }, - releaseTriggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType + completeDate: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + customFields: { + isArray: true, + typeInfo: exports.TypeInfo.TestExtensionField + }, + dueDate: { + isDate: true, + }, + lastUpdated: { + isDate: true, + }, + releaseReference: { + typeInfo: exports.TypeInfo.LegacyReleaseReference + }, + startDate: { + isDate: true, + }, + testMessageLogEntries: { + isArray: true, + typeInfo: exports.TypeInfo.TestMessageLogDetails } }; -exports.TypeInfo.AzureKeyVaultVariableGroupProviderData.fields = { - lastRefreshedOn: { +exports.TypeInfo.LegacyTestSettings.fields = { + createdDate: { + isDate: true, + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.PipelineTestMetrics.fields = { + resultSummary: { + typeInfo: exports.TypeInfo.ResultSummary + }, + runSummary: { + typeInfo: exports.TypeInfo.RunSummary + }, + summaryAtChild: { + isArray: true, + typeInfo: exports.TypeInfo.PipelineTestMetrics + } +}; +exports.TypeInfo.PointLastResult.fields = { + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.PointsResults2.fields = { + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.QueryTestActionResultResponse.fields = { + testActionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResult + }, + testAttachments: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultAttachment + } +}; +exports.TypeInfo.ReleaseReference.fields = { + creationDate: { + isDate: true, + }, + environmentCreationDate: { isDate: true, } }; -exports.TypeInfo.AzureKeyVaultVariableValue.fields = { - expires: { +exports.TypeInfo.ReleaseReference2.fields = { + environmentCreationDate: { + isDate: true, + }, + releaseCreationDate: { isDate: true, } }; -exports.TypeInfo.BuildVersion.fields = { - sourcePullRequestVersion: { - typeInfo: exports.TypeInfo.SourcePullRequestVersion +exports.TypeInfo.RequirementsToTestsMapping2.fields = { + creationDate: { + isDate: true, + }, + deletionDate: { + isDate: true, } }; -exports.TypeInfo.Change.fields = { - timestamp: { +exports.TypeInfo.Response.fields = {}; +exports.TypeInfo.ResultRetentionSettings.fields = { + lastUpdatedDate: { isDate: true, } }; -exports.TypeInfo.CodeRepositoryReference.fields = { - systemType: { - enumType: exports.TypeInfo.PullRequestSystemType +exports.TypeInfo.ResultsByQueryResponse.fields = { + testResults: { + isArray: true, + typeInfo: exports.TypeInfo.LegacyTestCaseResult } }; -exports.TypeInfo.Condition.fields = { - conditionType: { - enumType: exports.TypeInfo.ConditionType +exports.TypeInfo.ResultsFilter.fields = { + executedIn: { + enumType: exports.TypeInfo.Service + }, + maxCompleteDate: { + isDate: true, + }, + testResultsContext: { + typeInfo: exports.TypeInfo.TestResultsContext } }; -exports.TypeInfo.ContainerImageTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType +exports.TypeInfo.ResultsSummaryByOutcome.fields = { + aggregatedResultDetailsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultDetailsByOutcome } }; -exports.TypeInfo.ContinuousDeploymentTriggerIssue.fields = { - issueSource: { - enumType: exports.TypeInfo.IssueSource - }, - releaseTriggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType +exports.TypeInfo.ResultSummary.fields = { + resultSummaryByRunState: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunState, + dictionaryValueTypeInfo: exports.TypeInfo.ResultsSummaryByOutcome } }; -exports.TypeInfo.Deployment.fields = { - completedOn: { - isDate: true, - }, - conditions: { +exports.TypeInfo.ResultUpdateRequest.fields = { + actionResultDeletes: { isArray: true, - typeInfo: exports.TypeInfo.Condition - }, - deploymentStatus: { - enumType: exports.TypeInfo.DeploymentStatus - }, - lastModifiedOn: { - isDate: true, + typeInfo: exports.TypeInfo.TestActionResult }, - operationStatus: { - enumType: exports.TypeInfo.DeploymentOperationStatus + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResult }, - postDeployApprovals: { + attachments: { isArray: true, - typeInfo: exports.TypeInfo.ReleaseApproval + typeInfo: exports.TypeInfo.TestResultAttachment }, - preDeployApprovals: { + testCaseResult: { + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.ResultUpdateRequestModel.fields = { + actionResultDeletes: { isArray: true, - typeInfo: exports.TypeInfo.ReleaseApproval + typeInfo: exports.TypeInfo.TestActionResultModel }, - queuedOn: { + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResultModel + } +}; +exports.TypeInfo.ResultUpdateResponse.fields = { + lastUpdated: { isDate: true, + } +}; +exports.TypeInfo.RunCreateModel.fields = { + buildReference: { + typeInfo: exports.TypeInfo.BuildConfiguration }, - reason: { - enumType: exports.TypeInfo.DeploymentReason - }, - release: { + releaseReference: { typeInfo: exports.TypeInfo.ReleaseReference }, - scheduledDeploymentTime: { - isDate: true, - }, - startedOn: { - isDate: true, + runSummary: { + isArray: true, + typeInfo: exports.TypeInfo.RunSummaryModel } }; -exports.TypeInfo.DeploymentApprovalCompletedEvent.fields = { - approval: { - typeInfo: exports.TypeInfo.ReleaseApproval - }, - release: { - typeInfo: exports.TypeInfo.Release +exports.TypeInfo.RunStatistic.fields = { + resultMetadata: { + enumType: exports.TypeInfo.ResultMetadata } }; -exports.TypeInfo.DeploymentApprovalPendingEvent.fields = { - approval: { - typeInfo: exports.TypeInfo.ReleaseApproval - }, - approvalOptions: { - typeInfo: exports.TypeInfo.ApprovalOptions +exports.TypeInfo.RunSummary.fields = { + runSummaryByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunOutcome, }, - completedApprovals: { + runSummaryByState: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunState, + } +}; +exports.TypeInfo.RunSummaryModel.fields = { + testOutcome: { + enumType: exports.TypeInfo.TestOutcome + } +}; +exports.TypeInfo.RunUpdateModel.fields = { + logEntries: { isArray: true, - typeInfo: exports.TypeInfo.ReleaseApproval - }, - deployment: { - typeInfo: exports.TypeInfo.Deployment + typeInfo: exports.TypeInfo.TestMessageLogDetails }, - pendingApprovals: { + runSummary: { isArray: true, - typeInfo: exports.TypeInfo.ReleaseApproval + typeInfo: exports.TypeInfo.RunSummaryModel }, - release: { - typeInfo: exports.TypeInfo.Release + substate: { + enumType: exports.TypeInfo.TestRunSubstate } }; -exports.TypeInfo.DeploymentAttempt.fields = { - job: { - typeInfo: exports.TypeInfo.ReleaseTask - }, - lastModifiedOn: { +exports.TypeInfo.TestActionResult.fields = { + creationDate: { isDate: true, }, - operationStatus: { - enumType: exports.TypeInfo.DeploymentOperationStatus - }, - postDeploymentGates: { - typeInfo: exports.TypeInfo.ReleaseGates - }, - preDeploymentGates: { - typeInfo: exports.TypeInfo.ReleaseGates + dateCompleted: { + isDate: true, }, - queuedOn: { + dateStarted: { isDate: true, }, - reason: { - enumType: exports.TypeInfo.DeploymentReason + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.TestActionResult2.fields = { + creationDate: { + isDate: true, }, - releaseDeployPhases: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseDeployPhase + dateCompleted: { + isDate: true, }, - status: { - enumType: exports.TypeInfo.DeploymentStatus + dateStarted: { + isDate: true, }, - tasks: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseTask + lastUpdated: { + isDate: true, } }; -exports.TypeInfo.DeploymentAuthorizationInfo.fields = { - authorizationHeaderFor: { - enumType: exports.TypeInfo.AuthorizationHeaderFor +exports.TypeInfo.TestActionResultModel.fields = { + completedDate: { + isDate: true, + }, + startedDate: { + isDate: true, } }; -exports.TypeInfo.DeploymentCompletedEvent.fields = { - deployment: { - typeInfo: exports.TypeInfo.Deployment +exports.TypeInfo.TestAttachment.fields = { + attachmentType: { + enumType: exports.TypeInfo.AttachmentType }, - environment: { - typeInfo: exports.TypeInfo.ReleaseEnvironment + createdDate: { + isDate: true, } }; -exports.TypeInfo.DeploymentJob.fields = { - job: { - typeInfo: exports.TypeInfo.ReleaseTask +exports.TypeInfo.TestAuthoringDetails.fields = { + lastUpdated: { + isDate: true, }, - tasks: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseTask + state: { + enumType: exports.TypeInfo.TestPointState } }; -exports.TypeInfo.DeploymentManualInterventionPendingEvent.fields = { - deployment: { - typeInfo: exports.TypeInfo.Deployment - }, - manualIntervention: { - typeInfo: exports.TypeInfo.ManualIntervention +exports.TypeInfo.TestCaseReference2.fields = { + creationDate: { + isDate: true, }, - release: { - typeInfo: exports.TypeInfo.Release + lastRefTestRunDate: { + isDate: true, } }; -exports.TypeInfo.DeploymentQueryParameters.fields = { - deploymentStatus: { - enumType: exports.TypeInfo.DeploymentStatus - }, - expands: { - enumType: exports.TypeInfo.DeploymentExpands +exports.TypeInfo.TestCaseResult.fields = { + completedDate: { + isDate: true, }, - maxModifiedTime: { + createdDate: { isDate: true, }, - minModifiedTime: { + failingSince: { + typeInfo: exports.TypeInfo.FailingSince + }, + iterationDetails: { + isArray: true, + typeInfo: exports.TypeInfo.TestIterationDetailsModel + }, + lastUpdatedDate: { isDate: true, }, - operationStatus: { - enumType: exports.TypeInfo.DeploymentOperationStatus + releaseReference: { + typeInfo: exports.TypeInfo.ReleaseReference }, - queryOrder: { - enumType: exports.TypeInfo.ReleaseQueryOrder + resultGroupType: { + enumType: exports.TypeInfo.ResultGroupType }, - queryType: { - enumType: exports.TypeInfo.DeploymentsQueryType - } -}; -exports.TypeInfo.DeploymentStartedEvent.fields = { - environment: { - typeInfo: exports.TypeInfo.ReleaseEnvironment + startedDate: { + isDate: true, }, - release: { - typeInfo: exports.TypeInfo.Release - } -}; -exports.TypeInfo.DeployPhase.fields = { - phaseType: { - enumType: exports.TypeInfo.DeployPhaseTypes - } -}; -exports.TypeInfo.EnvironmentTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.EnvironmentTriggerType - } -}; -exports.TypeInfo.ExecutionInput.fields = { - parallelExecutionType: { - enumType: exports.TypeInfo.ParallelExecutionTypes + subResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestSubResult } }; -exports.TypeInfo.Folder.fields = { - createdOn: { +exports.TypeInfo.TestConfiguration.fields = { + lastUpdatedDate: { isDate: true, }, - lastChangedDate: { - isDate: true, + state: { + enumType: exports.TypeInfo.TestConfigurationState } }; -exports.TypeInfo.GatesDeployPhase.fields = { - phaseType: { - enumType: exports.TypeInfo.DeployPhaseTypes +exports.TypeInfo.TestExecutionReportData.fields = { + reportData: { + isArray: true, + typeInfo: exports.TypeInfo.DatedTestFieldData } }; -exports.TypeInfo.IgnoredGate.fields = { - lastModifiedOn: { - isDate: true, +exports.TypeInfo.TestExtensionField.fields = { + field: { + typeInfo: exports.TypeInfo.TestExtensionFieldDetails } }; -exports.TypeInfo.MachineGroupBasedDeployPhase.fields = { - phaseType: { - enumType: exports.TypeInfo.DeployPhaseTypes +exports.TypeInfo.TestExtensionFieldDetails.fields = { + type: { + enumType: SystemData.TypeInfo.SqlDbType } }; -exports.TypeInfo.MailMessage.fields = { - replyBy: { +exports.TypeInfo.TestFailuresAnalysis.fields = { + previousContext: { + typeInfo: exports.TypeInfo.TestResultsContext + } +}; +exports.TypeInfo.TestHistoryQuery.fields = { + groupBy: { + enumType: exports.TypeInfo.TestResultGroupBy + }, + maxCompleteDate: { isDate: true, }, - sections: { + resultsForGroup: { isArray: true, - enumType: exports.TypeInfo.MailSectionType - }, - senderType: { - enumType: exports.TypeInfo.SenderType + typeInfo: exports.TypeInfo.TestResultHistoryForGroup } }; -exports.TypeInfo.ManualIntervention.fields = { - createdOn: { - isDate: true, +exports.TypeInfo.TestIterationDetailsModel.fields = { + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResultModel }, - modifiedOn: { + completedDate: { isDate: true, }, - status: { - enumType: exports.TypeInfo.ManualInterventionStatus + startedDate: { + isDate: true, } }; -exports.TypeInfo.ManualInterventionUpdateMetadata.fields = { - status: { - enumType: exports.TypeInfo.ManualInterventionStatus +exports.TypeInfo.TestLog.fields = { + logReference: { + typeInfo: exports.TypeInfo.TestLogReference + }, + modifiedOn: { + isDate: true, } }; -exports.TypeInfo.MultiConfigInput.fields = { - parallelExecutionType: { - enumType: exports.TypeInfo.ParallelExecutionTypes +exports.TypeInfo.TestLogReference.fields = { + scope: { + enumType: exports.TypeInfo.TestLogScope + }, + type: { + enumType: exports.TypeInfo.TestLogType } }; -exports.TypeInfo.MultiMachineInput.fields = { - parallelExecutionType: { - enumType: exports.TypeInfo.ParallelExecutionTypes +exports.TypeInfo.TestLogStatus.fields = { + status: { + enumType: exports.TypeInfo.TestLogStatusCode } }; -exports.TypeInfo.PackageTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType +exports.TypeInfo.TestLogStoreAttachment.fields = { + attachmentType: { + enumType: exports.TypeInfo.AttachmentType + }, + createdDate: { + isDate: true, } }; -exports.TypeInfo.ParallelExecutionInputBase.fields = { - parallelExecutionType: { - enumType: exports.TypeInfo.ParallelExecutionTypes +exports.TypeInfo.TestLogStoreEndpointDetails.fields = { + endpointType: { + enumType: exports.TypeInfo.TestLogStoreEndpointType + }, + status: { + enumType: exports.TypeInfo.TestLogStatusCode } }; -exports.TypeInfo.PipelineProcess.fields = { - type: { - enumType: exports.TypeInfo.PipelineProcessTypes +exports.TypeInfo.TestMessageLogDetails.fields = { + dateCreated: { + isDate: true, } }; -exports.TypeInfo.PropertySelector.fields = { - selectorType: { - enumType: exports.TypeInfo.PropertySelectorType +exports.TypeInfo.TestMessageLogEntry.fields = { + dateCreated: { + isDate: true, } }; -exports.TypeInfo.PullRequestConfiguration.fields = { - codeRepositoryReference: { - typeInfo: exports.TypeInfo.CodeRepositoryReference +exports.TypeInfo.TestMessageLogEntry2.fields = { + dateCreated: { + isDate: true, } }; -exports.TypeInfo.PullRequestTrigger.fields = { - pullRequestConfiguration: { - typeInfo: exports.TypeInfo.PullRequestConfiguration +exports.TypeInfo.TestParameter2.fields = { + creationDate: { + isDate: true, }, - triggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType + dateModified: { + isDate: true, } }; -exports.TypeInfo.Release.fields = { - createdOn: { +exports.TypeInfo.TestPlan.fields = { + endDate: { isDate: true, }, - environments: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseEnvironment - }, - modifiedOn: { + startDate: { isDate: true, }, - reason: { - enumType: exports.TypeInfo.ReleaseReason + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPlanCloneRequest.fields = { + destinationTestPlan: { + typeInfo: exports.TypeInfo.TestPlan + } +}; +exports.TypeInfo.TestPlanHubData.fields = { + testPlan: { + typeInfo: exports.TypeInfo.TestPlan }, - status: { - enumType: exports.TypeInfo.ReleaseStatus + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPoint }, - variableGroups: { + testSuites: { isArray: true, - typeInfo: exports.TypeInfo.VariableGroup + typeInfo: exports.TypeInfo.TestSuite } }; -exports.TypeInfo.ReleaseAbandonedEvent.fields = { - release: { - typeInfo: exports.TypeInfo.Release +exports.TypeInfo.TestPlansWithSelection.fields = { + plans: { + isArray: true, + typeInfo: exports.TypeInfo.TestPlan } }; -exports.TypeInfo.ReleaseApproval.fields = { - approvalType: { - enumType: exports.TypeInfo.ApprovalType - }, - createdOn: { +exports.TypeInfo.TestPoint.fields = { + lastResetToActive: { isDate: true, }, - history: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseApprovalHistory + lastResultDetails: { + typeInfo: exports.TypeInfo.LastResultDetails }, - modifiedOn: { + lastUpdatedDate: { isDate: true, - }, - status: { - enumType: exports.TypeInfo.ApprovalStatus } }; -exports.TypeInfo.ReleaseApprovalHistory.fields = { - createdOn: { - isDate: true, - }, - modifiedOn: { - isDate: true, +exports.TypeInfo.TestPointReference.fields = { + state: { + enumType: exports.TypeInfo.TestPointState } }; -exports.TypeInfo.ReleaseApprovalPendingEvent.fields = { - approval: { - typeInfo: exports.TypeInfo.ReleaseApproval - }, - approvalOptions: { - typeInfo: exports.TypeInfo.ApprovalOptions - }, - completedApprovals: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseApproval - }, - deployment: { - typeInfo: exports.TypeInfo.Deployment - }, - environments: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseEnvironment - }, - pendingApprovals: { +exports.TypeInfo.TestPointsEvent.fields = { + testPoints: { isArray: true, - typeInfo: exports.TypeInfo.ReleaseApproval + typeInfo: exports.TypeInfo.TestPointReference } }; -exports.TypeInfo.ReleaseCondition.fields = { - conditionType: { - enumType: exports.TypeInfo.ConditionType +exports.TypeInfo.TestPointsQuery.fields = { + points: { + isArray: true, + typeInfo: exports.TypeInfo.TestPoint } }; -exports.TypeInfo.ReleaseCreatedEvent.fields = { - release: { - typeInfo: exports.TypeInfo.Release +exports.TypeInfo.TestPointsUpdatedEvent.fields = { + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPointReference } }; -exports.TypeInfo.ReleaseDefinition.fields = { - createdOn: { +exports.TypeInfo.TestResult2.fields = { + creationDate: { isDate: true, }, - environments: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseDefinitionEnvironment - }, - lastRelease: { - typeInfo: exports.TypeInfo.ReleaseReference - }, - modifiedOn: { + dateCompleted: { isDate: true, }, - pipelineProcess: { - typeInfo: exports.TypeInfo.PipelineProcess - }, - source: { - enumType: exports.TypeInfo.ReleaseDefinitionSource + dateStarted: { + isDate: true, }, - triggers: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseTriggerBase + lastUpdated: { + isDate: true, } }; -exports.TypeInfo.ReleaseDefinitionApprovals.fields = { - approvalOptions: { - typeInfo: exports.TypeInfo.ApprovalOptions +exports.TypeInfo.TestResultAcrossProjectResponse.fields = { + testResult: { + typeInfo: exports.TypeInfo.LegacyTestCaseResult } }; -exports.TypeInfo.ReleaseDefinitionEnvironment.fields = { - conditions: { - isArray: true, - typeInfo: exports.TypeInfo.Condition - }, - deployPhases: { - isArray: true, - typeInfo: exports.TypeInfo.DeployPhase - }, - environmentTriggers: { - isArray: true, - typeInfo: exports.TypeInfo.EnvironmentTrigger - }, - postDeployApprovals: { - typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals - }, - preDeployApprovals: { - typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals +exports.TypeInfo.TestResultAttachment.fields = { + attachmentType: { + enumType: exports.TypeInfo.AttachmentType }, - schedules: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseSchedule + creationDate: { + isDate: true, } }; -exports.TypeInfo.ReleaseDefinitionEnvironmentTemplate.fields = { - environment: { - typeInfo: exports.TypeInfo.ReleaseDefinitionEnvironment +exports.TypeInfo.TestResultHistory.fields = { + resultsForGroup: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultHistoryDetailsForGroup } }; -exports.TypeInfo.ReleaseDefinitionRevision.fields = { - changedDate: { - isDate: true, - }, - changeType: { - enumType: exports.TypeInfo.AuditAction +exports.TypeInfo.TestResultHistoryDetailsForGroup.fields = { + latestResult: { + typeInfo: exports.TypeInfo.TestCaseResult } }; -exports.TypeInfo.ReleaseDefinitionSummary.fields = { - releases: { +exports.TypeInfo.TestResultHistoryForGroup.fields = { + results: { isArray: true, - typeInfo: exports.TypeInfo.Release + typeInfo: exports.TypeInfo.TestCaseResult } }; -exports.TypeInfo.ReleaseDeployPhase.fields = { - deploymentJobs: { - isArray: true, - typeInfo: exports.TypeInfo.DeploymentJob - }, - manualInterventions: { - isArray: true, - typeInfo: exports.TypeInfo.ManualIntervention - }, - phaseType: { - enumType: exports.TypeInfo.DeployPhaseTypes - }, - startedOn: { +exports.TypeInfo.TestResultModelBase.fields = { + completedDate: { isDate: true, }, - status: { - enumType: exports.TypeInfo.DeployPhaseStatus + startedDate: { + isDate: true, } }; -exports.TypeInfo.ReleaseEnvironment.fields = { - conditions: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseCondition - }, - createdOn: { +exports.TypeInfo.TestResultReset2.fields = { + dateModified: { isDate: true, + } +}; +exports.TypeInfo.TestResultsContext.fields = { + contextType: { + enumType: exports.TypeInfo.TestResultsContextType }, - deployPhasesSnapshot: { + release: { + typeInfo: exports.TypeInfo.ReleaseReference + } +}; +exports.TypeInfo.TestResultsDetails.fields = { + resultsForGroup: { isArray: true, - typeInfo: exports.TypeInfo.DeployPhase - }, - deploySteps: { + typeInfo: exports.TypeInfo.TestResultsDetailsForGroup + } +}; +exports.TypeInfo.TestResultsDetailsForGroup.fields = { + results: { isArray: true, - typeInfo: exports.TypeInfo.DeploymentAttempt + typeInfo: exports.TypeInfo.TestCaseResult }, - modifiedOn: { + resultsCountByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome + } +}; +exports.TypeInfo.TestResultsEx2.fields = { + creationDate: { isDate: true, }, - nextScheduledUtcTime: { + dateTimeValue: { isDate: true, - }, - postApprovalsSnapshot: { - typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals - }, - postDeployApprovals: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseApproval - }, - preApprovalsSnapshot: { - typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals - }, - preDeployApprovals: { + } +}; +exports.TypeInfo.TestResultsQuery.fields = { + results: { isArray: true, - typeInfo: exports.TypeInfo.ReleaseApproval + typeInfo: exports.TypeInfo.TestCaseResult }, - scheduledDeploymentTime: { - isDate: true, + resultsFilter: { + typeInfo: exports.TypeInfo.ResultsFilter + } +}; +exports.TypeInfo.TestResultsSettings.fields = { + flakySettings: { + typeInfo: exports.TypeInfo.FlakySettings + } +}; +exports.TypeInfo.TestResultSummary.fields = { + aggregatedResultsAnalysis: { + typeInfo: exports.TypeInfo.AggregatedResultsAnalysis }, - schedules: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseSchedule + teamProject: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference }, - status: { - enumType: exports.TypeInfo.EnvironmentStatus + testFailures: { + typeInfo: exports.TypeInfo.TestFailuresAnalysis }, - variableGroups: { - isArray: true, - typeInfo: exports.TypeInfo.VariableGroup + testResultsContext: { + typeInfo: exports.TypeInfo.TestResultsContext } }; -exports.TypeInfo.ReleaseEnvironmentCompletedEvent.fields = { - environment: { - typeInfo: exports.TypeInfo.ReleaseEnvironment - }, - reason: { - enumType: exports.TypeInfo.DeploymentReason +exports.TypeInfo.TestResultsUpdateSettings.fields = { + flakySettings: { + typeInfo: exports.TypeInfo.FlakySettings } }; -exports.TypeInfo.ReleaseEnvironmentStatusUpdatedEvent.fields = { - environmentStatus: { - enumType: exports.TypeInfo.EnvironmentStatus - }, - latestDeploymentOperationStatus: { - enumType: exports.TypeInfo.DeploymentOperationStatus +exports.TypeInfo.TestResultsWithWatermark.fields = { + changedDate: { + isDate: true, }, - latestDeploymentStatus: { - enumType: exports.TypeInfo.DeploymentStatus + pointsResults: { + isArray: true, + typeInfo: exports.TypeInfo.PointsResults2 } }; -exports.TypeInfo.ReleaseEnvironmentUpdateMetadata.fields = { - scheduledDeploymentTime: { +exports.TypeInfo.TestResultTrendFilter.fields = { + maxCompleteDate: { isDate: true, - }, - status: { - enumType: exports.TypeInfo.EnvironmentStatus } }; -exports.TypeInfo.ReleaseGates.fields = { - deploymentJobs: { - isArray: true, - typeInfo: exports.TypeInfo.DeploymentJob +exports.TypeInfo.TestRun.fields = { + buildConfiguration: { + typeInfo: exports.TypeInfo.BuildConfiguration }, - ignoredGates: { - isArray: true, - typeInfo: exports.TypeInfo.IgnoredGate + completedDate: { + isDate: true, }, - lastModifiedOn: { + createdDate: { isDate: true, }, - stabilizationCompletedOn: { + dueDate: { isDate: true, }, - startedOn: { + lastUpdatedDate: { isDate: true, }, - status: { - enumType: exports.TypeInfo.GateStatus + release: { + typeInfo: exports.TypeInfo.ReleaseReference }, - succeedingSince: { - isDate: true, - } -}; -exports.TypeInfo.ReleaseGatesPhase.fields = { - deploymentJobs: { + runStatistics: { isArray: true, - typeInfo: exports.TypeInfo.DeploymentJob + typeInfo: exports.TypeInfo.RunStatistic }, - ignoredGates: { - isArray: true, - typeInfo: exports.TypeInfo.IgnoredGate + startedDate: { + isDate: true, }, - manualInterventions: { - isArray: true, - typeInfo: exports.TypeInfo.ManualIntervention + substate: { + enumType: exports.TypeInfo.TestRunSubstate + } +}; +exports.TypeInfo.TestRun2.fields = { + completeDate: { + isDate: true, }, - phaseType: { - enumType: exports.TypeInfo.DeployPhaseTypes + creationDate: { + isDate: true, }, - stabilizationCompletedOn: { + deletedOn: { isDate: true, }, - startedOn: { + dueDate: { isDate: true, }, - status: { - enumType: exports.TypeInfo.DeployPhaseStatus + lastUpdated: { + isDate: true, }, - succeedingSince: { + startDate: { isDate: true, } }; -exports.TypeInfo.ReleaseNotCreatedEvent.fields = { - releaseReason: { - enumType: exports.TypeInfo.ReleaseReason +exports.TypeInfo.TestRunCanceledEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun } }; -exports.TypeInfo.ReleaseReference.fields = { - createdOn: { - isDate: true, - }, - reason: { - enumType: exports.TypeInfo.ReleaseReason +exports.TypeInfo.TestRunCreatedEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun } }; -exports.TypeInfo.ReleaseRevision.fields = { - changedDate: { +exports.TypeInfo.TestRunEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestRunEx2.fields = { + createdDate: { + isDate: true, + }, + dateTimeValue: { isDate: true, } }; -exports.TypeInfo.ReleaseSchedule.fields = { - daysToRelease: { - enumType: exports.TypeInfo.ScheduleDays +exports.TypeInfo.TestRunStartedEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun } }; -exports.TypeInfo.ReleaseStartMetadata.fields = { - artifacts: { +exports.TypeInfo.TestRunStatistic.fields = { + runStatistics: { isArray: true, - typeInfo: exports.TypeInfo.ArtifactMetadata - }, - reason: { - enumType: exports.TypeInfo.ReleaseReason + typeInfo: exports.TypeInfo.RunStatistic } }; -exports.TypeInfo.ReleaseTask.fields = { - dateEnded: { +exports.TypeInfo.TestRunSummary2.fields = { + testRunCompletedDate: { isDate: true, - }, - dateStarted: { + } +}; +exports.TypeInfo.TestRunWithDtlEnvEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestSession.fields = { + endDate: { isDate: true, }, - finishTime: { + lastUpdatedDate: { isDate: true, }, - startTime: { + source: { + enumType: exports.TypeInfo.TestSessionSource + }, + startDate: { isDate: true, }, - status: { - enumType: exports.TypeInfo.TaskStatus + state: { + enumType: exports.TypeInfo.TestSessionState } }; -exports.TypeInfo.ReleaseTaskAttachment.fields = { - createdOn: { +exports.TypeInfo.TestSessionExploredWorkItemReference.fields = { + endTime: { isDate: true, }, - modifiedOn: { + startTime: { isDate: true, } }; -exports.TypeInfo.ReleaseTasksUpdatedEvent.fields = { - job: { - typeInfo: exports.TypeInfo.ReleaseTask +exports.TypeInfo.TestSettings2.fields = { + createdDate: { + isDate: true, }, - tasks: { - isArray: true, - typeInfo: exports.TypeInfo.ReleaseTask - } -}; -exports.TypeInfo.ReleaseTriggerBase.fields = { - triggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType - } -}; -exports.TypeInfo.ReleaseUpdatedEvent.fields = { - release: { - typeInfo: exports.TypeInfo.Release - } -}; -exports.TypeInfo.ReleaseUpdateMetadata.fields = { - status: { - enumType: exports.TypeInfo.ReleaseStatus + lastUpdatedDate: { + isDate: true, } }; -exports.TypeInfo.RunOnServerDeployPhase.fields = { - deploymentInput: { - typeInfo: exports.TypeInfo.ServerDeploymentInput +exports.TypeInfo.TestSubResult.fields = { + completedDate: { + isDate: true, }, - phaseType: { - enumType: exports.TypeInfo.DeployPhaseTypes - } -}; -exports.TypeInfo.ScheduledReleaseTrigger.fields = { - schedule: { - typeInfo: exports.TypeInfo.ReleaseSchedule + lastUpdatedDate: { + isDate: true, }, - triggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType - } -}; -exports.TypeInfo.ServerDeploymentInput.fields = { - parallelExecution: { - typeInfo: exports.TypeInfo.ExecutionInput - } -}; -exports.TypeInfo.SourcePullRequestVersion.fields = { - pullRequestMergedAt: { + resultGroupType: { + enumType: exports.TypeInfo.ResultGroupType + }, + startedDate: { isDate: true, + }, + subResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestSubResult } }; -exports.TypeInfo.SourceRepoTrigger.fields = { - triggerType: { - enumType: exports.TypeInfo.ReleaseTriggerType - } -}; -exports.TypeInfo.SummaryMailSection.fields = { - sectionType: { - enumType: exports.TypeInfo.MailSectionType - } -}; -exports.TypeInfo.VariableGroup.fields = { - createdOn: { - isDate: true, +exports.TypeInfo.TestSuite.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.TestSuite }, - modifiedOn: { + lastPopulatedDate: { isDate: true, - } -}; -exports.TypeInfo.YamlFileSource.fields = { - type: { - enumType: exports.TypeInfo.YamlFileSourceTypes - } -}; -exports.TypeInfo.YamlPipelineProcess.fields = { - fileSource: { - typeInfo: exports.TypeInfo.YamlFileSource }, - type: { - enumType: exports.TypeInfo.PipelineProcessTypes + lastUpdatedDate: { + isDate: true, } }; - - -/***/ }), - -/***/ 6573: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var RoleAccess; -(function (RoleAccess) { - /** - * Access has been explicitly set. - */ - RoleAccess[RoleAccess["Assigned"] = 1] = "Assigned"; - /** - * Access has been inherited from a higher scope. - */ - RoleAccess[RoleAccess["Inherited"] = 2] = "Inherited"; -})(RoleAccess = exports.RoleAccess || (exports.RoleAccess = {})); -exports.TypeInfo = { - RoleAccess: { - enumValues: { - "assigned": 1, - "inherited": 2 - } - }, - RoleAssignment: {}, +exports.TypeInfo.TestSummaryForWorkItem.fields = { + summary: { + typeInfo: exports.TypeInfo.AggregatedDataForResultTrend + } }; -exports.TypeInfo.RoleAssignment.fields = { - access: { - enumType: exports.TypeInfo.RoleAccess +exports.TypeInfo.UpdatedProperties.fields = { + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.UpdateTestRunRequest.fields = { + attachmentsToAdd: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultAttachment }, + testRun: { + typeInfo: exports.TypeInfo.LegacyTestRun + } +}; +exports.TypeInfo.UpdateTestRunResponse.fields = { + updatedProperties: { + typeInfo: exports.TypeInfo.UpdatedProperties + } +}; +exports.TypeInfo.WorkItemToTestLinks.fields = { + executedIn: { + enumType: exports.TypeInfo.Service + } }; /***/ }), -/***/ 9565: +/***/ 99003: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -59740,1815 +65844,977 @@ exports.TypeInfo.RoleAssignment.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const FormInputInterfaces = __nccwpck_require__(3627); -var AadLoginPromptOption; -(function (AadLoginPromptOption) { - /** - * Do not provide a prompt option - */ - AadLoginPromptOption[AadLoginPromptOption["NoOption"] = 0] = "NoOption"; - /** - * Force the user to login again. - */ - AadLoginPromptOption[AadLoginPromptOption["Login"] = 1] = "Login"; - /** - * Force the user to select which account they are logging in with instead of automatically picking the user up from the session state. NOTE: This does not work for switching between the variants of a dual-homed user. - */ - AadLoginPromptOption[AadLoginPromptOption["SelectAccount"] = 2] = "SelectAccount"; - /** - * Force the user to login again. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login. - */ - AadLoginPromptOption[AadLoginPromptOption["FreshLogin"] = 3] = "FreshLogin"; - /** - * Force the user to login again with mfa. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login, if MFA is required. - */ - AadLoginPromptOption[AadLoginPromptOption["FreshLoginWithMfa"] = 4] = "FreshLoginWithMfa"; -})(AadLoginPromptOption = exports.AadLoginPromptOption || (exports.AadLoginPromptOption = {})); -var AuditAction; -(function (AuditAction) { - AuditAction[AuditAction["Add"] = 1] = "Add"; - AuditAction[AuditAction["Update"] = 2] = "Update"; - AuditAction[AuditAction["Delete"] = 3] = "Delete"; - AuditAction[AuditAction["Undelete"] = 4] = "Undelete"; -})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); -var DemandSourceType; -(function (DemandSourceType) { - DemandSourceType[DemandSourceType["Task"] = 0] = "Task"; - DemandSourceType[DemandSourceType["Feature"] = 1] = "Feature"; -})(DemandSourceType = exports.DemandSourceType || (exports.DemandSourceType = {})); -/** - * This is useful in getting a list of deployment groups, filtered for which caller has permissions to take a particular action. - */ -var DeploymentGroupActionFilter; -(function (DeploymentGroupActionFilter) { - /** - * All deployment groups. - */ - DeploymentGroupActionFilter[DeploymentGroupActionFilter["None"] = 0] = "None"; - /** - * Only deployment groups for which caller has **manage** permission. - */ - DeploymentGroupActionFilter[DeploymentGroupActionFilter["Manage"] = 2] = "Manage"; - /** - * Only deployment groups for which caller has **use** permission. - */ - DeploymentGroupActionFilter[DeploymentGroupActionFilter["Use"] = 16] = "Use"; -})(DeploymentGroupActionFilter = exports.DeploymentGroupActionFilter || (exports.DeploymentGroupActionFilter = {})); -/** - * Properties to be included or expanded in deployment group objects. This is useful when getting a single or list of deployment grouops. - */ -var DeploymentGroupExpands; -(function (DeploymentGroupExpands) { - /** - * No additional properties. - */ - DeploymentGroupExpands[DeploymentGroupExpands["None"] = 0] = "None"; - /** - * Deprecated: Include all the deployment targets. - */ - DeploymentGroupExpands[DeploymentGroupExpands["Machines"] = 2] = "Machines"; - /** - * Include unique list of tags across all deployment targets. - */ - DeploymentGroupExpands[DeploymentGroupExpands["Tags"] = 4] = "Tags"; -})(DeploymentGroupExpands = exports.DeploymentGroupExpands || (exports.DeploymentGroupExpands = {})); -var DeploymentMachineExpands; -(function (DeploymentMachineExpands) { - DeploymentMachineExpands[DeploymentMachineExpands["None"] = 0] = "None"; - DeploymentMachineExpands[DeploymentMachineExpands["Capabilities"] = 2] = "Capabilities"; - DeploymentMachineExpands[DeploymentMachineExpands["AssignedRequest"] = 4] = "AssignedRequest"; -})(DeploymentMachineExpands = exports.DeploymentMachineExpands || (exports.DeploymentMachineExpands = {})); -/** - * Properties to be included or expanded in deployment pool summary objects. This is useful when getting a single or list of deployment pool summaries. - */ -var DeploymentPoolSummaryExpands; -(function (DeploymentPoolSummaryExpands) { - /** - * No additional properties - */ - DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["None"] = 0] = "None"; - /** - * Include deployment groups referring to the deployment pool. - */ - DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["DeploymentGroups"] = 2] = "DeploymentGroups"; - /** - * Include Resource referring to the deployment pool. - */ - DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["Resource"] = 4] = "Resource"; -})(DeploymentPoolSummaryExpands = exports.DeploymentPoolSummaryExpands || (exports.DeploymentPoolSummaryExpands = {})); -/** - * Properties to be included or expanded in deployment target objects. This is useful when getting a single or list of deployment targets. - */ -var DeploymentTargetExpands; -(function (DeploymentTargetExpands) { - /** - * No additional properties. - */ - DeploymentTargetExpands[DeploymentTargetExpands["None"] = 0] = "None"; - /** - * Include capabilities of the deployment agent. - */ - DeploymentTargetExpands[DeploymentTargetExpands["Capabilities"] = 2] = "Capabilities"; - /** - * Include the job request assigned to the deployment agent. - */ - DeploymentTargetExpands[DeploymentTargetExpands["AssignedRequest"] = 4] = "AssignedRequest"; - /** - * Include the last completed job request of the deployment agent. - */ - DeploymentTargetExpands[DeploymentTargetExpands["LastCompletedRequest"] = 8] = "LastCompletedRequest"; -})(DeploymentTargetExpands = exports.DeploymentTargetExpands || (exports.DeploymentTargetExpands = {})); -var ElasticAgentState; -(function (ElasticAgentState) { - ElasticAgentState[ElasticAgentState["None"] = 0] = "None"; - ElasticAgentState[ElasticAgentState["Enabled"] = 1] = "Enabled"; - ElasticAgentState[ElasticAgentState["Online"] = 2] = "Online"; - ElasticAgentState[ElasticAgentState["Assigned"] = 4] = "Assigned"; -})(ElasticAgentState = exports.ElasticAgentState || (exports.ElasticAgentState = {})); -var ElasticComputeState; -(function (ElasticComputeState) { - ElasticComputeState[ElasticComputeState["None"] = 0] = "None"; - ElasticComputeState[ElasticComputeState["Healthy"] = 1] = "Healthy"; - ElasticComputeState[ElasticComputeState["Creating"] = 2] = "Creating"; - ElasticComputeState[ElasticComputeState["Deleting"] = 3] = "Deleting"; - ElasticComputeState[ElasticComputeState["Failed"] = 4] = "Failed"; - ElasticComputeState[ElasticComputeState["Stopped"] = 5] = "Stopped"; - ElasticComputeState[ElasticComputeState["Reimaging"] = 6] = "Reimaging"; -})(ElasticComputeState = exports.ElasticComputeState || (exports.ElasticComputeState = {})); -var ElasticNodeState; -(function (ElasticNodeState) { - ElasticNodeState[ElasticNodeState["None"] = 0] = "None"; - ElasticNodeState[ElasticNodeState["New"] = 1] = "New"; - ElasticNodeState[ElasticNodeState["CreatingCompute"] = 2] = "CreatingCompute"; - ElasticNodeState[ElasticNodeState["StartingAgent"] = 3] = "StartingAgent"; - ElasticNodeState[ElasticNodeState["Idle"] = 4] = "Idle"; - ElasticNodeState[ElasticNodeState["Assigned"] = 5] = "Assigned"; - ElasticNodeState[ElasticNodeState["Offline"] = 6] = "Offline"; - ElasticNodeState[ElasticNodeState["PendingReimage"] = 7] = "PendingReimage"; - ElasticNodeState[ElasticNodeState["PendingDelete"] = 8] = "PendingDelete"; - ElasticNodeState[ElasticNodeState["Saved"] = 9] = "Saved"; - ElasticNodeState[ElasticNodeState["DeletingCompute"] = 10] = "DeletingCompute"; - ElasticNodeState[ElasticNodeState["Deleted"] = 11] = "Deleted"; - ElasticNodeState[ElasticNodeState["Lost"] = 12] = "Lost"; - ElasticNodeState[ElasticNodeState["ReimagingCompute"] = 13] = "ReimagingCompute"; - ElasticNodeState[ElasticNodeState["RestartingAgent"] = 14] = "RestartingAgent"; - ElasticNodeState[ElasticNodeState["FailedToStartPendingDelete"] = 15] = "FailedToStartPendingDelete"; - ElasticNodeState[ElasticNodeState["FailedToRestartPendingDelete"] = 16] = "FailedToRestartPendingDelete"; - ElasticNodeState[ElasticNodeState["FailedVMPendingDelete"] = 17] = "FailedVMPendingDelete"; - ElasticNodeState[ElasticNodeState["AssignedPendingDelete"] = 18] = "AssignedPendingDelete"; -})(ElasticNodeState = exports.ElasticNodeState || (exports.ElasticNodeState = {})); -var ElasticPoolState; -(function (ElasticPoolState) { - /** - * Online and healthy - */ - ElasticPoolState[ElasticPoolState["Online"] = 0] = "Online"; - ElasticPoolState[ElasticPoolState["Offline"] = 1] = "Offline"; - ElasticPoolState[ElasticPoolState["Unhealthy"] = 2] = "Unhealthy"; - ElasticPoolState[ElasticPoolState["New"] = 3] = "New"; -})(ElasticPoolState = exports.ElasticPoolState || (exports.ElasticPoolState = {})); -/** - * This is useful in getting a list of Environments, filtered for which caller has permissions to take a particular action. - */ -var EnvironmentActionFilter; -(function (EnvironmentActionFilter) { - /** - * All environments for which user has **view** permission. - */ - EnvironmentActionFilter[EnvironmentActionFilter["None"] = 0] = "None"; - /** - * Only environments for which caller has **manage** permission. - */ - EnvironmentActionFilter[EnvironmentActionFilter["Manage"] = 2] = "Manage"; - /** - * Only environments for which caller has **use** permission. - */ - EnvironmentActionFilter[EnvironmentActionFilter["Use"] = 16] = "Use"; -})(EnvironmentActionFilter = exports.EnvironmentActionFilter || (exports.EnvironmentActionFilter = {})); -/** - * Properties to be included or expanded in environment objects. This is useful when getting a single environment. - */ -var EnvironmentExpands; -(function (EnvironmentExpands) { - /** - * No additional properties - */ - EnvironmentExpands[EnvironmentExpands["None"] = 0] = "None"; - /** - * Include resource references referring to the environment. - */ - EnvironmentExpands[EnvironmentExpands["ResourceReferences"] = 1] = "ResourceReferences"; -})(EnvironmentExpands = exports.EnvironmentExpands || (exports.EnvironmentExpands = {})); -/** - * EnvironmentResourceType. - */ -var EnvironmentResourceType; -(function (EnvironmentResourceType) { - EnvironmentResourceType[EnvironmentResourceType["Undefined"] = 0] = "Undefined"; - /** - * Unknown resource type - */ - EnvironmentResourceType[EnvironmentResourceType["Generic"] = 1] = "Generic"; - /** - * Virtual machine resource type - */ - EnvironmentResourceType[EnvironmentResourceType["VirtualMachine"] = 2] = "VirtualMachine"; - /** - * Kubernetes resource type - */ - EnvironmentResourceType[EnvironmentResourceType["Kubernetes"] = 4] = "Kubernetes"; -})(EnvironmentResourceType = exports.EnvironmentResourceType || (exports.EnvironmentResourceType = {})); -var ExclusiveLockType; -(function (ExclusiveLockType) { - ExclusiveLockType[ExclusiveLockType["RunLatest"] = 0] = "RunLatest"; - ExclusiveLockType[ExclusiveLockType["Sequential"] = 1] = "Sequential"; -})(ExclusiveLockType = exports.ExclusiveLockType || (exports.ExclusiveLockType = {})); -/** - * The type of issue based on severity. - */ -var IssueType; -(function (IssueType) { - IssueType[IssueType["Error"] = 1] = "Error"; - IssueType[IssueType["Warning"] = 2] = "Warning"; -})(IssueType = exports.IssueType || (exports.IssueType = {})); -var LogLevel; -(function (LogLevel) { - LogLevel[LogLevel["Error"] = 0] = "Error"; - LogLevel[LogLevel["Warning"] = 1] = "Warning"; - LogLevel[LogLevel["Info"] = 2] = "Info"; -})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); -var MachineGroupActionFilter; -(function (MachineGroupActionFilter) { - MachineGroupActionFilter[MachineGroupActionFilter["None"] = 0] = "None"; - MachineGroupActionFilter[MachineGroupActionFilter["Manage"] = 2] = "Manage"; - MachineGroupActionFilter[MachineGroupActionFilter["Use"] = 16] = "Use"; -})(MachineGroupActionFilter = exports.MachineGroupActionFilter || (exports.MachineGroupActionFilter = {})); -var MaskType; -(function (MaskType) { - MaskType[MaskType["Variable"] = 1] = "Variable"; - MaskType[MaskType["Regex"] = 2] = "Regex"; -})(MaskType = exports.MaskType || (exports.MaskType = {})); -var OperatingSystemType; -(function (OperatingSystemType) { - OperatingSystemType[OperatingSystemType["Windows"] = 0] = "Windows"; - OperatingSystemType[OperatingSystemType["Linux"] = 1] = "Linux"; -})(OperatingSystemType = exports.OperatingSystemType || (exports.OperatingSystemType = {})); -var OperationType; -(function (OperationType) { - OperationType[OperationType["ConfigurationJob"] = 0] = "ConfigurationJob"; - OperationType[OperationType["SizingJob"] = 1] = "SizingJob"; - OperationType[OperationType["IncreaseCapacity"] = 2] = "IncreaseCapacity"; - OperationType[OperationType["Reimage"] = 3] = "Reimage"; - OperationType[OperationType["DeleteVMs"] = 4] = "DeleteVMs"; -})(OperationType = exports.OperationType || (exports.OperationType = {})); -var PlanGroupStatus; -(function (PlanGroupStatus) { - PlanGroupStatus[PlanGroupStatus["Running"] = 1] = "Running"; - PlanGroupStatus[PlanGroupStatus["Queued"] = 2] = "Queued"; - PlanGroupStatus[PlanGroupStatus["All"] = 3] = "All"; -})(PlanGroupStatus = exports.PlanGroupStatus || (exports.PlanGroupStatus = {})); -var PlanGroupStatusFilter; -(function (PlanGroupStatusFilter) { - PlanGroupStatusFilter[PlanGroupStatusFilter["Running"] = 1] = "Running"; - PlanGroupStatusFilter[PlanGroupStatusFilter["Queued"] = 2] = "Queued"; - PlanGroupStatusFilter[PlanGroupStatusFilter["All"] = 3] = "All"; -})(PlanGroupStatusFilter = exports.PlanGroupStatusFilter || (exports.PlanGroupStatusFilter = {})); -var ResourceLockStatus; -(function (ResourceLockStatus) { - ResourceLockStatus[ResourceLockStatus["Queued"] = 0] = "Queued"; - ResourceLockStatus[ResourceLockStatus["InUse"] = 1] = "InUse"; - ResourceLockStatus[ResourceLockStatus["Finished"] = 2] = "Finished"; - ResourceLockStatus[ResourceLockStatus["TimedOut"] = 3] = "TimedOut"; - ResourceLockStatus[ResourceLockStatus["Canceled"] = 4] = "Canceled"; - ResourceLockStatus[ResourceLockStatus["Abandoned"] = 5] = "Abandoned"; - ResourceLockStatus[ResourceLockStatus["WaitingOnChecks"] = 6] = "WaitingOnChecks"; -})(ResourceLockStatus = exports.ResourceLockStatus || (exports.ResourceLockStatus = {})); -var SecureFileActionFilter; -(function (SecureFileActionFilter) { - SecureFileActionFilter[SecureFileActionFilter["None"] = 0] = "None"; - SecureFileActionFilter[SecureFileActionFilter["Manage"] = 2] = "Manage"; - SecureFileActionFilter[SecureFileActionFilter["Use"] = 16] = "Use"; -})(SecureFileActionFilter = exports.SecureFileActionFilter || (exports.SecureFileActionFilter = {})); -/** - * This is useful in getting a list of deployment targets, filtered by the result of their last job. - */ -var TaskAgentJobResultFilter; -(function (TaskAgentJobResultFilter) { - /** - * Only those deployment targets on which last job failed (**Abandoned**, **Canceled**, **Failed**, **Skipped**). - */ - TaskAgentJobResultFilter[TaskAgentJobResultFilter["Failed"] = 1] = "Failed"; - /** - * Only those deployment targets on which last job Passed (**Succeeded**, **Succeeded with issues**). - */ - TaskAgentJobResultFilter[TaskAgentJobResultFilter["Passed"] = 2] = "Passed"; - /** - * Only those deployment targets that never executed a job. - */ - TaskAgentJobResultFilter[TaskAgentJobResultFilter["NeverDeployed"] = 4] = "NeverDeployed"; - /** - * All deployment targets. - */ - TaskAgentJobResultFilter[TaskAgentJobResultFilter["All"] = 7] = "All"; -})(TaskAgentJobResultFilter = exports.TaskAgentJobResultFilter || (exports.TaskAgentJobResultFilter = {})); -var TaskAgentJobStepType; -(function (TaskAgentJobStepType) { - TaskAgentJobStepType[TaskAgentJobStepType["Task"] = 1] = "Task"; - TaskAgentJobStepType[TaskAgentJobStepType["Action"] = 2] = "Action"; -})(TaskAgentJobStepType = exports.TaskAgentJobStepType || (exports.TaskAgentJobStepType = {})); +const TfsCoreInterfaces = __nccwpck_require__(73931); +var ItemContentType; +(function (ItemContentType) { + ItemContentType[ItemContentType["RawText"] = 0] = "RawText"; + ItemContentType[ItemContentType["Base64Encoded"] = 1] = "Base64Encoded"; +})(ItemContentType = exports.ItemContentType || (exports.ItemContentType = {})); /** - * Filters pools based on whether the calling user has permission to use or manage the pool. + * Options for Version handling. */ -var TaskAgentPoolActionFilter; -(function (TaskAgentPoolActionFilter) { - TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["None"] = 0] = "None"; - TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["Manage"] = 2] = "Manage"; - TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["Use"] = 16] = "Use"; -})(TaskAgentPoolActionFilter = exports.TaskAgentPoolActionFilter || (exports.TaskAgentPoolActionFilter = {})); -var TaskAgentPoolMaintenanceJobResult; -(function (TaskAgentPoolMaintenanceJobResult) { - TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Succeeded"] = 1] = "Succeeded"; - TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Failed"] = 2] = "Failed"; - TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Canceled"] = 4] = "Canceled"; -})(TaskAgentPoolMaintenanceJobResult = exports.TaskAgentPoolMaintenanceJobResult || (exports.TaskAgentPoolMaintenanceJobResult = {})); -var TaskAgentPoolMaintenanceJobStatus; -(function (TaskAgentPoolMaintenanceJobStatus) { - TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["InProgress"] = 1] = "InProgress"; - TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Completed"] = 2] = "Completed"; - TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Cancelling"] = 4] = "Cancelling"; - TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Queued"] = 8] = "Queued"; -})(TaskAgentPoolMaintenanceJobStatus = exports.TaskAgentPoolMaintenanceJobStatus || (exports.TaskAgentPoolMaintenanceJobStatus = {})); -var TaskAgentPoolMaintenanceScheduleDays; -(function (TaskAgentPoolMaintenanceScheduleDays) { - /** - * Do not run. - */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["None"] = 0] = "None"; - /** - * Run on Monday. - */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Monday"] = 1] = "Monday"; - /** - * Run on Tuesday. - */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Tuesday"] = 2] = "Tuesday"; - /** - * Run on Wednesday. - */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Wednesday"] = 4] = "Wednesday"; - /** - * Run on Thursday. - */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Thursday"] = 8] = "Thursday"; - /** - * Run on Friday. - */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Friday"] = 16] = "Friday"; +var TfvcVersionOption; +(function (TfvcVersionOption) { /** - * Run on Saturday. + * None. */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Saturday"] = 32] = "Saturday"; + TfvcVersionOption[TfvcVersionOption["None"] = 0] = "None"; /** - * Run on Sunday. + * Return the previous version. */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Sunday"] = 64] = "Sunday"; + TfvcVersionOption[TfvcVersionOption["Previous"] = 1] = "Previous"; /** - * Run on all days of the week. + * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier. */ - TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["All"] = 127] = "All"; -})(TaskAgentPoolMaintenanceScheduleDays = exports.TaskAgentPoolMaintenanceScheduleDays || (exports.TaskAgentPoolMaintenanceScheduleDays = {})); + TfvcVersionOption[TfvcVersionOption["UseRename"] = 2] = "UseRename"; +})(TfvcVersionOption = exports.TfvcVersionOption || (exports.TfvcVersionOption = {})); /** - * Additional settings and descriptors for a TaskAgentPool + * Type of Version object */ -var TaskAgentPoolOptions; -(function (TaskAgentPoolOptions) { - TaskAgentPoolOptions[TaskAgentPoolOptions["None"] = 0] = "None"; +var TfvcVersionType; +(function (TfvcVersionType) { /** - * TaskAgentPool backed by the Elastic pool service + * Version is treated as a ChangesetId. */ - TaskAgentPoolOptions[TaskAgentPoolOptions["ElasticPool"] = 1] = "ElasticPool"; + TfvcVersionType[TfvcVersionType["None"] = 0] = "None"; /** - * Set to true if agents are re-imaged after each TaskAgentJobRequest + * Version is treated as a ChangesetId. */ - TaskAgentPoolOptions[TaskAgentPoolOptions["SingleUseAgents"] = 2] = "SingleUseAgents"; + TfvcVersionType[TfvcVersionType["Changeset"] = 1] = "Changeset"; /** - * Set to true if agents are held for investigation after a TaskAgentJobRequest failure + * Version is treated as a Shelveset name and owner. */ - TaskAgentPoolOptions[TaskAgentPoolOptions["PreserveAgentOnJobFailure"] = 4] = "PreserveAgentOnJobFailure"; -})(TaskAgentPoolOptions = exports.TaskAgentPoolOptions || (exports.TaskAgentPoolOptions = {})); -/** - * The type of agent pool. - */ -var TaskAgentPoolType; -(function (TaskAgentPoolType) { + TfvcVersionType[TfvcVersionType["Shelveset"] = 2] = "Shelveset"; /** - * A typical pool of task agents + * Version is treated as a Change. */ - TaskAgentPoolType[TaskAgentPoolType["Automation"] = 1] = "Automation"; + TfvcVersionType[TfvcVersionType["Change"] = 3] = "Change"; /** - * A deployment pool + * Version is treated as a Date. */ - TaskAgentPoolType[TaskAgentPoolType["Deployment"] = 2] = "Deployment"; -})(TaskAgentPoolType = exports.TaskAgentPoolType || (exports.TaskAgentPoolType = {})); -/** - * Filters queues based on whether the calling user has permission to use or manage the queue. - */ -var TaskAgentQueueActionFilter; -(function (TaskAgentQueueActionFilter) { - TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["None"] = 0] = "None"; - TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["Manage"] = 2] = "Manage"; - TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["Use"] = 16] = "Use"; -})(TaskAgentQueueActionFilter = exports.TaskAgentQueueActionFilter || (exports.TaskAgentQueueActionFilter = {})); -var TaskAgentRequestUpdateOptions; -(function (TaskAgentRequestUpdateOptions) { - TaskAgentRequestUpdateOptions[TaskAgentRequestUpdateOptions["None"] = 0] = "None"; - TaskAgentRequestUpdateOptions[TaskAgentRequestUpdateOptions["BumpRequestToTop"] = 1] = "BumpRequestToTop"; -})(TaskAgentRequestUpdateOptions = exports.TaskAgentRequestUpdateOptions || (exports.TaskAgentRequestUpdateOptions = {})); -var TaskAgentStatus; -(function (TaskAgentStatus) { - TaskAgentStatus[TaskAgentStatus["Offline"] = 1] = "Offline"; - TaskAgentStatus[TaskAgentStatus["Online"] = 2] = "Online"; -})(TaskAgentStatus = exports.TaskAgentStatus || (exports.TaskAgentStatus = {})); -/** - * This is useful in getting a list of deployment targets, filtered by the deployment agent status. - */ -var TaskAgentStatusFilter; -(function (TaskAgentStatusFilter) { + TfvcVersionType[TfvcVersionType["Date"] = 4] = "Date"; /** - * Only deployment targets that are offline. + * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used. */ - TaskAgentStatusFilter[TaskAgentStatusFilter["Offline"] = 1] = "Offline"; + TfvcVersionType[TfvcVersionType["Latest"] = 5] = "Latest"; /** - * Only deployment targets that are online. + * Version will be treated as a Tip, if no version is defined latest will be used. */ - TaskAgentStatusFilter[TaskAgentStatusFilter["Online"] = 2] = "Online"; + TfvcVersionType[TfvcVersionType["Tip"] = 6] = "Tip"; /** - * All deployment targets. + * Version will be treated as a MergeSource. */ - TaskAgentStatusFilter[TaskAgentStatusFilter["All"] = 3] = "All"; -})(TaskAgentStatusFilter = exports.TaskAgentStatusFilter || (exports.TaskAgentStatusFilter = {})); -var TaskAgentUpdateReasonType; -(function (TaskAgentUpdateReasonType) { - TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["Manual"] = 1] = "Manual"; - TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["MinAgentVersionRequired"] = 2] = "MinAgentVersionRequired"; - TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["Downgrade"] = 3] = "Downgrade"; -})(TaskAgentUpdateReasonType = exports.TaskAgentUpdateReasonType || (exports.TaskAgentUpdateReasonType = {})); -var TaskCommandMode; -(function (TaskCommandMode) { - TaskCommandMode[TaskCommandMode["Any"] = 0] = "Any"; - TaskCommandMode[TaskCommandMode["Restricted"] = 1] = "Restricted"; -})(TaskCommandMode = exports.TaskCommandMode || (exports.TaskCommandMode = {})); -var TaskDefinitionStatus; -(function (TaskDefinitionStatus) { - TaskDefinitionStatus[TaskDefinitionStatus["Preinstalled"] = 1] = "Preinstalled"; - TaskDefinitionStatus[TaskDefinitionStatus["ReceivedInstallOrUpdate"] = 2] = "ReceivedInstallOrUpdate"; - TaskDefinitionStatus[TaskDefinitionStatus["Installed"] = 3] = "Installed"; - TaskDefinitionStatus[TaskDefinitionStatus["ReceivedUninstall"] = 4] = "ReceivedUninstall"; - TaskDefinitionStatus[TaskDefinitionStatus["Uninstalled"] = 5] = "Uninstalled"; - TaskDefinitionStatus[TaskDefinitionStatus["RequestedUpdate"] = 6] = "RequestedUpdate"; - TaskDefinitionStatus[TaskDefinitionStatus["Updated"] = 7] = "Updated"; - TaskDefinitionStatus[TaskDefinitionStatus["AlreadyUpToDate"] = 8] = "AlreadyUpToDate"; - TaskDefinitionStatus[TaskDefinitionStatus["InlineUpdateReceived"] = 9] = "InlineUpdateReceived"; -})(TaskDefinitionStatus = exports.TaskDefinitionStatus || (exports.TaskDefinitionStatus = {})); -var TaskGroupExpands; -(function (TaskGroupExpands) { - TaskGroupExpands[TaskGroupExpands["None"] = 0] = "None"; - TaskGroupExpands[TaskGroupExpands["Tasks"] = 2] = "Tasks"; -})(TaskGroupExpands = exports.TaskGroupExpands || (exports.TaskGroupExpands = {})); -/** - * Specifies the desired ordering of taskGroups. - */ -var TaskGroupQueryOrder; -(function (TaskGroupQueryOrder) { + TfvcVersionType[TfvcVersionType["MergeSource"] = 7] = "MergeSource"; +})(TfvcVersionType = exports.TfvcVersionType || (exports.TfvcVersionType = {})); +var VersionControlChangeType; +(function (VersionControlChangeType) { + VersionControlChangeType[VersionControlChangeType["None"] = 0] = "None"; + VersionControlChangeType[VersionControlChangeType["Add"] = 1] = "Add"; + VersionControlChangeType[VersionControlChangeType["Edit"] = 2] = "Edit"; + VersionControlChangeType[VersionControlChangeType["Encoding"] = 4] = "Encoding"; + VersionControlChangeType[VersionControlChangeType["Rename"] = 8] = "Rename"; + VersionControlChangeType[VersionControlChangeType["Delete"] = 16] = "Delete"; + VersionControlChangeType[VersionControlChangeType["Undelete"] = 32] = "Undelete"; + VersionControlChangeType[VersionControlChangeType["Branch"] = 64] = "Branch"; + VersionControlChangeType[VersionControlChangeType["Merge"] = 128] = "Merge"; + VersionControlChangeType[VersionControlChangeType["Lock"] = 256] = "Lock"; + VersionControlChangeType[VersionControlChangeType["Rollback"] = 512] = "Rollback"; + VersionControlChangeType[VersionControlChangeType["SourceRename"] = 1024] = "SourceRename"; + VersionControlChangeType[VersionControlChangeType["TargetRename"] = 2048] = "TargetRename"; + VersionControlChangeType[VersionControlChangeType["Property"] = 4096] = "Property"; + VersionControlChangeType[VersionControlChangeType["All"] = 8191] = "All"; +})(VersionControlChangeType = exports.VersionControlChangeType || (exports.VersionControlChangeType = {})); +var VersionControlRecursionType; +(function (VersionControlRecursionType) { /** - * Order by createdon ascending. + * Only return the specified item. */ - TaskGroupQueryOrder[TaskGroupQueryOrder["CreatedOnAscending"] = 0] = "CreatedOnAscending"; + VersionControlRecursionType[VersionControlRecursionType["None"] = 0] = "None"; /** - * Order by createdon descending. + * Return the specified item and its direct children. */ - TaskGroupQueryOrder[TaskGroupQueryOrder["CreatedOnDescending"] = 1] = "CreatedOnDescending"; -})(TaskGroupQueryOrder = exports.TaskGroupQueryOrder || (exports.TaskGroupQueryOrder = {})); -var TaskOrchestrationItemType; -(function (TaskOrchestrationItemType) { - TaskOrchestrationItemType[TaskOrchestrationItemType["Container"] = 0] = "Container"; - TaskOrchestrationItemType[TaskOrchestrationItemType["Job"] = 1] = "Job"; -})(TaskOrchestrationItemType = exports.TaskOrchestrationItemType || (exports.TaskOrchestrationItemType = {})); -var TaskOrchestrationPlanState; -(function (TaskOrchestrationPlanState) { - TaskOrchestrationPlanState[TaskOrchestrationPlanState["InProgress"] = 1] = "InProgress"; - TaskOrchestrationPlanState[TaskOrchestrationPlanState["Queued"] = 2] = "Queued"; - TaskOrchestrationPlanState[TaskOrchestrationPlanState["Completed"] = 4] = "Completed"; - TaskOrchestrationPlanState[TaskOrchestrationPlanState["Throttled"] = 8] = "Throttled"; -})(TaskOrchestrationPlanState = exports.TaskOrchestrationPlanState || (exports.TaskOrchestrationPlanState = {})); -/** - * The result of an operation tracked by a timeline record. - */ -var TaskResult; -(function (TaskResult) { - TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; - TaskResult[TaskResult["SucceededWithIssues"] = 1] = "SucceededWithIssues"; - TaskResult[TaskResult["Failed"] = 2] = "Failed"; - TaskResult[TaskResult["Canceled"] = 3] = "Canceled"; - TaskResult[TaskResult["Skipped"] = 4] = "Skipped"; - TaskResult[TaskResult["Abandoned"] = 5] = "Abandoned"; -})(TaskResult = exports.TaskResult || (exports.TaskResult = {})); -/** - * The state of the timeline record. - */ -var TimelineRecordState; -(function (TimelineRecordState) { - TimelineRecordState[TimelineRecordState["Pending"] = 0] = "Pending"; - TimelineRecordState[TimelineRecordState["InProgress"] = 1] = "InProgress"; - TimelineRecordState[TimelineRecordState["Completed"] = 2] = "Completed"; -})(TimelineRecordState = exports.TimelineRecordState || (exports.TimelineRecordState = {})); -var VariableGroupActionFilter; -(function (VariableGroupActionFilter) { - VariableGroupActionFilter[VariableGroupActionFilter["None"] = 0] = "None"; - VariableGroupActionFilter[VariableGroupActionFilter["Manage"] = 2] = "Manage"; - VariableGroupActionFilter[VariableGroupActionFilter["Use"] = 16] = "Use"; -})(VariableGroupActionFilter = exports.VariableGroupActionFilter || (exports.VariableGroupActionFilter = {})); -/** - * Specifies the desired ordering of variableGroups. - */ -var VariableGroupQueryOrder; -(function (VariableGroupQueryOrder) { + VersionControlRecursionType[VersionControlRecursionType["OneLevel"] = 1] = "OneLevel"; /** - * Order by id ascending. + * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. */ - VariableGroupQueryOrder[VariableGroupQueryOrder["IdAscending"] = 0] = "IdAscending"; + VersionControlRecursionType[VersionControlRecursionType["OneLevelPlusNestedEmptyFolders"] = 4] = "OneLevelPlusNestedEmptyFolders"; /** - * Order by id descending. + * Return specified item and all descendants */ - VariableGroupQueryOrder[VariableGroupQueryOrder["IdDescending"] = 1] = "IdDescending"; -})(VariableGroupQueryOrder = exports.VariableGroupQueryOrder || (exports.VariableGroupQueryOrder = {})); -exports.TypeInfo = { - AadLoginPromptOption: { - enumValues: { - "noOption": 0, - "login": 1, - "selectAccount": 2, - "freshLogin": 3, - "freshLoginWithMfa": 4 - } - }, - AgentChangeEvent: {}, - AgentJobRequestMessage: {}, - AgentPoolEvent: {}, - AgentQueueEvent: {}, - AgentQueuesEvent: {}, - AuditAction: { - enumValues: { - "add": 1, - "update": 2, - "delete": 3, - "undelete": 4 - } - }, - AzureKeyVaultVariableGroupProviderData: {}, - AzureKeyVaultVariableValue: {}, - DemandMinimumVersion: {}, - DemandSource: {}, - DemandSourceType: { - enumValues: { - "task": 0, - "feature": 1 - } - }, - DeploymentGroup: {}, - DeploymentGroupActionFilter: { - enumValues: { - "none": 0, - "manage": 2, - "use": 16 - } - }, - DeploymentGroupExpands: { - enumValues: { - "none": 0, - "machines": 2, - "tags": 4 - } - }, - DeploymentGroupMetrics: {}, - DeploymentGroupReference: {}, - DeploymentMachine: {}, - DeploymentMachineChangedData: {}, - DeploymentMachineExpands: { - enumValues: { - "none": 0, - "capabilities": 2, - "assignedRequest": 4 - } - }, - DeploymentMachineGroup: {}, - DeploymentMachineGroupReference: {}, - DeploymentMachinesChangeEvent: {}, - DeploymentPoolSummary: {}, - DeploymentPoolSummaryExpands: { - enumValues: { - "none": 0, - "deploymentGroups": 2, - "resource": 4 - } - }, - DeploymentTargetExpands: { - enumValues: { - "none": 0, - "capabilities": 2, - "assignedRequest": 4, - "lastCompletedRequest": 8 - } - }, - ElasticAgentState: { - enumValues: { - "none": 0, - "enabled": 1, - "online": 2, - "assigned": 4 - } - }, - ElasticComputeState: { - enumValues: { - "none": 0, - "healthy": 1, - "creating": 2, - "deleting": 3, - "failed": 4, - "stopped": 5, - "reimaging": 6 - } - }, - ElasticNode: {}, - ElasticNodeSettings: {}, - ElasticNodeState: { - enumValues: { - "none": 0, - "new": 1, - "creatingCompute": 2, - "startingAgent": 3, - "idle": 4, - "assigned": 5, - "offline": 6, - "pendingReimage": 7, - "pendingDelete": 8, - "saved": 9, - "deletingCompute": 10, - "deleted": 11, - "lost": 12, - "reimagingCompute": 13, - "restartingAgent": 14, - "failedToStartPendingDelete": 15, - "failedToRestartPendingDelete": 16, - "failedVMPendingDelete": 17, - "assignedPendingDelete": 18 - } - }, - ElasticPool: {}, - ElasticPoolCreationResult: {}, - ElasticPoolLog: {}, - ElasticPoolSettings: {}, - ElasticPoolState: { - enumValues: { - "online": 0, - "offline": 1, - "unhealthy": 2, - "new": 3 - } - }, - EnvironmentActionFilter: { - enumValues: { - "none": 0, - "manage": 2, - "use": 16 - } - }, - EnvironmentDeploymentExecutionRecord: {}, - EnvironmentExpands: { - enumValues: { - "none": 0, - "resourceReferences": 1 - } - }, - EnvironmentInstance: {}, - EnvironmentResource: {}, - EnvironmentResourceDeploymentExecutionRecord: {}, - EnvironmentResourceReference: {}, - EnvironmentResourceType: { - enumValues: { - "undefined": 0, - "generic": 1, - "virtualMachine": 2, - "kubernetes": 4 - } - }, - ExclusiveLockType: { - enumValues: { - "runLatest": 0, - "sequential": 1 - } - }, - Issue: {}, - IssueType: { - enumValues: { - "error": 1, - "warning": 2 - } - }, - JobAssignedEvent: {}, - JobCompletedEvent: {}, - JobEnvironment: {}, - JobRequestMessage: {}, - KubernetesResource: {}, - LogLevel: { - enumValues: { - "error": 0, - "warning": 1, - "info": 2 - } - }, - MachineGroupActionFilter: { - enumValues: { - "none": 0, - "manage": 2, - "use": 16 - } - }, - MaskHint: {}, - MaskType: { - enumValues: { - "variable": 1, - "regex": 2 - } - }, - OperatingSystemType: { - enumValues: { - "windows": 0, - "linux": 1 - } - }, - OperationType: { - enumValues: { - "configurationJob": 0, - "sizingJob": 1, - "increaseCapacity": 2, - "reimage": 3, - "deleteVMs": 4 - } - }, - PackageMetadata: {}, - PlanEnvironment: {}, - PlanGroupStatus: { - enumValues: { - "running": 1, - "queued": 2, - "all": 3 - } - }, - PlanGroupStatusFilter: { - enumValues: { - "running": 1, - "queued": 2, - "all": 3 - } - }, - ResourceLockRequest: {}, - ResourceLockStatus: { - enumValues: { - "queued": 0, - "inUse": 1, - "finished": 2, - "timedOut": 3, - "canceled": 4, - "abandoned": 5, - "waitingOnChecks": 6 - } - }, - ResourceUsage: {}, - SecureFile: {}, - SecureFileActionFilter: { - enumValues: { - "none": 0, - "manage": 2, - "use": 16 - } - }, - SecureFileEvent: {}, - ServerTaskRequestMessage: {}, - ServiceEndpointAuthenticationScheme: {}, - ServiceEndpointExecutionData: {}, - ServiceEndpointExecutionRecord: {}, - ServiceEndpointExecutionRecordsInput: {}, - ServiceEndpointRequestResult: {}, - ServiceEndpointType: {}, - TaskAgent: {}, - TaskAgentCloudRequest: {}, - TaskAgentCloudType: {}, - TaskAgentDowngrade: {}, - TaskAgentJob: {}, - TaskAgentJobRequest: {}, - TaskAgentJobResultFilter: { - enumValues: { - "failed": 1, - "passed": 2, - "neverDeployed": 4, - "all": 7 - } - }, - TaskAgentJobStep: {}, - TaskAgentJobStepType: { - enumValues: { - "task": 1, - "action": 2 - } - }, - TaskAgentManualUpdate: {}, - TaskAgentMinAgentVersionRequiredUpdate: {}, - TaskAgentPool: {}, - TaskAgentPoolActionFilter: { - enumValues: { - "none": 0, - "manage": 2, - "use": 16 - } - }, - TaskAgentPoolMaintenanceDefinition: {}, - TaskAgentPoolMaintenanceJob: {}, - TaskAgentPoolMaintenanceJobResult: { - enumValues: { - "succeeded": 1, - "failed": 2, - "canceled": 4 - } - }, - TaskAgentPoolMaintenanceJobStatus: { - enumValues: { - "inProgress": 1, - "completed": 2, - "cancelling": 4, - "queued": 8 - } - }, - TaskAgentPoolMaintenanceJobTargetAgent: {}, - TaskAgentPoolMaintenanceSchedule: {}, - TaskAgentPoolMaintenanceScheduleDays: { - enumValues: { - "none": 0, - "monday": 1, - "tuesday": 2, - "wednesday": 4, - "thursday": 8, - "friday": 16, - "saturday": 32, - "sunday": 64, - "all": 127 - } - }, - TaskAgentPoolOptions: { - enumValues: { - "none": 0, - "elasticPool": 1, - "singleUseAgents": 2, - "preserveAgentOnJobFailure": 4 - } - }, - TaskAgentPoolReference: {}, - TaskAgentPoolStatus: {}, - TaskAgentPoolSummary: {}, - TaskAgentPoolType: { - enumValues: { - "automation": 1, - "deployment": 2 - } - }, - TaskAgentQueue: {}, - TaskAgentQueueActionFilter: { - enumValues: { - "none": 0, - "manage": 2, - "use": 16 - } - }, - TaskAgentReference: {}, - TaskAgentRequestUpdateOptions: { - enumValues: { - "none": 0, - "bumpRequestToTop": 1 - } - }, - TaskAgentSession: {}, - TaskAgentStatus: { - enumValues: { - "offline": 1, - "online": 2 - } - }, - TaskAgentStatusFilter: { - enumValues: { - "offline": 1, - "online": 2, - "all": 3 - } - }, - TaskAgentUpdate: {}, - TaskAgentUpdateReason: {}, - TaskAgentUpdateReasonType: { - enumValues: { - "manual": 1, - "minAgentVersionRequired": 2, - "downgrade": 3 - } - }, - TaskAttachment: {}, - TaskCommandMode: { - enumValues: { - "any": 0, - "restricted": 1 - } - }, - TaskCommandRestrictions: {}, - TaskCompletedEvent: {}, - TaskDefinition: {}, - TaskDefinitionStatus: { - enumValues: { - "preinstalled": 1, - "receivedInstallOrUpdate": 2, - "installed": 3, - "receivedUninstall": 4, - "uninstalled": 5, - "requestedUpdate": 6, - "updated": 7, - "alreadyUpToDate": 8, - "inlineUpdateReceived": 9 - } - }, - TaskGroup: {}, - TaskGroupExpands: { - enumValues: { - "none": 0, - "tasks": 2 - } - }, - TaskGroupQueryOrder: { - enumValues: { - "createdOnAscending": 0, - "createdOnDescending": 1 - } - }, - TaskGroupRevision: {}, - TaskLog: {}, - TaskOrchestrationContainer: {}, - TaskOrchestrationItem: {}, - TaskOrchestrationItemType: { - enumValues: { - "container": 0, - "job": 1 - } - }, - TaskOrchestrationJob: {}, - TaskOrchestrationPlan: {}, - TaskOrchestrationPlanGroup: {}, - TaskOrchestrationPlanGroupsQueueMetrics: {}, - TaskOrchestrationPlanState: { + VersionControlRecursionType[VersionControlRecursionType["Full"] = 120] = "Full"; +})(VersionControlRecursionType = exports.VersionControlRecursionType || (exports.VersionControlRecursionType = {})); +exports.TypeInfo = { + Change: {}, + GitRepository: {}, + GitRepositoryRef: {}, + ItemContent: {}, + ItemContentType: { enumValues: { - "inProgress": 1, - "queued": 2, - "completed": 4, - "throttled": 8 + "rawText": 0, + "base64Encoded": 1 } }, - TaskOrchestrationQueuedPlan: {}, - TaskOrchestrationQueuedPlanGroup: {}, - TaskRestrictions: {}, - TaskResult: { + TfvcBranch: {}, + TfvcBranchRef: {}, + TfvcChange: {}, + TfvcChangeset: {}, + TfvcChangesetRef: {}, + TfvcItem: {}, + TfvcItemDescriptor: {}, + TfvcItemRequestData: {}, + TfvcLabel: {}, + TfvcLabelRef: {}, + TfvcShelveset: {}, + TfvcShelvesetRef: {}, + TfvcVersionDescriptor: {}, + TfvcVersionOption: { enumValues: { - "succeeded": 0, - "succeededWithIssues": 1, - "failed": 2, - "canceled": 3, - "skipped": 4, - "abandoned": 5 + "none": 0, + "previous": 1, + "useRename": 2 } }, - Timeline: {}, - TimelineRecord: {}, - TimelineRecordState: { + TfvcVersionType: { enumValues: { - "pending": 0, - "inProgress": 1, - "completed": 2 + "none": 0, + "changeset": 1, + "shelveset": 2, + "change": 3, + "date": 4, + "latest": 5, + "tip": 6, + "mergeSource": 7 } }, - VariableGroup: {}, - VariableGroupActionFilter: { + VersionControlChangeType: { enumValues: { "none": 0, - "manage": 2, - "use": 16 + "add": 1, + "edit": 2, + "encoding": 4, + "rename": 8, + "delete": 16, + "undelete": 32, + "branch": 64, + "merge": 128, + "lock": 256, + "rollback": 512, + "sourceRename": 1024, + "targetRename": 2048, + "property": 4096, + "all": 8191 } }, - VariableGroupQueryOrder: { + VersionControlProjectInfo: {}, + VersionControlRecursionType: { enumValues: { - "idAscending": 0, - "idDescending": 1 + "none": 0, + "oneLevel": 1, + "oneLevelPlusNestedEmptyFolders": 4, + "full": 120 } }, - VirtualMachine: {}, - VirtualMachineGroup: {}, - VirtualMachineResource: {}, - VirtualMachineResourceCreateParameters: {}, }; -exports.TypeInfo.AgentChangeEvent.fields = { - agent: { - typeInfo: exports.TypeInfo.TaskAgent - }, - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference +exports.TypeInfo.Change.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType }, - timeStamp: { - isDate: true, + newContent: { + typeInfo: exports.TypeInfo.ItemContent } }; -exports.TypeInfo.AgentJobRequestMessage.fields = { - environment: { - typeInfo: exports.TypeInfo.JobEnvironment +exports.TypeInfo.GitRepository.fields = { + parentRepository: { + typeInfo: exports.TypeInfo.GitRepositoryRef }, - lockedUntil: { - isDate: true, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; -exports.TypeInfo.AgentPoolEvent.fields = { - pool: { - typeInfo: exports.TypeInfo.TaskAgentPool +exports.TypeInfo.GitRepositoryRef.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; -exports.TypeInfo.AgentQueueEvent.fields = { - queue: { - typeInfo: exports.TypeInfo.TaskAgentQueue +exports.TypeInfo.ItemContent.fields = { + contentType: { + enumType: exports.TypeInfo.ItemContentType } }; -exports.TypeInfo.AgentQueuesEvent.fields = { - queues: { +exports.TypeInfo.TfvcBranch.fields = { + children: { isArray: true, - typeInfo: exports.TypeInfo.TaskAgentQueue - } -}; -exports.TypeInfo.AzureKeyVaultVariableGroupProviderData.fields = { - lastRefreshedOn: { + typeInfo: exports.TypeInfo.TfvcBranch + }, + createdDate: { isDate: true, } }; -exports.TypeInfo.AzureKeyVaultVariableValue.fields = { - expires: { +exports.TypeInfo.TfvcBranchRef.fields = { + createdDate: { isDate: true, } }; -exports.TypeInfo.DemandMinimumVersion.fields = { - source: { - typeInfo: exports.TypeInfo.DemandSource - } -}; -exports.TypeInfo.DemandSource.fields = { - sourceType: { - enumType: exports.TypeInfo.DemandSourceType - } -}; -exports.TypeInfo.DeploymentGroup.fields = { - machines: { - isArray: true, - typeInfo: exports.TypeInfo.DeploymentMachine - }, - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference - } -}; -exports.TypeInfo.DeploymentGroupMetrics.fields = { - deploymentGroup: { - typeInfo: exports.TypeInfo.DeploymentGroupReference - } -}; -exports.TypeInfo.DeploymentGroupReference.fields = { - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference - } -}; -exports.TypeInfo.DeploymentMachine.fields = { - agent: { - typeInfo: exports.TypeInfo.TaskAgent - } -}; -exports.TypeInfo.DeploymentMachineChangedData.fields = { - agent: { - typeInfo: exports.TypeInfo.TaskAgent - } -}; -exports.TypeInfo.DeploymentMachineGroup.fields = { - machines: { - isArray: true, - typeInfo: exports.TypeInfo.DeploymentMachine - }, - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference - } -}; -exports.TypeInfo.DeploymentMachineGroupReference.fields = { - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference - } -}; -exports.TypeInfo.DeploymentMachinesChangeEvent.fields = { - machineGroupReference: { - typeInfo: exports.TypeInfo.DeploymentGroupReference +exports.TypeInfo.TfvcChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType }, - machines: { - isArray: true, - typeInfo: exports.TypeInfo.DeploymentMachineChangedData + newContent: { + typeInfo: exports.TypeInfo.ItemContent } }; -exports.TypeInfo.DeploymentPoolSummary.fields = { - deploymentGroups: { +exports.TypeInfo.TfvcChangeset.fields = { + changes: { isArray: true, - typeInfo: exports.TypeInfo.DeploymentGroupReference - }, - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference - }, - resource: { - typeInfo: exports.TypeInfo.EnvironmentResourceReference - } -}; -exports.TypeInfo.ElasticNode.fields = { - agentState: { - enumType: exports.TypeInfo.ElasticAgentState - }, - computeState: { - enumType: exports.TypeInfo.ElasticComputeState - }, - desiredState: { - enumType: exports.TypeInfo.ElasticNodeState - }, - state: { - enumType: exports.TypeInfo.ElasticNodeState + typeInfo: exports.TypeInfo.TfvcChange }, - stateChangedOn: { + createdDate: { isDate: true, } }; -exports.TypeInfo.ElasticNodeSettings.fields = { - state: { - enumType: exports.TypeInfo.ElasticNodeState - } -}; -exports.TypeInfo.ElasticPool.fields = { - offlineSince: { +exports.TypeInfo.TfvcChangesetRef.fields = { + createdDate: { isDate: true, - }, - osType: { - enumType: exports.TypeInfo.OperatingSystemType - }, - state: { - enumType: exports.TypeInfo.ElasticPoolState } }; -exports.TypeInfo.ElasticPoolCreationResult.fields = { - agentPool: { - typeInfo: exports.TypeInfo.TaskAgentPool - }, - agentQueue: { - typeInfo: exports.TypeInfo.TaskAgentQueue - }, - elasticPool: { - typeInfo: exports.TypeInfo.ElasticPool +exports.TypeInfo.TfvcItem.fields = { + changeDate: { + isDate: true, } }; -exports.TypeInfo.ElasticPoolLog.fields = { - level: { - enumType: exports.TypeInfo.LogLevel +exports.TypeInfo.TfvcItemDescriptor.fields = { + recursionLevel: { + enumType: exports.TypeInfo.VersionControlRecursionType }, - operation: { - enumType: exports.TypeInfo.OperationType + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption }, - timestamp: { - isDate: true, + versionType: { + enumType: exports.TypeInfo.TfvcVersionType } }; -exports.TypeInfo.ElasticPoolSettings.fields = { - osType: { - enumType: exports.TypeInfo.OperatingSystemType +exports.TypeInfo.TfvcItemRequestData.fields = { + itemDescriptors: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcItemDescriptor } }; -exports.TypeInfo.EnvironmentDeploymentExecutionRecord.fields = { - finishTime: { - isDate: true, - }, - queueTime: { - isDate: true, - }, - result: { - enumType: exports.TypeInfo.TaskResult +exports.TypeInfo.TfvcLabel.fields = { + items: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcItem }, - startTime: { + modifiedDate: { isDate: true, } }; -exports.TypeInfo.EnvironmentInstance.fields = { - createdOn: { - isDate: true, - }, - lastModifiedOn: { +exports.TypeInfo.TfvcLabelRef.fields = { + modifiedDate: { isDate: true, - }, - resources: { - isArray: true, - typeInfo: exports.TypeInfo.EnvironmentResourceReference } }; -exports.TypeInfo.EnvironmentResource.fields = { - createdOn: { - isDate: true, +exports.TypeInfo.TfvcShelveset.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcChange }, - lastModifiedOn: { + createdDate: { isDate: true, - }, - type: { - enumType: exports.TypeInfo.EnvironmentResourceType } }; -exports.TypeInfo.EnvironmentResourceDeploymentExecutionRecord.fields = { - finishTime: { - isDate: true, - }, - result: { - enumType: exports.TypeInfo.TaskResult - }, - startTime: { +exports.TypeInfo.TfvcShelvesetRef.fields = { + createdDate: { isDate: true, } }; -exports.TypeInfo.EnvironmentResourceReference.fields = { - type: { - enumType: exports.TypeInfo.EnvironmentResourceType - } -}; -exports.TypeInfo.Issue.fields = { - type: { - enumType: exports.TypeInfo.IssueType - } -}; -exports.TypeInfo.JobAssignedEvent.fields = { - request: { - typeInfo: exports.TypeInfo.TaskAgentJobRequest +exports.TypeInfo.TfvcVersionDescriptor.fields = { + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption + }, + versionType: { + enumType: exports.TypeInfo.TfvcVersionType } }; -exports.TypeInfo.JobCompletedEvent.fields = { - result: { - enumType: exports.TypeInfo.TaskResult +exports.TypeInfo.VersionControlProjectInfo.fields = { + defaultSourceControlType: { + enumType: TfsCoreInterfaces.TypeInfo.SourceControlTypes + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference } }; -exports.TypeInfo.JobEnvironment.fields = { - mask: { - isArray: true, - typeInfo: exports.TypeInfo.MaskHint + + +/***/ }), + +/***/ 75787: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const GitInterfaces = __nccwpck_require__(89803); +/** + * Wiki types. + */ +var WikiType; +(function (WikiType) { + /** + * Indicates that the wiki is provisioned for the team project + */ + WikiType[WikiType["ProjectWiki"] = 0] = "ProjectWiki"; + /** + * Indicates that the wiki is published from a git repository + */ + WikiType[WikiType["CodeWiki"] = 1] = "CodeWiki"; +})(WikiType = exports.WikiType || (exports.WikiType = {})); +exports.TypeInfo = { + Wiki: {}, + WikiCreateBaseParameters: {}, + WikiCreateParametersV2: {}, + WikiPageDetail: {}, + WikiPageStat: {}, + WikiPageViewStats: {}, + WikiType: { + enumValues: { + "projectWiki": 0, + "codeWiki": 1 + } }, - secureFiles: { - isArray: true, - typeInfo: exports.TypeInfo.SecureFile - } + WikiUpdateParameters: {}, + WikiV2: {}, }; -exports.TypeInfo.JobRequestMessage.fields = { - environment: { - typeInfo: exports.TypeInfo.JobEnvironment +exports.TypeInfo.Wiki.fields = { + repository: { + typeInfo: GitInterfaces.TypeInfo.GitRepository } }; -exports.TypeInfo.KubernetesResource.fields = { - createdOn: { - isDate: true, - }, - lastModifiedOn: { - isDate: true, - }, +exports.TypeInfo.WikiCreateBaseParameters.fields = { type: { - enumType: exports.TypeInfo.EnvironmentResourceType + enumType: exports.TypeInfo.WikiType } }; -exports.TypeInfo.MaskHint.fields = { +exports.TypeInfo.WikiCreateParametersV2.fields = { type: { - enumType: exports.TypeInfo.MaskType - } -}; -exports.TypeInfo.PackageMetadata.fields = { - createdOn: { - isDate: true, + enumType: exports.TypeInfo.WikiType + }, + version: { + typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor } }; -exports.TypeInfo.PlanEnvironment.fields = { - mask: { +exports.TypeInfo.WikiPageDetail.fields = { + viewStats: { isArray: true, - typeInfo: exports.TypeInfo.MaskHint + typeInfo: exports.TypeInfo.WikiPageStat } }; -exports.TypeInfo.ResourceLockRequest.fields = { - assignTime: { - isDate: true, - }, - finishTime: { - isDate: true, - }, - lockType: { - enumType: exports.TypeInfo.ExclusiveLockType - }, - queueTime: { +exports.TypeInfo.WikiPageStat.fields = { + day: { isDate: true, - }, - status: { - enumType: exports.TypeInfo.ResourceLockStatus - } -}; -exports.TypeInfo.ResourceUsage.fields = { - runningRequests: { - isArray: true, - typeInfo: exports.TypeInfo.TaskAgentJobRequest } }; -exports.TypeInfo.SecureFile.fields = { - createdOn: { - isDate: true, - }, - modifiedOn: { +exports.TypeInfo.WikiPageViewStats.fields = { + lastViewedTime: { isDate: true, } }; -exports.TypeInfo.SecureFileEvent.fields = { - secureFiles: { +exports.TypeInfo.WikiUpdateParameters.fields = { + versions: { isArray: true, - typeInfo: exports.TypeInfo.SecureFile + typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor } }; -exports.TypeInfo.ServerTaskRequestMessage.fields = { - environment: { - typeInfo: exports.TypeInfo.JobEnvironment +exports.TypeInfo.WikiV2.fields = { + type: { + enumType: exports.TypeInfo.WikiType }, - taskDefinition: { - typeInfo: exports.TypeInfo.TaskDefinition - } -}; -exports.TypeInfo.ServiceEndpointAuthenticationScheme.fields = { - inputDescriptors: { + versions: { isArray: true, - typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor - } -}; -exports.TypeInfo.ServiceEndpointExecutionData.fields = { - finishTime: { - isDate: true, - }, - result: { - enumType: exports.TypeInfo.TaskResult - }, - startTime: { - isDate: true, - } -}; -exports.TypeInfo.ServiceEndpointExecutionRecord.fields = { - data: { - typeInfo: exports.TypeInfo.ServiceEndpointExecutionData - } -}; -exports.TypeInfo.ServiceEndpointExecutionRecordsInput.fields = { - data: { - typeInfo: exports.TypeInfo.ServiceEndpointExecutionData + typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor } }; -exports.TypeInfo.ServiceEndpointRequestResult.fields = {}; -exports.TypeInfo.ServiceEndpointType.fields = { - authenticationSchemes: { - isArray: true, - typeInfo: exports.TypeInfo.ServiceEndpointAuthenticationScheme + + +/***/ }), + +/***/ 7480: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const SystemInterfaces = __nccwpck_require__(66790); +/** + * Definition of the type of backlog level + */ +var BacklogType; +(function (BacklogType) { + /** + * Portfolio backlog level + */ + BacklogType[BacklogType["Portfolio"] = 0] = "Portfolio"; + /** + * Requirement backlog level + */ + BacklogType[BacklogType["Requirement"] = 1] = "Requirement"; + /** + * Task backlog level + */ + BacklogType[BacklogType["Task"] = 2] = "Task"; +})(BacklogType = exports.BacklogType || (exports.BacklogType = {})); +/** + * Determines what columns to include on the board badge + */ +var BoardBadgeColumnOptions; +(function (BoardBadgeColumnOptions) { + /** + * Only include In Progress columns + */ + BoardBadgeColumnOptions[BoardBadgeColumnOptions["InProgressColumns"] = 0] = "InProgressColumns"; + /** + * Include all columns + */ + BoardBadgeColumnOptions[BoardBadgeColumnOptions["AllColumns"] = 1] = "AllColumns"; + /** + * Include a custom set of columns + */ + BoardBadgeColumnOptions[BoardBadgeColumnOptions["CustomColumns"] = 2] = "CustomColumns"; +})(BoardBadgeColumnOptions = exports.BoardBadgeColumnOptions || (exports.BoardBadgeColumnOptions = {})); +var BoardColumnType; +(function (BoardColumnType) { + BoardColumnType[BoardColumnType["Incoming"] = 0] = "Incoming"; + BoardColumnType[BoardColumnType["InProgress"] = 1] = "InProgress"; + BoardColumnType[BoardColumnType["Outgoing"] = 2] = "Outgoing"; +})(BoardColumnType = exports.BoardColumnType || (exports.BoardColumnType = {})); +/** + * The behavior of the work item types that are in the work item category specified in the BugWorkItems section in the Process Configuration + */ +var BugsBehavior; +(function (BugsBehavior) { + BugsBehavior[BugsBehavior["Off"] = 0] = "Off"; + BugsBehavior[BugsBehavior["AsRequirements"] = 1] = "AsRequirements"; + BugsBehavior[BugsBehavior["AsTasks"] = 2] = "AsTasks"; +})(BugsBehavior = exports.BugsBehavior || (exports.BugsBehavior = {})); +var FieldType; +(function (FieldType) { + FieldType[FieldType["String"] = 0] = "String"; + FieldType[FieldType["PlainText"] = 1] = "PlainText"; + FieldType[FieldType["Integer"] = 2] = "Integer"; + FieldType[FieldType["DateTime"] = 3] = "DateTime"; + FieldType[FieldType["TreePath"] = 4] = "TreePath"; + FieldType[FieldType["Boolean"] = 5] = "Boolean"; + FieldType[FieldType["Double"] = 6] = "Double"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +/** + * Enum for the various modes of identity picker + */ +var IdentityDisplayFormat; +(function (IdentityDisplayFormat) { + /** + * Display avatar only + */ + IdentityDisplayFormat[IdentityDisplayFormat["AvatarOnly"] = 0] = "AvatarOnly"; + /** + * Display Full name only + */ + IdentityDisplayFormat[IdentityDisplayFormat["FullName"] = 1] = "FullName"; + /** + * Display Avatar and Full name + */ + IdentityDisplayFormat[IdentityDisplayFormat["AvatarAndFullName"] = 2] = "AvatarAndFullName"; +})(IdentityDisplayFormat = exports.IdentityDisplayFormat || (exports.IdentityDisplayFormat = {})); +/** + * Enum for the various types of plans + */ +var PlanType; +(function (PlanType) { + PlanType[PlanType["DeliveryTimelineView"] = 0] = "DeliveryTimelineView"; +})(PlanType = exports.PlanType || (exports.PlanType = {})); +/** + * Flag for permissions a user can have for this plan. + */ +var PlanUserPermissions; +(function (PlanUserPermissions) { + /** + * None + */ + PlanUserPermissions[PlanUserPermissions["None"] = 0] = "None"; + /** + * Permission to view this plan. + */ + PlanUserPermissions[PlanUserPermissions["View"] = 1] = "View"; + /** + * Permission to update this plan. + */ + PlanUserPermissions[PlanUserPermissions["Edit"] = 2] = "Edit"; + /** + * Permission to delete this plan. + */ + PlanUserPermissions[PlanUserPermissions["Delete"] = 4] = "Delete"; + /** + * Permission to manage this plan. + */ + PlanUserPermissions[PlanUserPermissions["Manage"] = 8] = "Manage"; + /** + * Full control permission for this plan. + */ + PlanUserPermissions[PlanUserPermissions["AllPermissions"] = 15] = "AllPermissions"; +})(PlanUserPermissions = exports.PlanUserPermissions || (exports.PlanUserPermissions = {})); +var TimeFrame; +(function (TimeFrame) { + TimeFrame[TimeFrame["Past"] = 0] = "Past"; + TimeFrame[TimeFrame["Current"] = 1] = "Current"; + TimeFrame[TimeFrame["Future"] = 2] = "Future"; +})(TimeFrame = exports.TimeFrame || (exports.TimeFrame = {})); +var TimelineCriteriaStatusCode; +(function (TimelineCriteriaStatusCode) { + /** + * No error - filter is good. + */ + TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["OK"] = 0] = "OK"; + /** + * One of the filter clause is invalid. + */ + TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["InvalidFilterClause"] = 1] = "InvalidFilterClause"; + /** + * Unknown error. + */ + TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["Unknown"] = 2] = "Unknown"; +})(TimelineCriteriaStatusCode = exports.TimelineCriteriaStatusCode || (exports.TimelineCriteriaStatusCode = {})); +var TimelineIterationStatusCode; +(function (TimelineIterationStatusCode) { + /** + * No error - iteration data is good. + */ + TimelineIterationStatusCode[TimelineIterationStatusCode["OK"] = 0] = "OK"; + /** + * This iteration overlaps with another iteration, no data is returned for this iteration. + */ + TimelineIterationStatusCode[TimelineIterationStatusCode["IsOverlapping"] = 1] = "IsOverlapping"; +})(TimelineIterationStatusCode = exports.TimelineIterationStatusCode || (exports.TimelineIterationStatusCode = {})); +var TimelineTeamStatusCode; +(function (TimelineTeamStatusCode) { + /** + * No error - all data for team is good. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["OK"] = 0] = "OK"; + /** + * Team does not exist or access is denied. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["DoesntExistOrAccessDenied"] = 1] = "DoesntExistOrAccessDenied"; + /** + * Maximum number of teams was exceeded. No team data will be returned for this team. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["MaxTeamsExceeded"] = 2] = "MaxTeamsExceeded"; + /** + * Maximum number of team fields (ie Area paths) have been exceeded. No team data will be returned for this team. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["MaxTeamFieldsExceeded"] = 3] = "MaxTeamFieldsExceeded"; + /** + * Backlog does not exist or is missing crucial information. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["BacklogInError"] = 4] = "BacklogInError"; + /** + * Team field value is not set for this team. No team data will be returned for this team + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["MissingTeamFieldValue"] = 5] = "MissingTeamFieldValue"; + /** + * Team does not have a single iteration with date range. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["NoIterationsExist"] = 6] = "NoIterationsExist"; +})(TimelineTeamStatusCode = exports.TimelineTeamStatusCode || (exports.TimelineTeamStatusCode = {})); +exports.TypeInfo = { + BacklogConfiguration: {}, + BacklogLevelConfiguration: {}, + BacklogType: { + enumValues: { + "portfolio": 0, + "requirement": 1, + "task": 2 + } }, - inputDescriptors: { - isArray: true, - typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor - } -}; -exports.TypeInfo.TaskAgent.fields = { - assignedAgentCloudRequest: { - typeInfo: exports.TypeInfo.TaskAgentCloudRequest + Board: {}, + BoardBadgeColumnOptions: { + enumValues: { + "inProgressColumns": 0, + "allColumns": 1, + "customColumns": 2 + } }, - assignedRequest: { - typeInfo: exports.TypeInfo.TaskAgentJobRequest + BoardColumn: {}, + BoardColumnType: { + enumValues: { + "incoming": 0, + "inProgress": 1, + "outgoing": 2 + } }, - createdOn: { - isDate: true, + BugsBehavior: { + enumValues: { + "off": 0, + "asRequirements": 1, + "asTasks": 2 + } }, - lastCompletedRequest: { - typeInfo: exports.TypeInfo.TaskAgentJobRequest + CapacityContractBase: {}, + CapacityPatch: {}, + CardFieldSettings: {}, + CardSettings: {}, + CreatePlan: {}, + DateRange: {}, + DeliveryViewData: {}, + DeliveryViewPropertyCollection: {}, + FieldInfo: {}, + FieldType: { + enumValues: { + "string": 0, + "plainText": 1, + "integer": 2, + "dateTime": 3, + "treePath": 4, + "boolean": 5, + "double": 6 + } }, - pendingUpdate: { - typeInfo: exports.TypeInfo.TaskAgentUpdate + IdentityDisplayFormat: { + enumValues: { + "avatarOnly": 0, + "fullName": 1, + "avatarAndFullName": 2 + } }, - status: { - enumType: exports.TypeInfo.TaskAgentStatus + Marker: {}, + Plan: {}, + PlanMetadata: {}, + PlanType: { + enumValues: { + "deliveryTimelineView": 0 + } }, - statusChangedOn: { - isDate: true, - } -}; -exports.TypeInfo.TaskAgentCloudRequest.fields = { - agent: { - typeInfo: exports.TypeInfo.TaskAgentReference + PlanUserPermissions: { + enumValues: { + "none": 0, + "view": 1, + "edit": 2, + "delete": 4, + "manage": 8, + "allPermissions": 15 + } }, - agentConnectedTime: { - isDate: true, + TeamCapacity: {}, + TeamIterationAttributes: {}, + TeamMemberCapacity: {}, + TeamMemberCapacityIdentityRef: {}, + TeamSetting: {}, + TeamSettingsDaysOff: {}, + TeamSettingsDaysOffPatch: {}, + TeamSettingsIteration: {}, + TeamSettingsPatch: {}, + TimeFrame: { + enumValues: { + "past": 0, + "current": 1, + "future": 2 + } }, - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference + TimelineCriteriaStatus: {}, + TimelineCriteriaStatusCode: { + enumValues: { + "ok": 0, + "invalidFilterClause": 1, + "unknown": 2 + } }, - provisionedTime: { - isDate: true, + TimelineIterationStatus: {}, + TimelineIterationStatusCode: { + enumValues: { + "ok": 0, + "isOverlapping": 1 + } }, - provisionRequestTime: { - isDate: true, + TimelineTeamData: {}, + TimelineTeamIteration: {}, + TimelineTeamStatus: {}, + TimelineTeamStatusCode: { + enumValues: { + "ok": 0, + "doesntExistOrAccessDenied": 1, + "maxTeamsExceeded": 2, + "maxTeamFieldsExceeded": 3, + "backlogInError": 4, + "missingTeamFieldValue": 5, + "noIterationsExist": 6 + } }, - releaseRequestTime: { - isDate: true, - } -}; -exports.TypeInfo.TaskAgentCloudType.fields = { - inputDescriptors: { - isArray: true, - typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor - } -}; -exports.TypeInfo.TaskAgentDowngrade.fields = { - code: { - enumType: exports.TypeInfo.TaskAgentUpdateReasonType - } -}; -exports.TypeInfo.TaskAgentJob.fields = { - steps: { - isArray: true, - typeInfo: exports.TypeInfo.TaskAgentJobStep - } + UpdatePlan: {}, }; -exports.TypeInfo.TaskAgentJobRequest.fields = { - assignTime: { - isDate: true, - }, - finishTime: { - isDate: true, - }, - lockedUntil: { - isDate: true, +exports.TypeInfo.BacklogConfiguration.fields = { + bugsBehavior: { + enumType: exports.TypeInfo.BugsBehavior }, - matchedAgents: { + portfolioBacklogs: { isArray: true, - typeInfo: exports.TypeInfo.TaskAgentReference - }, - queueTime: { - isDate: true, - }, - receiveTime: { - isDate: true, + typeInfo: exports.TypeInfo.BacklogLevelConfiguration }, - reservedAgent: { - typeInfo: exports.TypeInfo.TaskAgentReference + requirementBacklog: { + typeInfo: exports.TypeInfo.BacklogLevelConfiguration }, - result: { - enumType: exports.TypeInfo.TaskResult + taskBacklog: { + typeInfo: exports.TypeInfo.BacklogLevelConfiguration } }; -exports.TypeInfo.TaskAgentJobStep.fields = { +exports.TypeInfo.BacklogLevelConfiguration.fields = { type: { - enumType: exports.TypeInfo.TaskAgentJobStepType - } -}; -exports.TypeInfo.TaskAgentManualUpdate.fields = { - code: { - enumType: exports.TypeInfo.TaskAgentUpdateReasonType - } -}; -exports.TypeInfo.TaskAgentMinAgentVersionRequiredUpdate.fields = { - code: { - enumType: exports.TypeInfo.TaskAgentUpdateReasonType - } -}; -exports.TypeInfo.TaskAgentPool.fields = { - createdOn: { - isDate: true, - }, - options: { - enumType: exports.TypeInfo.TaskAgentPoolOptions - }, - poolType: { - enumType: exports.TypeInfo.TaskAgentPoolType - } -}; -exports.TypeInfo.TaskAgentPoolMaintenanceDefinition.fields = { - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference - }, - scheduleSetting: { - typeInfo: exports.TypeInfo.TaskAgentPoolMaintenanceSchedule + enumType: exports.TypeInfo.BacklogType } }; -exports.TypeInfo.TaskAgentPoolMaintenanceJob.fields = { - finishTime: { - isDate: true, - }, - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference - }, - queueTime: { - isDate: true, - }, - result: { - enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobResult - }, - startTime: { - isDate: true, - }, - status: { - enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobStatus - }, - targetAgents: { +exports.TypeInfo.Board.fields = { + columns: { isArray: true, - typeInfo: exports.TypeInfo.TaskAgentPoolMaintenanceJobTargetAgent - } -}; -exports.TypeInfo.TaskAgentPoolMaintenanceJobTargetAgent.fields = { - agent: { - typeInfo: exports.TypeInfo.TaskAgentReference - }, - result: { - enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobResult - }, - status: { - enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobStatus + typeInfo: exports.TypeInfo.BoardColumn } }; -exports.TypeInfo.TaskAgentPoolMaintenanceSchedule.fields = { - daysToBuild: { - enumType: exports.TypeInfo.TaskAgentPoolMaintenanceScheduleDays +exports.TypeInfo.BoardColumn.fields = { + columnType: { + enumType: exports.TypeInfo.BoardColumnType } }; -exports.TypeInfo.TaskAgentPoolReference.fields = { - options: { - enumType: exports.TypeInfo.TaskAgentPoolOptions - }, - poolType: { - enumType: exports.TypeInfo.TaskAgentPoolType +exports.TypeInfo.CapacityContractBase.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange } }; -exports.TypeInfo.TaskAgentPoolStatus.fields = { - options: { - enumType: exports.TypeInfo.TaskAgentPoolOptions - }, - poolType: { - enumType: exports.TypeInfo.TaskAgentPoolType +exports.TypeInfo.CapacityPatch.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange } }; -exports.TypeInfo.TaskAgentPoolSummary.fields = { - deploymentGroups: { +exports.TypeInfo.CardFieldSettings.fields = { + additionalFields: { isArray: true, - typeInfo: exports.TypeInfo.DeploymentGroupReference - }, - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference + typeInfo: exports.TypeInfo.FieldInfo }, - queues: { - isArray: true, - typeInfo: exports.TypeInfo.TaskAgentQueue - } -}; -exports.TypeInfo.TaskAgentQueue.fields = { - pool: { - typeInfo: exports.TypeInfo.TaskAgentPoolReference + assignedToDisplayFormat: { + enumType: exports.TypeInfo.IdentityDisplayFormat + }, + coreFields: { + isArray: true, + typeInfo: exports.TypeInfo.FieldInfo } }; -exports.TypeInfo.TaskAgentReference.fields = { - status: { - enumType: exports.TypeInfo.TaskAgentStatus +exports.TypeInfo.CardSettings.fields = { + fields: { + typeInfo: exports.TypeInfo.CardFieldSettings } }; -exports.TypeInfo.TaskAgentSession.fields = { - agent: { - typeInfo: exports.TypeInfo.TaskAgentReference +exports.TypeInfo.CreatePlan.fields = { + type: { + enumType: exports.TypeInfo.PlanType } }; -exports.TypeInfo.TaskAgentUpdate.fields = { - reason: { - typeInfo: exports.TypeInfo.TaskAgentUpdateReason +exports.TypeInfo.DateRange.fields = { + end: { + isDate: true, }, - requestTime: { + start: { isDate: true, } }; -exports.TypeInfo.TaskAgentUpdateReason.fields = { - code: { - enumType: exports.TypeInfo.TaskAgentUpdateReasonType - } -}; -exports.TypeInfo.TaskAttachment.fields = { - createdOn: { +exports.TypeInfo.DeliveryViewData.fields = { + criteriaStatus: { + typeInfo: exports.TypeInfo.TimelineCriteriaStatus + }, + endDate: { isDate: true, }, - lastChangedOn: { + startDate: { isDate: true, + }, + teams: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineTeamData } }; -exports.TypeInfo.TaskCommandRestrictions.fields = { - mode: { - enumType: exports.TypeInfo.TaskCommandMode +exports.TypeInfo.DeliveryViewPropertyCollection.fields = { + cardSettings: { + typeInfo: exports.TypeInfo.CardSettings + }, + markers: { + isArray: true, + typeInfo: exports.TypeInfo.Marker } }; -exports.TypeInfo.TaskCompletedEvent.fields = { - result: { - enumType: exports.TypeInfo.TaskResult +exports.TypeInfo.FieldInfo.fields = { + fieldType: { + enumType: exports.TypeInfo.FieldType } }; -exports.TypeInfo.TaskDefinition.fields = { - restrictions: { - typeInfo: exports.TypeInfo.TaskRestrictions +exports.TypeInfo.Marker.fields = { + date: { + isDate: true, } }; -exports.TypeInfo.TaskGroup.fields = { - createdOn: { +exports.TypeInfo.Plan.fields = { + createdDate: { isDate: true, }, - modifiedOn: { + lastAccessed: { isDate: true, }, - restrictions: { - typeInfo: exports.TypeInfo.TaskRestrictions - } -}; -exports.TypeInfo.TaskGroupRevision.fields = { - changedDate: { + modifiedDate: { isDate: true, }, - changeType: { - enumType: exports.TypeInfo.AuditAction + type: { + enumType: exports.TypeInfo.PlanType + }, + userPermissions: { + enumType: exports.TypeInfo.PlanUserPermissions } }; -exports.TypeInfo.TaskLog.fields = { - createdOn: { +exports.TypeInfo.PlanMetadata.fields = { + modifiedDate: { isDate: true, }, - lastChangedOn: { - isDate: true, + userPermissions: { + enumType: exports.TypeInfo.PlanUserPermissions } }; -exports.TypeInfo.TaskOrchestrationContainer.fields = { - children: { +exports.TypeInfo.TeamCapacity.fields = { + teamMembers: { isArray: true, - typeInfo: exports.TypeInfo.TaskOrchestrationItem - }, - itemType: { - enumType: exports.TypeInfo.TaskOrchestrationItemType - }, - rollback: { - typeInfo: exports.TypeInfo.TaskOrchestrationContainer - } -}; -exports.TypeInfo.TaskOrchestrationItem.fields = { - itemType: { - enumType: exports.TypeInfo.TaskOrchestrationItemType - } -}; -exports.TypeInfo.TaskOrchestrationJob.fields = { - itemType: { - enumType: exports.TypeInfo.TaskOrchestrationItemType + typeInfo: exports.TypeInfo.TeamMemberCapacityIdentityRef } }; -exports.TypeInfo.TaskOrchestrationPlan.fields = { - environment: { - typeInfo: exports.TypeInfo.PlanEnvironment - }, - finishTime: { +exports.TypeInfo.TeamIterationAttributes.fields = { + finishDate: { isDate: true, }, - implementation: { - typeInfo: exports.TypeInfo.TaskOrchestrationContainer - }, - result: { - enumType: exports.TypeInfo.TaskResult - }, - startTime: { + startDate: { isDate: true, }, - state: { - enumType: exports.TypeInfo.TaskOrchestrationPlanState + timeFrame: { + enumType: exports.TypeInfo.TimeFrame } }; -exports.TypeInfo.TaskOrchestrationPlanGroup.fields = { - runningRequests: { +exports.TypeInfo.TeamMemberCapacity.fields = { + daysOff: { isArray: true, - typeInfo: exports.TypeInfo.TaskAgentJobRequest + typeInfo: exports.TypeInfo.DateRange } }; -exports.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics.fields = { - status: { - enumType: exports.TypeInfo.PlanGroupStatus +exports.TypeInfo.TeamMemberCapacityIdentityRef.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange } }; -exports.TypeInfo.TaskOrchestrationQueuedPlan.fields = { - assignTime: { - isDate: true, +exports.TypeInfo.TeamSetting.fields = { + backlogIteration: { + typeInfo: exports.TypeInfo.TeamSettingsIteration }, - queueTime: { - isDate: true, + bugsBehavior: { + enumType: exports.TypeInfo.BugsBehavior + }, + defaultIteration: { + typeInfo: exports.TypeInfo.TeamSettingsIteration + }, + workingDays: { + isArray: true, + enumType: SystemInterfaces.TypeInfo.DayOfWeek } }; -exports.TypeInfo.TaskOrchestrationQueuedPlanGroup.fields = { - plans: { +exports.TypeInfo.TeamSettingsDaysOff.fields = { + daysOff: { isArray: true, - typeInfo: exports.TypeInfo.TaskOrchestrationQueuedPlan + typeInfo: exports.TypeInfo.DateRange } }; -exports.TypeInfo.TaskRestrictions.fields = { - commands: { - typeInfo: exports.TypeInfo.TaskCommandRestrictions +exports.TypeInfo.TeamSettingsDaysOffPatch.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange } }; -exports.TypeInfo.Timeline.fields = { - lastChangedOn: { - isDate: true, - }, - records: { - isArray: true, - typeInfo: exports.TypeInfo.TimelineRecord +exports.TypeInfo.TeamSettingsIteration.fields = { + attributes: { + typeInfo: exports.TypeInfo.TeamIterationAttributes } }; -exports.TypeInfo.TimelineRecord.fields = { - finishTime: { - isDate: true, +exports.TypeInfo.TeamSettingsPatch.fields = { + bugsBehavior: { + enumType: exports.TypeInfo.BugsBehavior }, - issues: { + workingDays: { isArray: true, - typeInfo: exports.TypeInfo.Issue - }, - lastModified: { - isDate: true, - }, - result: { - enumType: exports.TypeInfo.TaskResult - }, - startTime: { - isDate: true, - }, - state: { - enumType: exports.TypeInfo.TimelineRecordState + enumType: SystemInterfaces.TypeInfo.DayOfWeek } }; -exports.TypeInfo.VariableGroup.fields = { - createdOn: { - isDate: true, - }, - modifiedOn: { - isDate: true, +exports.TypeInfo.TimelineCriteriaStatus.fields = { + type: { + enumType: exports.TypeInfo.TimelineCriteriaStatusCode } }; -exports.TypeInfo.VirtualMachine.fields = { - agent: { - typeInfo: exports.TypeInfo.TaskAgent +exports.TypeInfo.TimelineIterationStatus.fields = { + type: { + enumType: exports.TypeInfo.TimelineIterationStatusCode } }; -exports.TypeInfo.VirtualMachineGroup.fields = { - createdOn: { - isDate: true, - }, - lastModifiedOn: { - isDate: true, +exports.TypeInfo.TimelineTeamData.fields = { + iterations: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineTeamIteration }, - type: { - enumType: exports.TypeInfo.EnvironmentResourceType + status: { + typeInfo: exports.TypeInfo.TimelineTeamStatus } }; -exports.TypeInfo.VirtualMachineResource.fields = { - agent: { - typeInfo: exports.TypeInfo.TaskAgent - }, - createdOn: { +exports.TypeInfo.TimelineTeamIteration.fields = { + finishDate: { isDate: true, }, - lastModifiedOn: { + startDate: { isDate: true, }, + status: { + typeInfo: exports.TypeInfo.TimelineIterationStatus + } +}; +exports.TypeInfo.TimelineTeamStatus.fields = { type: { - enumType: exports.TypeInfo.EnvironmentResourceType + enumType: exports.TypeInfo.TimelineTeamStatusCode } }; -exports.TypeInfo.VirtualMachineResourceCreateParameters.fields = { - virtualMachineResource: { - typeInfo: exports.TypeInfo.VirtualMachineResource +exports.TypeInfo.UpdatePlan.fields = { + type: { + enumType: exports.TypeInfo.PlanType } }; /***/ }), -/***/ 3047: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 26938: +/***/ ((__unused_webpack_module, exports) => { "use strict"; /* @@ -61562,39227 +66828,45291 @@ exports.TypeInfo.VirtualMachineResourceCreateParameters.fields = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const SystemData = __nccwpck_require__(4652); -const TfsCoreInterfaces = __nccwpck_require__(3931); -/** - * The types of test attachments. - */ -var AttachmentType; -(function (AttachmentType) { - /** - * Attachment type GeneralAttachment , use this as default type unless you have other type. - */ - AttachmentType[AttachmentType["GeneralAttachment"] = 0] = "GeneralAttachment"; - AttachmentType[AttachmentType["AfnStrip"] = 1] = "AfnStrip"; - AttachmentType[AttachmentType["BugFilingData"] = 2] = "BugFilingData"; - /** - * Attachment type CodeCoverage. - */ - AttachmentType[AttachmentType["CodeCoverage"] = 3] = "CodeCoverage"; - AttachmentType[AttachmentType["IntermediateCollectorData"] = 4] = "IntermediateCollectorData"; - AttachmentType[AttachmentType["RunConfig"] = 5] = "RunConfig"; - AttachmentType[AttachmentType["TestImpactDetails"] = 6] = "TestImpactDetails"; - AttachmentType[AttachmentType["TmiTestRunDeploymentFiles"] = 7] = "TmiTestRunDeploymentFiles"; - AttachmentType[AttachmentType["TmiTestRunReverseDeploymentFiles"] = 8] = "TmiTestRunReverseDeploymentFiles"; - AttachmentType[AttachmentType["TmiTestResultDetail"] = 9] = "TmiTestResultDetail"; - AttachmentType[AttachmentType["TmiTestRunSummary"] = 10] = "TmiTestRunSummary"; - /** - * Attachment type ConsoleLog. - */ - AttachmentType[AttachmentType["ConsoleLog"] = 11] = "ConsoleLog"; -})(AttachmentType = exports.AttachmentType || (exports.AttachmentType = {})); -/** - * Enum of type Clone Operation Type. - */ -var CloneOperationState; -(function (CloneOperationState) { - /** - * value for Failed State - */ - CloneOperationState[CloneOperationState["Failed"] = 2] = "Failed"; - /** - * value for Inprogress state - */ - CloneOperationState[CloneOperationState["InProgress"] = 1] = "InProgress"; - /** - * Value for Queued State - */ - CloneOperationState[CloneOperationState["Queued"] = 0] = "Queued"; - /** - * value for Success state - */ - CloneOperationState[CloneOperationState["Succeeded"] = 3] = "Succeeded"; -})(CloneOperationState = exports.CloneOperationState || (exports.CloneOperationState = {})); -/** - * Used to choose which coverage data is returned by a QueryXXXCoverage() call. - */ -var CoverageQueryFlags; -(function (CoverageQueryFlags) { - /** - * If set, the Coverage.Modules property will be populated. - */ - CoverageQueryFlags[CoverageQueryFlags["Modules"] = 1] = "Modules"; - /** - * If set, the ModuleCoverage.Functions properties will be populated. - */ - CoverageQueryFlags[CoverageQueryFlags["Functions"] = 2] = "Functions"; - /** - * If set, the ModuleCoverage.CoverageData field will be populated. - */ - CoverageQueryFlags[CoverageQueryFlags["BlockData"] = 4] = "BlockData"; -})(CoverageQueryFlags = exports.CoverageQueryFlags || (exports.CoverageQueryFlags = {})); -var CoverageStatus; -(function (CoverageStatus) { - CoverageStatus[CoverageStatus["Covered"] = 0] = "Covered"; - CoverageStatus[CoverageStatus["NotCovered"] = 1] = "NotCovered"; - CoverageStatus[CoverageStatus["PartiallyCovered"] = 2] = "PartiallyCovered"; -})(CoverageStatus = exports.CoverageStatus || (exports.CoverageStatus = {})); -/** - * Represents status of code coverage summary for a build - */ -var CoverageSummaryStatus; -(function (CoverageSummaryStatus) { - /** - * No coverage status - */ - CoverageSummaryStatus[CoverageSummaryStatus["None"] = 0] = "None"; - /** - * The summary evaluation is in progress - */ - CoverageSummaryStatus[CoverageSummaryStatus["InProgress"] = 1] = "InProgress"; - /** - * The summary evaluation for the previous request is completed. Summary can change in future - */ - CoverageSummaryStatus[CoverageSummaryStatus["Completed"] = 2] = "Completed"; - /** - * The summary evaluation is finalized and won't change - */ - CoverageSummaryStatus[CoverageSummaryStatus["Finalized"] = 3] = "Finalized"; - /** - * The summary evaluation is pending - */ - CoverageSummaryStatus[CoverageSummaryStatus["Pending"] = 4] = "Pending"; - /** - * Summary evaluation may be ongoing but another merge has been requested. - */ - CoverageSummaryStatus[CoverageSummaryStatus["UpdateRequestQueued"] = 5] = "UpdateRequestQueued"; -})(CoverageSummaryStatus = exports.CoverageSummaryStatus || (exports.CoverageSummaryStatus = {})); -var CustomTestFieldScope; -(function (CustomTestFieldScope) { - CustomTestFieldScope[CustomTestFieldScope["None"] = 0] = "None"; - CustomTestFieldScope[CustomTestFieldScope["TestRun"] = 1] = "TestRun"; - CustomTestFieldScope[CustomTestFieldScope["TestResult"] = 2] = "TestResult"; - CustomTestFieldScope[CustomTestFieldScope["System"] = 4] = "System"; - CustomTestFieldScope[CustomTestFieldScope["All"] = 7] = "All"; -})(CustomTestFieldScope = exports.CustomTestFieldScope || (exports.CustomTestFieldScope = {})); -var CustomTestFieldType; -(function (CustomTestFieldType) { - CustomTestFieldType[CustomTestFieldType["Bit"] = 2] = "Bit"; - CustomTestFieldType[CustomTestFieldType["DateTime"] = 4] = "DateTime"; - CustomTestFieldType[CustomTestFieldType["Int"] = 8] = "Int"; - CustomTestFieldType[CustomTestFieldType["Float"] = 6] = "Float"; - CustomTestFieldType[CustomTestFieldType["String"] = 12] = "String"; - CustomTestFieldType[CustomTestFieldType["Guid"] = 14] = "Guid"; -})(CustomTestFieldType = exports.CustomTestFieldType || (exports.CustomTestFieldType = {})); -var FlakyDetectionType; -(function (FlakyDetectionType) { - /** - * Custom defines manual detection type. - */ - FlakyDetectionType[FlakyDetectionType["Custom"] = 1] = "Custom"; - /** - * Defines System detection type. - */ - FlakyDetectionType[FlakyDetectionType["System"] = 2] = "System"; -})(FlakyDetectionType = exports.FlakyDetectionType || (exports.FlakyDetectionType = {})); -/** - * Test summary metrics. - */ -var Metrics; -(function (Metrics) { - /** - * To get results of all matrix. - */ - Metrics[Metrics["All"] = 1] = "All"; - /** - * Get results summary by results outcome - */ - Metrics[Metrics["ResultSummary"] = 2] = "ResultSummary"; - /** - * Get results analysis which include failure analysis, increase/decrease in results count analysis. - */ - Metrics[Metrics["ResultsAnalysis"] = 3] = "ResultsAnalysis"; - /** - * Get runs summary - */ - Metrics[Metrics["RunSummary"] = 4] = "RunSummary"; -})(Metrics = exports.Metrics || (exports.Metrics = {})); -var OperationType; -(function (OperationType) { - OperationType[OperationType["Add"] = 1] = "Add"; - OperationType[OperationType["Delete"] = 2] = "Delete"; -})(OperationType = exports.OperationType || (exports.OperationType = {})); /** - * Additional details with test result + * Flag to control error policy in a batch classification nodes get request. */ -var ResultDetails; -(function (ResultDetails) { - /** - * Core fields of test result. Core fields includes State, Outcome, Priority, AutomatedTestName, AutomatedTestStorage, Comments, ErrorMessage etc. - */ - ResultDetails[ResultDetails["None"] = 0] = "None"; - /** - * Test iteration details in a test result. - */ - ResultDetails[ResultDetails["Iterations"] = 1] = "Iterations"; - /** - * Workitems associated with a test result. - */ - ResultDetails[ResultDetails["WorkItems"] = 2] = "WorkItems"; - /** - * Subresults in a test result. - */ - ResultDetails[ResultDetails["SubResults"] = 4] = "SubResults"; - /** - * Point and plan detail in a test result. - */ - ResultDetails[ResultDetails["Point"] = 8] = "Point"; -})(ResultDetails = exports.ResultDetails || (exports.ResultDetails = {})); +var ClassificationNodesErrorPolicy; +(function (ClassificationNodesErrorPolicy) { + ClassificationNodesErrorPolicy[ClassificationNodesErrorPolicy["Fail"] = 1] = "Fail"; + ClassificationNodesErrorPolicy[ClassificationNodesErrorPolicy["Omit"] = 2] = "Omit"; +})(ClassificationNodesErrorPolicy = exports.ClassificationNodesErrorPolicy || (exports.ClassificationNodesErrorPolicy = {})); /** - * Hierarchy type of the result/subresults. + * Specifies the additional data retrieval options for work item comments. */ -var ResultGroupType; -(function (ResultGroupType) { - /** - * Leaf node of test result. - */ - ResultGroupType[ResultGroupType["None"] = 0] = "None"; - /** - * Hierarchy type of test result. - */ - ResultGroupType[ResultGroupType["Rerun"] = 1] = "Rerun"; - /** - * Hierarchy type of test result. - */ - ResultGroupType[ResultGroupType["DataDriven"] = 2] = "DataDriven"; - /** - * Hierarchy type of test result. - */ - ResultGroupType[ResultGroupType["OrderedTest"] = 3] = "OrderedTest"; +var CommentExpandOptions; +(function (CommentExpandOptions) { + CommentExpandOptions[CommentExpandOptions["None"] = 0] = "None"; /** - * Unknown hierarchy type. + * Include comment reactions. */ - ResultGroupType[ResultGroupType["Generic"] = 4] = "Generic"; -})(ResultGroupType = exports.ResultGroupType || (exports.ResultGroupType = {})); -var ResultMetadata; -(function (ResultMetadata) { + CommentExpandOptions[CommentExpandOptions["Reactions"] = 1] = "Reactions"; /** - * Rerun metadata + * Include the rendered text (html) in addition to MD text. */ - ResultMetadata[ResultMetadata["Rerun"] = 1] = "Rerun"; + CommentExpandOptions[CommentExpandOptions["RenderedText"] = 8] = "RenderedText"; /** - * Flaky metadata + * If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes. */ - ResultMetadata[ResultMetadata["Flaky"] = 2] = "Flaky"; -})(ResultMetadata = exports.ResultMetadata || (exports.ResultMetadata = {})); + CommentExpandOptions[CommentExpandOptions["RenderedTextOnly"] = 16] = "RenderedTextOnly"; + CommentExpandOptions[CommentExpandOptions["All"] = -17] = "All"; +})(CommentExpandOptions = exports.CommentExpandOptions || (exports.CommentExpandOptions = {})); /** - * Additional details with test result metadata + * Represents different reaction types for a work item comment. */ -var ResultMetaDataDetails; -(function (ResultMetaDataDetails) { +var CommentReactionType; +(function (CommentReactionType) { + CommentReactionType[CommentReactionType["Like"] = 0] = "Like"; + CommentReactionType[CommentReactionType["Dislike"] = 1] = "Dislike"; + CommentReactionType[CommentReactionType["Heart"] = 2] = "Heart"; + CommentReactionType[CommentReactionType["Hooray"] = 3] = "Hooray"; + CommentReactionType[CommentReactionType["Smile"] = 4] = "Smile"; + CommentReactionType[CommentReactionType["Confused"] = 5] = "Confused"; +})(CommentReactionType = exports.CommentReactionType || (exports.CommentReactionType = {})); +var CommentSortOrder; +(function (CommentSortOrder) { /** - * Core fields of test result metadata. + * The results will be sorted in Ascending order. */ - ResultMetaDataDetails[ResultMetaDataDetails["None"] = 0] = "None"; + CommentSortOrder[CommentSortOrder["Asc"] = 1] = "Asc"; /** - * Test FlakyIdentifiers details in test result metadata. + * The results will be sorted in Descending order. */ - ResultMetaDataDetails[ResultMetaDataDetails["FlakyIdentifiers"] = 1] = "FlakyIdentifiers"; -})(ResultMetaDataDetails = exports.ResultMetaDataDetails || (exports.ResultMetaDataDetails = {})); + CommentSortOrder[CommentSortOrder["Desc"] = 2] = "Desc"; +})(CommentSortOrder = exports.CommentSortOrder || (exports.CommentSortOrder = {})); /** - * The top level entity that is being cloned as part of a Clone operation + * Enum for field types. */ -var ResultObjectType; -(function (ResultObjectType) { - /** - * Suite Clone - */ - ResultObjectType[ResultObjectType["TestSuite"] = 0] = "TestSuite"; +var FieldType; +(function (FieldType) { /** - * Plan Clone + * String field type. */ - ResultObjectType[ResultObjectType["TestPlan"] = 1] = "TestPlan"; -})(ResultObjectType = exports.ResultObjectType || (exports.ResultObjectType = {})); -var RunType; -(function (RunType) { + FieldType[FieldType["String"] = 0] = "String"; /** - * Only used during an update to preserve the existing value. + * Integer field type. */ - RunType[RunType["Unspecified"] = 0] = "Unspecified"; + FieldType[FieldType["Integer"] = 1] = "Integer"; /** - * Normal test run. + * Datetime field type. */ - RunType[RunType["Normal"] = 1] = "Normal"; + FieldType[FieldType["DateTime"] = 2] = "DateTime"; /** - * Test run created for the blocked result when a test point is blocked. + * Plain text field type. */ - RunType[RunType["Blocking"] = 2] = "Blocking"; + FieldType[FieldType["PlainText"] = 3] = "PlainText"; /** - * Test run created from Web. + * HTML (Multiline) field type. */ - RunType[RunType["Web"] = 4] = "Web"; + FieldType[FieldType["Html"] = 4] = "Html"; /** - * Run initiated from web through MTR + * Treepath field type. */ - RunType[RunType["MtrRunInitiatedFromWeb"] = 8] = "MtrRunInitiatedFromWeb"; + FieldType[FieldType["TreePath"] = 5] = "TreePath"; /** - * These test run would require DTL environment. These could be either of automated or manual test run. + * History field type. */ - RunType[RunType["RunWithDtlEnv"] = 16] = "RunWithDtlEnv"; + FieldType[FieldType["History"] = 6] = "History"; /** - * These test run may or may not have published test results but it will have summary like total test, passed test, failed test etc. These are automated tests. + * Double field type. */ - RunType[RunType["NoConfigRun"] = 32] = "NoConfigRun"; -})(RunType = exports.RunType || (exports.RunType = {})); -var Service; -(function (Service) { - Service[Service["Any"] = 0] = "Any"; - Service[Service["Tcm"] = 1] = "Tcm"; - Service[Service["Tfs"] = 2] = "Tfs"; -})(Service = exports.Service || (exports.Service = {})); -/** - * Option to get details in response - */ -var SuiteExpand; -(function (SuiteExpand) { + FieldType[FieldType["Double"] = 7] = "Double"; /** - * Include children in response. + * Guid field type. */ - SuiteExpand[SuiteExpand["Children"] = 1] = "Children"; + FieldType[FieldType["Guid"] = 8] = "Guid"; /** - * Include default testers in response. + * Boolean field type. */ - SuiteExpand[SuiteExpand["DefaultTesters"] = 2] = "DefaultTesters"; -})(SuiteExpand = exports.SuiteExpand || (exports.SuiteExpand = {})); -var TCMServiceDataMigrationStatus; -(function (TCMServiceDataMigrationStatus) { + FieldType[FieldType["Boolean"] = 9] = "Boolean"; /** - * Migration Not Started + * Identity field type. */ - TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["NotStarted"] = 0] = "NotStarted"; + FieldType[FieldType["Identity"] = 10] = "Identity"; /** - * Migration InProgress + * String picklist field type. When creating a string picklist field from REST API, use "String" FieldType. */ - TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["InProgress"] = 1] = "InProgress"; + FieldType[FieldType["PicklistString"] = 11] = "PicklistString"; /** - * Migration Completed + * Integer picklist field type. When creating a integer picklist field from REST API, use "Integer" FieldType. */ - TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["Completed"] = 2] = "Completed"; + FieldType[FieldType["PicklistInteger"] = 12] = "PicklistInteger"; /** - * Migration Failed + * Double picklist field type. When creating a double picklist field from REST API, use "Double" FieldType. */ - TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["Failed"] = 3] = "Failed"; -})(TCMServiceDataMigrationStatus = exports.TCMServiceDataMigrationStatus || (exports.TCMServiceDataMigrationStatus = {})); + FieldType[FieldType["PicklistDouble"] = 13] = "PicklistDouble"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); /** - * Represents the state of an ITestConfiguration object. + * Enum for field usages. */ -var TestConfigurationState; -(function (TestConfigurationState) { +var FieldUsage; +(function (FieldUsage) { /** - * The configuration can be used for new test runs. + * Empty usage. */ - TestConfigurationState[TestConfigurationState["Active"] = 1] = "Active"; + FieldUsage[FieldUsage["None"] = 0] = "None"; /** - * The configuration has been retired and should not be used for new test runs. + * Work item field usage. */ - TestConfigurationState[TestConfigurationState["Inactive"] = 2] = "Inactive"; -})(TestConfigurationState = exports.TestConfigurationState || (exports.TestConfigurationState = {})); -/** - * Test Log Context - */ -var TestLogScope; -(function (TestLogScope) { + FieldUsage[FieldUsage["WorkItem"] = 1] = "WorkItem"; /** - * Log file is associated with Run, result, subresult + * Work item link field usage. */ - TestLogScope[TestLogScope["Run"] = 0] = "Run"; + FieldUsage[FieldUsage["WorkItemLink"] = 2] = "WorkItemLink"; /** - * Log File associated with Build + * Treenode field usage. */ - TestLogScope[TestLogScope["Build"] = 1] = "Build"; + FieldUsage[FieldUsage["Tree"] = 3] = "Tree"; /** - * Log File associated with Release + * Work Item Type Extension usage. */ - TestLogScope[TestLogScope["Release"] = 2] = "Release"; -})(TestLogScope = exports.TestLogScope || (exports.TestLogScope = {})); + FieldUsage[FieldUsage["WorkItemTypeExtension"] = 4] = "WorkItemTypeExtension"; +})(FieldUsage = exports.FieldUsage || (exports.FieldUsage = {})); /** - * Test Log Status codes. + * Flag to expand types of fields. */ -var TestLogStatusCode; -(function (TestLogStatusCode) { - /** - * Operation is successful - */ - TestLogStatusCode[TestLogStatusCode["Success"] = 0] = "Success"; - /** - * Operation failed - */ - TestLogStatusCode[TestLogStatusCode["Failed"] = 1] = "Failed"; - /** - * Operation failed due to file already exist - */ - TestLogStatusCode[TestLogStatusCode["FileAlreadyExists"] = 2] = "FileAlreadyExists"; - /** - * Invalid input provided by user - */ - TestLogStatusCode[TestLogStatusCode["InvalidInput"] = 3] = "InvalidInput"; - /** - * Invalid file name provided by user - */ - TestLogStatusCode[TestLogStatusCode["InvalidFileName"] = 4] = "InvalidFileName"; - /** - * Error occurred while operating on container - */ - TestLogStatusCode[TestLogStatusCode["InvalidContainer"] = 5] = "InvalidContainer"; - /** - * Blob Transfer Error - */ - TestLogStatusCode[TestLogStatusCode["TransferFailed"] = 6] = "TransferFailed"; - /** - * TestLogStore feature is not enabled - */ - TestLogStatusCode[TestLogStatusCode["FeatureDisabled"] = 7] = "FeatureDisabled"; - /** - * Build for which operation is requested does not exist - */ - TestLogStatusCode[TestLogStatusCode["BuildDoesNotExist"] = 8] = "BuildDoesNotExist"; - /** - * Run for which operation is requested does not exist - */ - TestLogStatusCode[TestLogStatusCode["RunDoesNotExist"] = 9] = "RunDoesNotExist"; - /** - * Container cannot be created - */ - TestLogStatusCode[TestLogStatusCode["ContainerNotCreated"] = 10] = "ContainerNotCreated"; - /** - * Api is not supported - */ - TestLogStatusCode[TestLogStatusCode["APINotSupported"] = 11] = "APINotSupported"; - /** - * File size is greater than the limitation - */ - TestLogStatusCode[TestLogStatusCode["FileSizeExceeds"] = 12] = "FileSizeExceeds"; - /** - * Container is not found for which operation is requested - */ - TestLogStatusCode[TestLogStatusCode["ContainerNotFound"] = 13] = "ContainerNotFound"; +var GetFieldsExpand; +(function (GetFieldsExpand) { /** - * File cannot be found + * Default behavior. */ - TestLogStatusCode[TestLogStatusCode["FileNotFound"] = 14] = "FileNotFound"; + GetFieldsExpand[GetFieldsExpand["None"] = 0] = "None"; /** - * Directory cannot be found + * Adds extension fields to the response. */ - TestLogStatusCode[TestLogStatusCode["DirectoryNotFound"] = 15] = "DirectoryNotFound"; + GetFieldsExpand[GetFieldsExpand["ExtensionFields"] = 1] = "ExtensionFields"; /** - * Storage capacity exceeded + * Includes fields that have been deleted. */ - TestLogStatusCode[TestLogStatusCode["StorageCapacityExceeded"] = 16] = "StorageCapacityExceeded"; -})(TestLogStatusCode = exports.TestLogStatusCode || (exports.TestLogStatusCode = {})); + GetFieldsExpand[GetFieldsExpand["IncludeDeleted"] = 2] = "IncludeDeleted"; +})(GetFieldsExpand = exports.GetFieldsExpand || (exports.GetFieldsExpand = {})); /** - * Specifies set of possible log store endpoint type. + * The link query mode which determines the behavior of the query. */ -var TestLogStoreEndpointType; -(function (TestLogStoreEndpointType) { +var LinkQueryMode; +(function (LinkQueryMode) { /** - * Endpoint type is scoped to root + * Returns flat list of work items. */ - TestLogStoreEndpointType[TestLogStoreEndpointType["Root"] = 1] = "Root"; + LinkQueryMode[LinkQueryMode["WorkItems"] = 0] = "WorkItems"; /** - * Endpoint type is scoped to file + * Returns work items where the source, target, and link criteria are all satisfied. */ - TestLogStoreEndpointType[TestLogStoreEndpointType["File"] = 2] = "File"; -})(TestLogStoreEndpointType = exports.TestLogStoreEndpointType || (exports.TestLogStoreEndpointType = {})); -/** - * Specifies set of possible operation type on log store. - */ -var TestLogStoreOperationType; -(function (TestLogStoreOperationType) { + LinkQueryMode[LinkQueryMode["LinksOneHopMustContain"] = 1] = "LinksOneHopMustContain"; /** - * Operation is scoped to read data only. + * Returns work items that satisfy the source and link criteria, even if no linked work item satisfies the target criteria. */ - TestLogStoreOperationType[TestLogStoreOperationType["Read"] = 1] = "Read"; + LinkQueryMode[LinkQueryMode["LinksOneHopMayContain"] = 2] = "LinksOneHopMayContain"; /** - * Operation is scoped to create data only. + * Returns work items that satisfy the source, only if no linked work item satisfies the link and target criteria. */ - TestLogStoreOperationType[TestLogStoreOperationType["Create"] = 2] = "Create"; + LinkQueryMode[LinkQueryMode["LinksOneHopDoesNotContain"] = 3] = "LinksOneHopDoesNotContain"; + LinkQueryMode[LinkQueryMode["LinksRecursiveMustContain"] = 4] = "LinksRecursiveMustContain"; /** - * Operation is scoped to read and create data. + * Returns work items a hierarchy of work items that by default satisfy the source */ - TestLogStoreOperationType[TestLogStoreOperationType["ReadAndCreate"] = 3] = "ReadAndCreate"; -})(TestLogStoreOperationType = exports.TestLogStoreOperationType || (exports.TestLogStoreOperationType = {})); + LinkQueryMode[LinkQueryMode["LinksRecursiveMayContain"] = 5] = "LinksRecursiveMayContain"; + LinkQueryMode[LinkQueryMode["LinksRecursiveDoesNotContain"] = 6] = "LinksRecursiveDoesNotContain"; +})(LinkQueryMode = exports.LinkQueryMode || (exports.LinkQueryMode = {})); +var LogicalOperation; +(function (LogicalOperation) { + LogicalOperation[LogicalOperation["NONE"] = 0] = "NONE"; + LogicalOperation[LogicalOperation["AND"] = 1] = "AND"; + LogicalOperation[LogicalOperation["OR"] = 2] = "OR"; +})(LogicalOperation = exports.LogicalOperation || (exports.LogicalOperation = {})); /** - * Test Log Types + * Enumerates the possible provisioning actions that can be triggered on process template update. */ -var TestLogType; -(function (TestLogType) { - /** - * Any gereric attachment. - */ - TestLogType[TestLogType["GeneralAttachment"] = 1] = "GeneralAttachment"; - /** - * Code Coverage files - */ - TestLogType[TestLogType["CodeCoverage"] = 2] = "CodeCoverage"; - /** - * Test Impact details. - */ - TestLogType[TestLogType["TestImpact"] = 3] = "TestImpact"; - /** - * Temporary files - */ - TestLogType[TestLogType["Intermediate"] = 4] = "Intermediate"; - /** - * Subresult Attachment - */ - TestLogType[TestLogType["System"] = 5] = "System"; -})(TestLogType = exports.TestLogType || (exports.TestLogType = {})); +var ProvisioningActionType; +(function (ProvisioningActionType) { + ProvisioningActionType[ProvisioningActionType["Import"] = 0] = "Import"; + ProvisioningActionType[ProvisioningActionType["Validate"] = 1] = "Validate"; +})(ProvisioningActionType = exports.ProvisioningActionType || (exports.ProvisioningActionType = {})); /** - * Valid TestOutcome values. + * Enum to control error policy in a query batch request. */ -var TestOutcome; -(function (TestOutcome) { - /** - * Only used during an update to preserve the existing value. - */ - TestOutcome[TestOutcome["Unspecified"] = 0] = "Unspecified"; - /** - * Test has not been completed, or the test type does not report pass/failure. - */ - TestOutcome[TestOutcome["None"] = 1] = "None"; - /** - * Test was executed w/o any issues. - */ - TestOutcome[TestOutcome["Passed"] = 2] = "Passed"; - /** - * Test was executed, but there were issues. Issues may involve exceptions or failed assertions. - */ - TestOutcome[TestOutcome["Failed"] = 3] = "Failed"; - /** - * Test has completed, but we can't say if it passed or failed. May be used for aborted tests... - */ - TestOutcome[TestOutcome["Inconclusive"] = 4] = "Inconclusive"; - /** - * The test timed out - */ - TestOutcome[TestOutcome["Timeout"] = 5] = "Timeout"; - /** - * Test was aborted. This was not caused by a user gesture, but rather by a framework decision. - */ - TestOutcome[TestOutcome["Aborted"] = 6] = "Aborted"; - /** - * Test had it chance for been executed but was not, as ITestElement.IsRunnable == false. - */ - TestOutcome[TestOutcome["Blocked"] = 7] = "Blocked"; - /** - * Test was not executed. This was caused by a user gesture - e.g. user hit stop button. - */ - TestOutcome[TestOutcome["NotExecuted"] = 8] = "NotExecuted"; - /** - * To be used by Run level results. This is not a failure. - */ - TestOutcome[TestOutcome["Warning"] = 9] = "Warning"; - /** - * There was a system error while we were trying to execute a test. - */ - TestOutcome[TestOutcome["Error"] = 10] = "Error"; - /** - * Test is Not Applicable for execution. - */ - TestOutcome[TestOutcome["NotApplicable"] = 11] = "NotApplicable"; - /** - * Test is paused. - */ - TestOutcome[TestOutcome["Paused"] = 12] = "Paused"; - /** - * Test is currently executing. Added this for TCM charts - */ - TestOutcome[TestOutcome["InProgress"] = 13] = "InProgress"; - /** - * Test is not impacted. Added fot TIA. - */ - TestOutcome[TestOutcome["NotImpacted"] = 14] = "NotImpacted"; - TestOutcome[TestOutcome["MaxValue"] = 14] = "MaxValue"; -})(TestOutcome = exports.TestOutcome || (exports.TestOutcome = {})); -var TestPointState; -(function (TestPointState) { - /** - * Default - */ - TestPointState[TestPointState["None"] = 0] = "None"; - /** - * The test point needs to be executed in order for the test pass to be considered complete. Either the test has not been run before or the previous run failed. - */ - TestPointState[TestPointState["Ready"] = 1] = "Ready"; - /** - * The test has passed successfully and does not need to be re-run for the test pass to be considered complete. - */ - TestPointState[TestPointState["Completed"] = 2] = "Completed"; - /** - * The test point needs to be executed but is not able to. - */ - TestPointState[TestPointState["NotReady"] = 3] = "NotReady"; - /** - * The test is being executed. - */ - TestPointState[TestPointState["InProgress"] = 4] = "InProgress"; - TestPointState[TestPointState["MaxValue"] = 4] = "MaxValue"; -})(TestPointState = exports.TestPointState || (exports.TestPointState = {})); +var QueryErrorPolicy; +(function (QueryErrorPolicy) { + QueryErrorPolicy[QueryErrorPolicy["Fail"] = 1] = "Fail"; + QueryErrorPolicy[QueryErrorPolicy["Omit"] = 2] = "Omit"; +})(QueryErrorPolicy = exports.QueryErrorPolicy || (exports.QueryErrorPolicy = {})); /** - * Group by for results + * Determines which set of additional query properties to display */ -var TestResultGroupBy; -(function (TestResultGroupBy) { - /** - * Group the results by branches - */ - TestResultGroupBy[TestResultGroupBy["Branch"] = 1] = "Branch"; - /** - * Group the results by environment - */ - TestResultGroupBy[TestResultGroupBy["Environment"] = 2] = "Environment"; -})(TestResultGroupBy = exports.TestResultGroupBy || (exports.TestResultGroupBy = {})); -var TestResultsContextType; -(function (TestResultsContextType) { - TestResultsContextType[TestResultsContextType["Build"] = 1] = "Build"; - TestResultsContextType[TestResultsContextType["Release"] = 2] = "Release"; - TestResultsContextType[TestResultsContextType["Pipeline"] = 3] = "Pipeline"; -})(TestResultsContextType = exports.TestResultsContextType || (exports.TestResultsContextType = {})); -var TestResultsSettingsType; -(function (TestResultsSettingsType) { - /** - * Returns All Test Settings. - */ - TestResultsSettingsType[TestResultsSettingsType["All"] = 1] = "All"; - /** - * Returns Flaky Test Settings. - */ - TestResultsSettingsType[TestResultsSettingsType["Flaky"] = 2] = "Flaky"; +var QueryExpand; +(function (QueryExpand) { /** - * Returns whether to log new tests or not + * Expands Columns, Links and ChangeInfo */ - TestResultsSettingsType[TestResultsSettingsType["NewTestLogging"] = 3] = "NewTestLogging"; -})(TestResultsSettingsType = exports.TestResultsSettingsType || (exports.TestResultsSettingsType = {})); -/** - * The types of outcomes for test run. - */ -var TestRunOutcome; -(function (TestRunOutcome) { + QueryExpand[QueryExpand["None"] = 0] = "None"; /** - * Run with zero failed tests and has at least one impacted test + * Expands Columns, Links, ChangeInfo and WIQL text */ - TestRunOutcome[TestRunOutcome["Passed"] = 0] = "Passed"; + QueryExpand[QueryExpand["Wiql"] = 1] = "Wiql"; /** - * Run with at-least one failed test. + * Expands Columns, Links, ChangeInfo, WIQL text and clauses */ - TestRunOutcome[TestRunOutcome["Failed"] = 1] = "Failed"; + QueryExpand[QueryExpand["Clauses"] = 2] = "Clauses"; /** - * Run with no impacted tests. + * Expands all properties */ - TestRunOutcome[TestRunOutcome["NotImpacted"] = 2] = "NotImpacted"; + QueryExpand[QueryExpand["All"] = 3] = "All"; /** - * Runs with All tests in other category. + * Displays minimal properties and the WIQL text */ - TestRunOutcome[TestRunOutcome["Others"] = 3] = "Others"; -})(TestRunOutcome = exports.TestRunOutcome || (exports.TestRunOutcome = {})); + QueryExpand[QueryExpand["Minimal"] = 4] = "Minimal"; +})(QueryExpand = exports.QueryExpand || (exports.QueryExpand = {})); +var QueryOption; +(function (QueryOption) { + QueryOption[QueryOption["Doing"] = 1] = "Doing"; + QueryOption[QueryOption["Done"] = 2] = "Done"; + QueryOption[QueryOption["Followed"] = 3] = "Followed"; +})(QueryOption = exports.QueryOption || (exports.QueryOption = {})); /** - * The types of publish context for run. + * Determines whether a tree query matches parents or children first. */ -var TestRunPublishContext; -(function (TestRunPublishContext) { - /** - * Run is published for Build Context. - */ - TestRunPublishContext[TestRunPublishContext["Build"] = 1] = "Build"; +var QueryRecursionOption; +(function (QueryRecursionOption) { /** - * Run is published for Release Context. + * Returns work items that satisfy the source, even if no linked work item satisfies the target and link criteria. */ - TestRunPublishContext[TestRunPublishContext["Release"] = 2] = "Release"; + QueryRecursionOption[QueryRecursionOption["ParentFirst"] = 0] = "ParentFirst"; /** - * Run is published for any Context. + * Returns work items that satisfy the target criteria, even if no work item satisfies the source and link criteria. */ - TestRunPublishContext[TestRunPublishContext["All"] = 3] = "All"; -})(TestRunPublishContext = exports.TestRunPublishContext || (exports.TestRunPublishContext = {})); + QueryRecursionOption[QueryRecursionOption["ChildFirst"] = 1] = "ChildFirst"; +})(QueryRecursionOption = exports.QueryRecursionOption || (exports.QueryRecursionOption = {})); /** - * The types of states for test run. + * The query result type */ -var TestRunState; -(function (TestRunState) { - /** - * Only used during an update to preserve the existing value. - */ - TestRunState[TestRunState["Unspecified"] = 0] = "Unspecified"; - /** - * The run is still being created. No tests have started yet. - */ - TestRunState[TestRunState["NotStarted"] = 1] = "NotStarted"; - /** - * Tests are running. - */ - TestRunState[TestRunState["InProgress"] = 2] = "InProgress"; - /** - * All tests have completed or been skipped. - */ - TestRunState[TestRunState["Completed"] = 3] = "Completed"; - /** - * Run is stopped and remaining tests have been aborted - */ - TestRunState[TestRunState["Aborted"] = 4] = "Aborted"; +var QueryResultType; +(function (QueryResultType) { /** - * Run is currently initializing This is a legacy state and should not be used any more + * A list of work items (for flat queries). */ - TestRunState[TestRunState["Waiting"] = 5] = "Waiting"; + QueryResultType[QueryResultType["WorkItem"] = 1] = "WorkItem"; /** - * Run requires investigation because of a test point failure This is a legacy state and should not be used any more + * A list of work item links (for OneHop and Tree queries). */ - TestRunState[TestRunState["NeedsInvestigation"] = 6] = "NeedsInvestigation"; -})(TestRunState = exports.TestRunState || (exports.TestRunState = {})); + QueryResultType[QueryResultType["WorkItemLink"] = 2] = "WorkItemLink"; +})(QueryResultType = exports.QueryResultType || (exports.QueryResultType = {})); /** - * The types of sub states for test run. It gives the user more info about the test run beyond the high level test run state + * The type of query. */ -var TestRunSubstate; -(function (TestRunSubstate) { - /** - * Run with noState. - */ - TestRunSubstate[TestRunSubstate["None"] = 0] = "None"; - /** - * Run state while Creating Environment. - */ - TestRunSubstate[TestRunSubstate["CreatingEnvironment"] = 1] = "CreatingEnvironment"; - /** - * Run state while Running Tests. - */ - TestRunSubstate[TestRunSubstate["RunningTests"] = 2] = "RunningTests"; - /** - * Run state while Creating Environment. - */ - TestRunSubstate[TestRunSubstate["CanceledByUser"] = 3] = "CanceledByUser"; +var QueryType; +(function (QueryType) { /** - * Run state when it is Aborted By the System. + * Gets a flat list of work items. */ - TestRunSubstate[TestRunSubstate["AbortedBySystem"] = 4] = "AbortedBySystem"; + QueryType[QueryType["Flat"] = 1] = "Flat"; /** - * Run state when run has timedOut. + * Gets a tree of work items showing their link hierarchy. */ - TestRunSubstate[TestRunSubstate["TimedOut"] = 5] = "TimedOut"; + QueryType[QueryType["Tree"] = 2] = "Tree"; /** - * Run state while Pending Analysis. + * Gets a list of work items and their direct links. */ - TestRunSubstate[TestRunSubstate["PendingAnalysis"] = 6] = "PendingAnalysis"; + QueryType[QueryType["OneHop"] = 3] = "OneHop"; +})(QueryType = exports.QueryType || (exports.QueryType = {})); +/** + * The reporting revision expand level. + */ +var ReportingRevisionsExpand; +(function (ReportingRevisionsExpand) { /** - * Run state after being Analysed. + * Default behavior. */ - TestRunSubstate[TestRunSubstate["Analyzed"] = 7] = "Analyzed"; + ReportingRevisionsExpand[ReportingRevisionsExpand["None"] = 0] = "None"; /** - * Run state when cancellation is in Progress. + * Add fields to the response. */ - TestRunSubstate[TestRunSubstate["CancellationInProgress"] = 8] = "CancellationInProgress"; -})(TestRunSubstate = exports.TestRunSubstate || (exports.TestRunSubstate = {})); + ReportingRevisionsExpand[ReportingRevisionsExpand["Fields"] = 1] = "Fields"; +})(ReportingRevisionsExpand = exports.ReportingRevisionsExpand || (exports.ReportingRevisionsExpand = {})); /** - * Represents the source from which the test session was created + * Enumerates types of supported xml templates used for customization. */ -var TestSessionSource; -(function (TestSessionSource) { +var TemplateType; +(function (TemplateType) { + TemplateType[TemplateType["WorkItemType"] = 0] = "WorkItemType"; + TemplateType[TemplateType["GlobalWorkflow"] = 1] = "GlobalWorkflow"; +})(TemplateType = exports.TemplateType || (exports.TemplateType = {})); +/** + * Types of tree node structures. + */ +var TreeNodeStructureType; +(function (TreeNodeStructureType) { /** - * Source of test session uncertain as it is stale + * Area type. */ - TestSessionSource[TestSessionSource["Unknown"] = 0] = "Unknown"; + TreeNodeStructureType[TreeNodeStructureType["Area"] = 0] = "Area"; /** - * The session was created from Microsoft Test Manager exploratory desktop tool. + * Iteration type. */ - TestSessionSource[TestSessionSource["XTDesktop"] = 1] = "XTDesktop"; + TreeNodeStructureType[TreeNodeStructureType["Iteration"] = 1] = "Iteration"; +})(TreeNodeStructureType = exports.TreeNodeStructureType || (exports.TreeNodeStructureType = {})); +/** + * Types of tree structures groups. + */ +var TreeStructureGroup; +(function (TreeStructureGroup) { + TreeStructureGroup[TreeStructureGroup["Areas"] = 0] = "Areas"; + TreeStructureGroup[TreeStructureGroup["Iterations"] = 1] = "Iterations"; +})(TreeStructureGroup = exports.TreeStructureGroup || (exports.TreeStructureGroup = {})); +/** + * Enum to control error policy in a bulk get work items request. + */ +var WorkItemErrorPolicy; +(function (WorkItemErrorPolicy) { /** - * The session was created from feedback client. + * Fail work error policy. */ - TestSessionSource[TestSessionSource["FeedbackDesktop"] = 2] = "FeedbackDesktop"; + WorkItemErrorPolicy[WorkItemErrorPolicy["Fail"] = 1] = "Fail"; /** - * The session was created from browser extension. + * Omit work error policy. */ - TestSessionSource[TestSessionSource["XTWeb"] = 3] = "XTWeb"; + WorkItemErrorPolicy[WorkItemErrorPolicy["Omit"] = 2] = "Omit"; +})(WorkItemErrorPolicy = exports.WorkItemErrorPolicy || (exports.WorkItemErrorPolicy = {})); +/** + * Flag to control payload properties from get work item command. + */ +var WorkItemExpand; +(function (WorkItemExpand) { /** - * The session was created from browser extension. + * Default behavior. */ - TestSessionSource[TestSessionSource["FeedbackWeb"] = 4] = "FeedbackWeb"; + WorkItemExpand[WorkItemExpand["None"] = 0] = "None"; /** - * The session was created from web access using Microsoft Test Manager exploratory desktop tool. + * Relations work item expand. */ - TestSessionSource[TestSessionSource["XTDesktop2"] = 5] = "XTDesktop2"; + WorkItemExpand[WorkItemExpand["Relations"] = 1] = "Relations"; /** - * To show sessions from all supported sources. + * Fields work item expand. */ - TestSessionSource[TestSessionSource["SessionInsightsForAll"] = 6] = "SessionInsightsForAll"; -})(TestSessionSource = exports.TestSessionSource || (exports.TestSessionSource = {})); -/** - * Represents the state of the test session. - */ -var TestSessionState; -(function (TestSessionState) { + WorkItemExpand[WorkItemExpand["Fields"] = 2] = "Fields"; /** - * Only used during an update to preserve the existing value. + * Links work item expand. */ - TestSessionState[TestSessionState["Unspecified"] = 0] = "Unspecified"; + WorkItemExpand[WorkItemExpand["Links"] = 3] = "Links"; /** - * The session is still being created. + * Expands all. */ - TestSessionState[TestSessionState["NotStarted"] = 1] = "NotStarted"; + WorkItemExpand[WorkItemExpand["All"] = 4] = "All"; +})(WorkItemExpand = exports.WorkItemExpand || (exports.WorkItemExpand = {})); +/** + * Type of the activity + */ +var WorkItemRecentActivityType; +(function (WorkItemRecentActivityType) { + WorkItemRecentActivityType[WorkItemRecentActivityType["Visited"] = 0] = "Visited"; + WorkItemRecentActivityType[WorkItemRecentActivityType["Edited"] = 1] = "Edited"; + WorkItemRecentActivityType[WorkItemRecentActivityType["Deleted"] = 2] = "Deleted"; + WorkItemRecentActivityType[WorkItemRecentActivityType["Restored"] = 3] = "Restored"; +})(WorkItemRecentActivityType = exports.WorkItemRecentActivityType || (exports.WorkItemRecentActivityType = {})); +/** + * Expand options for the work item field(s) request. + */ +var WorkItemTypeFieldsExpandLevel; +(function (WorkItemTypeFieldsExpandLevel) { /** - * The session is running. + * Includes only basic properties of the field. */ - TestSessionState[TestSessionState["InProgress"] = 2] = "InProgress"; + WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["None"] = 0] = "None"; /** - * The session has paused. + * Includes allowed values for the field. */ - TestSessionState[TestSessionState["Paused"] = 3] = "Paused"; + WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["AllowedValues"] = 1] = "AllowedValues"; /** - * The session has completed. + * Includes dependent fields of the field. */ - TestSessionState[TestSessionState["Completed"] = 4] = "Completed"; + WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["DependentFields"] = 2] = "DependentFields"; /** - * This is required for Feedback session which are declined + * Includes allowed values and dependent fields of the field. */ - TestSessionState[TestSessionState["Declined"] = 5] = "Declined"; -})(TestSessionState = exports.TestSessionState || (exports.TestSessionState = {})); + WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["All"] = 3] = "All"; +})(WorkItemTypeFieldsExpandLevel = exports.WorkItemTypeFieldsExpandLevel || (exports.WorkItemTypeFieldsExpandLevel = {})); exports.TypeInfo = { - AfnStrip: {}, - AggregatedDataForResultTrend: {}, - AggregatedResultDetailsByOutcome: {}, - AggregatedResultsAnalysis: {}, - AggregatedResultsByOutcome: {}, - AggregatedRunsByOutcome: {}, - AggregatedRunsByState: {}, - AttachmentType: { - enumValues: { - "generalAttachment": 0, - "afnStrip": 1, - "bugFilingData": 2, - "codeCoverage": 3, - "intermediateCollectorData": 4, - "runConfig": 5, - "testImpactDetails": 6, - "tmiTestRunDeploymentFiles": 7, - "tmiTestRunReverseDeploymentFiles": 8, - "tmiTestResultDetail": 9, - "tmiTestRunSummary": 10, - "consoleLog": 11 - } - }, - BatchResponse: {}, - BuildConfiguration: {}, - BuildCoverage: {}, - BuildReference2: {}, - BulkResultUpdateRequest: {}, - CloneOperationInformation: {}, - CloneOperationState: { - enumValues: { - "failed": 2, - "inProgress": 1, - "queued": 0, - "succeeded": 3 - } - }, - CodeCoverageSummary: {}, - Coverage2: {}, - CoverageQueryFlags: { - enumValues: { - "modules": 1, - "functions": 2, - "blockData": 4 - } - }, - CoverageStatus: { - enumValues: { - "covered": 0, - "notCovered": 1, - "partiallyCovered": 2 - } - }, - CoverageSummaryStatus: { + AccountMyWorkResult: {}, + AccountRecentActivityWorkItemModel: {}, + AccountRecentActivityWorkItemModel2: {}, + AccountRecentActivityWorkItemModelBase: {}, + AccountRecentMentionWorkItemModel: {}, + AccountWorkWorkItemModel: {}, + ClassificationNodesErrorPolicy: { enumValues: { - "none": 0, - "inProgress": 1, - "completed": 2, - "finalized": 3, - "pending": 4, - "updateRequestQueued": 5 + "fail": 1, + "omit": 2 } }, - CreateTestMessageLogEntryRequest: {}, - CreateTestResultsRequest: {}, - CreateTestRunRequest: {}, - CustomTestFieldDefinition: {}, - CustomTestFieldScope: { + Comment: {}, + CommentExpandOptions: { enumValues: { "none": 0, - "testRun": 1, - "testResult": 2, - "system": 4, - "all": 7 - } - }, - CustomTestFieldType: { - enumValues: { - "bit": 2, - "dateTime": 4, - "int": 8, - "float": 6, - "string": 12, - "guid": 14 + "reactions": 1, + "renderedText": 8, + "renderedTextOnly": 16, + "all": -17 } }, - DatedTestFieldData: {}, - FailingSince: {}, - FetchTestResultsResponse: {}, - FlakyDetection: {}, - FlakyDetectionType: { + CommentList: {}, + CommentReaction: {}, + CommentReactionType: { enumValues: { - "custom": 1, - "system": 2 + "like": 0, + "dislike": 1, + "heart": 2, + "hooray": 3, + "smile": 4, + "confused": 5 } }, - FlakySettings: {}, - LastResultDetails: {}, - LegacyBuildConfiguration: {}, - LegacyReleaseReference: {}, - LegacyTestCaseResult: {}, - LegacyTestRun: {}, - LegacyTestSettings: {}, - Metrics: { + CommentSortOrder: { enumValues: { - "all": 1, - "resultSummary": 2, - "resultsAnalysis": 3, - "runSummary": 4 + "asc": 1, + "desc": 2 } }, - OperationType: { + CommentVersion: {}, + ExternalDeployment: {}, + FieldType: { enumValues: { - "add": 1, - "delete": 2 + "string": 0, + "integer": 1, + "dateTime": 2, + "plainText": 3, + "html": 4, + "treePath": 5, + "history": 6, + "double": 7, + "guid": 8, + "boolean": 9, + "identity": 10, + "picklistString": 11, + "picklistInteger": 12, + "picklistDouble": 13 } }, - PipelineTestMetrics: {}, - PointLastResult: {}, - PointsResults2: {}, - QueryTestActionResultResponse: {}, - ReleaseReference: {}, - ReleaseReference2: {}, - RequirementsToTestsMapping2: {}, - Response: {}, - ResultDetails: { + FieldUsage: { enumValues: { "none": 0, - "iterations": 1, - "workItems": 2, - "subResults": 4, - "point": 8 + "workItem": 1, + "workItemLink": 2, + "tree": 3, + "workItemTypeExtension": 4 } }, - ResultGroupType: { + GetFieldsExpand: { enumValues: { "none": 0, - "rerun": 1, - "dataDriven": 2, - "orderedTest": 3, - "generic": 4 + "extensionFields": 1, + "includeDeleted": 2 } }, - ResultMetadata: { + LinkQueryMode: { enumValues: { - "rerun": 1, - "flaky": 2 + "workItems": 0, + "linksOneHopMustContain": 1, + "linksOneHopMayContain": 2, + "linksOneHopDoesNotContain": 3, + "linksRecursiveMustContain": 4, + "linksRecursiveMayContain": 5, + "linksRecursiveDoesNotContain": 6 } }, - ResultMetaDataDetails: { + LogicalOperation: { enumValues: { "none": 0, - "flakyIdentifiers": 1 - } - }, - ResultObjectType: { - enumValues: { - "testSuite": 0, - "testPlan": 1 - } - }, - ResultRetentionSettings: {}, - ResultsByQueryResponse: {}, - ResultsFilter: {}, - ResultsSummaryByOutcome: {}, - ResultSummary: {}, - ResultUpdateRequest: {}, - ResultUpdateRequestModel: {}, - ResultUpdateResponse: {}, - RunCreateModel: {}, - RunStatistic: {}, - RunSummary: {}, - RunSummaryModel: {}, - RunType: { - enumValues: { - "unspecified": 0, - "normal": 1, - "blocking": 2, - "web": 4, - "mtrRunInitiatedFromWeb": 8, - "runWithDtlEnv": 16, - "noConfigRun": 32 - } - }, - RunUpdateModel: {}, - Service: { - enumValues: { - "any": 0, - "tcm": 1, - "tfs": 2 - } - }, - SuiteExpand: { - enumValues: { - "children": 1, - "defaultTesters": 2 - } - }, - TCMServiceDataMigrationStatus: { - enumValues: { - "notStarted": 0, - "inProgress": 1, - "completed": 2, - "failed": 3 + "and": 1, + "or": 2 } }, - TestActionResult: {}, - TestActionResult2: {}, - TestActionResultModel: {}, - TestAttachment: {}, - TestAuthoringDetails: {}, - TestCaseReference2: {}, - TestCaseResult: {}, - TestConfiguration: {}, - TestConfigurationState: { + ProvisioningActionType: { enumValues: { - "active": 1, - "inactive": 2 + "import": 0, + "validate": 1 } }, - TestExecutionReportData: {}, - TestExtensionField: {}, - TestExtensionFieldDetails: {}, - TestFailuresAnalysis: {}, - TestHistoryQuery: {}, - TestIterationDetailsModel: {}, - TestLog: {}, - TestLogReference: {}, - TestLogScope: { + QueryBatchGetRequest: {}, + QueryErrorPolicy: { enumValues: { - "run": 0, - "build": 1, - "release": 2 + "fail": 1, + "omit": 2 } }, - TestLogStatus: {}, - TestLogStatusCode: { + QueryExpand: { enumValues: { - "success": 0, - "failed": 1, - "fileAlreadyExists": 2, - "invalidInput": 3, - "invalidFileName": 4, - "invalidContainer": 5, - "transferFailed": 6, - "featureDisabled": 7, - "buildDoesNotExist": 8, - "runDoesNotExist": 9, - "containerNotCreated": 10, - "apiNotSupported": 11, - "fileSizeExceeds": 12, - "containerNotFound": 13, - "fileNotFound": 14, - "directoryNotFound": 15, - "storageCapacityExceeded": 16 + "none": 0, + "wiql": 1, + "clauses": 2, + "all": 3, + "minimal": 4 } }, - TestLogStoreAttachment: {}, - TestLogStoreEndpointDetails: {}, - TestLogStoreEndpointType: { + QueryHierarchyItem: {}, + QueryHierarchyItemsResult: {}, + QueryOption: { enumValues: { - "root": 1, - "file": 2 + "doing": 1, + "done": 2, + "followed": 3 } }, - TestLogStoreOperationType: { + QueryRecursionOption: { enumValues: { - "read": 1, - "create": 2, - "readAndCreate": 3 + "parentFirst": 0, + "childFirst": 1 } }, - TestLogType: { + QueryResultType: { enumValues: { - "generalAttachment": 1, - "codeCoverage": 2, - "testImpact": 3, - "intermediate": 4, - "system": 5 + "workItem": 1, + "workItemLink": 2 } }, - TestMessageLogDetails: {}, - TestMessageLogEntry: {}, - TestMessageLogEntry2: {}, - TestOutcome: { + QueryType: { enumValues: { - "unspecified": 0, - "none": 1, - "passed": 2, - "failed": 3, - "inconclusive": 4, - "timeout": 5, - "aborted": 6, - "blocked": 7, - "notExecuted": 8, - "warning": 9, - "error": 10, - "notApplicable": 11, - "paused": 12, - "inProgress": 13, - "notImpacted": 14, - "maxValue": 14 + "flat": 1, + "tree": 2, + "oneHop": 3 } }, - TestParameter2: {}, - TestPlan: {}, - TestPlanCloneRequest: {}, - TestPlanHubData: {}, - TestPlansWithSelection: {}, - TestPoint: {}, - TestPointReference: {}, - TestPointsEvent: {}, - TestPointsQuery: {}, - TestPointState: { + ReportingRevisionsExpand: { enumValues: { "none": 0, - "ready": 1, - "completed": 2, - "notReady": 3, - "inProgress": 4, - "maxValue": 4 - } - }, - TestPointsUpdatedEvent: {}, - TestResult2: {}, - TestResultAcrossProjectResponse: {}, - TestResultAttachment: {}, - TestResultGroupBy: { - enumValues: { - "branch": 1, - "environment": 2 - } - }, - TestResultHistory: {}, - TestResultHistoryDetailsForGroup: {}, - TestResultHistoryForGroup: {}, - TestResultModelBase: {}, - TestResultReset2: {}, - TestResultsContext: {}, - TestResultsContextType: { - enumValues: { - "build": 1, - "release": 2, - "pipeline": 3 + "fields": 1 } }, - TestResultsDetails: {}, - TestResultsDetailsForGroup: {}, - TestResultsEx2: {}, - TestResultsQuery: {}, - TestResultsSettings: {}, - TestResultsSettingsType: { + TemplateType: { enumValues: { - "all": 1, - "flaky": 2, - "newTestLogging": 3 + "workItemType": 0, + "globalWorkflow": 1 } }, - TestResultSummary: {}, - TestResultsUpdateSettings: {}, - TestResultsWithWatermark: {}, - TestResultTrendFilter: {}, - TestRun: {}, - TestRun2: {}, - TestRunCanceledEvent: {}, - TestRunCreatedEvent: {}, - TestRunEvent: {}, - TestRunEx2: {}, - TestRunOutcome: { + TreeNodeStructureType: { enumValues: { - "passed": 0, - "failed": 1, - "notImpacted": 2, - "others": 3 + "area": 0, + "iteration": 1 } }, - TestRunPublishContext: { + TreeStructureGroup: { enumValues: { - "build": 1, - "release": 2, - "all": 3 + "areas": 0, + "iterations": 1 } }, - TestRunStartedEvent: {}, - TestRunState: { + WorkItemBatchGetRequest: {}, + WorkItemClassificationNode: {}, + WorkItemComment: {}, + WorkItemComments: {}, + WorkItemErrorPolicy: { enumValues: { - "unspecified": 0, - "notStarted": 1, - "inProgress": 2, - "completed": 3, - "aborted": 4, - "waiting": 5, - "needsInvestigation": 6 + "fail": 1, + "omit": 2 } }, - TestRunStatistic: {}, - TestRunSubstate: { + WorkItemExpand: { enumValues: { "none": 0, - "creatingEnvironment": 1, - "runningTests": 2, - "canceledByUser": 3, - "abortedBySystem": 4, - "timedOut": 5, - "pendingAnalysis": 6, - "analyzed": 7, - "cancellationInProgress": 8 + "relations": 1, + "fields": 2, + "links": 3, + "all": 4 } }, - TestRunSummary2: {}, - TestRunWithDtlEnvEvent: {}, - TestSession: {}, - TestSessionExploredWorkItemReference: {}, - TestSessionSource: { + WorkItemField: {}, + WorkItemField2: {}, + WorkItemHistory: {}, + WorkItemQueryClause: {}, + WorkItemQueryResult: {}, + WorkItemRecentActivityType: { enumValues: { - "unknown": 0, - "xtDesktop": 1, - "feedbackDesktop": 2, - "xtWeb": 3, - "feedbackWeb": 4, - "xtDesktop2": 5, - "sessionInsightsForAll": 6 + "visited": 0, + "edited": 1, + "deleted": 2, + "restored": 3 } }, - TestSessionState: { + WorkItemTagDefinition: {}, + WorkItemTypeFieldsExpandLevel: { enumValues: { - "unspecified": 0, - "notStarted": 1, - "inProgress": 2, - "paused": 3, - "completed": 4, - "declined": 5 - } - }, - TestSettings2: {}, - TestSubResult: {}, - TestSuite: {}, - TestSummaryForWorkItem: {}, - UpdatedProperties: {}, - UpdateTestRunRequest: {}, - UpdateTestRunResponse: {}, - WorkItemToTestLinks: {}, -}; -exports.TypeInfo.AfnStrip.fields = { - creationDate: { - isDate: true, - } -}; -exports.TypeInfo.AggregatedDataForResultTrend.fields = { - resultsByOutcome: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome - }, - runSummaryByState: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestRunState, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByState - }, - testResultsContext: { - typeInfo: exports.TypeInfo.TestResultsContext - } -}; -exports.TypeInfo.AggregatedResultDetailsByOutcome.fields = { - outcome: { - enumType: exports.TypeInfo.TestOutcome - } -}; -exports.TypeInfo.AggregatedResultsAnalysis.fields = { - notReportedResultsByOutcome: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome - }, - previousContext: { - typeInfo: exports.TypeInfo.TestResultsContext - }, - resultsByOutcome: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome - }, - runSummaryByOutcome: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestRunOutcome, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByOutcome - }, - runSummaryByState: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestRunState, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByState - } -}; -exports.TypeInfo.AggregatedResultsByOutcome.fields = { - outcome: { - enumType: exports.TypeInfo.TestOutcome - } -}; -exports.TypeInfo.AggregatedRunsByOutcome.fields = { - outcome: { - enumType: exports.TypeInfo.TestRunOutcome - } -}; -exports.TypeInfo.AggregatedRunsByState.fields = { - resultsByOutcome: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome - }, - state: { - enumType: exports.TypeInfo.TestRunState - } -}; -exports.TypeInfo.BatchResponse.fields = { - responses: { - isArray: true, - typeInfo: exports.TypeInfo.Response - }, -}; -exports.TypeInfo.BuildConfiguration.fields = { - creationDate: { - isDate: true, - } -}; -exports.TypeInfo.BuildCoverage.fields = { - configuration: { - typeInfo: exports.TypeInfo.BuildConfiguration - } -}; -exports.TypeInfo.BuildReference2.fields = { - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.BulkResultUpdateRequest.fields = { - requests: { - isArray: true, - typeInfo: exports.TypeInfo.ResultUpdateRequest - } -}; -exports.TypeInfo.CloneOperationInformation.fields = { - completionDate: { - isDate: true, - }, - creationDate: { - isDate: true, - }, - resultObjectType: { - enumType: exports.TypeInfo.ResultObjectType - }, - state: { - enumType: exports.TypeInfo.CloneOperationState - } -}; -exports.TypeInfo.CodeCoverageSummary.fields = { - status: { - enumType: exports.TypeInfo.CoverageSummaryStatus - } -}; -exports.TypeInfo.Coverage2.fields = { - dateCreated: { - isDate: true, - }, - dateModified: { - isDate: true, - } -}; -exports.TypeInfo.CreateTestMessageLogEntryRequest.fields = { - testMessageLogEntry: { - isArray: true, - typeInfo: exports.TypeInfo.TestMessageLogEntry - } -}; -exports.TypeInfo.CreateTestResultsRequest.fields = { - results: { - isArray: true, - typeInfo: exports.TypeInfo.LegacyTestCaseResult - } -}; -exports.TypeInfo.CreateTestRunRequest.fields = { - results: { - isArray: true, - typeInfo: exports.TypeInfo.LegacyTestCaseResult - }, - testRun: { - typeInfo: exports.TypeInfo.LegacyTestRun - }, - testSettings: { - typeInfo: exports.TypeInfo.LegacyTestSettings - } -}; -exports.TypeInfo.CustomTestFieldDefinition.fields = { - fieldType: { - enumType: exports.TypeInfo.CustomTestFieldType - }, - scope: { - enumType: exports.TypeInfo.CustomTestFieldScope - } -}; -exports.TypeInfo.DatedTestFieldData.fields = { - date: { - isDate: true, - } -}; -exports.TypeInfo.FailingSince.fields = { - date: { - isDate: true, - }, - release: { - typeInfo: exports.TypeInfo.ReleaseReference - } -}; -exports.TypeInfo.FetchTestResultsResponse.fields = { - actionResults: { - isArray: true, - typeInfo: exports.TypeInfo.TestActionResult - }, - attachments: { - isArray: true, - typeInfo: exports.TypeInfo.TestResultAttachment - }, - results: { - isArray: true, - typeInfo: exports.TypeInfo.LegacyTestCaseResult - } -}; -exports.TypeInfo.FlakyDetection.fields = { - flakyDetectionType: { - enumType: exports.TypeInfo.FlakyDetectionType - } -}; -exports.TypeInfo.FlakySettings.fields = { - flakyDetection: { - typeInfo: exports.TypeInfo.FlakyDetection - } -}; -exports.TypeInfo.LastResultDetails.fields = { - dateCompleted: { - isDate: true, - } -}; -exports.TypeInfo.LegacyBuildConfiguration.fields = { - completedDate: { - isDate: true, - }, - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.LegacyReleaseReference.fields = { - environmentCreationDate: { - isDate: true, - }, - releaseCreationDate: { - isDate: true, - } -}; -exports.TypeInfo.LegacyTestCaseResult.fields = { - buildReference: { - typeInfo: exports.TypeInfo.LegacyBuildConfiguration - }, - creationDate: { - isDate: true, - }, - customFields: { - isArray: true, - typeInfo: exports.TypeInfo.TestExtensionField - }, - dateCompleted: { - isDate: true, - }, - dateStarted: { - isDate: true, - }, - failingSince: { - typeInfo: exports.TypeInfo.FailingSince - }, - lastUpdated: { - isDate: true, - }, - releaseReference: { - typeInfo: exports.TypeInfo.LegacyReleaseReference - }, - resultGroupType: { - enumType: exports.TypeInfo.ResultGroupType - }, - stackTrace: { - typeInfo: exports.TypeInfo.TestExtensionField - } -}; -exports.TypeInfo.LegacyTestRun.fields = { - buildReference: { - typeInfo: exports.TypeInfo.LegacyBuildConfiguration - }, - completeDate: { - isDate: true, - }, - creationDate: { - isDate: true, - }, - customFields: { - isArray: true, - typeInfo: exports.TypeInfo.TestExtensionField - }, - dueDate: { - isDate: true, - }, - lastUpdated: { - isDate: true, - }, - releaseReference: { - typeInfo: exports.TypeInfo.LegacyReleaseReference - }, - startDate: { - isDate: true, - }, - testMessageLogEntries: { - isArray: true, - typeInfo: exports.TypeInfo.TestMessageLogDetails - } -}; -exports.TypeInfo.LegacyTestSettings.fields = { - createdDate: { - isDate: true, - }, - lastUpdated: { - isDate: true, - } -}; -exports.TypeInfo.PipelineTestMetrics.fields = { - resultSummary: { - typeInfo: exports.TypeInfo.ResultSummary - }, - runSummary: { - typeInfo: exports.TypeInfo.RunSummary - }, - summaryAtChild: { - isArray: true, - typeInfo: exports.TypeInfo.PipelineTestMetrics - } -}; -exports.TypeInfo.PointLastResult.fields = { - lastUpdatedDate: { - isDate: true, - } -}; -exports.TypeInfo.PointsResults2.fields = { - lastUpdated: { - isDate: true, - } -}; -exports.TypeInfo.QueryTestActionResultResponse.fields = { - testActionResults: { - isArray: true, - typeInfo: exports.TypeInfo.TestActionResult - }, - testAttachments: { - isArray: true, - typeInfo: exports.TypeInfo.TestResultAttachment - } -}; -exports.TypeInfo.ReleaseReference.fields = { - creationDate: { - isDate: true, - }, - environmentCreationDate: { - isDate: true, - } -}; -exports.TypeInfo.ReleaseReference2.fields = { - environmentCreationDate: { - isDate: true, - }, - releaseCreationDate: { - isDate: true, - } -}; -exports.TypeInfo.RequirementsToTestsMapping2.fields = { - creationDate: { - isDate: true, - }, - deletionDate: { - isDate: true, - } -}; -exports.TypeInfo.Response.fields = {}; -exports.TypeInfo.ResultRetentionSettings.fields = { - lastUpdatedDate: { - isDate: true, - } -}; -exports.TypeInfo.ResultsByQueryResponse.fields = { - testResults: { - isArray: true, - typeInfo: exports.TypeInfo.LegacyTestCaseResult - } -}; -exports.TypeInfo.ResultsFilter.fields = { - executedIn: { - enumType: exports.TypeInfo.Service - }, - maxCompleteDate: { - isDate: true, - }, - testResultsContext: { - typeInfo: exports.TypeInfo.TestResultsContext - } -}; -exports.TypeInfo.ResultsSummaryByOutcome.fields = { - aggregatedResultDetailsByOutcome: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultDetailsByOutcome - } -}; -exports.TypeInfo.ResultSummary.fields = { - resultSummaryByRunState: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestRunState, - dictionaryValueTypeInfo: exports.TypeInfo.ResultsSummaryByOutcome - } -}; -exports.TypeInfo.ResultUpdateRequest.fields = { - actionResultDeletes: { - isArray: true, - typeInfo: exports.TypeInfo.TestActionResult - }, - actionResults: { - isArray: true, - typeInfo: exports.TypeInfo.TestActionResult - }, - attachments: { - isArray: true, - typeInfo: exports.TypeInfo.TestResultAttachment + "none": 0, + "allowedValues": 1, + "dependentFields": 2, + "all": 3 + } }, - testCaseResult: { - typeInfo: exports.TypeInfo.LegacyTestCaseResult - } + WorkItemTypeTemplateUpdateModel: {}, + WorkItemUpdate: {}, }; -exports.TypeInfo.ResultUpdateRequestModel.fields = { - actionResultDeletes: { - isArray: true, - typeInfo: exports.TypeInfo.TestActionResultModel - }, - actionResults: { +exports.TypeInfo.AccountMyWorkResult.fields = { + workItemDetails: { isArray: true, - typeInfo: exports.TypeInfo.TestActionResultModel + typeInfo: exports.TypeInfo.AccountWorkWorkItemModel } }; -exports.TypeInfo.ResultUpdateResponse.fields = { - lastUpdated: { +exports.TypeInfo.AccountRecentActivityWorkItemModel.fields = { + activityDate: { isDate: true, - } -}; -exports.TypeInfo.RunCreateModel.fields = { - buildReference: { - typeInfo: exports.TypeInfo.BuildConfiguration - }, - releaseReference: { - typeInfo: exports.TypeInfo.ReleaseReference }, - runSummary: { - isArray: true, - typeInfo: exports.TypeInfo.RunSummaryModel - } -}; -exports.TypeInfo.RunStatistic.fields = { - resultMetadata: { - enumType: exports.TypeInfo.ResultMetadata - } -}; -exports.TypeInfo.RunSummary.fields = { - runSummaryByOutcome: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestRunOutcome, + activityType: { + enumType: exports.TypeInfo.WorkItemRecentActivityType }, - runSummaryByState: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestRunState, - } -}; -exports.TypeInfo.RunSummaryModel.fields = { - testOutcome: { - enumType: exports.TypeInfo.TestOutcome + changedDate: { + isDate: true, } }; -exports.TypeInfo.RunUpdateModel.fields = { - logEntries: { - isArray: true, - typeInfo: exports.TypeInfo.TestMessageLogDetails +exports.TypeInfo.AccountRecentActivityWorkItemModel2.fields = { + activityDate: { + isDate: true, }, - runSummary: { - isArray: true, - typeInfo: exports.TypeInfo.RunSummaryModel + activityType: { + enumType: exports.TypeInfo.WorkItemRecentActivityType }, - substate: { - enumType: exports.TypeInfo.TestRunSubstate + changedDate: { + isDate: true, } }; -exports.TypeInfo.TestActionResult.fields = { - creationDate: { +exports.TypeInfo.AccountRecentActivityWorkItemModelBase.fields = { + activityDate: { isDate: true, }, - dateCompleted: { - isDate: true, + activityType: { + enumType: exports.TypeInfo.WorkItemRecentActivityType }, - dateStarted: { + changedDate: { isDate: true, - }, - lastUpdated: { + } +}; +exports.TypeInfo.AccountRecentMentionWorkItemModel.fields = { + mentionedDateField: { isDate: true, } }; -exports.TypeInfo.TestActionResult2.fields = { - creationDate: { +exports.TypeInfo.AccountWorkWorkItemModel.fields = { + changedDate: { isDate: true, - }, - dateCompleted: { + } +}; +exports.TypeInfo.Comment.fields = { + createdDate: { isDate: true, }, - dateStarted: { + createdOnBehalfDate: { isDate: true, }, - lastUpdated: { + modifiedDate: { isDate: true, + }, + reactions: { + isArray: true, + typeInfo: exports.TypeInfo.CommentReaction } }; -exports.TypeInfo.TestActionResultModel.fields = { - completedDate: { +exports.TypeInfo.CommentList.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment + } +}; +exports.TypeInfo.CommentReaction.fields = { + type: { + enumType: exports.TypeInfo.CommentReactionType + } +}; +exports.TypeInfo.CommentVersion.fields = { + createdDate: { isDate: true, }, - startedDate: { + createdOnBehalfDate: { isDate: true, - } -}; -exports.TypeInfo.TestAttachment.fields = { - attachmentType: { - enumType: exports.TypeInfo.AttachmentType }, - createdDate: { + modifiedDate: { isDate: true, } }; -exports.TypeInfo.TestAuthoringDetails.fields = { - lastUpdated: { +exports.TypeInfo.ExternalDeployment.fields = { + statusDate: { isDate: true, - }, - state: { - enumType: exports.TypeInfo.TestPointState } }; -exports.TypeInfo.TestCaseReference2.fields = { - creationDate: { - isDate: true, +exports.TypeInfo.QueryBatchGetRequest.fields = { + $expand: { + enumType: exports.TypeInfo.QueryExpand }, - lastRefTestRunDate: { - isDate: true, + errorPolicy: { + enumType: exports.TypeInfo.QueryErrorPolicy } }; -exports.TypeInfo.TestCaseResult.fields = { - completedDate: { - isDate: true, +exports.TypeInfo.QueryHierarchyItem.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.QueryHierarchyItem + }, + clauses: { + typeInfo: exports.TypeInfo.WorkItemQueryClause }, createdDate: { isDate: true, }, - failingSince: { - typeInfo: exports.TypeInfo.FailingSince + filterOptions: { + enumType: exports.TypeInfo.LinkQueryMode }, - iterationDetails: { - isArray: true, - typeInfo: exports.TypeInfo.TestIterationDetailsModel + lastExecutedDate: { + isDate: true, }, - lastUpdatedDate: { + lastModifiedDate: { isDate: true, }, - releaseReference: { - typeInfo: exports.TypeInfo.ReleaseReference + linkClauses: { + typeInfo: exports.TypeInfo.WorkItemQueryClause }, - resultGroupType: { - enumType: exports.TypeInfo.ResultGroupType + queryRecursionOption: { + enumType: exports.TypeInfo.QueryRecursionOption }, - startedDate: { - isDate: true, + queryType: { + enumType: exports.TypeInfo.QueryType }, - subResults: { - isArray: true, - typeInfo: exports.TypeInfo.TestSubResult - } -}; -exports.TypeInfo.TestConfiguration.fields = { - lastUpdatedDate: { - isDate: true, + sourceClauses: { + typeInfo: exports.TypeInfo.WorkItemQueryClause }, - state: { - enumType: exports.TypeInfo.TestConfigurationState + targetClauses: { + typeInfo: exports.TypeInfo.WorkItemQueryClause } }; -exports.TypeInfo.TestExecutionReportData.fields = { - reportData: { +exports.TypeInfo.QueryHierarchyItemsResult.fields = { + value: { isArray: true, - typeInfo: exports.TypeInfo.DatedTestFieldData - } -}; -exports.TypeInfo.TestExtensionField.fields = { - field: { - typeInfo: exports.TypeInfo.TestExtensionFieldDetails - } -}; -exports.TypeInfo.TestExtensionFieldDetails.fields = { - type: { - enumType: SystemData.TypeInfo.SqlDbType - } -}; -exports.TypeInfo.TestFailuresAnalysis.fields = { - previousContext: { - typeInfo: exports.TypeInfo.TestResultsContext + typeInfo: exports.TypeInfo.QueryHierarchyItem } }; -exports.TypeInfo.TestHistoryQuery.fields = { - groupBy: { - enumType: exports.TypeInfo.TestResultGroupBy +exports.TypeInfo.WorkItemBatchGetRequest.fields = { + $expand: { + enumType: exports.TypeInfo.WorkItemExpand }, - maxCompleteDate: { + asOf: { isDate: true, }, - resultsForGroup: { - isArray: true, - typeInfo: exports.TypeInfo.TestResultHistoryForGroup + errorPolicy: { + enumType: exports.TypeInfo.WorkItemErrorPolicy } }; -exports.TypeInfo.TestIterationDetailsModel.fields = { - actionResults: { +exports.TypeInfo.WorkItemClassificationNode.fields = { + children: { isArray: true, - typeInfo: exports.TypeInfo.TestActionResultModel - }, - completedDate: { - isDate: true, + typeInfo: exports.TypeInfo.WorkItemClassificationNode }, - startedDate: { - isDate: true, + structureType: { + enumType: exports.TypeInfo.TreeNodeStructureType } }; -exports.TypeInfo.TestLog.fields = { - logReference: { - typeInfo: exports.TypeInfo.TestLogReference - }, - modifiedOn: { +exports.TypeInfo.WorkItemComment.fields = { + revisedDate: { isDate: true, } }; -exports.TypeInfo.TestLogReference.fields = { - scope: { - enumType: exports.TypeInfo.TestLogScope - }, - type: { - enumType: exports.TypeInfo.TestLogType - } -}; -exports.TypeInfo.TestLogStatus.fields = { - status: { - enumType: exports.TypeInfo.TestLogStatusCode +exports.TypeInfo.WorkItemComments.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemComment } }; -exports.TypeInfo.TestLogStoreAttachment.fields = { - attachmentType: { - enumType: exports.TypeInfo.AttachmentType +exports.TypeInfo.WorkItemField.fields = { + type: { + enumType: exports.TypeInfo.FieldType }, - createdDate: { - isDate: true, + usage: { + enumType: exports.TypeInfo.FieldUsage } }; -exports.TypeInfo.TestLogStoreEndpointDetails.fields = { - endpointType: { - enumType: exports.TypeInfo.TestLogStoreEndpointType +exports.TypeInfo.WorkItemField2.fields = { + type: { + enumType: exports.TypeInfo.FieldType }, - status: { - enumType: exports.TypeInfo.TestLogStatusCode + usage: { + enumType: exports.TypeInfo.FieldUsage } }; -exports.TypeInfo.TestMessageLogDetails.fields = { - dateCreated: { +exports.TypeInfo.WorkItemHistory.fields = { + revisedDate: { isDate: true, } }; -exports.TypeInfo.TestMessageLogEntry.fields = { - dateCreated: { - isDate: true, +exports.TypeInfo.WorkItemQueryClause.fields = { + clauses: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemQueryClause + }, + logicalOperator: { + enumType: exports.TypeInfo.LogicalOperation } }; -exports.TypeInfo.TestMessageLogEntry2.fields = { - dateCreated: { +exports.TypeInfo.WorkItemQueryResult.fields = { + asOf: { isDate: true, + }, + queryResultType: { + enumType: exports.TypeInfo.QueryResultType + }, + queryType: { + enumType: exports.TypeInfo.QueryType } }; -exports.TypeInfo.TestParameter2.fields = { - creationDate: { - isDate: true, - }, - dateModified: { +exports.TypeInfo.WorkItemTagDefinition.fields = { + lastUpdated: { isDate: true, } }; -exports.TypeInfo.TestPlan.fields = { - endDate: { - isDate: true, - }, - startDate: { - isDate: true, +exports.TypeInfo.WorkItemTypeTemplateUpdateModel.fields = { + actionType: { + enumType: exports.TypeInfo.ProvisioningActionType }, - updatedDate: { - isDate: true, + templateType: { + enumType: exports.TypeInfo.TemplateType } }; -exports.TypeInfo.TestPlanCloneRequest.fields = { - destinationTestPlan: { - typeInfo: exports.TypeInfo.TestPlan +exports.TypeInfo.WorkItemUpdate.fields = { + revisedDate: { + isDate: true, } }; -exports.TypeInfo.TestPlanHubData.fields = { - testPlan: { - typeInfo: exports.TypeInfo.TestPlan + + +/***/ }), + +/***/ 21655: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Enum for the type of a field. + */ +var FieldType; +(function (FieldType) { + /** + * String field type. + */ + FieldType[FieldType["String"] = 1] = "String"; + /** + * Integer field type. + */ + FieldType[FieldType["Integer"] = 2] = "Integer"; + /** + * Datetime field type. + */ + FieldType[FieldType["DateTime"] = 3] = "DateTime"; + /** + * Plain Text field type. + */ + FieldType[FieldType["PlainText"] = 5] = "PlainText"; + /** + * HTML (Multiline) field type. + */ + FieldType[FieldType["Html"] = 7] = "Html"; + /** + * Treepath field type. + */ + FieldType[FieldType["TreePath"] = 8] = "TreePath"; + /** + * History field type. + */ + FieldType[FieldType["History"] = 9] = "History"; + /** + * Double field type. + */ + FieldType[FieldType["Double"] = 10] = "Double"; + /** + * Guid field type. + */ + FieldType[FieldType["Guid"] = 11] = "Guid"; + /** + * Boolean field type. + */ + FieldType[FieldType["Boolean"] = 12] = "Boolean"; + /** + * Identity field type. + */ + FieldType[FieldType["Identity"] = 13] = "Identity"; + /** + * Integer picklist field type. + */ + FieldType[FieldType["PicklistInteger"] = 14] = "PicklistInteger"; + /** + * String picklist field type. + */ + FieldType[FieldType["PicklistString"] = 15] = "PicklistString"; + /** + * Double picklist field type. + */ + FieldType[FieldType["PicklistDouble"] = 16] = "PicklistDouble"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +var GetWorkItemTypeExpand; +(function (GetWorkItemTypeExpand) { + GetWorkItemTypeExpand[GetWorkItemTypeExpand["None"] = 0] = "None"; + GetWorkItemTypeExpand[GetWorkItemTypeExpand["States"] = 1] = "States"; + GetWorkItemTypeExpand[GetWorkItemTypeExpand["Behaviors"] = 2] = "Behaviors"; + GetWorkItemTypeExpand[GetWorkItemTypeExpand["Layout"] = 4] = "Layout"; +})(GetWorkItemTypeExpand = exports.GetWorkItemTypeExpand || (exports.GetWorkItemTypeExpand = {})); +/** + * Type of page + */ +var PageType; +(function (PageType) { + PageType[PageType["Custom"] = 1] = "Custom"; + PageType[PageType["History"] = 2] = "History"; + PageType[PageType["Links"] = 3] = "Links"; + PageType[PageType["Attachments"] = 4] = "Attachments"; +})(PageType = exports.PageType || (exports.PageType = {})); +/** + * Work item type classes' + */ +var WorkItemTypeClass; +(function (WorkItemTypeClass) { + WorkItemTypeClass[WorkItemTypeClass["System"] = 0] = "System"; + WorkItemTypeClass[WorkItemTypeClass["Derived"] = 1] = "Derived"; + WorkItemTypeClass[WorkItemTypeClass["Custom"] = 2] = "Custom"; +})(WorkItemTypeClass = exports.WorkItemTypeClass || (exports.WorkItemTypeClass = {})); +exports.TypeInfo = { + FieldModel: {}, + FieldType: { + enumValues: { + "string": 1, + "integer": 2, + "dateTime": 3, + "plainText": 5, + "html": 7, + "treePath": 8, + "history": 9, + "double": 10, + "guid": 11, + "boolean": 12, + "identity": 13, + "picklistInteger": 14, + "picklistString": 15, + "picklistDouble": 16 + } }, - testPoints: { - isArray: true, - typeInfo: exports.TypeInfo.TestPoint + FormLayout: {}, + GetWorkItemTypeExpand: { + enumValues: { + "none": 0, + "states": 1, + "behaviors": 2, + "layout": 4 + } }, - testSuites: { - isArray: true, - typeInfo: exports.TypeInfo.TestSuite - } + Page: {}, + PageType: { + enumValues: { + "custom": 1, + "history": 2, + "links": 3, + "attachments": 4 + } + }, + WorkItemTypeClass: { + enumValues: { + "system": 0, + "derived": 1, + "custom": 2 + } + }, + WorkItemTypeFieldModel: {}, + WorkItemTypeFieldModel2: {}, + WorkItemTypeModel: {}, }; -exports.TypeInfo.TestPlansWithSelection.fields = { - plans: { - isArray: true, - typeInfo: exports.TypeInfo.TestPlan +exports.TypeInfo.FieldModel.fields = { + type: { + enumType: exports.TypeInfo.FieldType } }; -exports.TypeInfo.TestPoint.fields = { - lastResetToActive: { - isDate: true, - }, - lastResultDetails: { - typeInfo: exports.TypeInfo.LastResultDetails - }, - lastUpdatedDate: { - isDate: true, +exports.TypeInfo.FormLayout.fields = { + pages: { + isArray: true, + typeInfo: exports.TypeInfo.Page } }; -exports.TypeInfo.TestPointReference.fields = { - state: { - enumType: exports.TypeInfo.TestPointState +exports.TypeInfo.Page.fields = { + pageType: { + enumType: exports.TypeInfo.PageType } }; -exports.TypeInfo.TestPointsEvent.fields = { - testPoints: { - isArray: true, - typeInfo: exports.TypeInfo.TestPointReference +exports.TypeInfo.WorkItemTypeFieldModel.fields = { + type: { + enumType: exports.TypeInfo.FieldType } }; -exports.TypeInfo.TestPointsQuery.fields = { - points: { - isArray: true, - typeInfo: exports.TypeInfo.TestPoint +exports.TypeInfo.WorkItemTypeFieldModel2.fields = { + type: { + enumType: exports.TypeInfo.FieldType } }; -exports.TypeInfo.TestPointsUpdatedEvent.fields = { - testPoints: { - isArray: true, - typeInfo: exports.TypeInfo.TestPointReference +exports.TypeInfo.WorkItemTypeModel.fields = { + class: { + enumType: exports.TypeInfo.WorkItemTypeClass + }, + layout: { + typeInfo: exports.TypeInfo.FormLayout } }; -exports.TypeInfo.TestResult2.fields = { - creationDate: { - isDate: true, + + +/***/ }), + +/***/ 44524: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Indicates the customization-type. Customization-type is System if is system generated or by default. Customization-type is Inherited if the existing workitemtype of inherited process is customized. Customization-type is Custom if the newly created workitemtype is customized. + */ +var CustomizationType; +(function (CustomizationType) { + /** + * Customization-type is System if is system generated workitemtype. + */ + CustomizationType[CustomizationType["System"] = 1] = "System"; + /** + * Customization-type is Inherited if the existing workitemtype of inherited process is customized. + */ + CustomizationType[CustomizationType["Inherited"] = 2] = "Inherited"; + /** + * Customization-type is Custom if the newly created workitemtype is customized. + */ + CustomizationType[CustomizationType["Custom"] = 3] = "Custom"; +})(CustomizationType = exports.CustomizationType || (exports.CustomizationType = {})); +/** + * Enum for the type of a field. + */ +var FieldType; +(function (FieldType) { + /** + * String field type. + */ + FieldType[FieldType["String"] = 1] = "String"; + /** + * Integer field type. + */ + FieldType[FieldType["Integer"] = 2] = "Integer"; + /** + * DateTime field type. + */ + FieldType[FieldType["DateTime"] = 3] = "DateTime"; + /** + * Plain text field type. + */ + FieldType[FieldType["PlainText"] = 5] = "PlainText"; + /** + * HTML (Multiline) field type. + */ + FieldType[FieldType["Html"] = 7] = "Html"; + /** + * Treepath field type. + */ + FieldType[FieldType["TreePath"] = 8] = "TreePath"; + /** + * History field type. + */ + FieldType[FieldType["History"] = 9] = "History"; + /** + * Double field type. + */ + FieldType[FieldType["Double"] = 10] = "Double"; + /** + * Guid field type. + */ + FieldType[FieldType["Guid"] = 11] = "Guid"; + /** + * Boolean field type. + */ + FieldType[FieldType["Boolean"] = 12] = "Boolean"; + /** + * Identity field type. + */ + FieldType[FieldType["Identity"] = 13] = "Identity"; + /** + * Integer picklist field type. + */ + FieldType[FieldType["PicklistInteger"] = 14] = "PicklistInteger"; + /** + * String picklist field type. + */ + FieldType[FieldType["PicklistString"] = 15] = "PicklistString"; + /** + * Double picklist field type. + */ + FieldType[FieldType["PicklistDouble"] = 16] = "PicklistDouble"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +/** + * Expand options to fetch fields for behaviors API. + */ +var GetBehaviorsExpand; +(function (GetBehaviorsExpand) { + /** + * Default none option. + */ + GetBehaviorsExpand[GetBehaviorsExpand["None"] = 0] = "None"; + /** + * This option returns fields associated with a behavior. + */ + GetBehaviorsExpand[GetBehaviorsExpand["Fields"] = 1] = "Fields"; + /** + * This option returns fields associated with this behavior and all behaviors from which it inherits. + */ + GetBehaviorsExpand[GetBehaviorsExpand["CombinedFields"] = 2] = "CombinedFields"; +})(GetBehaviorsExpand = exports.GetBehaviorsExpand || (exports.GetBehaviorsExpand = {})); +/** + * The expand level of returned processes. + */ +var GetProcessExpandLevel; +(function (GetProcessExpandLevel) { + /** + * No expand level. + */ + GetProcessExpandLevel[GetProcessExpandLevel["None"] = 0] = "None"; + /** + * Projects expand level. + */ + GetProcessExpandLevel[GetProcessExpandLevel["Projects"] = 1] = "Projects"; +})(GetProcessExpandLevel = exports.GetProcessExpandLevel || (exports.GetProcessExpandLevel = {})); +/** + * Flag to define what properties to return in get work item type response. + */ +var GetWorkItemTypeExpand; +(function (GetWorkItemTypeExpand) { + /** + * Returns no properties in get work item type response. + */ + GetWorkItemTypeExpand[GetWorkItemTypeExpand["None"] = 0] = "None"; + /** + * Returns states property in get work item type response. + */ + GetWorkItemTypeExpand[GetWorkItemTypeExpand["States"] = 1] = "States"; + /** + * Returns behaviors property in get work item type response. + */ + GetWorkItemTypeExpand[GetWorkItemTypeExpand["Behaviors"] = 2] = "Behaviors"; + /** + * Returns layout property in get work item type response. + */ + GetWorkItemTypeExpand[GetWorkItemTypeExpand["Layout"] = 4] = "Layout"; +})(GetWorkItemTypeExpand = exports.GetWorkItemTypeExpand || (exports.GetWorkItemTypeExpand = {})); +/** + * Enum for the types of pages in the work item form layout + */ +var PageType; +(function (PageType) { + /** + * Custom page type. + */ + PageType[PageType["Custom"] = 1] = "Custom"; + /** + * History page type. + */ + PageType[PageType["History"] = 2] = "History"; + /** + * Link page type. + */ + PageType[PageType["Links"] = 3] = "Links"; + /** + * Attachment page type. + */ + PageType[PageType["Attachments"] = 4] = "Attachments"; +})(PageType = exports.PageType || (exports.PageType = {})); +var ProcessClass; +(function (ProcessClass) { + ProcessClass[ProcessClass["System"] = 0] = "System"; + ProcessClass[ProcessClass["Derived"] = 1] = "Derived"; + ProcessClass[ProcessClass["Custom"] = 2] = "Custom"; +})(ProcessClass = exports.ProcessClass || (exports.ProcessClass = {})); +/** + * Expand options for the work item field(s) request. + */ +var ProcessWorkItemTypeFieldsExpandLevel; +(function (ProcessWorkItemTypeFieldsExpandLevel) { + /** + * Includes only basic properties of the field. + */ + ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["None"] = 0] = "None"; + /** + * Includes allowed values for the field. + */ + ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["AllowedValues"] = 1] = "AllowedValues"; + /** + * Includes allowed values and dependent fields of the field. + */ + ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["All"] = 2] = "All"; +})(ProcessWorkItemTypeFieldsExpandLevel = exports.ProcessWorkItemTypeFieldsExpandLevel || (exports.ProcessWorkItemTypeFieldsExpandLevel = {})); +/** + * Type of action to take when the rule is triggered. + */ +var RuleActionType; +(function (RuleActionType) { + /** + * Make the target field required. Example : {"actionType":"$makeRequired","targetField":"Microsoft.VSTS.Common.Activity","value":""} + */ + RuleActionType[RuleActionType["MakeRequired"] = 1] = "MakeRequired"; + /** + * Make the target field read-only. Example : {"actionType":"$makeReadOnly","targetField":"Microsoft.VSTS.Common.Activity","value":""} + */ + RuleActionType[RuleActionType["MakeReadOnly"] = 2] = "MakeReadOnly"; + /** + * Set a default value on the target field. This is used if the user creates a integer/string field and sets a default value of this field. + */ + RuleActionType[RuleActionType["SetDefaultValue"] = 3] = "SetDefaultValue"; + /** + * Set the default value on the target field from server clock. This is used if user creates the field like Date/Time and uses default value. + */ + RuleActionType[RuleActionType["SetDefaultFromClock"] = 4] = "SetDefaultFromClock"; + /** + * Set the default current user value on the target field. This is used if the user creates the field of type identity and uses default value. + */ + RuleActionType[RuleActionType["SetDefaultFromCurrentUser"] = 5] = "SetDefaultFromCurrentUser"; + /** + * Set the default value on from existing field to the target field. This used wants to set a existing field value to the current field. + */ + RuleActionType[RuleActionType["SetDefaultFromField"] = 6] = "SetDefaultFromField"; + /** + * Set the value of target field to given value. Example : {actionType: "$copyValue", targetField: "ScrumInherited.mypicklist", value: "samplevalue"} + */ + RuleActionType[RuleActionType["CopyValue"] = 7] = "CopyValue"; + /** + * Set the value from clock. + */ + RuleActionType[RuleActionType["CopyFromClock"] = 8] = "CopyFromClock"; + /** + * Set the current user to the target field. Example : {"actionType":"$copyFromCurrentUser","targetField":"System.AssignedTo","value":""}. + */ + RuleActionType[RuleActionType["CopyFromCurrentUser"] = 9] = "CopyFromCurrentUser"; + /** + * Copy the value from a specified field and set to target field. Example : {actionType: "$copyFromField", targetField: "System.AssignedTo", value:"System.ChangedBy"}. Here, value is copied from "System.ChangedBy" and set to "System.AssingedTo" field. + */ + RuleActionType[RuleActionType["CopyFromField"] = 10] = "CopyFromField"; + /** + * Set the value of the target field to empty. + */ + RuleActionType[RuleActionType["SetValueToEmpty"] = 11] = "SetValueToEmpty"; + /** + * Use the current time to set the value of the target field. Example : {actionType: "$copyFromServerClock", targetField: "System.CreatedDate", value: ""} + */ + RuleActionType[RuleActionType["CopyFromServerClock"] = 12] = "CopyFromServerClock"; + /** + * Use the current user to set the value of the target field. + */ + RuleActionType[RuleActionType["CopyFromServerCurrentUser"] = 13] = "CopyFromServerCurrentUser"; + /** + * Hides target field from the form. This is a server side only action. + */ + RuleActionType[RuleActionType["HideTargetField"] = 14] = "HideTargetField"; + /** + * Disallows a field from being set to a specific value. + */ + RuleActionType[RuleActionType["DisallowValue"] = 15] = "DisallowValue"; +})(RuleActionType = exports.RuleActionType || (exports.RuleActionType = {})); +/** + * Type of rule condition. + */ +var RuleConditionType; +(function (RuleConditionType) { + /** + * $When. This condition limits the execution of its children to cases when another field has a particular value, i.e. when the Is value of the referenced field is equal to the given literal value. + */ + RuleConditionType[RuleConditionType["When"] = 1] = "When"; + /** + * $WhenNot.This condition limits the execution of its children to cases when another field does not have a particular value, i.e.when the Is value of the referenced field is not equal to the given literal value. + */ + RuleConditionType[RuleConditionType["WhenNot"] = 2] = "WhenNot"; + /** + * $WhenChanged.This condition limits the execution of its children to cases when another field has changed, i.e.when the Is value of the referenced field is not equal to the Was value of that field. + */ + RuleConditionType[RuleConditionType["WhenChanged"] = 3] = "WhenChanged"; + /** + * $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field. + */ + RuleConditionType[RuleConditionType["WhenNotChanged"] = 4] = "WhenNotChanged"; + RuleConditionType[RuleConditionType["WhenWas"] = 5] = "WhenWas"; + RuleConditionType[RuleConditionType["WhenStateChangedTo"] = 6] = "WhenStateChangedTo"; + RuleConditionType[RuleConditionType["WhenStateChangedFromAndTo"] = 7] = "WhenStateChangedFromAndTo"; + RuleConditionType[RuleConditionType["WhenWorkItemIsCreated"] = 8] = "WhenWorkItemIsCreated"; + RuleConditionType[RuleConditionType["WhenValueIsDefined"] = 9] = "WhenValueIsDefined"; + RuleConditionType[RuleConditionType["WhenValueIsNotDefined"] = 10] = "WhenValueIsNotDefined"; + RuleConditionType[RuleConditionType["WhenCurrentUserIsMemberOfGroup"] = 11] = "WhenCurrentUserIsMemberOfGroup"; + RuleConditionType[RuleConditionType["WhenCurrentUserIsNotMemberOfGroup"] = 12] = "WhenCurrentUserIsNotMemberOfGroup"; +})(RuleConditionType = exports.RuleConditionType || (exports.RuleConditionType = {})); +var WorkItemTypeClass; +(function (WorkItemTypeClass) { + WorkItemTypeClass[WorkItemTypeClass["System"] = 0] = "System"; + WorkItemTypeClass[WorkItemTypeClass["Derived"] = 1] = "Derived"; + WorkItemTypeClass[WorkItemTypeClass["Custom"] = 2] = "Custom"; +})(WorkItemTypeClass = exports.WorkItemTypeClass || (exports.WorkItemTypeClass = {})); +exports.TypeInfo = { + CreateProcessRuleRequest: {}, + CustomizationType: { + enumValues: { + "system": 1, + "inherited": 2, + "custom": 3 + } }, - dateCompleted: { - isDate: true, + FieldModel: {}, + FieldType: { + enumValues: { + "string": 1, + "integer": 2, + "dateTime": 3, + "plainText": 5, + "html": 7, + "treePath": 8, + "history": 9, + "double": 10, + "guid": 11, + "boolean": 12, + "identity": 13, + "picklistInteger": 14, + "picklistString": 15, + "picklistDouble": 16 + } }, - dateStarted: { - isDate: true, + FormLayout: {}, + GetBehaviorsExpand: { + enumValues: { + "none": 0, + "fields": 1, + "combinedFields": 2 + } }, - lastUpdated: { - isDate: true, - } + GetProcessExpandLevel: { + enumValues: { + "none": 0, + "projects": 1 + } + }, + GetWorkItemTypeExpand: { + enumValues: { + "none": 0, + "states": 1, + "behaviors": 2, + "layout": 4 + } + }, + Page: {}, + PageType: { + enumValues: { + "custom": 1, + "history": 2, + "links": 3, + "attachments": 4 + } + }, + ProcessBehavior: {}, + ProcessClass: { + enumValues: { + "system": 0, + "derived": 1, + "custom": 2 + } + }, + ProcessInfo: {}, + ProcessModel: {}, + ProcessProperties: {}, + ProcessRule: {}, + ProcessWorkItemType: {}, + ProcessWorkItemTypeField: {}, + ProcessWorkItemTypeFieldsExpandLevel: { + enumValues: { + "none": 0, + "allowedValues": 1, + "all": 2 + } + }, + RuleAction: {}, + RuleActionType: { + enumValues: { + "makeRequired": 1, + "makeReadOnly": 2, + "setDefaultValue": 3, + "setDefaultFromClock": 4, + "setDefaultFromCurrentUser": 5, + "setDefaultFromField": 6, + "copyValue": 7, + "copyFromClock": 8, + "copyFromCurrentUser": 9, + "copyFromField": 10, + "setValueToEmpty": 11, + "copyFromServerClock": 12, + "copyFromServerCurrentUser": 13, + "hideTargetField": 14, + "disallowValue": 15 + } + }, + RuleCondition: {}, + RuleConditionType: { + enumValues: { + "when": 1, + "whenNot": 2, + "whenChanged": 3, + "whenNotChanged": 4, + "whenWas": 5, + "whenStateChangedTo": 6, + "whenStateChangedFromAndTo": 7, + "whenWorkItemIsCreated": 8, + "whenValueIsDefined": 9, + "whenValueIsNotDefined": 10, + "whenCurrentUserIsMemberOfGroup": 11, + "whenCurrentUserIsNotMemberOfGroup": 12 + } + }, + UpdateProcessRuleRequest: {}, + WorkItemStateResultModel: {}, + WorkItemTypeClass: { + enumValues: { + "system": 0, + "derived": 1, + "custom": 2 + } + }, + WorkItemTypeModel: {}, }; -exports.TypeInfo.TestResultAcrossProjectResponse.fields = { - testResult: { - typeInfo: exports.TypeInfo.LegacyTestCaseResult +exports.TypeInfo.CreateProcessRuleRequest.fields = { + actions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleAction + }, + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleCondition } }; -exports.TypeInfo.TestResultAttachment.fields = { - attachmentType: { - enumType: exports.TypeInfo.AttachmentType - }, - creationDate: { - isDate: true, +exports.TypeInfo.FieldModel.fields = { + type: { + enumType: exports.TypeInfo.FieldType } }; -exports.TypeInfo.TestResultHistory.fields = { - resultsForGroup: { +exports.TypeInfo.FormLayout.fields = { + pages: { isArray: true, - typeInfo: exports.TypeInfo.TestResultHistoryDetailsForGroup + typeInfo: exports.TypeInfo.Page } }; -exports.TypeInfo.TestResultHistoryDetailsForGroup.fields = { - latestResult: { - typeInfo: exports.TypeInfo.TestCaseResult +exports.TypeInfo.Page.fields = { + pageType: { + enumType: exports.TypeInfo.PageType } }; -exports.TypeInfo.TestResultHistoryForGroup.fields = { - results: { - isArray: true, - typeInfo: exports.TypeInfo.TestCaseResult +exports.TypeInfo.ProcessBehavior.fields = { + customization: { + enumType: exports.TypeInfo.CustomizationType } }; -exports.TypeInfo.TestResultModelBase.fields = { - completedDate: { - isDate: true, - }, - startedDate: { - isDate: true, +exports.TypeInfo.ProcessInfo.fields = { + customizationType: { + enumType: exports.TypeInfo.CustomizationType } }; -exports.TypeInfo.TestResultReset2.fields = { - dateModified: { - isDate: true, +exports.TypeInfo.ProcessModel.fields = { + properties: { + typeInfo: exports.TypeInfo.ProcessProperties } }; -exports.TypeInfo.TestResultsContext.fields = { - contextType: { - enumType: exports.TypeInfo.TestResultsContextType - }, - release: { - typeInfo: exports.TypeInfo.ReleaseReference +exports.TypeInfo.ProcessProperties.fields = { + class: { + enumType: exports.TypeInfo.ProcessClass } }; -exports.TypeInfo.TestResultsDetails.fields = { - resultsForGroup: { +exports.TypeInfo.ProcessRule.fields = { + actions: { isArray: true, - typeInfo: exports.TypeInfo.TestResultsDetailsForGroup - } -}; -exports.TypeInfo.TestResultsDetailsForGroup.fields = { - results: { + typeInfo: exports.TypeInfo.RuleAction + }, + conditions: { isArray: true, - typeInfo: exports.TypeInfo.TestCaseResult + typeInfo: exports.TypeInfo.RuleCondition }, - resultsCountByOutcome: { - isDictionary: true, - dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, - dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome + customizationType: { + enumType: exports.TypeInfo.CustomizationType } }; -exports.TypeInfo.TestResultsEx2.fields = { - creationDate: { - isDate: true, +exports.TypeInfo.ProcessWorkItemType.fields = { + customization: { + enumType: exports.TypeInfo.CustomizationType }, - dateTimeValue: { - isDate: true, - } -}; -exports.TypeInfo.TestResultsQuery.fields = { - results: { - isArray: true, - typeInfo: exports.TypeInfo.TestCaseResult + layout: { + typeInfo: exports.TypeInfo.FormLayout }, - resultsFilter: { - typeInfo: exports.TypeInfo.ResultsFilter + states: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemStateResultModel } }; -exports.TypeInfo.TestResultsSettings.fields = { - flakySettings: { - typeInfo: exports.TypeInfo.FlakySettings +exports.TypeInfo.ProcessWorkItemTypeField.fields = { + customization: { + enumType: exports.TypeInfo.CustomizationType + }, + type: { + enumType: exports.TypeInfo.FieldType } }; -exports.TypeInfo.TestResultSummary.fields = { - aggregatedResultsAnalysis: { - typeInfo: exports.TypeInfo.AggregatedResultsAnalysis - }, - teamProject: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - }, - testFailures: { - typeInfo: exports.TypeInfo.TestFailuresAnalysis - }, - testResultsContext: { - typeInfo: exports.TypeInfo.TestResultsContext +exports.TypeInfo.RuleAction.fields = { + actionType: { + enumType: exports.TypeInfo.RuleActionType } }; -exports.TypeInfo.TestResultsUpdateSettings.fields = { - flakySettings: { - typeInfo: exports.TypeInfo.FlakySettings +exports.TypeInfo.RuleCondition.fields = { + conditionType: { + enumType: exports.TypeInfo.RuleConditionType } }; -exports.TypeInfo.TestResultsWithWatermark.fields = { - changedDate: { - isDate: true, +exports.TypeInfo.UpdateProcessRuleRequest.fields = { + actions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleAction }, - pointsResults: { + conditions: { isArray: true, - typeInfo: exports.TypeInfo.PointsResults2 + typeInfo: exports.TypeInfo.RuleCondition } }; -exports.TypeInfo.TestResultTrendFilter.fields = { - maxCompleteDate: { - isDate: true, +exports.TypeInfo.WorkItemStateResultModel.fields = { + customizationType: { + enumType: exports.TypeInfo.CustomizationType } }; -exports.TypeInfo.TestRun.fields = { - buildConfiguration: { - typeInfo: exports.TypeInfo.BuildConfiguration +exports.TypeInfo.WorkItemTypeModel.fields = { + class: { + enumType: exports.TypeInfo.WorkItemTypeClass }, - completedDate: { - isDate: true, + layout: { + typeInfo: exports.TypeInfo.FormLayout }, - createdDate: { - isDate: true, + states: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemStateResultModel + } +}; + + +/***/ }), + +/***/ 43627: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +* +* See following wiki page for instructions on how to regenerate: +* https://vsowiki.com/index.php?title=Rest_Client_Generation +*/ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var InputDataType; +(function (InputDataType) { + /** + * No data type is specified. + */ + InputDataType[InputDataType["None"] = 0] = "None"; + /** + * Represents a textual value. + */ + InputDataType[InputDataType["String"] = 10] = "String"; + /** + * Represents a numberic value. + */ + InputDataType[InputDataType["Number"] = 20] = "Number"; + /** + * Represents a value of true or false. + */ + InputDataType[InputDataType["Boolean"] = 30] = "Boolean"; + /** + * Represents a Guid. + */ + InputDataType[InputDataType["Guid"] = 40] = "Guid"; + /** + * Represents a URI. + */ + InputDataType[InputDataType["Uri"] = 50] = "Uri"; +})(InputDataType = exports.InputDataType || (exports.InputDataType = {})); +var InputFilterOperator; +(function (InputFilterOperator) { + InputFilterOperator[InputFilterOperator["Equals"] = 0] = "Equals"; + InputFilterOperator[InputFilterOperator["NotEquals"] = 1] = "NotEquals"; +})(InputFilterOperator = exports.InputFilterOperator || (exports.InputFilterOperator = {})); +var InputMode; +(function (InputMode) { + /** + * This input should not be shown in the UI + */ + InputMode[InputMode["None"] = 0] = "None"; + /** + * An input text box should be shown + */ + InputMode[InputMode["TextBox"] = 10] = "TextBox"; + /** + * An password input box should be shown + */ + InputMode[InputMode["PasswordBox"] = 20] = "PasswordBox"; + /** + * A select/combo control should be shown + */ + InputMode[InputMode["Combo"] = 30] = "Combo"; + /** + * Radio buttons should be shown + */ + InputMode[InputMode["RadioButtons"] = 40] = "RadioButtons"; + /** + * Checkbox should be shown(for true/false values) + */ + InputMode[InputMode["CheckBox"] = 50] = "CheckBox"; + /** + * A multi-line text area should be shown + */ + InputMode[InputMode["TextArea"] = 60] = "TextArea"; +})(InputMode = exports.InputMode || (exports.InputMode = {})); +exports.TypeInfo = { + InputDataType: { + enumValues: { + "none": 0, + "string": 10, + "number": 20, + "boolean": 30, + "guid": 40, + "uri": 50, + } }, - dueDate: { - isDate: true, + InputDescriptor: { + fields: null }, - lastUpdatedDate: { - isDate: true, + InputFilter: { + fields: null }, - release: { - typeInfo: exports.TypeInfo.ReleaseReference + InputFilterCondition: { + fields: null }, - runStatistics: { - isArray: true, - typeInfo: exports.TypeInfo.RunStatistic + InputFilterOperator: { + enumValues: { + "equals": 0, + "notEquals": 1, + } }, - startedDate: { - isDate: true, + InputMode: { + enumValues: { + "none": 0, + "textBox": 10, + "passwordBox": 20, + "combo": 30, + "radioButtons": 40, + "checkBox": 50, + "textArea": 60, + } }, - substate: { - enumType: exports.TypeInfo.TestRunSubstate - } -}; -exports.TypeInfo.TestRun2.fields = { - completeDate: { - isDate: true, + InputValidation: { + fields: null }, - creationDate: { - isDate: true, + InputValue: { + fields: null }, - deletedOn: { - isDate: true, + InputValues: { + fields: null }, - dueDate: { - isDate: true, + InputValuesError: { + fields: null }, - lastUpdated: { - isDate: true, + InputValuesQuery: { + fields: null }, - startDate: { - isDate: true, - } -}; -exports.TypeInfo.TestRunCanceledEvent.fields = { - testRun: { - typeInfo: exports.TypeInfo.TestRun - } -}; -exports.TypeInfo.TestRunCreatedEvent.fields = { - testRun: { - typeInfo: exports.TypeInfo.TestRun - } -}; -exports.TypeInfo.TestRunEvent.fields = { - testRun: { - typeInfo: exports.TypeInfo.TestRun - } }; -exports.TypeInfo.TestRunEx2.fields = { - createdDate: { - isDate: true, +exports.TypeInfo.InputDescriptor.fields = { + inputMode: { + enumType: exports.TypeInfo.InputMode + }, + validation: { + typeInfo: exports.TypeInfo.InputValidation + }, + values: { + typeInfo: exports.TypeInfo.InputValues }, - dateTimeValue: { - isDate: true, - } -}; -exports.TypeInfo.TestRunStartedEvent.fields = { - testRun: { - typeInfo: exports.TypeInfo.TestRun - } }; -exports.TypeInfo.TestRunStatistic.fields = { - runStatistics: { +exports.TypeInfo.InputFilter.fields = { + conditions: { isArray: true, - typeInfo: exports.TypeInfo.RunStatistic - } + typeInfo: exports.TypeInfo.InputFilterCondition + }, }; -exports.TypeInfo.TestRunSummary2.fields = { - testRunCompletedDate: { - isDate: true, - } +exports.TypeInfo.InputFilterCondition.fields = { + operator: { + enumType: exports.TypeInfo.InputFilterOperator + }, }; -exports.TypeInfo.TestRunWithDtlEnvEvent.fields = { - testRun: { - typeInfo: exports.TypeInfo.TestRun - } +exports.TypeInfo.InputValidation.fields = { + dataType: { + enumType: exports.TypeInfo.InputDataType + }, }; -exports.TypeInfo.TestSession.fields = { - endDate: { - isDate: true, +exports.TypeInfo.InputValue.fields = {}; +exports.TypeInfo.InputValues.fields = { + error: { + typeInfo: exports.TypeInfo.InputValuesError }, - lastUpdatedDate: { - isDate: true, + possibleValues: { + isArray: true, + typeInfo: exports.TypeInfo.InputValue }, - source: { - enumType: exports.TypeInfo.TestSessionSource +}; +exports.TypeInfo.InputValuesError.fields = {}; +exports.TypeInfo.InputValuesQuery.fields = { + inputValues: { + isArray: true, + typeInfo: exports.TypeInfo.InputValues }, - startDate: { - isDate: true, +}; + + +/***/ }), + +/***/ 63052: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var OperationStatus; +(function (OperationStatus) { + /** + * The operation object does not have the status set. + */ + OperationStatus[OperationStatus["NotSet"] = 0] = "NotSet"; + /** + * The operation has been queued. + */ + OperationStatus[OperationStatus["Queued"] = 1] = "Queued"; + /** + * The operation is in progress. + */ + OperationStatus[OperationStatus["InProgress"] = 2] = "InProgress"; + /** + * The operation was cancelled by the user. + */ + OperationStatus[OperationStatus["Cancelled"] = 3] = "Cancelled"; + /** + * The operation completed successfully. + */ + OperationStatus[OperationStatus["Succeeded"] = 4] = "Succeeded"; + /** + * The operation completed with a failure. + */ + OperationStatus[OperationStatus["Failed"] = 5] = "Failed"; +})(OperationStatus = exports.OperationStatus || (exports.OperationStatus = {})); +exports.TypeInfo = { + OperationReference: { + fields: null + }, + OperationStatus: { + enumValues: { + "notSet": 0, + "queued": 1, + "inProgress": 2, + "cancelled": 3, + "succeeded": 4, + "failed": 5, + } }, - state: { - enumType: exports.TypeInfo.TestSessionState - } }; -exports.TypeInfo.TestSessionExploredWorkItemReference.fields = { - endTime: { - isDate: true, +exports.TypeInfo.OperationReference.fields = { + status: { + enumType: exports.TypeInfo.OperationStatus }, - startTime: { - isDate: true, +}; + + +/***/ }), + +/***/ 66790: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DayOfWeek; +(function (DayOfWeek) { + /** + * Indicates Sunday. + */ + DayOfWeek[DayOfWeek["Sunday"] = 0] = "Sunday"; + /** + * Indicates Monday. + */ + DayOfWeek[DayOfWeek["Monday"] = 1] = "Monday"; + /** + * Indicates Tuesday. + */ + DayOfWeek[DayOfWeek["Tuesday"] = 2] = "Tuesday"; + /** + * Indicates Wednesday. + */ + DayOfWeek[DayOfWeek["Wednesday"] = 3] = "Wednesday"; + /** + * Indicates Thursday. + */ + DayOfWeek[DayOfWeek["Thursday"] = 4] = "Thursday"; + /** + * Indicates Friday. + */ + DayOfWeek[DayOfWeek["Friday"] = 5] = "Friday"; + /** + * Indicates Saturday. + */ + DayOfWeek[DayOfWeek["Saturday"] = 6] = "Saturday"; +})(DayOfWeek = exports.DayOfWeek || (exports.DayOfWeek = {})); +exports.TypeInfo = { + DayOfWeek: { + enumValues: { + "sunday": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 3, + "thursday": 4, + "friday": 5, + "saturday": 6 + } } }; -exports.TypeInfo.TestSettings2.fields = { - createdDate: { - isDate: true, - }, - lastUpdatedDate: { - isDate: true, + + +/***/ }), + +/***/ 64652: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +//---------------------------------------------------------- +// Copyright (C) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------- +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Specifies SQL Server-specific data type of a field, property, for use in a System.Data.SqlClient.SqlParameter. + */ +var SqlDbType; +(function (SqlDbType) { + /** + * A 64-bit signed integer. + */ + SqlDbType[SqlDbType["BigInt"] = 0] = "BigInt"; + /** + * Array of type Byte. A fixed-length stream of binary data ranging between 1 and 8,000 bytes. + */ + SqlDbType[SqlDbType["Binary"] = 1] = "Binary"; + /** + * Boolean. An unsigned numeric value that can be 0, 1, or null. + */ + SqlDbType[SqlDbType["Bit"] = 2] = "Bit"; + /** + * String. A fixed-length stream of non-Unicode characters ranging between 1 and 8,000 characters. + */ + SqlDbType[SqlDbType["Char"] = 3] = "Char"; + /** + * DateTime. Date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds. + */ + SqlDbType[SqlDbType["DateTime"] = 4] = "DateTime"; + /** + * Decimal. A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1. + */ + SqlDbType[SqlDbType["Decimal"] = 5] = "Decimal"; + /** + * Double. A floating point number within the range of -1.79E +308 through 1.79E +308. + */ + SqlDbType[SqlDbType["Float"] = 6] = "Float"; + /** + * Array of type Byte. A variable-length stream of binary data ranging from 0 to 2 31 -1 (or 2,147,483,647) bytes. + */ + SqlDbType[SqlDbType["Image"] = 7] = "Image"; + /** + * Int32. A 32-bit signed integer. + */ + SqlDbType[SqlDbType["Int"] = 8] = "Int"; + /** + * Decimal. A currency value ranging from -2 63 (or -9,223,372,036,854,775,808) to 2 63 -1 (or +9,223,372,036,854,775,807) with an accuracy to a ten-thousandth of a currency unit. + */ + SqlDbType[SqlDbType["Money"] = 9] = "Money"; + /** + * String. A fixed-length stream of Unicode characters ranging between 1 and 4,000 characters. + */ + SqlDbType[SqlDbType["NChar"] = 10] = "NChar"; + /** + * String. A variable-length stream of Unicode data with a maximum length of 2 30 - 1 (or 1,073,741,823) characters. + */ + SqlDbType[SqlDbType["NText"] = 11] = "NText"; + /** + * String. A variable-length stream of Unicode characters ranging between 1 and 4,000 characters. Implicit conversion fails if the string is greater than 4,000 characters. Explicitly set the object when working with strings longer than 4,000 characters. Use System.Data.SqlDbType.NVarChar when the database column is nvarchar(max). + */ + SqlDbType[SqlDbType["NVarChar"] = 12] = "NVarChar"; + /** + * Single. A floating point number within the range of -3.40E +38 through 3.40E +38. + */ + SqlDbType[SqlDbType["Real"] = 13] = "Real"; + /** + * Guid. A globally unique identifier (or GUID). + */ + SqlDbType[SqlDbType["UniqueIdentifier"] = 14] = "UniqueIdentifier"; + /** + * DateTime. Date and time data ranging in value from January 1, 1900 to June 6, 2079 to an accuracy of one minute. + */ + SqlDbType[SqlDbType["SmallDateTime"] = 15] = "SmallDateTime"; + /** + * Int16. A 16-bit signed integer. + */ + SqlDbType[SqlDbType["SmallInt"] = 16] = "SmallInt"; + /** + * Decimal. A currency value ranging from -214,748.3648 to +214,748.3647 with an accuracy to a ten-thousandth of a currency unit. + */ + SqlDbType[SqlDbType["SmallMoney"] = 17] = "SmallMoney"; + /** + * String. A variable-length stream of non-Unicode data with a maximum length of 2 31 -1 (or 2,147,483,647) characters. + */ + SqlDbType[SqlDbType["Text"] = 18] = "Text"; + /** + * Array of type System.Byte. Automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes. + */ + SqlDbType[SqlDbType["Timestamp"] = 19] = "Timestamp"; + /** + * Byte. An 8-bit unsigned integer. + */ + SqlDbType[SqlDbType["TinyInt"] = 20] = "TinyInt"; + /** + * Array of type Byte. A variable-length stream of binary data ranging between 1 and 8,000 bytes. Implicit conversion fails if the byte array is greater than 8,000 bytes. Explicitly set the object when working with byte arrays larger than 8,000 bytes. + */ + SqlDbType[SqlDbType["VarBinary"] = 21] = "VarBinary"; + /** + * String. A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters. Use System.Data.SqlDbType.VarChar when the database column is varchar(max). + */ + SqlDbType[SqlDbType["VarChar"] = 22] = "VarChar"; + /** + * Object. A special data type that can contain numeric, string, binary, or date data as well as the SQL Server values Empty and Null, which is assumed if no other type is declared. + */ + SqlDbType[SqlDbType["Variant"] = 23] = "Variant"; + /** + * An XML value. Obtain the XML as a string using the System.Data.SqlClient.SqlDataReader.GetValue(System.Int32) method or System.Data.SqlTypes.SqlXml.Value property, or as an System.Xml.XmlReader by calling the System.Data.SqlTypes.SqlXml.CreateReader method. + */ + SqlDbType[SqlDbType["Xml"] = 25] = "Xml"; + /** + * A SQL Server user-defined type (UDT). + */ + SqlDbType[SqlDbType["Udt"] = 29] = "Udt"; + /** + * A special data type for specifying structured data contained in table-valued parameters. + */ + SqlDbType[SqlDbType["Structured"] = 30] = "Structured"; + /** + * Date data ranging in value from January 1,1 AD through December 31, 9999 AD. + */ + SqlDbType[SqlDbType["Date"] = 31] = "Date"; + /** + * Time data based on a 24-hour clock. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Corresponds to a SQL Server time value. + */ + SqlDbType[SqlDbType["Time"] = 32] = "Time"; + /** + * Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. + */ + SqlDbType[SqlDbType["DateTime2"] = 33] = "DateTime2"; + /** + * Date and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range is -14:00 through +14:00. + */ + SqlDbType[SqlDbType["DateTimeOffset"] = 34] = "DateTimeOffset"; +})(SqlDbType = exports.SqlDbType || (exports.SqlDbType = {})); +exports.TypeInfo = { + SqlDbType: { + enumValues: { + "BigInt": 0, + "Binary": 1, + "Bit": 2, + "Char": 3, + "DateTime": 4, + "Decimal": 5, + "Float": 6, + "Image": 7, + "Int": 8, + "Money": 9, + "NChar": 10, + "NText": 11, + "NVarChar": 12, + "Real": 13, + "UniqueIdentifier": 14, + "SmallDateTime": 15, + "SmallInt": 16, + "SmallMoney": 17, + "Text": 18, + "Timestamp": 19, + "TinyInt": 20, + "VarBinary": 21, + "VarChar": 22, + "Variant": 23, + "Xml": 25, + "Udt": 29, + "Structured": 30, + "Date": 31, + "Time": 32, + "DateTime2": 33, + "DateTimeOffset": 34 + } } }; -exports.TypeInfo.TestSubResult.fields = { - completedDate: { - isDate: true, - }, - lastUpdatedDate: { - isDate: true, - }, - resultGroupType: { - enumType: exports.TypeInfo.ResultGroupType + + +/***/ }), + +/***/ 94498: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Enumeration of the options that can be passed in on Connect. + */ +var ConnectOptions; +(function (ConnectOptions) { + /** + * Retrieve no optional data. + */ + ConnectOptions[ConnectOptions["None"] = 0] = "None"; + /** + * Includes information about AccessMappings and ServiceDefinitions. + */ + ConnectOptions[ConnectOptions["IncludeServices"] = 1] = "IncludeServices"; + /** + * Includes the last user access for this host. + */ + ConnectOptions[ConnectOptions["IncludeLastUserAccess"] = 2] = "IncludeLastUserAccess"; + /** + * This is only valid on the deployment host and when true. Will only return inherited definitions. + */ + ConnectOptions[ConnectOptions["IncludeInheritedDefinitionsOnly"] = 4] = "IncludeInheritedDefinitionsOnly"; + /** + * When true will only return non inherited definitions. Only valid at non-deployment host. + */ + ConnectOptions[ConnectOptions["IncludeNonInheritedDefinitionsOnly"] = 8] = "IncludeNonInheritedDefinitionsOnly"; +})(ConnectOptions = exports.ConnectOptions || (exports.ConnectOptions = {})); +var DeploymentFlags; +(function (DeploymentFlags) { + DeploymentFlags[DeploymentFlags["None"] = 0] = "None"; + DeploymentFlags[DeploymentFlags["Hosted"] = 1] = "Hosted"; + DeploymentFlags[DeploymentFlags["OnPremises"] = 2] = "OnPremises"; +})(DeploymentFlags = exports.DeploymentFlags || (exports.DeploymentFlags = {})); +var JWTAlgorithm; +(function (JWTAlgorithm) { + JWTAlgorithm[JWTAlgorithm["None"] = 0] = "None"; + JWTAlgorithm[JWTAlgorithm["HS256"] = 1] = "HS256"; + JWTAlgorithm[JWTAlgorithm["RS256"] = 2] = "RS256"; +})(JWTAlgorithm = exports.JWTAlgorithm || (exports.JWTAlgorithm = {})); +var Operation; +(function (Operation) { + Operation[Operation["Add"] = 0] = "Add"; + Operation[Operation["Remove"] = 1] = "Remove"; + Operation[Operation["Replace"] = 2] = "Replace"; + Operation[Operation["Move"] = 3] = "Move"; + Operation[Operation["Copy"] = 4] = "Copy"; + Operation[Operation["Test"] = 5] = "Test"; +})(Operation = exports.Operation || (exports.Operation = {})); +exports.TypeInfo = { + ConnectOptions: { + enumValues: { + "none": 0, + "includeServices": 1, + "includeLastUserAccess": 2, + "includeInheritedDefinitionsOnly": 4, + "includeNonInheritedDefinitionsOnly": 8 + } }, - startedDate: { - isDate: true, + DeploymentFlags: { + enumValues: { + "none": 0, + "hosted": 1, + "onPremises": 2 + } }, - subResults: { - isArray: true, - typeInfo: exports.TypeInfo.TestSubResult - } -}; -exports.TypeInfo.TestSuite.fields = { - children: { - isArray: true, - typeInfo: exports.TypeInfo.TestSuite + JsonPatchOperation: {}, + JWTAlgorithm: { + enumValues: { + "none": 0, + "hS256": 1, + "rS256": 2 + } }, - lastPopulatedDate: { - isDate: true, + Operation: { + enumValues: { + "add": 0, + "remove": 1, + "replace": 2, + "move": 3, + "copy": 4, + "test": 5 + } }, - lastUpdatedDate: { - isDate: true, - } + SignedUrl: {}, + TraceFilter: {}, + VssNotificationEvent: {}, }; -exports.TypeInfo.TestSummaryForWorkItem.fields = { - summary: { - typeInfo: exports.TypeInfo.AggregatedDataForResultTrend +exports.TypeInfo.JsonPatchOperation.fields = { + op: { + enumType: exports.TypeInfo.Operation } }; -exports.TypeInfo.UpdatedProperties.fields = { - lastUpdated: { +exports.TypeInfo.SignedUrl.fields = { + signatureExpires: { isDate: true, } }; -exports.TypeInfo.UpdateTestRunRequest.fields = { - attachmentsToAdd: { - isArray: true, - typeInfo: exports.TypeInfo.TestResultAttachment - }, - testRun: { - typeInfo: exports.TypeInfo.LegacyTestRun - } -}; -exports.TypeInfo.UpdateTestRunResponse.fields = { - updatedProperties: { - typeInfo: exports.TypeInfo.UpdatedProperties +exports.TypeInfo.TraceFilter.fields = { + timeCreated: { + isDate: true, } }; -exports.TypeInfo.WorkItemToTestLinks.fields = { - executedIn: { - enumType: exports.TypeInfo.Service +exports.TypeInfo.VssNotificationEvent.fields = { + sourceEventCreatedTime: { + isDate: true, } }; -/***/ }), +/***/ }), + +/***/ 36526: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports._exposeCertSettings = exports._exposeProxySettings = exports._normalizeSeparators = exports._isRooted = exports._getDirectoryName = exports._ensureRooted = exports._isUncPath = exports._loadData = exports._ensurePatternRooted = exports._getFindInfoFromPattern = exports._cloneMatchOptions = exports._legacyFindFiles_convertPatternToRegExp = exports._which = exports._checkPath = exports._exist = exports._debug = exports._error = exports._warning = exports._command = exports._getVariableKey = exports._getVariable = exports._loc = exports._setResourcePath = exports._setErrStream = exports._setStdStream = exports._writeLine = exports._endsWith = exports._startsWith = exports._vault = exports._knownVariableMap = void 0; +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); +var os = __nccwpck_require__(22037); +var minimatch = __nccwpck_require__(83973); +var util = __nccwpck_require__(73837); +var tcm = __nccwpck_require__(33011); +var vm = __nccwpck_require__(26007); +var semver = __nccwpck_require__(80242); +var crypto = __nccwpck_require__(6113); +/** + * Hash table of known variable info. The formatted env var name is the lookup key. + * + * The purpose of this hash table is to keep track of known variables. The hash table + * needs to be maintained for multiple reasons: + * 1) to distinguish between env vars and job vars + * 2) to distinguish between secret vars and public + * 3) to know the real variable name and not just the formatted env var name. + */ +exports._knownVariableMap = {}; +//----------------------------------------------------- +// Validation Checks +//----------------------------------------------------- +// async await needs generators in node 4.x+ +if (semver.lt(process.versions.node, '4.2.0')) { + _warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later'); +} +//----------------------------------------------------- +// String convenience +//----------------------------------------------------- +function _startsWith(str, start) { + return str.slice(0, start.length) == start; +} +exports._startsWith = _startsWith; +function _endsWith(str, end) { + return str.slice(-end.length) == end; +} +exports._endsWith = _endsWith; +//----------------------------------------------------- +// General Helpers +//----------------------------------------------------- +var _outStream = process.stdout; +var _errStream = process.stderr; +function _writeLine(str) { + _outStream.write(str + os.EOL); +} +exports._writeLine = _writeLine; +function _setStdStream(stdStream) { + _outStream = stdStream; +} +exports._setStdStream = _setStdStream; +function _setErrStream(errStream) { + _errStream = errStream; +} +exports._setErrStream = _setErrStream; +//----------------------------------------------------- +// Loc Helpers +//----------------------------------------------------- +var _locStringCache = {}; +var _resourceFiles = {}; +var _libResourceFileLoaded = false; +var _resourceCulture = 'en-US'; +function _loadResJson(resjsonFile) { + var resJson; + if (_exist(resjsonFile)) { + var resjsonContent = fs.readFileSync(resjsonFile, 'utf8').toString(); + // remove BOM + if (resjsonContent.indexOf('\uFEFF') == 0) { + resjsonContent = resjsonContent.slice(1); + } + try { + resJson = JSON.parse(resjsonContent); + } + catch (err) { + _debug('unable to parse resjson with err: ' + err.message); + } + } + else { + _debug('.resjson file not found: ' + resjsonFile); + } + return resJson; +} +function _loadLocStrings(resourceFile, culture) { + var locStrings = {}; + if (_exist(resourceFile)) { + var resourceJson = require(resourceFile); + if (resourceJson && resourceJson.hasOwnProperty('messages')) { + var locResourceJson; + // load up resource resjson for different culture + var localizedResourceFile = path.join(path.dirname(resourceFile), 'Strings', 'resources.resjson'); + var upperCulture = culture.toUpperCase(); + var cultures = []; + try { + cultures = fs.readdirSync(localizedResourceFile); + } + catch (ex) { } + for (var i = 0; i < cultures.length; i++) { + if (cultures[i].toUpperCase() == upperCulture) { + localizedResourceFile = path.join(localizedResourceFile, cultures[i], 'resources.resjson'); + if (_exist(localizedResourceFile)) { + locResourceJson = _loadResJson(localizedResourceFile); + } + break; + } + } + for (var key in resourceJson.messages) { + if (locResourceJson && locResourceJson.hasOwnProperty('loc.messages.' + key)) { + locStrings[key] = locResourceJson['loc.messages.' + key]; + } + else { + locStrings[key] = resourceJson.messages[key]; + } + } + } + } + else { + _warning('LIB_ResourceFile does not exist'); + } + return locStrings; +} +/** + * Sets the location of the resources json. This is typically the task.json file. + * Call once at the beginning of the script before any calls to loc. + * @param path Full path to the json. + * @param ignoreWarnings Won't throw warnings if path already set. + * @returns void + */ +function _setResourcePath(path, ignoreWarnings) { + if (ignoreWarnings === void 0) { ignoreWarnings = false; } + if (process.env['TASKLIB_INPROC_UNITS']) { + _resourceFiles = {}; + _libResourceFileLoaded = false; + _locStringCache = {}; + _resourceCulture = 'en-US'; + } + if (!_resourceFiles[path]) { + _checkPath(path, 'resource file path'); + _resourceFiles[path] = path; + _debug('adding resource file: ' + path); + _resourceCulture = _getVariable('system.culture') || _resourceCulture; + var locStrs = _loadLocStrings(path, _resourceCulture); + for (var key in locStrs) { + //cache loc string + _locStringCache[key] = locStrs[key]; + } + } + else { + if (ignoreWarnings) { + _debug(_loc('LIB_ResourceFileAlreadySet', path)); + } + else { + _warning(_loc('LIB_ResourceFileAlreadySet', path)); + } + } +} +exports._setResourcePath = _setResourcePath; +/** + * Gets the localized string from the json resource file. Optionally formats with additional params. + * + * @param key key of the resources string in the resource file + * @param param additional params for formatting the string + * @returns string + */ +function _loc(key) { + var param = []; + for (var _i = 1; _i < arguments.length; _i++) { + param[_i - 1] = arguments[_i]; + } + if (!_libResourceFileLoaded) { + // merge loc strings from azure-pipelines-task-lib. + var libResourceFile = __nccwpck_require__.ab + "lib.json"; + var libLocStrs = _loadLocStrings(__nccwpck_require__.ab + "lib.json", _resourceCulture); + for (var libKey in libLocStrs) { + //cache azure-pipelines-task-lib loc string + _locStringCache[libKey] = libLocStrs[libKey]; + } + _libResourceFileLoaded = true; + } + var locString; + ; + if (_locStringCache.hasOwnProperty(key)) { + locString = _locStringCache[key]; + } + else { + if (Object.keys(_resourceFiles).length <= 0) { + _warning("Resource file haven't been set, can't find loc string for key: " + key); + } + else { + _warning("Can't find loc string for key: " + key); + } + locString = key; + } + if (param.length > 0) { + return util.format.apply(this, [locString].concat(param)); + } + else { + return locString; + } +} +exports._loc = _loc; +//----------------------------------------------------- +// Input Helpers +//----------------------------------------------------- +/** + * Gets a variable value that is defined on the build/release definition or set at runtime. + * + * @param name name of the variable to get + * @returns string + */ +function _getVariable(name) { + var varval; + // get the metadata + var info; + var key = _getVariableKey(name); + if (exports._knownVariableMap.hasOwnProperty(key)) { + info = exports._knownVariableMap[key]; + } + if (info && info.secret) { + // get the secret value + varval = exports._vault.retrieveSecret('SECRET_' + key); + } + else { + // get the public value + varval = process.env[key]; + // fallback for pre 2.104.1 agent + if (!varval && name.toUpperCase() == 'AGENT.JOBSTATUS') { + varval = process.env['agent.jobstatus']; + } + } + _debug(name + '=' + varval); + return varval; +} +exports._getVariable = _getVariable; +function _getVariableKey(name) { + if (!name) { + throw new Error(_loc('LIB_ParameterIsRequired', 'name')); + } + return name.replace(/\./g, '_').replace(/ /g, '_').toUpperCase(); +} +exports._getVariableKey = _getVariableKey; +//----------------------------------------------------- +// Cmd Helpers +//----------------------------------------------------- +function _command(command, properties, message) { + var taskCmd = new tcm.TaskCommand(command, properties, message); + _writeLine(taskCmd.toString()); +} +exports._command = _command; +function _warning(message) { + _command('task.issue', { 'type': 'warning' }, message); +} +exports._warning = _warning; +function _error(message) { + _command('task.issue', { 'type': 'error' }, message); +} +exports._error = _error; +function _debug(message) { + _command('task.debug', null, message); +} +exports._debug = _debug; +// //----------------------------------------------------- +// // Disk Functions +// //----------------------------------------------------- +/** + * Returns whether a path exists. + * + * @param path path to check + * @returns boolean + */ +function _exist(path) { + var exist = false; + try { + exist = !!(path && fs.statSync(path) != null); + } + catch (err) { + if (err && err.code === 'ENOENT') { + exist = false; + } + else { + throw err; + } + } + return exist; +} +exports._exist = _exist; +/** + * Checks whether a path exists. + * If the path does not exist, it will throw. + * + * @param p path to check + * @param name name only used in error message to identify the path + * @returns void + */ +function _checkPath(p, name) { + _debug('check path : ' + p); + if (!_exist(p)) { + throw new Error(_loc('LIB_PathNotFound', name, p)); + } +} +exports._checkPath = _checkPath; +/** + * Returns path of a tool had the tool actually been invoked. Resolves via paths. + * If you check and the tool does not exist, it will throw. + * + * @param tool name of the tool + * @param check whether to check if tool exists + * @returns string + */ +function _which(tool, check) { + if (!tool) { + throw new Error('parameter \'tool\' is required'); + } + // recursive when check=true + if (check) { + var result = _which(tool, false); + if (result) { + return result; + } + else { + if (process.platform == 'win32') { + throw new Error(_loc('LIB_WhichNotFound_Win', tool)); + } + else { + throw new Error(_loc('LIB_WhichNotFound_Linux', tool)); + } + } + } + _debug("which '" + tool + "'"); + try { + // build the list of extensions to try + var extensions = []; + if (process.platform == 'win32' && process.env['PATHEXT']) { + for (var _i = 0, _a = process.env['PATHEXT'].split(path.delimiter); _i < _a.length; _i++) { + var extension = _a[_i]; + if (extension) { + extensions.push(extension); + } + } + } + // if it's rooted, return it if exists. otherwise return empty. + if (_isRooted(tool)) { + var filePath = _tryGetExecutablePath(tool, extensions); + if (filePath) { + _debug("found: '" + filePath + "'"); + return filePath; + } + _debug('not found'); + return ''; + } + // if any path separators, return empty + if (tool.indexOf('/') >= 0 || (process.platform == 'win32' && tool.indexOf('\\') >= 0)) { + _debug('not found'); + return ''; + } + // build the list of directories + // + // Note, technically "where" checks the current directory on Windows. From a task lib perspective, + // it feels like we should not do this. Checking the current directory seems like more of a use + // case of a shell, and the which() function exposed by the task lib should strive for consistency + // across platforms. + var directories = []; + if (process.env['PATH']) { + for (var _b = 0, _c = process.env['PATH'].split(path.delimiter); _b < _c.length; _b++) { + var p = _c[_b]; + if (p) { + directories.push(p); + } + } + } + // return the first match + for (var _d = 0, directories_1 = directories; _d < directories_1.length; _d++) { + var directory = directories_1[_d]; + var filePath = _tryGetExecutablePath(directory + path.sep + tool, extensions); + if (filePath) { + _debug("found: '" + filePath + "'"); + return filePath; + } + } + _debug('not found'); + return ''; + } + catch (err) { + throw new Error(_loc('LIB_OperationFailed', 'which', err.message)); + } +} +exports._which = _which; +/** + * Best effort attempt to determine whether a file exists and is executable. + * @param filePath file path to check + * @param extensions additional file extensions to try + * @return if file exists and is executable, returns the file path. otherwise empty string. + */ +function _tryGetExecutablePath(filePath, extensions) { + try { + // test file exists + var stats = fs.statSync(filePath); + if (stats.isFile()) { + if (process.platform == 'win32') { + // on Windows, test for valid extension + var isExecutable = false; + var fileName = path.basename(filePath); + var dotIndex = fileName.lastIndexOf('.'); + if (dotIndex >= 0) { + var upperExt_1 = fileName.substr(dotIndex).toUpperCase(); + if (extensions.some(function (validExt) { return validExt.toUpperCase() == upperExt_1; })) { + return filePath; + } + } + } + else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + catch (err) { + if (err.code != 'ENOENT') { + _debug("Unexpected error attempting to determine if executable file exists '" + filePath + "': " + err); + } + } + // try each extension + var originalFilePath = filePath; + for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { + var extension = extensions_1[_i]; + var found = false; + var filePath_1 = originalFilePath + extension; + try { + var stats = fs.statSync(filePath_1); + if (stats.isFile()) { + if (process.platform == 'win32') { + // preserve the case of the actual file (since an extension was appended) + try { + var directory = path.dirname(filePath_1); + var upperName = path.basename(filePath_1).toUpperCase(); + for (var _a = 0, _b = fs.readdirSync(directory); _a < _b.length; _a++) { + var actualName = _b[_a]; + if (upperName == actualName.toUpperCase()) { + filePath_1 = path.join(directory, actualName); + break; + } + } + } + catch (err) { + _debug("Unexpected error attempting to determine the actual case of the file '" + filePath_1 + "': " + err); + } + return filePath_1; + } + else { + if (isUnixExecutable(stats)) { + return filePath_1; + } + } + } + } + catch (err) { + if (err.code != 'ENOENT') { + _debug("Unexpected error attempting to determine if executable file exists '" + filePath_1 + "': " + err); + } + } + } + return ''; +} +// on Mac/Linux, test the execute bit +// R W X R W X R W X +// 256 128 64 32 16 8 4 2 1 +function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || ((stats.mode & 64) > 0 && stats.uid === process.getuid()); +} +function _legacyFindFiles_convertPatternToRegExp(pattern) { + pattern = (process.platform == 'win32' ? pattern.replace(/\\/g, '/') : pattern) // normalize separator on Windows + .replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') // regex escape - from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + .replace(/\\\/\\\*\\\*\\\//g, '((\/.+/)|(\/))') // replace directory globstar, e.g. /hello/**/world + .replace(/\\\*\\\*/g, '.*') // replace remaining globstars with a wildcard that can span directory separators, e.g. /hello/**dll + .replace(/\\\*/g, '[^\/]*') // replace asterisks with a wildcard that cannot span directory separators, e.g. /hello/*.dll + .replace(/\\\?/g, '[^\/]'); // replace single character wildcards, e.g. /hello/log?.dll + pattern = "^" + pattern + "$"; + var flags = process.platform == 'win32' ? 'i' : ''; + return new RegExp(pattern, flags); +} +exports._legacyFindFiles_convertPatternToRegExp = _legacyFindFiles_convertPatternToRegExp; +function _cloneMatchOptions(matchOptions) { + return { + debug: matchOptions.debug, + nobrace: matchOptions.nobrace, + noglobstar: matchOptions.noglobstar, + dot: matchOptions.dot, + noext: matchOptions.noext, + nocase: matchOptions.nocase, + nonull: matchOptions.nonull, + matchBase: matchOptions.matchBase, + nocomment: matchOptions.nocomment, + nonegate: matchOptions.nonegate, + flipNegate: matchOptions.flipNegate + }; +} +exports._cloneMatchOptions = _cloneMatchOptions; +function _getFindInfoFromPattern(defaultRoot, pattern, matchOptions) { + // parameter validation + if (!defaultRoot) { + throw new Error('getFindRootFromPattern() parameter defaultRoot cannot be empty'); + } + if (!pattern) { + throw new Error('getFindRootFromPattern() parameter pattern cannot be empty'); + } + if (!matchOptions.nobrace) { + throw new Error('getFindRootFromPattern() expected matchOptions.nobrace to be true'); + } + // for the sake of determining the findPath, pretend nocase=false + matchOptions = _cloneMatchOptions(matchOptions); + matchOptions.nocase = false; + // check if basename only and matchBase=true + if (matchOptions.matchBase && + !_isRooted(pattern) && + (process.platform == 'win32' ? pattern.replace(/\\/g, '/') : pattern).indexOf('/') < 0) { + return { + adjustedPattern: pattern, + findPath: defaultRoot, + statOnly: false, + }; + } + // the technique applied by this function is to use the information on the Minimatch object determine + // the findPath. Minimatch breaks the pattern into path segments, and exposes information about which + // segments are literal vs patterns. + // + // note, the technique currently imposes a limitation for drive-relative paths with a glob in the + // first segment, e.g. C:hello*/world. it's feasible to overcome this limitation, but is left unsolved + // for now. + var minimatchObj = new minimatch.Minimatch(pattern, matchOptions); + // the "set" property is an array of arrays of parsed path segment info. the outer array should only + // contain one item, otherwise something went wrong. brace expansion can result in multiple arrays, + // but that should be turned off by the time this function is reached. + if (minimatchObj.set.length != 1) { + throw new Error('getFindRootFromPattern() expected Minimatch(...).set.length to be 1. Actual: ' + minimatchObj.set.length); + } + var literalSegments = []; + for (var _i = 0, _a = minimatchObj.set[0]; _i < _a.length; _i++) { + var parsedSegment = _a[_i]; + if (typeof parsedSegment == 'string') { + // the item is a string when the original input for the path segment does not contain any + // unescaped glob characters. + // + // note, the string here is already unescaped (i.e. glob escaping removed), so it is ready + // to pass to find() as-is. for example, an input string 'hello\\*world' => 'hello*world'. + literalSegments.push(parsedSegment); + continue; + } + break; + } + // join the literal segments back together. Minimatch converts '\' to '/' on Windows, then squashes + // consequetive slashes, and finally splits on slash. this means that UNC format is lost, but can + // be detected from the original pattern. + var joinedSegments = literalSegments.join('/'); + if (joinedSegments && process.platform == 'win32' && _startsWith(pattern.replace(/\\/g, '/'), '//')) { + joinedSegments = '/' + joinedSegments; // restore UNC format + } + // determine the find path + var findPath; + if (_isRooted(pattern)) { // the pattern was rooted + findPath = joinedSegments; + } + else if (joinedSegments) { // the pattern was not rooted, and literal segments were found + findPath = _ensureRooted(defaultRoot, joinedSegments); + } + else { // the pattern was not rooted, and no literal segments were found + findPath = defaultRoot; + } + // clean up the path + if (findPath) { + findPath = _getDirectoryName(_ensureRooted(findPath, '_')); // hack to remove unnecessary trailing slash + findPath = _normalizeSeparators(findPath); // normalize slashes + } + return { + adjustedPattern: _ensurePatternRooted(defaultRoot, pattern), + findPath: findPath, + statOnly: literalSegments.length == minimatchObj.set[0].length, + }; +} +exports._getFindInfoFromPattern = _getFindInfoFromPattern; +function _ensurePatternRooted(root, p) { + if (!root) { + throw new Error('ensurePatternRooted() parameter "root" cannot be empty'); + } + if (!p) { + throw new Error('ensurePatternRooted() parameter "p" cannot be empty'); + } + if (_isRooted(p)) { + return p; + } + // normalize root + root = _normalizeSeparators(root); + // escape special glob characters + root = (process.platform == 'win32' ? root : root.replace(/\\/g, '\\\\')) // escape '\' on OSX/Linux + .replace(/(\[)(?=[^\/]+\])/g, '[[]') // escape '[' when ']' follows within the path segment + .replace(/\?/g, '[?]') // escape '?' + .replace(/\*/g, '[*]') // escape '*' + .replace(/\+\(/g, '[+](') // escape '+(' + .replace(/@\(/g, '[@](') // escape '@(' + .replace(/!\(/g, '[!]('); // escape '!(' + return _ensureRooted(root, p); +} +exports._ensurePatternRooted = _ensurePatternRooted; +//------------------------------------------------------------------- +// Populate the vault with sensitive data. Inputs and Endpoints +//------------------------------------------------------------------- +function _loadData() { + // in agent, prefer TempDirectory then workFolder. + // In interactive dev mode, it won't be + var keyPath = _getVariable("agent.TempDirectory") || _getVariable("agent.workFolder") || process.cwd(); + exports._vault = new vm.Vault(keyPath); + exports._knownVariableMap = {}; + _debug('loading inputs and endpoints'); + var loaded = 0; + for (var envvar in process.env) { + if (_startsWith(envvar, 'INPUT_') || + _startsWith(envvar, 'ENDPOINT_AUTH_') || + _startsWith(envvar, 'SECUREFILE_TICKET_') || + _startsWith(envvar, 'SECRET_') || + _startsWith(envvar, 'VSTS_TASKVARIABLE_')) { + // Record the secret variable metadata. This is required by getVariable to know whether + // to retrieve the value from the vault. In a 2.104.1 agent or higher, this metadata will + // be overwritten when the VSTS_SECRET_VARIABLES env var is processed below. + if (_startsWith(envvar, 'SECRET_')) { + var variableName = envvar.substring('SECRET_'.length); + if (variableName) { + // This is technically not the variable name (has underscores instead of dots), + // but it's good enough to make getVariable work in a pre-2.104.1 agent where + // the VSTS_SECRET_VARIABLES env var is not defined. + exports._knownVariableMap[_getVariableKey(variableName)] = { name: variableName, secret: true }; + } + } + // store the secret + var value = process.env[envvar]; + if (value) { + ++loaded; + _debug('loading ' + envvar); + exports._vault.storeSecret(envvar, value); + delete process.env[envvar]; + } + } + } + _debug('loaded ' + loaded); + // store public variable metadata + var names; + try { + names = JSON.parse(process.env['VSTS_PUBLIC_VARIABLES'] || '[]'); + } + catch (err) { + throw new Error('Failed to parse VSTS_PUBLIC_VARIABLES as JSON. ' + err); // may occur during interactive testing + } + names.forEach(function (name) { + exports._knownVariableMap[_getVariableKey(name)] = { name: name, secret: false }; + }); + delete process.env['VSTS_PUBLIC_VARIABLES']; + // store secret variable metadata + try { + names = JSON.parse(process.env['VSTS_SECRET_VARIABLES'] || '[]'); + } + catch (err) { + throw new Error('Failed to parse VSTS_SECRET_VARIABLES as JSON. ' + err); // may occur during interactive testing + } + names.forEach(function (name) { + exports._knownVariableMap[_getVariableKey(name)] = { name: name, secret: true }; + }); + delete process.env['VSTS_SECRET_VARIABLES']; + // avoid loading twice (overwrites .taskkey) + global['_vsts_task_lib_loaded'] = true; +} +exports._loadData = _loadData; +//-------------------------------------------------------------------------------- +// Internal path helpers. +//-------------------------------------------------------------------------------- +/** + * Defines if path is unc-path. + * + * @param path a path to a file. + * @returns true if path starts with double backslash, otherwise returns false. + */ +function _isUncPath(path) { + return /^\\\\[^\\]/.test(path); +} +exports._isUncPath = _isUncPath; +function _ensureRooted(root, p) { + if (!root) { + throw new Error('ensureRooted() parameter "root" cannot be empty'); + } + if (!p) { + throw new Error('ensureRooted() parameter "p" cannot be empty'); + } + if (_isRooted(p)) { + return p; + } + if (process.platform == 'win32' && root.match(/^[A-Z]:$/i)) { // e.g. C: + return root + p; + } + // ensure root ends with a separator + if (_endsWith(root, '/') || (process.platform == 'win32' && _endsWith(root, '\\'))) { + // root already ends with a separator + } + else { + root += path.sep; // append separator + } + return root + p; +} +exports._ensureRooted = _ensureRooted; +/** + * Determines the parent path and trims trailing slashes (when safe). Path separators are normalized + * in the result. This function works similar to the .NET System.IO.Path.GetDirectoryName() method. + * For example, C:\hello\world\ returns C:\hello\world (trailing slash removed). Returns empty when + * no higher directory can be determined. + */ +function _getDirectoryName(p) { + // short-circuit if empty + if (!p) { + return ''; + } + // normalize separators + p = _normalizeSeparators(p); + // on Windows, the goal of this function is to match the behavior of + // [System.IO.Path]::GetDirectoryName(), e.g. + // C:/ => + // C:/hello => C:\ + // C:/hello/ => C:\hello + // C:/hello/world => C:\hello + // C:/hello/world/ => C:\hello\world + // C: => + // C:hello => C: + // C:hello/ => C:hello + // / => + // /hello => \ + // /hello/ => \hello + // //hello => + // //hello/ => + // //hello/world => + // //hello/world/ => \\hello\world + // + // unfortunately, path.dirname() can't simply be used. for example, on Windows + // it yields different results from Path.GetDirectoryName: + // C:/ => C:/ + // C:/hello => C:/ + // C:/hello/ => C:/ + // C:/hello/world => C:/hello + // C:/hello/world/ => C:/hello + // C: => C: + // C:hello => C: + // C:hello/ => C: + // / => / + // /hello => / + // /hello/ => / + // //hello => / + // //hello/ => / + // //hello/world => //hello/world + // //hello/world/ => //hello/world/ + // //hello/world/again => //hello/world/ + // //hello/world/again/ => //hello/world/ + // //hello/world/again/again => //hello/world/again + // //hello/world/again/again/ => //hello/world/again + if (process.platform == 'win32') { + if (/^[A-Z]:\\?[^\\]+$/i.test(p)) { // e.g. C:\hello or C:hello + return p.charAt(2) == '\\' ? p.substring(0, 3) : p.substring(0, 2); + } + else if (/^[A-Z]:\\?$/i.test(p)) { // e.g. C:\ or C: + return ''; + } + var lastSlashIndex = p.lastIndexOf('\\'); + if (lastSlashIndex < 0) { // file name only + return ''; + } + else if (p == '\\') { // relative root + return ''; + } + else if (lastSlashIndex == 0) { // e.g. \\hello + return '\\'; + } + else if (/^\\\\[^\\]+(\\[^\\]*)?$/.test(p)) { // UNC root, e.g. \\hello or \\hello\ or \\hello\world + return ''; + } + return p.substring(0, lastSlashIndex); // e.g. hello\world => hello or hello\world\ => hello\world + // note, this means trailing slashes for non-root directories + // (i.e. not C:\, \, or \\unc\) will simply be removed. + } + // OSX/Linux + if (p.indexOf('/') < 0) { // file name only + return ''; + } + else if (p == '/') { + return ''; + } + else if (_endsWith(p, '/')) { + return p.substring(0, p.length - 1); + } + return path.dirname(p); +} +exports._getDirectoryName = _getDirectoryName; +/** + * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: + * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). + */ +function _isRooted(p) { + p = _normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (process.platform == 'win32') { + return _startsWith(p, '\\') || // e.g. \ or \hello or \\hello + /^[A-Z]:/i.test(p); // e.g. C: or C:\hello + } + return _startsWith(p, '/'); // e.g. /hello +} +exports._isRooted = _isRooted; +function _normalizeSeparators(p) { + p = p || ''; + if (process.platform == 'win32') { + // convert slashes on Windows + p = p.replace(/\//g, '\\'); + // remove redundant slashes + var isUnc = /^\\\\+[^\\]/.test(p); // e.g. \\hello + return (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\'); // preserve leading // for UNC + } + // remove redundant slashes + return p.replace(/\/\/+/g, '/'); +} +exports._normalizeSeparators = _normalizeSeparators; +//----------------------------------------------------- +// Expose proxy information to vsts-node-api +//----------------------------------------------------- +function _exposeProxySettings() { + var proxyUrl = _getVariable('Agent.ProxyUrl'); + if (proxyUrl && proxyUrl.length > 0) { + var proxyUsername = _getVariable('Agent.ProxyUsername'); + var proxyPassword = _getVariable('Agent.ProxyPassword'); + var proxyBypassHostsJson = _getVariable('Agent.ProxyBypassList'); + global['_vsts_task_lib_proxy_url'] = proxyUrl; + global['_vsts_task_lib_proxy_username'] = proxyUsername; + global['_vsts_task_lib_proxy_bypass'] = proxyBypassHostsJson; + global['_vsts_task_lib_proxy_password'] = _exposeTaskLibSecret('proxy', proxyPassword || ''); + _debug('expose agent proxy configuration.'); + global['_vsts_task_lib_proxy'] = true; + } +} +exports._exposeProxySettings = _exposeProxySettings; +//----------------------------------------------------- +// Expose certificate information to vsts-node-api +//----------------------------------------------------- +function _exposeCertSettings() { + var ca = _getVariable('Agent.CAInfo'); + if (ca) { + global['_vsts_task_lib_cert_ca'] = ca; + } + var clientCert = _getVariable('Agent.ClientCert'); + if (clientCert) { + var clientCertKey = _getVariable('Agent.ClientCertKey'); + var clientCertArchive = _getVariable('Agent.ClientCertArchive'); + var clientCertPassword = _getVariable('Agent.ClientCertPassword'); + global['_vsts_task_lib_cert_clientcert'] = clientCert; + global['_vsts_task_lib_cert_key'] = clientCertKey; + global['_vsts_task_lib_cert_archive'] = clientCertArchive; + global['_vsts_task_lib_cert_passphrase'] = _exposeTaskLibSecret('cert', clientCertPassword || ''); + } + if (ca || clientCert) { + _debug('expose agent certificate configuration.'); + global['_vsts_task_lib_cert'] = true; + } + var skipCertValidation = _getVariable('Agent.SkipCertValidation') || 'false'; + if (skipCertValidation) { + global['_vsts_task_lib_skip_cert_validation'] = skipCertValidation.toUpperCase() === 'TRUE'; + } +} +exports._exposeCertSettings = _exposeCertSettings; +// We store the encryption key on disk and hold the encrypted content and key file in memory +// return base64encoded:base64encoded +// downstream vsts-node-api will retrieve the secret later +function _exposeTaskLibSecret(keyFile, secret) { + if (secret) { + var encryptKey = crypto.randomBytes(256); + var cipher = crypto.createCipher("aes-256-ctr", encryptKey); + var encryptedContent = cipher.update(secret, "utf8", "hex"); + encryptedContent += cipher.final("hex"); + var storageFile = path.join(_getVariable('Agent.TempDirectory') || _getVariable("agent.workFolder") || process.cwd(), keyFile); + fs.writeFileSync(storageFile, encryptKey.toString('base64'), { encoding: 'utf8' }); + return new Buffer(storageFile).toString('base64') + ':' + new Buffer(encryptedContent).toString('base64'); + } +} + + +/***/ }), + +/***/ 80242: +/***/ ((module, exports) => { + +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + +// The actual regexps go on exports.re +var re = exports.re = [] +var safeRe = exports.safeRe = [] +var src = exports.src = [] +var R = 0 + +var LETTERDASHNUMBER = '[a-zA-Z0-9-]' + +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +var safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] + +function makeSafeRe (value) { + for (var i = 0; i < safeRegexReplacements.length; i++) { + var token = safeRegexReplacements[i][0] + var max = safeRegexReplacements[i][1] + value = value + .split(token + '*').join(token + '{0,' + max + '}') + .split(token + '+').join(token + '{1,' + max + '}') + } + return value +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '\\d+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +safeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +safeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +safeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + + // Replace all greedy whitespace to prevent regex dos issues. These regex are + // used internally via the safeRe object since all inputs in this library get + // normalized first to trim and collapse all extra whitespace. The original + // regexes are exported for userland consumption and lower level usage. A + // future breaking change could export the safer regex only with a note that + // all input should have extra whitespace removed. + safeRe[i] = new RegExp(makeSafeRe(src[i])) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? safeRe[LOOSE] : safeRe[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } -/***/ 9003: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const TfsCoreInterfaces = __nccwpck_require__(3931); -var ItemContentType; -(function (ItemContentType) { - ItemContentType[ItemContentType["RawText"] = 0] = "RawText"; - ItemContentType[ItemContentType["Base64Encoded"] = 1] = "Base64Encoded"; -})(ItemContentType = exports.ItemContentType || (exports.ItemContentType = {})); -/** - * Options for Version handling. - */ -var TfvcVersionOption; -(function (TfvcVersionOption) { - /** - * None. - */ - TfvcVersionOption[TfvcVersionOption["None"] = 0] = "None"; - /** - * Return the previous version. - */ - TfvcVersionOption[TfvcVersionOption["Previous"] = 1] = "Previous"; - /** - * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier. - */ - TfvcVersionOption[TfvcVersionOption["UseRename"] = 2] = "UseRename"; -})(TfvcVersionOption = exports.TfvcVersionOption || (exports.TfvcVersionOption = {})); -/** - * Type of Version object - */ -var TfvcVersionType; -(function (TfvcVersionType) { - /** - * Version is treated as a ChangesetId. - */ - TfvcVersionType[TfvcVersionType["None"] = 0] = "None"; - /** - * Version is treated as a ChangesetId. - */ - TfvcVersionType[TfvcVersionType["Changeset"] = 1] = "Changeset"; - /** - * Version is treated as a Shelveset name and owner. - */ - TfvcVersionType[TfvcVersionType["Shelveset"] = 2] = "Shelveset"; - /** - * Version is treated as a Change. - */ - TfvcVersionType[TfvcVersionType["Change"] = 3] = "Change"; - /** - * Version is treated as a Date. - */ - TfvcVersionType[TfvcVersionType["Date"] = 4] = "Date"; - /** - * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used. - */ - TfvcVersionType[TfvcVersionType["Latest"] = 5] = "Latest"; - /** - * Version will be treated as a Tip, if no version is defined latest will be used. - */ - TfvcVersionType[TfvcVersionType["Tip"] = 6] = "Tip"; - /** - * Version will be treated as a MergeSource. - */ - TfvcVersionType[TfvcVersionType["MergeSource"] = 7] = "MergeSource"; -})(TfvcVersionType = exports.TfvcVersionType || (exports.TfvcVersionType = {})); -var VersionControlChangeType; -(function (VersionControlChangeType) { - VersionControlChangeType[VersionControlChangeType["None"] = 0] = "None"; - VersionControlChangeType[VersionControlChangeType["Add"] = 1] = "Add"; - VersionControlChangeType[VersionControlChangeType["Edit"] = 2] = "Edit"; - VersionControlChangeType[VersionControlChangeType["Encoding"] = 4] = "Encoding"; - VersionControlChangeType[VersionControlChangeType["Rename"] = 8] = "Rename"; - VersionControlChangeType[VersionControlChangeType["Delete"] = 16] = "Delete"; - VersionControlChangeType[VersionControlChangeType["Undelete"] = 32] = "Undelete"; - VersionControlChangeType[VersionControlChangeType["Branch"] = 64] = "Branch"; - VersionControlChangeType[VersionControlChangeType["Merge"] = 128] = "Merge"; - VersionControlChangeType[VersionControlChangeType["Lock"] = 256] = "Lock"; - VersionControlChangeType[VersionControlChangeType["Rollback"] = 512] = "Rollback"; - VersionControlChangeType[VersionControlChangeType["SourceRename"] = 1024] = "SourceRename"; - VersionControlChangeType[VersionControlChangeType["TargetRename"] = 2048] = "TargetRename"; - VersionControlChangeType[VersionControlChangeType["Property"] = 4096] = "Property"; - VersionControlChangeType[VersionControlChangeType["All"] = 8191] = "All"; -})(VersionControlChangeType = exports.VersionControlChangeType || (exports.VersionControlChangeType = {})); -var VersionControlRecursionType; -(function (VersionControlRecursionType) { - /** - * Only return the specified item. - */ - VersionControlRecursionType[VersionControlRecursionType["None"] = 0] = "None"; - /** - * Return the specified item and its direct children. - */ - VersionControlRecursionType[VersionControlRecursionType["OneLevel"] = 1] = "OneLevel"; - /** - * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. - */ - VersionControlRecursionType[VersionControlRecursionType["OneLevelPlusNestedEmptyFolders"] = 4] = "OneLevelPlusNestedEmptyFolders"; - /** - * Return specified item and all descendants - */ - VersionControlRecursionType[VersionControlRecursionType["Full"] = 120] = "Full"; -})(VersionControlRecursionType = exports.VersionControlRecursionType || (exports.VersionControlRecursionType = {})); -exports.TypeInfo = { - Change: {}, - GitRepository: {}, - GitRepositoryRef: {}, - ItemContent: {}, - ItemContentType: { - enumValues: { - "rawText": 0, - "base64Encoded": 1 - } - }, - TfvcBranch: {}, - TfvcBranchRef: {}, - TfvcChange: {}, - TfvcChangeset: {}, - TfvcChangesetRef: {}, - TfvcItem: {}, - TfvcItemDescriptor: {}, - TfvcItemRequestData: {}, - TfvcLabel: {}, - TfvcLabelRef: {}, - TfvcShelveset: {}, - TfvcShelvesetRef: {}, - TfvcVersionDescriptor: {}, - TfvcVersionOption: { - enumValues: { - "none": 0, - "previous": 1, - "useRename": 2 - } - }, - TfvcVersionType: { - enumValues: { - "none": 0, - "changeset": 1, - "shelveset": 2, - "change": 3, - "date": 4, - "latest": 5, - "tip": 6, - "mergeSource": 7 - } - }, - VersionControlChangeType: { - enumValues: { - "none": 0, - "add": 1, - "edit": 2, - "encoding": 4, - "rename": 8, - "delete": 16, - "undelete": 32, - "branch": 64, - "merge": 128, - "lock": 256, - "rollback": 512, - "sourceRename": 1024, - "targetRename": 2048, - "property": 4096, - "all": 8191 - } - }, - VersionControlProjectInfo: {}, - VersionControlRecursionType: { - enumValues: { - "none": 0, - "oneLevel": 1, - "oneLevelPlusNestedEmptyFolders": 4, - "full": 120 - } - }, -}; -exports.TypeInfo.Change.fields = { - changeType: { - enumType: exports.TypeInfo.VersionControlChangeType - }, - newContent: { - typeInfo: exports.TypeInfo.ItemContent - } -}; -exports.TypeInfo.GitRepository.fields = { - parentRepository: { - typeInfo: exports.TypeInfo.GitRepositoryRef - }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - } -}; -exports.TypeInfo.GitRepositoryRef.fields = { - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - } -}; -exports.TypeInfo.ItemContent.fields = { - contentType: { - enumType: exports.TypeInfo.ItemContentType - } -}; -exports.TypeInfo.TfvcBranch.fields = { - children: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcBranch - }, - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcBranchRef.fields = { - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcChange.fields = { - changeType: { - enumType: exports.TypeInfo.VersionControlChangeType - }, - newContent: { - typeInfo: exports.TypeInfo.ItemContent - } -}; -exports.TypeInfo.TfvcChangeset.fields = { - changes: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcChange - }, - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcChangesetRef.fields = { - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcItem.fields = { - changeDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcItemDescriptor.fields = { - recursionLevel: { - enumType: exports.TypeInfo.VersionControlRecursionType - }, - versionOption: { - enumType: exports.TypeInfo.TfvcVersionOption - }, - versionType: { - enumType: exports.TypeInfo.TfvcVersionType - } -}; -exports.TypeInfo.TfvcItemRequestData.fields = { - itemDescriptors: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcItemDescriptor - } -}; -exports.TypeInfo.TfvcLabel.fields = { - items: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcItem - }, - modifiedDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcLabelRef.fields = { - modifiedDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcShelveset.fields = { - changes: { - isArray: true, - typeInfo: exports.TypeInfo.TfvcChange - }, - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcShelvesetRef.fields = { - createdDate: { - isDate: true, - } -}; -exports.TypeInfo.TfvcVersionDescriptor.fields = { - versionOption: { - enumType: exports.TypeInfo.TfvcVersionOption - }, - versionType: { - enumType: exports.TypeInfo.TfvcVersionType - } -}; -exports.TypeInfo.VersionControlProjectInfo.fields = { - defaultSourceControlType: { - enumType: TfsCoreInterfaces.TypeInfo.SourceControlTypes - }, - project: { - typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference - } -}; + var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL]) + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } -/***/ }), + this.raw = version -/***/ 5507: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const GitInterfaces = __nccwpck_require__(9803); -/** - * Wiki types. - */ -var WikiType; -(function (WikiType) { - /** - * Indicates that the wiki is provisioned for the team project - */ - WikiType[WikiType["ProjectWiki"] = 0] = "ProjectWiki"; - /** - * Indicates that the wiki is published from a git repository - */ - WikiType[WikiType["CodeWiki"] = 1] = "CodeWiki"; -})(WikiType = exports.WikiType || (exports.WikiType = {})); -exports.TypeInfo = { - Wiki: {}, - WikiCreateBaseParameters: {}, - WikiCreateParametersV2: {}, - WikiPageDetail: {}, - WikiPageStat: {}, - WikiPageViewStats: {}, - WikiType: { - enumValues: { - "projectWiki": 0, - "codeWiki": 1 - } - }, - WikiUpdateParameters: {}, - WikiV2: {}, -}; -exports.TypeInfo.Wiki.fields = { - repository: { - typeInfo: GitInterfaces.TypeInfo.GitRepository - } -}; -exports.TypeInfo.WikiCreateBaseParameters.fields = { - type: { - enumType: exports.TypeInfo.WikiType - } -}; -exports.TypeInfo.WikiCreateParametersV2.fields = { - type: { - enumType: exports.TypeInfo.WikiType - }, - version: { - typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor - } -}; -exports.TypeInfo.WikiPageDetail.fields = { - viewStats: { - isArray: true, - typeInfo: exports.TypeInfo.WikiPageStat - } -}; -exports.TypeInfo.WikiPageStat.fields = { - day: { - isDate: true, - } -}; -exports.TypeInfo.WikiPageViewStats.fields = { - lastViewedTime: { - isDate: true, - } -}; -exports.TypeInfo.WikiUpdateParameters.fields = { - versions: { - isArray: true, - typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor - } -}; -exports.TypeInfo.WikiV2.fields = { - type: { - enumType: exports.TypeInfo.WikiType - }, - versions: { - isArray: true, - typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor - } -}; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } -/***/ }), + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } -/***/ 7480: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const SystemInterfaces = __nccwpck_require__(6790); -/** - * Definition of the type of backlog level - */ -var BacklogType; -(function (BacklogType) { - /** - * Portfolio backlog level - */ - BacklogType[BacklogType["Portfolio"] = 0] = "Portfolio"; - /** - * Requirement backlog level - */ - BacklogType[BacklogType["Requirement"] = 1] = "Requirement"; - /** - * Task backlog level - */ - BacklogType[BacklogType["Task"] = 2] = "Task"; -})(BacklogType = exports.BacklogType || (exports.BacklogType = {})); -/** - * Determines what columns to include on the board badge - */ -var BoardBadgeColumnOptions; -(function (BoardBadgeColumnOptions) { - /** - * Only include In Progress columns - */ - BoardBadgeColumnOptions[BoardBadgeColumnOptions["InProgressColumns"] = 0] = "InProgressColumns"; - /** - * Include all columns - */ - BoardBadgeColumnOptions[BoardBadgeColumnOptions["AllColumns"] = 1] = "AllColumns"; - /** - * Include a custom set of columns - */ - BoardBadgeColumnOptions[BoardBadgeColumnOptions["CustomColumns"] = 2] = "CustomColumns"; -})(BoardBadgeColumnOptions = exports.BoardBadgeColumnOptions || (exports.BoardBadgeColumnOptions = {})); -var BoardColumnType; -(function (BoardColumnType) { - BoardColumnType[BoardColumnType["Incoming"] = 0] = "Incoming"; - BoardColumnType[BoardColumnType["InProgress"] = 1] = "InProgress"; - BoardColumnType[BoardColumnType["Outgoing"] = 2] = "Outgoing"; -})(BoardColumnType = exports.BoardColumnType || (exports.BoardColumnType = {})); -/** - * The behavior of the work item types that are in the work item category specified in the BugWorkItems section in the Process Configuration - */ -var BugsBehavior; -(function (BugsBehavior) { - BugsBehavior[BugsBehavior["Off"] = 0] = "Off"; - BugsBehavior[BugsBehavior["AsRequirements"] = 1] = "AsRequirements"; - BugsBehavior[BugsBehavior["AsTasks"] = 2] = "AsTasks"; -})(BugsBehavior = exports.BugsBehavior || (exports.BugsBehavior = {})); -var FieldType; -(function (FieldType) { - FieldType[FieldType["String"] = 0] = "String"; - FieldType[FieldType["PlainText"] = 1] = "PlainText"; - FieldType[FieldType["Integer"] = 2] = "Integer"; - FieldType[FieldType["DateTime"] = 3] = "DateTime"; - FieldType[FieldType["TreePath"] = 4] = "TreePath"; - FieldType[FieldType["Boolean"] = 5] = "Boolean"; - FieldType[FieldType["Double"] = 6] = "Double"; -})(FieldType = exports.FieldType || (exports.FieldType = {})); -/** - * Enum for the various modes of identity picker - */ -var IdentityDisplayFormat; -(function (IdentityDisplayFormat) { - /** - * Display avatar only - */ - IdentityDisplayFormat[IdentityDisplayFormat["AvatarOnly"] = 0] = "AvatarOnly"; - /** - * Display Full name only - */ - IdentityDisplayFormat[IdentityDisplayFormat["FullName"] = 1] = "FullName"; - /** - * Display Avatar and Full name - */ - IdentityDisplayFormat[IdentityDisplayFormat["AvatarAndFullName"] = 2] = "AvatarAndFullName"; -})(IdentityDisplayFormat = exports.IdentityDisplayFormat || (exports.IdentityDisplayFormat = {})); -/** - * Enum for the various types of plans - */ -var PlanType; -(function (PlanType) { - PlanType[PlanType["DeliveryTimelineView"] = 0] = "DeliveryTimelineView"; -})(PlanType = exports.PlanType || (exports.PlanType = {})); -/** - * Flag for permissions a user can have for this plan. - */ -var PlanUserPermissions; -(function (PlanUserPermissions) { - /** - * None - */ - PlanUserPermissions[PlanUserPermissions["None"] = 0] = "None"; - /** - * Permission to view this plan. - */ - PlanUserPermissions[PlanUserPermissions["View"] = 1] = "View"; - /** - * Permission to update this plan. - */ - PlanUserPermissions[PlanUserPermissions["Edit"] = 2] = "Edit"; - /** - * Permission to delete this plan. - */ - PlanUserPermissions[PlanUserPermissions["Delete"] = 4] = "Delete"; - /** - * Permission to manage this plan. - */ - PlanUserPermissions[PlanUserPermissions["Manage"] = 8] = "Manage"; - /** - * Full control permission for this plan. - */ - PlanUserPermissions[PlanUserPermissions["AllPermissions"] = 15] = "AllPermissions"; -})(PlanUserPermissions = exports.PlanUserPermissions || (exports.PlanUserPermissions = {})); -var TimeFrame; -(function (TimeFrame) { - TimeFrame[TimeFrame["Past"] = 0] = "Past"; - TimeFrame[TimeFrame["Current"] = 1] = "Current"; - TimeFrame[TimeFrame["Future"] = 2] = "Future"; -})(TimeFrame = exports.TimeFrame || (exports.TimeFrame = {})); -var TimelineCriteriaStatusCode; -(function (TimelineCriteriaStatusCode) { - /** - * No error - filter is good. - */ - TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["OK"] = 0] = "OK"; - /** - * One of the filter clause is invalid. - */ - TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["InvalidFilterClause"] = 1] = "InvalidFilterClause"; - /** - * Unknown error. - */ - TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["Unknown"] = 2] = "Unknown"; -})(TimelineCriteriaStatusCode = exports.TimelineCriteriaStatusCode || (exports.TimelineCriteriaStatusCode = {})); -var TimelineIterationStatusCode; -(function (TimelineIterationStatusCode) { - /** - * No error - iteration data is good. - */ - TimelineIterationStatusCode[TimelineIterationStatusCode["OK"] = 0] = "OK"; - /** - * This iteration overlaps with another iteration, no data is returned for this iteration. - */ - TimelineIterationStatusCode[TimelineIterationStatusCode["IsOverlapping"] = 1] = "IsOverlapping"; -})(TimelineIterationStatusCode = exports.TimelineIterationStatusCode || (exports.TimelineIterationStatusCode = {})); -var TimelineTeamStatusCode; -(function (TimelineTeamStatusCode) { - /** - * No error - all data for team is good. - */ - TimelineTeamStatusCode[TimelineTeamStatusCode["OK"] = 0] = "OK"; - /** - * Team does not exist or access is denied. - */ - TimelineTeamStatusCode[TimelineTeamStatusCode["DoesntExistOrAccessDenied"] = 1] = "DoesntExistOrAccessDenied"; - /** - * Maximum number of teams was exceeded. No team data will be returned for this team. - */ - TimelineTeamStatusCode[TimelineTeamStatusCode["MaxTeamsExceeded"] = 2] = "MaxTeamsExceeded"; - /** - * Maximum number of team fields (ie Area paths) have been exceeded. No team data will be returned for this team. - */ - TimelineTeamStatusCode[TimelineTeamStatusCode["MaxTeamFieldsExceeded"] = 3] = "MaxTeamFieldsExceeded"; - /** - * Backlog does not exist or is missing crucial information. - */ - TimelineTeamStatusCode[TimelineTeamStatusCode["BacklogInError"] = 4] = "BacklogInError"; - /** - * Team field value is not set for this team. No team data will be returned for this team - */ - TimelineTeamStatusCode[TimelineTeamStatusCode["MissingTeamFieldValue"] = 5] = "MissingTeamFieldValue"; - /** - * Team does not have a single iteration with date range. - */ - TimelineTeamStatusCode[TimelineTeamStatusCode["NoIterationsExist"] = 6] = "NoIterationsExist"; -})(TimelineTeamStatusCode = exports.TimelineTeamStatusCode || (exports.TimelineTeamStatusCode = {})); -exports.TypeInfo = { - BacklogConfiguration: {}, - BacklogLevelConfiguration: {}, - BacklogType: { - enumValues: { - "portfolio": 0, - "requirement": 1, - "task": 2 - } - }, - Board: {}, - BoardBadgeColumnOptions: { - enumValues: { - "inProgressColumns": 0, - "allColumns": 1, - "customColumns": 2 - } - }, - BoardColumn: {}, - BoardColumnType: { - enumValues: { - "incoming": 0, - "inProgress": 1, - "outgoing": 2 - } - }, - BugsBehavior: { - enumValues: { - "off": 0, - "asRequirements": 1, - "asTasks": 2 - } - }, - CapacityContractBase: {}, - CapacityPatch: {}, - CardFieldSettings: {}, - CardSettings: {}, - CreatePlan: {}, - DateRange: {}, - DeliveryViewData: {}, - DeliveryViewPropertyCollection: {}, - FieldInfo: {}, - FieldType: { - enumValues: { - "string": 0, - "plainText": 1, - "integer": 2, - "dateTime": 3, - "treePath": 4, - "boolean": 5, - "double": 6 - } - }, - IdentityDisplayFormat: { - enumValues: { - "avatarOnly": 0, - "fullName": 1, - "avatarAndFullName": 2 - } - }, - Marker: {}, - Plan: {}, - PlanMetadata: {}, - PlanType: { - enumValues: { - "deliveryTimelineView": 0 - } - }, - PlanUserPermissions: { - enumValues: { - "none": 0, - "view": 1, - "edit": 2, - "delete": 4, - "manage": 8, - "allPermissions": 15 - } - }, - TeamCapacity: {}, - TeamIterationAttributes: {}, - TeamMemberCapacity: {}, - TeamMemberCapacityIdentityRef: {}, - TeamSetting: {}, - TeamSettingsDaysOff: {}, - TeamSettingsDaysOffPatch: {}, - TeamSettingsIteration: {}, - TeamSettingsPatch: {}, - TimeFrame: { - enumValues: { - "past": 0, - "current": 1, - "future": 2 - } - }, - TimelineCriteriaStatus: {}, - TimelineCriteriaStatusCode: { - enumValues: { - "ok": 0, - "invalidFilterClause": 1, - "unknown": 2 - } - }, - TimelineIterationStatus: {}, - TimelineIterationStatusCode: { - enumValues: { - "ok": 0, - "isOverlapping": 1 - } - }, - TimelineTeamData: {}, - TimelineTeamIteration: {}, - TimelineTeamStatus: {}, - TimelineTeamStatusCode: { - enumValues: { - "ok": 0, - "doesntExistOrAccessDenied": 1, - "maxTeamsExceeded": 2, - "maxTeamFieldsExceeded": 3, - "backlogInError": 4, - "missingTeamFieldValue": 5, - "noIterationsExist": 6 - } - }, - UpdatePlan: {}, -}; -exports.TypeInfo.BacklogConfiguration.fields = { - bugsBehavior: { - enumType: exports.TypeInfo.BugsBehavior - }, - portfolioBacklogs: { - isArray: true, - typeInfo: exports.TypeInfo.BacklogLevelConfiguration - }, - requirementBacklog: { - typeInfo: exports.TypeInfo.BacklogLevelConfiguration - }, - taskBacklog: { - typeInfo: exports.TypeInfo.BacklogLevelConfiguration - } -}; -exports.TypeInfo.BacklogLevelConfiguration.fields = { - type: { - enumType: exports.TypeInfo.BacklogType - } -}; -exports.TypeInfo.Board.fields = { - columns: { - isArray: true, - typeInfo: exports.TypeInfo.BoardColumn - } -}; -exports.TypeInfo.BoardColumn.fields = { - columnType: { - enumType: exports.TypeInfo.BoardColumnType - } -}; -exports.TypeInfo.CapacityContractBase.fields = { - daysOff: { - isArray: true, - typeInfo: exports.TypeInfo.DateRange - } -}; -exports.TypeInfo.CapacityPatch.fields = { - daysOff: { - isArray: true, - typeInfo: exports.TypeInfo.DateRange - } -}; -exports.TypeInfo.CardFieldSettings.fields = { - additionalFields: { - isArray: true, - typeInfo: exports.TypeInfo.FieldInfo - }, - assignedToDisplayFormat: { - enumType: exports.TypeInfo.IdentityDisplayFormat - }, - coreFields: { - isArray: true, - typeInfo: exports.TypeInfo.FieldInfo - } -}; -exports.TypeInfo.CardSettings.fields = { - fields: { - typeInfo: exports.TypeInfo.CardFieldSettings - } -}; -exports.TypeInfo.CreatePlan.fields = { - type: { - enumType: exports.TypeInfo.PlanType - } -}; -exports.TypeInfo.DateRange.fields = { - end: { - isDate: true, - }, - start: { - isDate: true, - } -}; -exports.TypeInfo.DeliveryViewData.fields = { - criteriaStatus: { - typeInfo: exports.TypeInfo.TimelineCriteriaStatus - }, - endDate: { - isDate: true, - }, - startDate: { - isDate: true, - }, - teams: { - isArray: true, - typeInfo: exports.TypeInfo.TimelineTeamData - } -}; -exports.TypeInfo.DeliveryViewPropertyCollection.fields = { - cardSettings: { - typeInfo: exports.TypeInfo.CardSettings - }, - markers: { - isArray: true, - typeInfo: exports.TypeInfo.Marker - } -}; -exports.TypeInfo.FieldInfo.fields = { - fieldType: { - enumType: exports.TypeInfo.FieldType - } -}; -exports.TypeInfo.Marker.fields = { - date: { - isDate: true, - } -}; -exports.TypeInfo.Plan.fields = { - createdDate: { - isDate: true, - }, - lastAccessed: { - isDate: true, - }, - modifiedDate: { - isDate: true, - }, - type: { - enumType: exports.TypeInfo.PlanType - }, - userPermissions: { - enumType: exports.TypeInfo.PlanUserPermissions - } -}; -exports.TypeInfo.PlanMetadata.fields = { - modifiedDate: { - isDate: true, - }, - userPermissions: { - enumType: exports.TypeInfo.PlanUserPermissions - } -}; -exports.TypeInfo.TeamCapacity.fields = { - teamMembers: { - isArray: true, - typeInfo: exports.TypeInfo.TeamMemberCapacityIdentityRef - } -}; -exports.TypeInfo.TeamIterationAttributes.fields = { - finishDate: { - isDate: true, - }, - startDate: { - isDate: true, - }, - timeFrame: { - enumType: exports.TypeInfo.TimeFrame - } -}; -exports.TypeInfo.TeamMemberCapacity.fields = { - daysOff: { - isArray: true, - typeInfo: exports.TypeInfo.DateRange - } -}; -exports.TypeInfo.TeamMemberCapacityIdentityRef.fields = { - daysOff: { - isArray: true, - typeInfo: exports.TypeInfo.DateRange - } -}; -exports.TypeInfo.TeamSetting.fields = { - backlogIteration: { - typeInfo: exports.TypeInfo.TeamSettingsIteration - }, - bugsBehavior: { - enumType: exports.TypeInfo.BugsBehavior - }, - defaultIteration: { - typeInfo: exports.TypeInfo.TeamSettingsIteration - }, - workingDays: { - isArray: true, - enumType: SystemInterfaces.TypeInfo.DayOfWeek - } -}; -exports.TypeInfo.TeamSettingsDaysOff.fields = { - daysOff: { - isArray: true, - typeInfo: exports.TypeInfo.DateRange - } -}; -exports.TypeInfo.TeamSettingsDaysOffPatch.fields = { - daysOff: { - isArray: true, - typeInfo: exports.TypeInfo.DateRange - } -}; -exports.TypeInfo.TeamSettingsIteration.fields = { - attributes: { - typeInfo: exports.TypeInfo.TeamIterationAttributes - } -}; -exports.TypeInfo.TeamSettingsPatch.fields = { - bugsBehavior: { - enumType: exports.TypeInfo.BugsBehavior - }, - workingDays: { - isArray: true, - enumType: SystemInterfaces.TypeInfo.DayOfWeek - } -}; -exports.TypeInfo.TimelineCriteriaStatus.fields = { - type: { - enumType: exports.TypeInfo.TimelineCriteriaStatusCode - } -}; -exports.TypeInfo.TimelineIterationStatus.fields = { - type: { - enumType: exports.TypeInfo.TimelineIterationStatusCode - } -}; -exports.TypeInfo.TimelineTeamData.fields = { - iterations: { - isArray: true, - typeInfo: exports.TypeInfo.TimelineTeamIteration - }, - status: { - typeInfo: exports.TypeInfo.TimelineTeamStatus - } -}; -exports.TypeInfo.TimelineTeamIteration.fields = { - finishDate: { - isDate: true, - }, - startDate: { - isDate: true, - }, - status: { - typeInfo: exports.TypeInfo.TimelineIterationStatus - } -}; -exports.TypeInfo.TimelineTeamStatus.fields = { - type: { - enumType: exports.TypeInfo.TimelineTeamStatusCode - } -}; -exports.TypeInfo.UpdatePlan.fields = { - type: { - enumType: exports.TypeInfo.PlanType - } -}; + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } -/***/ }), + return this.compareMain(other) || this.comparePre(other) +} -/***/ 6938: -/***/ ((__unused_webpack_module, exports) => { +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Flag to control error policy in a batch classification nodes get request. - */ -var ClassificationNodesErrorPolicy; -(function (ClassificationNodesErrorPolicy) { - ClassificationNodesErrorPolicy[ClassificationNodesErrorPolicy["Fail"] = 1] = "Fail"; - ClassificationNodesErrorPolicy[ClassificationNodesErrorPolicy["Omit"] = 2] = "Omit"; -})(ClassificationNodesErrorPolicy = exports.ClassificationNodesErrorPolicy || (exports.ClassificationNodesErrorPolicy = {})); -/** - * Specifies the additional data retrieval options for work item comments. - */ -var CommentExpandOptions; -(function (CommentExpandOptions) { - CommentExpandOptions[CommentExpandOptions["None"] = 0] = "None"; - /** - * Include comment reactions. - */ - CommentExpandOptions[CommentExpandOptions["Reactions"] = 1] = "Reactions"; - /** - * Include the rendered text (html) in addition to MD text. - */ - CommentExpandOptions[CommentExpandOptions["RenderedText"] = 8] = "RenderedText"; - /** - * If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes. - */ - CommentExpandOptions[CommentExpandOptions["RenderedTextOnly"] = 16] = "RenderedTextOnly"; - CommentExpandOptions[CommentExpandOptions["All"] = -17] = "All"; -})(CommentExpandOptions = exports.CommentExpandOptions || (exports.CommentExpandOptions = {})); -/** - * Represents different reaction types for a work item comment. - */ -var CommentReactionType; -(function (CommentReactionType) { - CommentReactionType[CommentReactionType["Like"] = 0] = "Like"; - CommentReactionType[CommentReactionType["Dislike"] = 1] = "Dislike"; - CommentReactionType[CommentReactionType["Heart"] = 2] = "Heart"; - CommentReactionType[CommentReactionType["Hooray"] = 3] = "Hooray"; - CommentReactionType[CommentReactionType["Smile"] = 4] = "Smile"; - CommentReactionType[CommentReactionType["Confused"] = 5] = "Confused"; -})(CommentReactionType = exports.CommentReactionType || (exports.CommentReactionType = {})); -var CommentSortOrder; -(function (CommentSortOrder) { - /** - * The results will be sorted in Ascending order. - */ - CommentSortOrder[CommentSortOrder["Asc"] = 1] = "Asc"; - /** - * The results will be sorted in Descending order. - */ - CommentSortOrder[CommentSortOrder["Desc"] = 2] = "Desc"; -})(CommentSortOrder = exports.CommentSortOrder || (exports.CommentSortOrder = {})); -/** - * Enum for field types. - */ -var FieldType; -(function (FieldType) { - /** - * String field type. - */ - FieldType[FieldType["String"] = 0] = "String"; - /** - * Integer field type. - */ - FieldType[FieldType["Integer"] = 1] = "Integer"; - /** - * Datetime field type. - */ - FieldType[FieldType["DateTime"] = 2] = "DateTime"; - /** - * Plain text field type. - */ - FieldType[FieldType["PlainText"] = 3] = "PlainText"; - /** - * HTML (Multiline) field type. - */ - FieldType[FieldType["Html"] = 4] = "Html"; - /** - * Treepath field type. - */ - FieldType[FieldType["TreePath"] = 5] = "TreePath"; - /** - * History field type. - */ - FieldType[FieldType["History"] = 6] = "History"; - /** - * Double field type. - */ - FieldType[FieldType["Double"] = 7] = "Double"; - /** - * Guid field type. - */ - FieldType[FieldType["Guid"] = 8] = "Guid"; - /** - * Boolean field type. - */ - FieldType[FieldType["Boolean"] = 9] = "Boolean"; - /** - * Identity field type. - */ - FieldType[FieldType["Identity"] = 10] = "Identity"; - /** - * String picklist field type. When creating a string picklist field from REST API, use "String" FieldType. - */ - FieldType[FieldType["PicklistString"] = 11] = "PicklistString"; - /** - * Integer picklist field type. When creating a integer picklist field from REST API, use "Integer" FieldType. - */ - FieldType[FieldType["PicklistInteger"] = 12] = "PicklistInteger"; - /** - * Double picklist field type. When creating a double picklist field from REST API, use "Double" FieldType. - */ - FieldType[FieldType["PicklistDouble"] = 13] = "PicklistDouble"; -})(FieldType = exports.FieldType || (exports.FieldType = {})); -/** - * Enum for field usages. - */ -var FieldUsage; -(function (FieldUsage) { - /** - * Empty usage. - */ - FieldUsage[FieldUsage["None"] = 0] = "None"; - /** - * Work item field usage. - */ - FieldUsage[FieldUsage["WorkItem"] = 1] = "WorkItem"; - /** - * Work item link field usage. - */ - FieldUsage[FieldUsage["WorkItemLink"] = 2] = "WorkItemLink"; - /** - * Treenode field usage. - */ - FieldUsage[FieldUsage["Tree"] = 3] = "Tree"; - /** - * Work Item Type Extension usage. - */ - FieldUsage[FieldUsage["WorkItemTypeExtension"] = 4] = "WorkItemTypeExtension"; -})(FieldUsage = exports.FieldUsage || (exports.FieldUsage = {})); -/** - * Flag to expand types of fields. - */ -var GetFieldsExpand; -(function (GetFieldsExpand) { - /** - * Default behavior. - */ - GetFieldsExpand[GetFieldsExpand["None"] = 0] = "None"; - /** - * Adds extension fields to the response. - */ - GetFieldsExpand[GetFieldsExpand["ExtensionFields"] = 1] = "ExtensionFields"; - /** - * Includes fields that have been deleted. - */ - GetFieldsExpand[GetFieldsExpand["IncludeDeleted"] = 2] = "IncludeDeleted"; -})(GetFieldsExpand = exports.GetFieldsExpand || (exports.GetFieldsExpand = {})); -/** - * The link query mode which determines the behavior of the query. - */ -var LinkQueryMode; -(function (LinkQueryMode) { - /** - * Returns flat list of work items. - */ - LinkQueryMode[LinkQueryMode["WorkItems"] = 0] = "WorkItems"; - /** - * Returns work items where the source, target, and link criteria are all satisfied. - */ - LinkQueryMode[LinkQueryMode["LinksOneHopMustContain"] = 1] = "LinksOneHopMustContain"; - /** - * Returns work items that satisfy the source and link criteria, even if no linked work item satisfies the target criteria. - */ - LinkQueryMode[LinkQueryMode["LinksOneHopMayContain"] = 2] = "LinksOneHopMayContain"; - /** - * Returns work items that satisfy the source, only if no linked work item satisfies the link and target criteria. - */ - LinkQueryMode[LinkQueryMode["LinksOneHopDoesNotContain"] = 3] = "LinksOneHopDoesNotContain"; - LinkQueryMode[LinkQueryMode["LinksRecursiveMustContain"] = 4] = "LinksRecursiveMustContain"; - /** - * Returns work items a hierarchy of work items that by default satisfy the source - */ - LinkQueryMode[LinkQueryMode["LinksRecursiveMayContain"] = 5] = "LinksRecursiveMayContain"; - LinkQueryMode[LinkQueryMode["LinksRecursiveDoesNotContain"] = 6] = "LinksRecursiveDoesNotContain"; -})(LinkQueryMode = exports.LinkQueryMode || (exports.LinkQueryMode = {})); -var LogicalOperation; -(function (LogicalOperation) { - LogicalOperation[LogicalOperation["NONE"] = 0] = "NONE"; - LogicalOperation[LogicalOperation["AND"] = 1] = "AND"; - LogicalOperation[LogicalOperation["OR"] = 2] = "OR"; -})(LogicalOperation = exports.LogicalOperation || (exports.LogicalOperation = {})); -/** - * Enumerates the possible provisioning actions that can be triggered on process template update. - */ -var ProvisioningActionType; -(function (ProvisioningActionType) { - ProvisioningActionType[ProvisioningActionType["Import"] = 0] = "Import"; - ProvisioningActionType[ProvisioningActionType["Validate"] = 1] = "Validate"; -})(ProvisioningActionType = exports.ProvisioningActionType || (exports.ProvisioningActionType = {})); -/** - * Enum to control error policy in a query batch request. - */ -var QueryErrorPolicy; -(function (QueryErrorPolicy) { - QueryErrorPolicy[QueryErrorPolicy["Fail"] = 1] = "Fail"; - QueryErrorPolicy[QueryErrorPolicy["Omit"] = 2] = "Omit"; -})(QueryErrorPolicy = exports.QueryErrorPolicy || (exports.QueryErrorPolicy = {})); -/** - * Determines which set of additional query properties to display - */ -var QueryExpand; -(function (QueryExpand) { - /** - * Expands Columns, Links and ChangeInfo - */ - QueryExpand[QueryExpand["None"] = 0] = "None"; - /** - * Expands Columns, Links, ChangeInfo and WIQL text - */ - QueryExpand[QueryExpand["Wiql"] = 1] = "Wiql"; - /** - * Expands Columns, Links, ChangeInfo, WIQL text and clauses - */ - QueryExpand[QueryExpand["Clauses"] = 2] = "Clauses"; - /** - * Expands all properties - */ - QueryExpand[QueryExpand["All"] = 3] = "All"; - /** - * Displays minimal properties and the WIQL text - */ - QueryExpand[QueryExpand["Minimal"] = 4] = "Minimal"; -})(QueryExpand = exports.QueryExpand || (exports.QueryExpand = {})); -var QueryOption; -(function (QueryOption) { - QueryOption[QueryOption["Doing"] = 1] = "Doing"; - QueryOption[QueryOption["Done"] = 2] = "Done"; - QueryOption[QueryOption["Followed"] = 3] = "Followed"; -})(QueryOption = exports.QueryOption || (exports.QueryOption = {})); -/** - * Determines whether a tree query matches parents or children first. - */ -var QueryRecursionOption; -(function (QueryRecursionOption) { - /** - * Returns work items that satisfy the source, even if no linked work item satisfies the target and link criteria. - */ - QueryRecursionOption[QueryRecursionOption["ParentFirst"] = 0] = "ParentFirst"; - /** - * Returns work items that satisfy the target criteria, even if no work item satisfies the source and link criteria. - */ - QueryRecursionOption[QueryRecursionOption["ChildFirst"] = 1] = "ChildFirst"; -})(QueryRecursionOption = exports.QueryRecursionOption || (exports.QueryRecursionOption = {})); -/** - * The query result type - */ -var QueryResultType; -(function (QueryResultType) { - /** - * A list of work items (for flat queries). - */ - QueryResultType[QueryResultType["WorkItem"] = 1] = "WorkItem"; - /** - * A list of work item links (for OneHop and Tree queries). - */ - QueryResultType[QueryResultType["WorkItemLink"] = 2] = "WorkItemLink"; -})(QueryResultType = exports.QueryResultType || (exports.QueryResultType = {})); -/** - * The type of query. - */ -var QueryType; -(function (QueryType) { - /** - * Gets a flat list of work items. - */ - QueryType[QueryType["Flat"] = 1] = "Flat"; - /** - * Gets a tree of work items showing their link hierarchy. - */ - QueryType[QueryType["Tree"] = 2] = "Tree"; - /** - * Gets a list of work items and their direct links. - */ - QueryType[QueryType["OneHop"] = 3] = "OneHop"; -})(QueryType = exports.QueryType || (exports.QueryType = {})); -/** - * The reporting revision expand level. - */ -var ReportingRevisionsExpand; -(function (ReportingRevisionsExpand) { - /** - * Default behavior. - */ - ReportingRevisionsExpand[ReportingRevisionsExpand["None"] = 0] = "None"; - /** - * Add fields to the response. - */ - ReportingRevisionsExpand[ReportingRevisionsExpand["Fields"] = 1] = "Fields"; -})(ReportingRevisionsExpand = exports.ReportingRevisionsExpand || (exports.ReportingRevisionsExpand = {})); -/** - * Enumerates types of supported xml templates used for customization. - */ -var TemplateType; -(function (TemplateType) { - TemplateType[TemplateType["WorkItemType"] = 0] = "WorkItemType"; - TemplateType[TemplateType["GlobalWorkflow"] = 1] = "GlobalWorkflow"; -})(TemplateType = exports.TemplateType || (exports.TemplateType = {})); -/** - * Types of tree node structures. - */ -var TreeNodeStructureType; -(function (TreeNodeStructureType) { - /** - * Area type. - */ - TreeNodeStructureType[TreeNodeStructureType["Area"] = 0] = "Area"; - /** - * Iteration type. - */ - TreeNodeStructureType[TreeNodeStructureType["Iteration"] = 1] = "Iteration"; -})(TreeNodeStructureType = exports.TreeNodeStructureType || (exports.TreeNodeStructureType = {})); -/** - * Types of tree structures groups. - */ -var TreeStructureGroup; -(function (TreeStructureGroup) { - TreeStructureGroup[TreeStructureGroup["Areas"] = 0] = "Areas"; - TreeStructureGroup[TreeStructureGroup["Iterations"] = 1] = "Iterations"; -})(TreeStructureGroup = exports.TreeStructureGroup || (exports.TreeStructureGroup = {})); -/** - * Enum to control error policy in a bulk get work items request. - */ -var WorkItemErrorPolicy; -(function (WorkItemErrorPolicy) { - /** - * Fail work error policy. - */ - WorkItemErrorPolicy[WorkItemErrorPolicy["Fail"] = 1] = "Fail"; - /** - * Omit work error policy. - */ - WorkItemErrorPolicy[WorkItemErrorPolicy["Omit"] = 2] = "Omit"; -})(WorkItemErrorPolicy = exports.WorkItemErrorPolicy || (exports.WorkItemErrorPolicy = {})); -/** - * Flag to control payload properties from get work item command. - */ -var WorkItemExpand; -(function (WorkItemExpand) { - /** - * Default behavior. - */ - WorkItemExpand[WorkItemExpand["None"] = 0] = "None"; - /** - * Relations work item expand. - */ - WorkItemExpand[WorkItemExpand["Relations"] = 1] = "Relations"; - /** - * Fields work item expand. - */ - WorkItemExpand[WorkItemExpand["Fields"] = 2] = "Fields"; - /** - * Links work item expand. - */ - WorkItemExpand[WorkItemExpand["Links"] = 3] = "Links"; - /** - * Expands all. - */ - WorkItemExpand[WorkItemExpand["All"] = 4] = "All"; -})(WorkItemExpand = exports.WorkItemExpand || (exports.WorkItemExpand = {})); -/** - * Type of the activity - */ -var WorkItemRecentActivityType; -(function (WorkItemRecentActivityType) { - WorkItemRecentActivityType[WorkItemRecentActivityType["Visited"] = 0] = "Visited"; - WorkItemRecentActivityType[WorkItemRecentActivityType["Edited"] = 1] = "Edited"; - WorkItemRecentActivityType[WorkItemRecentActivityType["Deleted"] = 2] = "Deleted"; - WorkItemRecentActivityType[WorkItemRecentActivityType["Restored"] = 3] = "Restored"; -})(WorkItemRecentActivityType = exports.WorkItemRecentActivityType || (exports.WorkItemRecentActivityType = {})); -/** - * Expand options for the work item field(s) request. - */ -var WorkItemTypeFieldsExpandLevel; -(function (WorkItemTypeFieldsExpandLevel) { - /** - * Includes only basic properties of the field. - */ - WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["None"] = 0] = "None"; - /** - * Includes allowed values for the field. - */ - WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["AllowedValues"] = 1] = "AllowedValues"; - /** - * Includes dependent fields of the field. - */ - WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["DependentFields"] = 2] = "DependentFields"; - /** - * Includes allowed values and dependent fields of the field. - */ - WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["All"] = 3] = "All"; -})(WorkItemTypeFieldsExpandLevel = exports.WorkItemTypeFieldsExpandLevel || (exports.WorkItemTypeFieldsExpandLevel = {})); -exports.TypeInfo = { - AccountMyWorkResult: {}, - AccountRecentActivityWorkItemModel: {}, - AccountRecentActivityWorkItemModel2: {}, - AccountRecentActivityWorkItemModelBase: {}, - AccountRecentMentionWorkItemModel: {}, - AccountWorkWorkItemModel: {}, - ClassificationNodesErrorPolicy: { - enumValues: { - "fail": 1, - "omit": 2 - } - }, - Comment: {}, - CommentExpandOptions: { - enumValues: { - "none": 0, - "reactions": 1, - "renderedText": 8, - "renderedTextOnly": 16, - "all": -17 - } - }, - CommentList: {}, - CommentReaction: {}, - CommentReactionType: { - enumValues: { - "like": 0, - "dislike": 1, - "heart": 2, - "hooray": 3, - "smile": 4, - "confused": 5 - } - }, - CommentSortOrder: { - enumValues: { - "asc": 1, - "desc": 2 - } - }, - CommentVersion: {}, - ExternalDeployment: {}, - FieldType: { - enumValues: { - "string": 0, - "integer": 1, - "dateTime": 2, - "plainText": 3, - "html": 4, - "treePath": 5, - "history": 6, - "double": 7, - "guid": 8, - "boolean": 9, - "identity": 10, - "picklistString": 11, - "picklistInteger": 12, - "picklistDouble": 13 - } - }, - FieldUsage: { - enumValues: { - "none": 0, - "workItem": 1, - "workItemLink": 2, - "tree": 3, - "workItemTypeExtension": 4 - } - }, - GetFieldsExpand: { - enumValues: { - "none": 0, - "extensionFields": 1, - "includeDeleted": 2 - } - }, - LinkQueryMode: { - enumValues: { - "workItems": 0, - "linksOneHopMustContain": 1, - "linksOneHopMayContain": 2, - "linksOneHopDoesNotContain": 3, - "linksRecursiveMustContain": 4, - "linksRecursiveMayContain": 5, - "linksRecursiveDoesNotContain": 6 - } - }, - LogicalOperation: { - enumValues: { - "none": 0, - "and": 1, - "or": 2 - } - }, - ProvisioningActionType: { - enumValues: { - "import": 0, - "validate": 1 - } - }, - QueryBatchGetRequest: {}, - QueryErrorPolicy: { - enumValues: { - "fail": 1, - "omit": 2 - } - }, - QueryExpand: { - enumValues: { - "none": 0, - "wiql": 1, - "clauses": 2, - "all": 3, - "minimal": 4 - } - }, - QueryHierarchyItem: {}, - QueryHierarchyItemsResult: {}, - QueryOption: { - enumValues: { - "doing": 1, - "done": 2, - "followed": 3 - } - }, - QueryRecursionOption: { - enumValues: { - "parentFirst": 0, - "childFirst": 1 - } - }, - QueryResultType: { - enumValues: { - "workItem": 1, - "workItemLink": 2 - } - }, - QueryType: { - enumValues: { - "flat": 1, - "tree": 2, - "oneHop": 3 - } - }, - ReportingRevisionsExpand: { - enumValues: { - "none": 0, - "fields": 1 - } - }, - TemplateType: { - enumValues: { - "workItemType": 0, - "globalWorkflow": 1 - } - }, - TreeNodeStructureType: { - enumValues: { - "area": 0, - "iteration": 1 - } - }, - TreeStructureGroup: { - enumValues: { - "areas": 0, - "iterations": 1 - } - }, - WorkItemBatchGetRequest: {}, - WorkItemClassificationNode: {}, - WorkItemComment: {}, - WorkItemComments: {}, - WorkItemErrorPolicy: { - enumValues: { - "fail": 1, - "omit": 2 - } - }, - WorkItemExpand: { - enumValues: { - "none": 0, - "relations": 1, - "fields": 2, - "links": 3, - "all": 4 - } - }, - WorkItemField: {}, - WorkItemField2: {}, - WorkItemHistory: {}, - WorkItemQueryClause: {}, - WorkItemQueryResult: {}, - WorkItemRecentActivityType: { - enumValues: { - "visited": 0, - "edited": 1, - "deleted": 2, - "restored": 3 - } - }, - WorkItemTagDefinition: {}, - WorkItemTypeFieldsExpandLevel: { - enumValues: { - "none": 0, - "allowedValues": 1, - "dependentFields": 2, - "all": 3 - } - }, - WorkItemTypeTemplateUpdateModel: {}, - WorkItemUpdate: {}, -}; -exports.TypeInfo.AccountMyWorkResult.fields = { - workItemDetails: { - isArray: true, - typeInfo: exports.TypeInfo.AccountWorkWorkItemModel - } -}; -exports.TypeInfo.AccountRecentActivityWorkItemModel.fields = { - activityDate: { - isDate: true, - }, - activityType: { - enumType: exports.TypeInfo.WorkItemRecentActivityType - }, - changedDate: { - isDate: true, - } -}; -exports.TypeInfo.AccountRecentActivityWorkItemModel2.fields = { - activityDate: { - isDate: true, - }, - activityType: { - enumType: exports.TypeInfo.WorkItemRecentActivityType - }, - changedDate: { - isDate: true, - } -}; -exports.TypeInfo.AccountRecentActivityWorkItemModelBase.fields = { - activityDate: { - isDate: true, - }, - activityType: { - enumType: exports.TypeInfo.WorkItemRecentActivityType - }, - changedDate: { - isDate: true, - } -}; -exports.TypeInfo.AccountRecentMentionWorkItemModel.fields = { - mentionedDateField: { - isDate: true, - } -}; -exports.TypeInfo.AccountWorkWorkItemModel.fields = { - changedDate: { - isDate: true, - } -}; -exports.TypeInfo.Comment.fields = { - createdDate: { - isDate: true, - }, - createdOnBehalfDate: { - isDate: true, - }, - modifiedDate: { - isDate: true, - }, - reactions: { - isArray: true, - typeInfo: exports.TypeInfo.CommentReaction - } -}; -exports.TypeInfo.CommentList.fields = { - comments: { - isArray: true, - typeInfo: exports.TypeInfo.Comment - } -}; -exports.TypeInfo.CommentReaction.fields = { - type: { - enumType: exports.TypeInfo.CommentReactionType - } -}; -exports.TypeInfo.CommentVersion.fields = { - createdDate: { - isDate: true, - }, - createdOnBehalfDate: { - isDate: true, - }, - modifiedDate: { - isDate: true, - } -}; -exports.TypeInfo.ExternalDeployment.fields = { - statusDate: { - isDate: true, - } -}; -exports.TypeInfo.QueryBatchGetRequest.fields = { - $expand: { - enumType: exports.TypeInfo.QueryExpand - }, - errorPolicy: { - enumType: exports.TypeInfo.QueryErrorPolicy - } -}; -exports.TypeInfo.QueryHierarchyItem.fields = { - children: { - isArray: true, - typeInfo: exports.TypeInfo.QueryHierarchyItem - }, - clauses: { - typeInfo: exports.TypeInfo.WorkItemQueryClause - }, - createdDate: { - isDate: true, - }, - filterOptions: { - enumType: exports.TypeInfo.LinkQueryMode - }, - lastExecutedDate: { - isDate: true, - }, - lastModifiedDate: { - isDate: true, - }, - linkClauses: { - typeInfo: exports.TypeInfo.WorkItemQueryClause - }, - queryRecursionOption: { - enumType: exports.TypeInfo.QueryRecursionOption - }, - queryType: { - enumType: exports.TypeInfo.QueryType - }, - sourceClauses: { - typeInfo: exports.TypeInfo.WorkItemQueryClause - }, - targetClauses: { - typeInfo: exports.TypeInfo.WorkItemQueryClause - } -}; -exports.TypeInfo.QueryHierarchyItemsResult.fields = { - value: { - isArray: true, - typeInfo: exports.TypeInfo.QueryHierarchyItem - } -}; -exports.TypeInfo.WorkItemBatchGetRequest.fields = { - $expand: { - enumType: exports.TypeInfo.WorkItemExpand - }, - asOf: { - isDate: true, - }, - errorPolicy: { - enumType: exports.TypeInfo.WorkItemErrorPolicy - } -}; -exports.TypeInfo.WorkItemClassificationNode.fields = { - children: { - isArray: true, - typeInfo: exports.TypeInfo.WorkItemClassificationNode - }, - structureType: { - enumType: exports.TypeInfo.TreeNodeStructureType - } -}; -exports.TypeInfo.WorkItemComment.fields = { - revisedDate: { - isDate: true, - } -}; -exports.TypeInfo.WorkItemComments.fields = { - comments: { - isArray: true, - typeInfo: exports.TypeInfo.WorkItemComment - } -}; -exports.TypeInfo.WorkItemField.fields = { - type: { - enumType: exports.TypeInfo.FieldType - }, - usage: { - enumType: exports.TypeInfo.FieldUsage - } -}; -exports.TypeInfo.WorkItemField2.fields = { - type: { - enumType: exports.TypeInfo.FieldType - }, - usage: { - enumType: exports.TypeInfo.FieldUsage - } -}; -exports.TypeInfo.WorkItemHistory.fields = { - revisedDate: { - isDate: true, - } -}; -exports.TypeInfo.WorkItemQueryClause.fields = { - clauses: { - isArray: true, - typeInfo: exports.TypeInfo.WorkItemQueryClause - }, - logicalOperator: { - enumType: exports.TypeInfo.LogicalOperation - } -}; -exports.TypeInfo.WorkItemQueryResult.fields = { - asOf: { - isDate: true, - }, - queryResultType: { - enumType: exports.TypeInfo.QueryResultType - }, - queryType: { - enumType: exports.TypeInfo.QueryType - } -}; -exports.TypeInfo.WorkItemTagDefinition.fields = { - lastUpdated: { - isDate: true, - } -}; -exports.TypeInfo.WorkItemTypeTemplateUpdateModel.fields = { - actionType: { - enumType: exports.TypeInfo.ProvisioningActionType - }, - templateType: { - enumType: exports.TypeInfo.TemplateType - } -}; -exports.TypeInfo.WorkItemUpdate.fields = { - revisedDate: { - isDate: true, - } -}; + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} -/***/ }), +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} -/***/ 1655: -/***/ ((__unused_webpack_module, exports) => { +exports.compareIdentifiers = compareIdentifiers -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Enum for the type of a field. - */ -var FieldType; -(function (FieldType) { - /** - * String field type. - */ - FieldType[FieldType["String"] = 1] = "String"; - /** - * Integer field type. - */ - FieldType[FieldType["Integer"] = 2] = "Integer"; - /** - * Datetime field type. - */ - FieldType[FieldType["DateTime"] = 3] = "DateTime"; - /** - * Plain Text field type. - */ - FieldType[FieldType["PlainText"] = 5] = "PlainText"; - /** - * HTML (Multiline) field type. - */ - FieldType[FieldType["Html"] = 7] = "Html"; - /** - * Treepath field type. - */ - FieldType[FieldType["TreePath"] = 8] = "TreePath"; - /** - * History field type. - */ - FieldType[FieldType["History"] = 9] = "History"; - /** - * Double field type. - */ - FieldType[FieldType["Double"] = 10] = "Double"; - /** - * Guid field type. - */ - FieldType[FieldType["Guid"] = 11] = "Guid"; - /** - * Boolean field type. - */ - FieldType[FieldType["Boolean"] = 12] = "Boolean"; - /** - * Identity field type. - */ - FieldType[FieldType["Identity"] = 13] = "Identity"; - /** - * Integer picklist field type. - */ - FieldType[FieldType["PicklistInteger"] = 14] = "PicklistInteger"; - /** - * String picklist field type. - */ - FieldType[FieldType["PicklistString"] = 15] = "PicklistString"; - /** - * Double picklist field type. - */ - FieldType[FieldType["PicklistDouble"] = 16] = "PicklistDouble"; -})(FieldType = exports.FieldType || (exports.FieldType = {})); -var GetWorkItemTypeExpand; -(function (GetWorkItemTypeExpand) { - GetWorkItemTypeExpand[GetWorkItemTypeExpand["None"] = 0] = "None"; - GetWorkItemTypeExpand[GetWorkItemTypeExpand["States"] = 1] = "States"; - GetWorkItemTypeExpand[GetWorkItemTypeExpand["Behaviors"] = 2] = "Behaviors"; - GetWorkItemTypeExpand[GetWorkItemTypeExpand["Layout"] = 4] = "Layout"; -})(GetWorkItemTypeExpand = exports.GetWorkItemTypeExpand || (exports.GetWorkItemTypeExpand = {})); -/** - * Type of page - */ -var PageType; -(function (PageType) { - PageType[PageType["Custom"] = 1] = "Custom"; - PageType[PageType["History"] = 2] = "History"; - PageType[PageType["Links"] = 3] = "Links"; - PageType[PageType["Attachments"] = 4] = "Attachments"; -})(PageType = exports.PageType || (exports.PageType = {})); -/** - * Work item type classes' - */ -var WorkItemTypeClass; -(function (WorkItemTypeClass) { - WorkItemTypeClass[WorkItemTypeClass["System"] = 0] = "System"; - WorkItemTypeClass[WorkItemTypeClass["Derived"] = 1] = "Derived"; - WorkItemTypeClass[WorkItemTypeClass["Custom"] = 2] = "Custom"; -})(WorkItemTypeClass = exports.WorkItemTypeClass || (exports.WorkItemTypeClass = {})); -exports.TypeInfo = { - FieldModel: {}, - FieldType: { - enumValues: { - "string": 1, - "integer": 2, - "dateTime": 3, - "plainText": 5, - "html": 7, - "treePath": 8, - "history": 9, - "double": 10, - "guid": 11, - "boolean": 12, - "identity": 13, - "picklistInteger": 14, - "picklistString": 15, - "picklistDouble": 16 - } - }, - FormLayout: {}, - GetWorkItemTypeExpand: { - enumValues: { - "none": 0, - "states": 1, - "behaviors": 2, - "layout": 4 - } - }, - Page: {}, - PageType: { - enumValues: { - "custom": 1, - "history": 2, - "links": 3, - "attachments": 4 - } - }, - WorkItemTypeClass: { - enumValues: { - "system": 0, - "derived": 1, - "custom": 2 - } - }, - WorkItemTypeFieldModel: {}, - WorkItemTypeFieldModel2: {}, - WorkItemTypeModel: {}, -}; -exports.TypeInfo.FieldModel.fields = { - type: { - enumType: exports.TypeInfo.FieldType - } -}; -exports.TypeInfo.FormLayout.fields = { - pages: { - isArray: true, - typeInfo: exports.TypeInfo.Page - } -}; -exports.TypeInfo.Page.fields = { - pageType: { - enumType: exports.TypeInfo.PageType - } -}; -exports.TypeInfo.WorkItemTypeFieldModel.fields = { - type: { - enumType: exports.TypeInfo.FieldType - } -}; -exports.TypeInfo.WorkItemTypeFieldModel2.fields = { - type: { - enumType: exports.TypeInfo.FieldType - } -}; -exports.TypeInfo.WorkItemTypeModel.fields = { - class: { - enumType: exports.TypeInfo.WorkItemTypeClass - }, - layout: { - typeInfo: exports.TypeInfo.FormLayout - } -}; +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + if (anum && bnum) { + a = +a + b = +b + } -/***/ }), + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} -/***/ 4524: -/***/ ((__unused_webpack_module, exports) => { +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Indicates the customization-type. Customization-type is System if is system generated or by default. Customization-type is Inherited if the existing workitemtype of inherited process is customized. Customization-type is Custom if the newly created workitemtype is customized. - */ -var CustomizationType; -(function (CustomizationType) { - /** - * Customization-type is System if is system generated workitemtype. - */ - CustomizationType[CustomizationType["System"] = 1] = "System"; - /** - * Customization-type is Inherited if the existing workitemtype of inherited process is customized. - */ - CustomizationType[CustomizationType["Inherited"] = 2] = "Inherited"; - /** - * Customization-type is Custom if the newly created workitemtype is customized. - */ - CustomizationType[CustomizationType["Custom"] = 3] = "Custom"; -})(CustomizationType = exports.CustomizationType || (exports.CustomizationType = {})); -/** - * Enum for the type of a field. - */ -var FieldType; -(function (FieldType) { - /** - * String field type. - */ - FieldType[FieldType["String"] = 1] = "String"; - /** - * Integer field type. - */ - FieldType[FieldType["Integer"] = 2] = "Integer"; - /** - * DateTime field type. - */ - FieldType[FieldType["DateTime"] = 3] = "DateTime"; - /** - * Plain text field type. - */ - FieldType[FieldType["PlainText"] = 5] = "PlainText"; - /** - * HTML (Multiline) field type. - */ - FieldType[FieldType["Html"] = 7] = "Html"; - /** - * Treepath field type. - */ - FieldType[FieldType["TreePath"] = 8] = "TreePath"; - /** - * History field type. - */ - FieldType[FieldType["History"] = 9] = "History"; - /** - * Double field type. - */ - FieldType[FieldType["Double"] = 10] = "Double"; - /** - * Guid field type. - */ - FieldType[FieldType["Guid"] = 11] = "Guid"; - /** - * Boolean field type. - */ - FieldType[FieldType["Boolean"] = 12] = "Boolean"; - /** - * Identity field type. - */ - FieldType[FieldType["Identity"] = 13] = "Identity"; - /** - * Integer picklist field type. - */ - FieldType[FieldType["PicklistInteger"] = 14] = "PicklistInteger"; - /** - * String picklist field type. - */ - FieldType[FieldType["PicklistString"] = 15] = "PicklistString"; - /** - * Double picklist field type. - */ - FieldType[FieldType["PicklistDouble"] = 16] = "PicklistDouble"; -})(FieldType = exports.FieldType || (exports.FieldType = {})); -/** - * Expand options to fetch fields for behaviors API. - */ -var GetBehaviorsExpand; -(function (GetBehaviorsExpand) { - /** - * Default none option. - */ - GetBehaviorsExpand[GetBehaviorsExpand["None"] = 0] = "None"; - /** - * This option returns fields associated with a behavior. - */ - GetBehaviorsExpand[GetBehaviorsExpand["Fields"] = 1] = "Fields"; - /** - * This option returns fields associated with this behavior and all behaviors from which it inherits. - */ - GetBehaviorsExpand[GetBehaviorsExpand["CombinedFields"] = 2] = "CombinedFields"; -})(GetBehaviorsExpand = exports.GetBehaviorsExpand || (exports.GetBehaviorsExpand = {})); -/** - * The expand level of returned processes. - */ -var GetProcessExpandLevel; -(function (GetProcessExpandLevel) { - /** - * No expand level. - */ - GetProcessExpandLevel[GetProcessExpandLevel["None"] = 0] = "None"; - /** - * Projects expand level. - */ - GetProcessExpandLevel[GetProcessExpandLevel["Projects"] = 1] = "Projects"; -})(GetProcessExpandLevel = exports.GetProcessExpandLevel || (exports.GetProcessExpandLevel = {})); -/** - * Flag to define what properties to return in get work item type response. - */ -var GetWorkItemTypeExpand; -(function (GetWorkItemTypeExpand) { - /** - * Returns no properties in get work item type response. - */ - GetWorkItemTypeExpand[GetWorkItemTypeExpand["None"] = 0] = "None"; - /** - * Returns states property in get work item type response. - */ - GetWorkItemTypeExpand[GetWorkItemTypeExpand["States"] = 1] = "States"; - /** - * Returns behaviors property in get work item type response. - */ - GetWorkItemTypeExpand[GetWorkItemTypeExpand["Behaviors"] = 2] = "Behaviors"; - /** - * Returns layout property in get work item type response. - */ - GetWorkItemTypeExpand[GetWorkItemTypeExpand["Layout"] = 4] = "Layout"; -})(GetWorkItemTypeExpand = exports.GetWorkItemTypeExpand || (exports.GetWorkItemTypeExpand = {})); -/** - * Enum for the types of pages in the work item form layout - */ -var PageType; -(function (PageType) { - /** - * Custom page type. - */ - PageType[PageType["Custom"] = 1] = "Custom"; - /** - * History page type. - */ - PageType[PageType["History"] = 2] = "History"; - /** - * Link page type. - */ - PageType[PageType["Links"] = 3] = "Links"; - /** - * Attachment page type. - */ - PageType[PageType["Attachments"] = 4] = "Attachments"; -})(PageType = exports.PageType || (exports.PageType = {})); -var ProcessClass; -(function (ProcessClass) { - ProcessClass[ProcessClass["System"] = 0] = "System"; - ProcessClass[ProcessClass["Derived"] = 1] = "Derived"; - ProcessClass[ProcessClass["Custom"] = 2] = "Custom"; -})(ProcessClass = exports.ProcessClass || (exports.ProcessClass = {})); -/** - * Expand options for the work item field(s) request. - */ -var ProcessWorkItemTypeFieldsExpandLevel; -(function (ProcessWorkItemTypeFieldsExpandLevel) { - /** - * Includes only basic properties of the field. - */ - ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["None"] = 0] = "None"; - /** - * Includes allowed values for the field. - */ - ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["AllowedValues"] = 1] = "AllowedValues"; - /** - * Includes allowed values and dependent fields of the field. - */ - ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["All"] = 2] = "All"; -})(ProcessWorkItemTypeFieldsExpandLevel = exports.ProcessWorkItemTypeFieldsExpandLevel || (exports.ProcessWorkItemTypeFieldsExpandLevel = {})); -/** - * Type of action to take when the rule is triggered. - */ -var RuleActionType; -(function (RuleActionType) { - /** - * Make the target field required. Example : {"actionType":"$makeRequired","targetField":"Microsoft.VSTS.Common.Activity","value":""} - */ - RuleActionType[RuleActionType["MakeRequired"] = 1] = "MakeRequired"; - /** - * Make the target field read-only. Example : {"actionType":"$makeReadOnly","targetField":"Microsoft.VSTS.Common.Activity","value":""} - */ - RuleActionType[RuleActionType["MakeReadOnly"] = 2] = "MakeReadOnly"; - /** - * Set a default value on the target field. This is used if the user creates a integer/string field and sets a default value of this field. - */ - RuleActionType[RuleActionType["SetDefaultValue"] = 3] = "SetDefaultValue"; - /** - * Set the default value on the target field from server clock. This is used if user creates the field like Date/Time and uses default value. - */ - RuleActionType[RuleActionType["SetDefaultFromClock"] = 4] = "SetDefaultFromClock"; - /** - * Set the default current user value on the target field. This is used if the user creates the field of type identity and uses default value. - */ - RuleActionType[RuleActionType["SetDefaultFromCurrentUser"] = 5] = "SetDefaultFromCurrentUser"; - /** - * Set the default value on from existing field to the target field. This used wants to set a existing field value to the current field. - */ - RuleActionType[RuleActionType["SetDefaultFromField"] = 6] = "SetDefaultFromField"; - /** - * Set the value of target field to given value. Example : {actionType: "$copyValue", targetField: "ScrumInherited.mypicklist", value: "samplevalue"} - */ - RuleActionType[RuleActionType["CopyValue"] = 7] = "CopyValue"; - /** - * Set the value from clock. - */ - RuleActionType[RuleActionType["CopyFromClock"] = 8] = "CopyFromClock"; - /** - * Set the current user to the target field. Example : {"actionType":"$copyFromCurrentUser","targetField":"System.AssignedTo","value":""}. - */ - RuleActionType[RuleActionType["CopyFromCurrentUser"] = 9] = "CopyFromCurrentUser"; - /** - * Copy the value from a specified field and set to target field. Example : {actionType: "$copyFromField", targetField: "System.AssignedTo", value:"System.ChangedBy"}. Here, value is copied from "System.ChangedBy" and set to "System.AssingedTo" field. - */ - RuleActionType[RuleActionType["CopyFromField"] = 10] = "CopyFromField"; - /** - * Set the value of the target field to empty. - */ - RuleActionType[RuleActionType["SetValueToEmpty"] = 11] = "SetValueToEmpty"; - /** - * Use the current time to set the value of the target field. Example : {actionType: "$copyFromServerClock", targetField: "System.CreatedDate", value: ""} - */ - RuleActionType[RuleActionType["CopyFromServerClock"] = 12] = "CopyFromServerClock"; - /** - * Use the current user to set the value of the target field. - */ - RuleActionType[RuleActionType["CopyFromServerCurrentUser"] = 13] = "CopyFromServerCurrentUser"; - /** - * Hides target field from the form. This is a server side only action. - */ - RuleActionType[RuleActionType["HideTargetField"] = 14] = "HideTargetField"; - /** - * Disallows a field from being set to a specific value. - */ - RuleActionType[RuleActionType["DisallowValue"] = 15] = "DisallowValue"; -})(RuleActionType = exports.RuleActionType || (exports.RuleActionType = {})); -/** - * Type of rule condition. - */ -var RuleConditionType; -(function (RuleConditionType) { - /** - * $When. This condition limits the execution of its children to cases when another field has a particular value, i.e. when the Is value of the referenced field is equal to the given literal value. - */ - RuleConditionType[RuleConditionType["When"] = 1] = "When"; - /** - * $WhenNot.This condition limits the execution of its children to cases when another field does not have a particular value, i.e.when the Is value of the referenced field is not equal to the given literal value. - */ - RuleConditionType[RuleConditionType["WhenNot"] = 2] = "WhenNot"; - /** - * $WhenChanged.This condition limits the execution of its children to cases when another field has changed, i.e.when the Is value of the referenced field is not equal to the Was value of that field. - */ - RuleConditionType[RuleConditionType["WhenChanged"] = 3] = "WhenChanged"; - /** - * $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field. - */ - RuleConditionType[RuleConditionType["WhenNotChanged"] = 4] = "WhenNotChanged"; - RuleConditionType[RuleConditionType["WhenWas"] = 5] = "WhenWas"; - RuleConditionType[RuleConditionType["WhenStateChangedTo"] = 6] = "WhenStateChangedTo"; - RuleConditionType[RuleConditionType["WhenStateChangedFromAndTo"] = 7] = "WhenStateChangedFromAndTo"; - RuleConditionType[RuleConditionType["WhenWorkItemIsCreated"] = 8] = "WhenWorkItemIsCreated"; - RuleConditionType[RuleConditionType["WhenValueIsDefined"] = 9] = "WhenValueIsDefined"; - RuleConditionType[RuleConditionType["WhenValueIsNotDefined"] = 10] = "WhenValueIsNotDefined"; - RuleConditionType[RuleConditionType["WhenCurrentUserIsMemberOfGroup"] = 11] = "WhenCurrentUserIsMemberOfGroup"; - RuleConditionType[RuleConditionType["WhenCurrentUserIsNotMemberOfGroup"] = 12] = "WhenCurrentUserIsNotMemberOfGroup"; -})(RuleConditionType = exports.RuleConditionType || (exports.RuleConditionType = {})); -var WorkItemTypeClass; -(function (WorkItemTypeClass) { - WorkItemTypeClass[WorkItemTypeClass["System"] = 0] = "System"; - WorkItemTypeClass[WorkItemTypeClass["Derived"] = 1] = "Derived"; - WorkItemTypeClass[WorkItemTypeClass["Custom"] = 2] = "Custom"; -})(WorkItemTypeClass = exports.WorkItemTypeClass || (exports.WorkItemTypeClass = {})); -exports.TypeInfo = { - CreateProcessRuleRequest: {}, - CustomizationType: { - enumValues: { - "system": 1, - "inherited": 2, - "custom": 3 - } - }, - FieldModel: {}, - FieldType: { - enumValues: { - "string": 1, - "integer": 2, - "dateTime": 3, - "plainText": 5, - "html": 7, - "treePath": 8, - "history": 9, - "double": 10, - "guid": 11, - "boolean": 12, - "identity": 13, - "picklistInteger": 14, - "picklistString": 15, - "picklistDouble": 16 - } - }, - FormLayout: {}, - GetBehaviorsExpand: { - enumValues: { - "none": 0, - "fields": 1, - "combinedFields": 2 - } - }, - GetProcessExpandLevel: { - enumValues: { - "none": 0, - "projects": 1 - } - }, - GetWorkItemTypeExpand: { - enumValues: { - "none": 0, - "states": 1, - "behaviors": 2, - "layout": 4 - } - }, - Page: {}, - PageType: { - enumValues: { - "custom": 1, - "history": 2, - "links": 3, - "attachments": 4 - } - }, - ProcessBehavior: {}, - ProcessClass: { - enumValues: { - "system": 0, - "derived": 1, - "custom": 2 - } - }, - ProcessInfo: {}, - ProcessModel: {}, - ProcessProperties: {}, - ProcessRule: {}, - ProcessWorkItemType: {}, - ProcessWorkItemTypeField: {}, - ProcessWorkItemTypeFieldsExpandLevel: { - enumValues: { - "none": 0, - "allowedValues": 1, - "all": 2 - } - }, - RuleAction: {}, - RuleActionType: { - enumValues: { - "makeRequired": 1, - "makeReadOnly": 2, - "setDefaultValue": 3, - "setDefaultFromClock": 4, - "setDefaultFromCurrentUser": 5, - "setDefaultFromField": 6, - "copyValue": 7, - "copyFromClock": 8, - "copyFromCurrentUser": 9, - "copyFromField": 10, - "setValueToEmpty": 11, - "copyFromServerClock": 12, - "copyFromServerCurrentUser": 13, - "hideTargetField": 14, - "disallowValue": 15 - } - }, - RuleCondition: {}, - RuleConditionType: { - enumValues: { - "when": 1, - "whenNot": 2, - "whenChanged": 3, - "whenNotChanged": 4, - "whenWas": 5, - "whenStateChangedTo": 6, - "whenStateChangedFromAndTo": 7, - "whenWorkItemIsCreated": 8, - "whenValueIsDefined": 9, - "whenValueIsNotDefined": 10, - "whenCurrentUserIsMemberOfGroup": 11, - "whenCurrentUserIsNotMemberOfGroup": 12 - } - }, - UpdateProcessRuleRequest: {}, - WorkItemStateResultModel: {}, - WorkItemTypeClass: { - enumValues: { - "system": 0, - "derived": 1, - "custom": 2 - } - }, - WorkItemTypeModel: {}, -}; -exports.TypeInfo.CreateProcessRuleRequest.fields = { - actions: { - isArray: true, - typeInfo: exports.TypeInfo.RuleAction - }, - conditions: { - isArray: true, - typeInfo: exports.TypeInfo.RuleCondition - } -}; -exports.TypeInfo.FieldModel.fields = { - type: { - enumType: exports.TypeInfo.FieldType - } -}; -exports.TypeInfo.FormLayout.fields = { - pages: { - isArray: true, - typeInfo: exports.TypeInfo.Page - } -}; -exports.TypeInfo.Page.fields = { - pageType: { - enumType: exports.TypeInfo.PageType - } -}; -exports.TypeInfo.ProcessBehavior.fields = { - customization: { - enumType: exports.TypeInfo.CustomizationType - } -}; -exports.TypeInfo.ProcessInfo.fields = { - customizationType: { - enumType: exports.TypeInfo.CustomizationType - } -}; -exports.TypeInfo.ProcessModel.fields = { - properties: { - typeInfo: exports.TypeInfo.ProcessProperties - } -}; -exports.TypeInfo.ProcessProperties.fields = { - class: { - enumType: exports.TypeInfo.ProcessClass - } -}; -exports.TypeInfo.ProcessRule.fields = { - actions: { - isArray: true, - typeInfo: exports.TypeInfo.RuleAction - }, - conditions: { - isArray: true, - typeInfo: exports.TypeInfo.RuleCondition - }, - customizationType: { - enumType: exports.TypeInfo.CustomizationType - } -}; -exports.TypeInfo.ProcessWorkItemType.fields = { - customization: { - enumType: exports.TypeInfo.CustomizationType - }, - layout: { - typeInfo: exports.TypeInfo.FormLayout - }, - states: { - isArray: true, - typeInfo: exports.TypeInfo.WorkItemStateResultModel - } -}; -exports.TypeInfo.ProcessWorkItemTypeField.fields = { - customization: { - enumType: exports.TypeInfo.CustomizationType - }, - type: { - enumType: exports.TypeInfo.FieldType - } -}; -exports.TypeInfo.RuleAction.fields = { - actionType: { - enumType: exports.TypeInfo.RuleActionType - } -}; -exports.TypeInfo.RuleCondition.fields = { - conditionType: { - enumType: exports.TypeInfo.RuleConditionType - } -}; -exports.TypeInfo.UpdateProcessRuleRequest.fields = { - actions: { - isArray: true, - typeInfo: exports.TypeInfo.RuleAction - }, - conditions: { - isArray: true, - typeInfo: exports.TypeInfo.RuleCondition - } -}; -exports.TypeInfo.WorkItemStateResultModel.fields = { - customizationType: { - enumType: exports.TypeInfo.CustomizationType - } -}; -exports.TypeInfo.WorkItemTypeModel.fields = { - class: { - enumType: exports.TypeInfo.WorkItemTypeClass - }, - layout: { - typeInfo: exports.TypeInfo.FormLayout - }, - states: { - isArray: true, - typeInfo: exports.TypeInfo.WorkItemStateResultModel - } -}; +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + comp = comp.trim().split(/\s+/).join(' ') + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + if (range instanceof Comparator) { + return new Range(range.value, options) + } -/***/ }), + if (!(this instanceof Range)) { + return new Range(range, options) + } -/***/ 3627: -/***/ ((__unused_webpack_module, exports) => { + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease -"use strict"; -/* -* --------------------------------------------------------- -* Copyright(C) Microsoft Corporation. All rights reserved. -* --------------------------------------------------------- -* -* --------------------------------------------------------- -* Generated file, DO NOT EDIT -* --------------------------------------------------------- -* -* See following wiki page for instructions on how to regenerate: -* https://vsowiki.com/index.php?title=Rest_Client_Generation -*/ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var InputDataType; -(function (InputDataType) { - /** - * No data type is specified. - */ - InputDataType[InputDataType["None"] = 0] = "None"; - /** - * Represents a textual value. - */ - InputDataType[InputDataType["String"] = 10] = "String"; - /** - * Represents a numberic value. - */ - InputDataType[InputDataType["Number"] = 20] = "Number"; - /** - * Represents a value of true or false. - */ - InputDataType[InputDataType["Boolean"] = 30] = "Boolean"; - /** - * Represents a Guid. - */ - InputDataType[InputDataType["Guid"] = 40] = "Guid"; - /** - * Represents a URI. - */ - InputDataType[InputDataType["Uri"] = 50] = "Uri"; -})(InputDataType = exports.InputDataType || (exports.InputDataType = {})); -var InputFilterOperator; -(function (InputFilterOperator) { - InputFilterOperator[InputFilterOperator["Equals"] = 0] = "Equals"; - InputFilterOperator[InputFilterOperator["NotEquals"] = 1] = "NotEquals"; -})(InputFilterOperator = exports.InputFilterOperator || (exports.InputFilterOperator = {})); -var InputMode; -(function (InputMode) { - /** - * This input should not be shown in the UI - */ - InputMode[InputMode["None"] = 0] = "None"; - /** - * An input text box should be shown - */ - InputMode[InputMode["TextBox"] = 10] = "TextBox"; - /** - * An password input box should be shown - */ - InputMode[InputMode["PasswordBox"] = 20] = "PasswordBox"; - /** - * A select/combo control should be shown - */ - InputMode[InputMode["Combo"] = 30] = "Combo"; - /** - * Radio buttons should be shown - */ - InputMode[InputMode["RadioButtons"] = 40] = "RadioButtons"; - /** - * Checkbox should be shown(for true/false values) - */ - InputMode[InputMode["CheckBox"] = 50] = "CheckBox"; - /** - * A multi-line text area should be shown - */ - InputMode[InputMode["TextArea"] = 60] = "TextArea"; -})(InputMode = exports.InputMode || (exports.InputMode = {})); -exports.TypeInfo = { - InputDataType: { - enumValues: { - "none": 0, - "string": 10, - "number": 20, - "boolean": 30, - "guid": 40, - "uri": 50, - } - }, - InputDescriptor: { - fields: null - }, - InputFilter: { - fields: null - }, - InputFilterCondition: { - fields: null - }, - InputFilterOperator: { - enumValues: { - "equals": 0, - "notEquals": 1, - } - }, - InputMode: { - enumValues: { - "none": 0, - "textBox": 10, - "passwordBox": 20, - "combo": 30, - "radioButtons": 40, - "checkBox": 50, - "textArea": 60, - } - }, - InputValidation: { - fields: null - }, - InputValue: { - fields: null - }, - InputValues: { - fields: null - }, - InputValuesError: { - fields: null - }, - InputValuesQuery: { - fields: null - }, -}; -exports.TypeInfo.InputDescriptor.fields = { - inputMode: { - enumType: exports.TypeInfo.InputMode - }, - validation: { - typeInfo: exports.TypeInfo.InputValidation - }, - values: { - typeInfo: exports.TypeInfo.InputValues - }, -}; -exports.TypeInfo.InputFilter.fields = { - conditions: { - isArray: true, - typeInfo: exports.TypeInfo.InputFilterCondition - }, -}; -exports.TypeInfo.InputFilterCondition.fields = { - operator: { - enumType: exports.TypeInfo.InputFilterOperator - }, -}; -exports.TypeInfo.InputValidation.fields = { - dataType: { - enumType: exports.TypeInfo.InputDataType - }, -}; -exports.TypeInfo.InputValue.fields = {}; -exports.TypeInfo.InputValues.fields = { - error: { - typeInfo: exports.TypeInfo.InputValuesError - }, - possibleValues: { - isArray: true, - typeInfo: exports.TypeInfo.InputValue - }, -}; -exports.TypeInfo.InputValuesError.fields = {}; -exports.TypeInfo.InputValuesQuery.fields = { - inputValues: { - isArray: true, - typeInfo: exports.TypeInfo.InputValues - }, -}; + // First reduce all whitespace as much as possible so we do not have to rely + // on potentially slow regexes like \s*. This is then stored and used for + // future error messages as well. + this.raw = range + .trim() + .split(/\s+/) + .join(' ') + // First, split based on boolean or || + this.set = this.raw.split('||').map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) -/***/ }), + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + this.raw) + } -/***/ 3052: -/***/ ((__unused_webpack_module, exports) => { + this.format() +} -"use strict"; -/* -* --------------------------------------------------------- -* Copyright(C) Microsoft Corporation. All rights reserved. -* --------------------------------------------------------- -* -* --------------------------------------------------------- -* Generated file, DO NOT EDIT -* --------------------------------------------------------- -*/ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var OperationStatus; -(function (OperationStatus) { - /** - * The operation object does not have the status set. - */ - OperationStatus[OperationStatus["NotSet"] = 0] = "NotSet"; - /** - * The operation has been queued. - */ - OperationStatus[OperationStatus["Queued"] = 1] = "Queued"; - /** - * The operation is in progress. - */ - OperationStatus[OperationStatus["InProgress"] = 2] = "InProgress"; - /** - * The operation was cancelled by the user. - */ - OperationStatus[OperationStatus["Cancelled"] = 3] = "Cancelled"; - /** - * The operation completed successfully. - */ - OperationStatus[OperationStatus["Succeeded"] = 4] = "Succeeded"; - /** - * The operation completed with a failure. - */ - OperationStatus[OperationStatus["Failed"] = 5] = "Failed"; -})(OperationStatus = exports.OperationStatus || (exports.OperationStatus = {})); -exports.TypeInfo = { - OperationReference: { - fields: null - }, - OperationStatus: { - enumValues: { - "notSet": 0, - "queued": 1, - "inProgress": 2, - "cancelled": 3, - "succeeded": 4, - "failed": 5, - } - }, -}; -exports.TypeInfo.OperationReference.fields = { - status: { - enumType: exports.TypeInfo.OperationStatus - }, -}; +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} +Range.prototype.toString = function () { + return this.range +} -/***/ }), +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, safeRe[COMPARATORTRIM]) -/***/ 6790: -/***/ ((__unused_webpack_module, exports) => { + // `~ 1.2.3` => `~1.2.3` + range = range.replace(safeRe[TILDETRIM], tildeTrimReplace) -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DayOfWeek; -(function (DayOfWeek) { - /** - * Indicates Sunday. - */ - DayOfWeek[DayOfWeek["Sunday"] = 0] = "Sunday"; - /** - * Indicates Monday. - */ - DayOfWeek[DayOfWeek["Monday"] = 1] = "Monday"; - /** - * Indicates Tuesday. - */ - DayOfWeek[DayOfWeek["Tuesday"] = 2] = "Tuesday"; - /** - * Indicates Wednesday. - */ - DayOfWeek[DayOfWeek["Wednesday"] = 3] = "Wednesday"; - /** - * Indicates Thursday. - */ - DayOfWeek[DayOfWeek["Thursday"] = 4] = "Thursday"; - /** - * Indicates Friday. - */ - DayOfWeek[DayOfWeek["Friday"] = 5] = "Friday"; - /** - * Indicates Saturday. - */ - DayOfWeek[DayOfWeek["Saturday"] = 6] = "Saturday"; -})(DayOfWeek = exports.DayOfWeek || (exports.DayOfWeek = {})); -exports.TypeInfo = { - DayOfWeek: { - enumValues: { - "sunday": 0, - "monday": 1, - "tuesday": 2, - "wednesday": 3, - "thursday": 4, - "friday": 5, - "saturday": 6 - } - } -}; + // `^ 1.2.3` => `^1.2.3` + range = range.replace(safeRe[CARETTRIM], caretTrimReplace) + // At this point, the range is completely trimmed and + // ready to be split into comparators. + var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) -/***/ }), + return set +} -/***/ 4652: -/***/ ((__unused_webpack_module, exports) => { +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } -"use strict"; - -//---------------------------------------------------------- -// Copyright (C) Microsoft Corporation. All rights reserved. -//---------------------------------------------------------- -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Specifies SQL Server-specific data type of a field, property, for use in a System.Data.SqlClient.SqlParameter. - */ -var SqlDbType; -(function (SqlDbType) { - /** - * A 64-bit signed integer. - */ - SqlDbType[SqlDbType["BigInt"] = 0] = "BigInt"; - /** - * Array of type Byte. A fixed-length stream of binary data ranging between 1 and 8,000 bytes. - */ - SqlDbType[SqlDbType["Binary"] = 1] = "Binary"; - /** - * Boolean. An unsigned numeric value that can be 0, 1, or null. - */ - SqlDbType[SqlDbType["Bit"] = 2] = "Bit"; - /** - * String. A fixed-length stream of non-Unicode characters ranging between 1 and 8,000 characters. - */ - SqlDbType[SqlDbType["Char"] = 3] = "Char"; - /** - * DateTime. Date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds. - */ - SqlDbType[SqlDbType["DateTime"] = 4] = "DateTime"; - /** - * Decimal. A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1. - */ - SqlDbType[SqlDbType["Decimal"] = 5] = "Decimal"; - /** - * Double. A floating point number within the range of -1.79E +308 through 1.79E +308. - */ - SqlDbType[SqlDbType["Float"] = 6] = "Float"; - /** - * Array of type Byte. A variable-length stream of binary data ranging from 0 to 2 31 -1 (or 2,147,483,647) bytes. - */ - SqlDbType[SqlDbType["Image"] = 7] = "Image"; - /** - * Int32. A 32-bit signed integer. - */ - SqlDbType[SqlDbType["Int"] = 8] = "Int"; - /** - * Decimal. A currency value ranging from -2 63 (or -9,223,372,036,854,775,808) to 2 63 -1 (or +9,223,372,036,854,775,807) with an accuracy to a ten-thousandth of a currency unit. - */ - SqlDbType[SqlDbType["Money"] = 9] = "Money"; - /** - * String. A fixed-length stream of Unicode characters ranging between 1 and 4,000 characters. - */ - SqlDbType[SqlDbType["NChar"] = 10] = "NChar"; - /** - * String. A variable-length stream of Unicode data with a maximum length of 2 30 - 1 (or 1,073,741,823) characters. - */ - SqlDbType[SqlDbType["NText"] = 11] = "NText"; - /** - * String. A variable-length stream of Unicode characters ranging between 1 and 4,000 characters. Implicit conversion fails if the string is greater than 4,000 characters. Explicitly set the object when working with strings longer than 4,000 characters. Use System.Data.SqlDbType.NVarChar when the database column is nvarchar(max). - */ - SqlDbType[SqlDbType["NVarChar"] = 12] = "NVarChar"; - /** - * Single. A floating point number within the range of -3.40E +38 through 3.40E +38. - */ - SqlDbType[SqlDbType["Real"] = 13] = "Real"; - /** - * Guid. A globally unique identifier (or GUID). - */ - SqlDbType[SqlDbType["UniqueIdentifier"] = 14] = "UniqueIdentifier"; - /** - * DateTime. Date and time data ranging in value from January 1, 1900 to June 6, 2079 to an accuracy of one minute. - */ - SqlDbType[SqlDbType["SmallDateTime"] = 15] = "SmallDateTime"; - /** - * Int16. A 16-bit signed integer. - */ - SqlDbType[SqlDbType["SmallInt"] = 16] = "SmallInt"; - /** - * Decimal. A currency value ranging from -214,748.3648 to +214,748.3647 with an accuracy to a ten-thousandth of a currency unit. - */ - SqlDbType[SqlDbType["SmallMoney"] = 17] = "SmallMoney"; - /** - * String. A variable-length stream of non-Unicode data with a maximum length of 2 31 -1 (or 2,147,483,647) characters. - */ - SqlDbType[SqlDbType["Text"] = 18] = "Text"; - /** - * Array of type System.Byte. Automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes. - */ - SqlDbType[SqlDbType["Timestamp"] = 19] = "Timestamp"; - /** - * Byte. An 8-bit unsigned integer. - */ - SqlDbType[SqlDbType["TinyInt"] = 20] = "TinyInt"; - /** - * Array of type Byte. A variable-length stream of binary data ranging between 1 and 8,000 bytes. Implicit conversion fails if the byte array is greater than 8,000 bytes. Explicitly set the object when working with byte arrays larger than 8,000 bytes. - */ - SqlDbType[SqlDbType["VarBinary"] = 21] = "VarBinary"; - /** - * String. A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters. Use System.Data.SqlDbType.VarChar when the database column is varchar(max). - */ - SqlDbType[SqlDbType["VarChar"] = 22] = "VarChar"; - /** - * Object. A special data type that can contain numeric, string, binary, or date data as well as the SQL Server values Empty and Null, which is assumed if no other type is declared. - */ - SqlDbType[SqlDbType["Variant"] = 23] = "Variant"; - /** - * An XML value. Obtain the XML as a string using the System.Data.SqlClient.SqlDataReader.GetValue(System.Int32) method or System.Data.SqlTypes.SqlXml.Value property, or as an System.Xml.XmlReader by calling the System.Data.SqlTypes.SqlXml.CreateReader method. - */ - SqlDbType[SqlDbType["Xml"] = 25] = "Xml"; - /** - * A SQL Server user-defined type (UDT). - */ - SqlDbType[SqlDbType["Udt"] = 29] = "Udt"; - /** - * A special data type for specifying structured data contained in table-valued parameters. - */ - SqlDbType[SqlDbType["Structured"] = 30] = "Structured"; - /** - * Date data ranging in value from January 1,1 AD through December 31, 9999 AD. - */ - SqlDbType[SqlDbType["Date"] = 31] = "Date"; - /** - * Time data based on a 24-hour clock. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Corresponds to a SQL Server time value. - */ - SqlDbType[SqlDbType["Time"] = 32] = "Time"; - /** - * Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. - */ - SqlDbType[SqlDbType["DateTime2"] = 33] = "DateTime2"; - /** - * Date and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range is -14:00 through +14:00. - */ - SqlDbType[SqlDbType["DateTimeOffset"] = 34] = "DateTimeOffset"; -})(SqlDbType = exports.SqlDbType || (exports.SqlDbType = {})); -exports.TypeInfo = { - SqlDbType: { - enumValues: { - "BigInt": 0, - "Binary": 1, - "Bit": 2, - "Char": 3, - "DateTime": 4, - "Decimal": 5, - "Float": 6, - "Image": 7, - "Int": 8, - "Money": 9, - "NChar": 10, - "NText": 11, - "NVarChar": 12, - "Real": 13, - "UniqueIdentifier": 14, - "SmallDateTime": 15, - "SmallInt": 16, - "SmallMoney": 17, - "Text": 18, - "Timestamp": 19, - "TinyInt": 20, - "VarBinary": 21, - "VarChar": 22, - "Variant": 23, - "Xml": 25, - "Udt": 29, - "Structured": 30, - "Date": 31, - "Time": 32, - "DateTime2": 33, - "DateTimeOffset": 34 - } - } -}; + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(safeRe[STAR], '') +} + +// This function is passed to string.replace(safeRe[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(safeRe[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} /***/ }), -/***/ 4498: -/***/ ((__unused_webpack_module, exports) => { +/***/ 16782: +/***/ ((module) => { -"use strict"; -/* - * --------------------------------------------------------- - * Copyright(C) Microsoft Corporation. All rights reserved. - * --------------------------------------------------------- - * - * --------------------------------------------------------- - * Generated file, DO NOT EDIT - * --------------------------------------------------------- - */ - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Enumeration of the options that can be passed in on Connect. - */ -var ConnectOptions; -(function (ConnectOptions) { - /** - * Retrieve no optional data. - */ - ConnectOptions[ConnectOptions["None"] = 0] = "None"; - /** - * Includes information about AccessMappings and ServiceDefinitions. - */ - ConnectOptions[ConnectOptions["IncludeServices"] = 1] = "IncludeServices"; - /** - * Includes the last user access for this host. - */ - ConnectOptions[ConnectOptions["IncludeLastUserAccess"] = 2] = "IncludeLastUserAccess"; - /** - * This is only valid on the deployment host and when true. Will only return inherited definitions. - */ - ConnectOptions[ConnectOptions["IncludeInheritedDefinitionsOnly"] = 4] = "IncludeInheritedDefinitionsOnly"; - /** - * When true will only return non inherited definitions. Only valid at non-deployment host. - */ - ConnectOptions[ConnectOptions["IncludeNonInheritedDefinitionsOnly"] = 8] = "IncludeNonInheritedDefinitionsOnly"; -})(ConnectOptions = exports.ConnectOptions || (exports.ConnectOptions = {})); -var DeploymentFlags; -(function (DeploymentFlags) { - DeploymentFlags[DeploymentFlags["None"] = 0] = "None"; - DeploymentFlags[DeploymentFlags["Hosted"] = 1] = "Hosted"; - DeploymentFlags[DeploymentFlags["OnPremises"] = 2] = "OnPremises"; -})(DeploymentFlags = exports.DeploymentFlags || (exports.DeploymentFlags = {})); -var JWTAlgorithm; -(function (JWTAlgorithm) { - JWTAlgorithm[JWTAlgorithm["None"] = 0] = "None"; - JWTAlgorithm[JWTAlgorithm["HS256"] = 1] = "HS256"; - JWTAlgorithm[JWTAlgorithm["RS256"] = 2] = "RS256"; -})(JWTAlgorithm = exports.JWTAlgorithm || (exports.JWTAlgorithm = {})); -var Operation; -(function (Operation) { - Operation[Operation["Add"] = 0] = "Add"; - Operation[Operation["Remove"] = 1] = "Remove"; - Operation[Operation["Replace"] = 2] = "Replace"; - Operation[Operation["Move"] = 3] = "Move"; - Operation[Operation["Copy"] = 4] = "Copy"; - Operation[Operation["Test"] = 5] = "Test"; -})(Operation = exports.Operation || (exports.Operation = {})); -exports.TypeInfo = { - ConnectOptions: { - enumValues: { - "none": 0, - "includeServices": 1, - "includeLastUserAccess": 2, - "includeInheritedDefinitionsOnly": 4, - "includeNonInheritedDefinitionsOnly": 8 - } - }, - DeploymentFlags: { - enumValues: { - "none": 0, - "hosted": 1, - "onPremises": 2 - } - }, - JsonPatchOperation: {}, - JWTAlgorithm: { - enumValues: { - "none": 0, - "hS256": 1, - "rS256": 2 - } - }, - Operation: { - enumValues: { - "add": 0, - "remove": 1, - "replace": 2, - "move": 3, - "copy": 4, - "test": 5 - } - }, - SignedUrl: {}, - TraceFilter: {}, - VssNotificationEvent: {}, -}; -exports.TypeInfo.JsonPatchOperation.fields = { - op: { - enumType: exports.TypeInfo.Operation - } -}; -exports.TypeInfo.SignedUrl.fields = { - signatureExpires: { - isDate: true, - } -}; -exports.TypeInfo.TraceFilter.fields = { - timeCreated: { - isDate: true, - } -}; -exports.TypeInfo.VssNotificationEvent.fields = { - sourceEventCreatedTime: { - isDate: true, - } -}; +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} + +module.exports = bytesToUuid; + + +/***/ }), + +/***/ 85059: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = __nccwpck_require__(6113); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; + + +/***/ }), + +/***/ 28087: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var rng = __nccwpck_require__(85059); +var bytesToUuid = __nccwpck_require__(16782); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; /***/ }), -/***/ 6526: +/***/ 80347: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._exposeCertSettings = exports._exposeProxySettings = exports._normalizeSeparators = exports._isRooted = exports._getDirectoryName = exports._ensureRooted = exports._isUncPath = exports._loadData = exports._ensurePatternRooted = exports._getFindInfoFromPattern = exports._cloneMatchOptions = exports._legacyFindFiles_convertPatternToRegExp = exports._which = exports._checkPath = exports._exist = exports._debug = exports._error = exports._warning = exports._command = exports._getVariableKey = exports._getVariable = exports._loc = exports._setResourcePath = exports._setErrStream = exports._setStdStream = exports._writeLine = exports._endsWith = exports._startsWith = exports._vault = exports._knownVariableMap = void 0; -var fs = __nccwpck_require__(7147); -var path = __nccwpck_require__(1017); -var os = __nccwpck_require__(2037); -var minimatch = __nccwpck_require__(3973); -var util = __nccwpck_require__(3837); -var tcm = __nccwpck_require__(3011); -var vm = __nccwpck_require__(6007); -var semver = __nccwpck_require__(242); -var crypto = __nccwpck_require__(6113); +exports.updateReleaseName = exports.addBuildTag = exports.updateBuildNumber = exports.uploadBuildLog = exports.associateArtifact = exports.uploadArtifact = exports.logIssue = exports.logDetail = exports.setProgress = exports.setEndpoint = exports.addAttachment = exports.uploadSummary = exports.prependPath = exports.uploadFile = exports.CodeCoverageEnabler = exports.CodeCoveragePublisher = exports.TestPublisher = exports.getHttpCertConfiguration = exports.getHttpProxyConfiguration = exports.findMatch = exports.filter = exports.match = exports.tool = exports.execSync = exports.exec = exports.rmRF = exports.legacyFindFiles = exports.find = exports.retry = exports.mv = exports.cp = exports.ls = exports.which = exports.resolve = exports.mkdirP = exports.popd = exports.pushd = exports.cd = exports.checkPath = exports.cwd = exports.getAgentMode = exports.getPlatform = exports.osType = exports.writeFile = exports.exist = exports.stats = exports.debug = exports.error = exports.warning = exports.command = exports.setTaskVariable = exports.getTaskVariable = exports.getSecureFileTicket = exports.getSecureFileName = exports.getEndpointAuthorization = exports.getEndpointAuthorizationParameterRequired = exports.getEndpointAuthorizationParameter = exports.getEndpointAuthorizationSchemeRequired = exports.getEndpointAuthorizationScheme = exports.getEndpointDataParameterRequired = exports.getEndpointDataParameter = exports.getEndpointUrlRequired = exports.getEndpointUrl = exports.getPathInputRequired = exports.getPathInput = exports.filePathSupplied = exports.getDelimitedInput = exports.getBoolFeatureFlag = exports.getBoolInput = exports.getInputRequired = exports.getInput = exports.setSecret = exports.setVariable = exports.getVariables = exports.assertAgent = exports.getVariable = exports.loc = exports.setResourcePath = exports.setResult = exports.setErrStream = exports.setStdStream = exports.AgentHostedMode = exports.Platform = exports.FieldType = exports.ArtifactType = exports.IssueType = exports.TaskState = exports.TaskResult = void 0; +var shell = __nccwpck_require__(33516); +var childProcess = __nccwpck_require__(32081); +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); +var os = __nccwpck_require__(22037); +var minimatch = __nccwpck_require__(83973); +var im = __nccwpck_require__(36526); +var tcm = __nccwpck_require__(33011); +var trm = __nccwpck_require__(17515); +var semver = __nccwpck_require__(80242); +var TaskResult; +(function (TaskResult) { + TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; + TaskResult[TaskResult["SucceededWithIssues"] = 1] = "SucceededWithIssues"; + TaskResult[TaskResult["Failed"] = 2] = "Failed"; + TaskResult[TaskResult["Cancelled"] = 3] = "Cancelled"; + TaskResult[TaskResult["Skipped"] = 4] = "Skipped"; +})(TaskResult = exports.TaskResult || (exports.TaskResult = {})); +var TaskState; +(function (TaskState) { + TaskState[TaskState["Unknown"] = 0] = "Unknown"; + TaskState[TaskState["Initialized"] = 1] = "Initialized"; + TaskState[TaskState["InProgress"] = 2] = "InProgress"; + TaskState[TaskState["Completed"] = 3] = "Completed"; +})(TaskState = exports.TaskState || (exports.TaskState = {})); +var IssueType; +(function (IssueType) { + IssueType[IssueType["Error"] = 0] = "Error"; + IssueType[IssueType["Warning"] = 1] = "Warning"; +})(IssueType = exports.IssueType || (exports.IssueType = {})); +var ArtifactType; +(function (ArtifactType) { + ArtifactType[ArtifactType["Container"] = 0] = "Container"; + ArtifactType[ArtifactType["FilePath"] = 1] = "FilePath"; + ArtifactType[ArtifactType["VersionControl"] = 2] = "VersionControl"; + ArtifactType[ArtifactType["GitRef"] = 3] = "GitRef"; + ArtifactType[ArtifactType["TfvcLabel"] = 4] = "TfvcLabel"; +})(ArtifactType = exports.ArtifactType || (exports.ArtifactType = {})); +var FieldType; +(function (FieldType) { + FieldType[FieldType["AuthParameter"] = 0] = "AuthParameter"; + FieldType[FieldType["DataParameter"] = 1] = "DataParameter"; + FieldType[FieldType["Url"] = 2] = "Url"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +/** Platforms supported by our build agent */ +var Platform; +(function (Platform) { + Platform[Platform["Windows"] = 0] = "Windows"; + Platform[Platform["MacOS"] = 1] = "MacOS"; + Platform[Platform["Linux"] = 2] = "Linux"; +})(Platform = exports.Platform || (exports.Platform = {})); +var AgentHostedMode; +(function (AgentHostedMode) { + AgentHostedMode[AgentHostedMode["Unknown"] = 0] = "Unknown"; + AgentHostedMode[AgentHostedMode["SelfHosted"] = 1] = "SelfHosted"; + AgentHostedMode[AgentHostedMode["MsHosted"] = 2] = "MsHosted"; +})(AgentHostedMode = exports.AgentHostedMode || (exports.AgentHostedMode = {})); +//----------------------------------------------------- +// General Helpers +//----------------------------------------------------- +exports.setStdStream = im._setStdStream; +exports.setErrStream = im._setErrStream; +//----------------------------------------------------- +// Results +//----------------------------------------------------- +/** + * Sets the result of the task. + * Execution will continue. + * If not set, task will be Succeeded. + * If multiple calls are made to setResult the most pessimistic call wins (Failed) regardless of the order of calls. + * + * @param result TaskResult enum of Succeeded, SucceededWithIssues, Failed, Cancelled or Skipped. + * @param message A message which will be logged as an error issue if the result is Failed. + * @param done Optional. Instructs the agent the task is done. This is helpful when child processes + * may still be running and prevent node from fully exiting. This argument is supported + * from agent version 2.142.0 or higher (otherwise will no-op). + * @returns void + */ +function setResult(result, message, done) { + exports.debug('task result: ' + TaskResult[result]); + // add an error issue + if (result == TaskResult.Failed && message) { + exports.error(message); + } + else if (result == TaskResult.SucceededWithIssues && message) { + exports.warning(message); + } + // task.complete + var properties = { 'result': TaskResult[result] }; + if (done) { + properties['done'] = 'true'; + } + exports.command('task.complete', properties, message); +} +exports.setResult = setResult; +// +// Catching all exceptions +// +process.on('uncaughtException', function (err) { + setResult(TaskResult.Failed, exports.loc('LIB_UnhandledEx', err.message)); + exports.error(String(err.stack)); +}); +// +// Catching unhandled rejections from promises and rethrowing them as exceptions +// For example, a promise that is rejected but not handled by a .catch() handler in node 10 +// doesn't cause an uncaughtException but causes in Node 16. +// For types definitions(Error | Any) see https://nodejs.org/docs/latest-v16.x/api/process.html#event-unhandledrejection +// +process.on('unhandledRejection', function (reason) { + if (reason instanceof Error) { + throw reason; + } + else { + throw new Error(reason); + } +}); +//----------------------------------------------------- +// Loc Helpers +//----------------------------------------------------- +exports.setResourcePath = im._setResourcePath; +exports.loc = im._loc; +//----------------------------------------------------- +// Input Helpers +//----------------------------------------------------- +exports.getVariable = im._getVariable; +/** + * Asserts the agent version is at least the specified minimum. + * + * @param minimum minimum version version - must be 2.104.1 or higher + */ +function assertAgent(minimum) { + if (semver.lt(minimum, '2.104.1')) { + throw new Error('assertAgent() requires the parameter to be 2.104.1 or higher'); + } + var agent = exports.getVariable('Agent.Version'); + if (agent && semver.lt(agent, minimum)) { + throw new Error("Agent version " + minimum + " or higher is required"); + } +} +exports.assertAgent = assertAgent; +/** + * Gets a snapshot of the current state of all job variables available to the task. + * Requires a 2.104.1 agent or higher for full functionality. + * + * Limitations on an agent prior to 2.104.1: + * 1) The return value does not include all public variables. Only public variables + * that have been added using setVariable are returned. + * 2) The name returned for each secret variable is the formatted environment variable + * name, not the actual variable name (unless it was set explicitly at runtime using + * setVariable). + * + * @returns VariableInfo[] + */ +function getVariables() { + return Object.keys(im._knownVariableMap) + .map(function (key) { + var info = im._knownVariableMap[key]; + return { name: info.name, value: exports.getVariable(info.name), secret: info.secret }; + }); +} +exports.getVariables = getVariables; +/** + * Sets a variable which will be available to subsequent tasks as well. + * + * @param name name of the variable to set + * @param val value to set + * @param secret whether variable is secret. Multi-line secrets are not allowed. Optional, defaults to false + * @param isOutput whether variable is an output variable. Optional, defaults to false + * @returns void + */ +function setVariable(name, val, secret, isOutput) { + if (secret === void 0) { secret = false; } + if (isOutput === void 0) { isOutput = false; } + // once a secret always a secret + var key = im._getVariableKey(name); + if (im._knownVariableMap.hasOwnProperty(key)) { + secret = secret || im._knownVariableMap[key].secret; + } + // store the value + var varValue = val || ''; + exports.debug('set ' + name + '=' + (secret && varValue ? '********' : varValue)); + if (secret) { + if (varValue && varValue.match(/\r|\n/) && ("" + process.env['SYSTEM_UNSAFEALLOWMULTILINESECRET']).toUpperCase() != 'TRUE') { + throw new Error(exports.loc('LIB_MultilineSecret')); + } + im._vault.storeSecret('SECRET_' + key, varValue); + delete process.env[key]; + } + else { + process.env[key] = varValue; + } + // store the metadata + im._knownVariableMap[key] = { name: name, secret: secret }; + // write the setvariable command + exports.command('task.setvariable', { 'variable': name || '', isOutput: (isOutput || false).toString(), 'issecret': (secret || false).toString() }, varValue); +} +exports.setVariable = setVariable; +/** + * Registers a value with the logger, so the value will be masked from the logs. Multi-line secrets are not allowed. + * + * @param val value to register + */ +function setSecret(val) { + if (val) { + if (val.match(/\r|\n/) && ("" + process.env['SYSTEM_UNSAFEALLOWMULTILINESECRET']).toUpperCase() !== 'TRUE') { + throw new Error(exports.loc('LIB_MultilineSecret')); + } + exports.command('task.setsecret', {}, val); + } +} +exports.setSecret = setSecret; +/** + * Gets the value of an input. + * If required is true and the value is not set, it will throw. + * + * @param name name of the input to get + * @param required whether input is required. optional, defaults to false + * @returns string + */ +function getInput(name, required) { + var inval = im._vault.retrieveSecret('INPUT_' + im._getVariableKey(name)); + if (required && !inval) { + throw new Error(exports.loc('LIB_InputRequired', name)); + } + exports.debug(name + '=' + inval); + return inval; +} +exports.getInput = getInput; +/** + * Gets the value of an input. + * If the value is not set, it will throw. + * + * @param name name of the input to get + * @returns string + */ +function getInputRequired(name) { + return getInput(name, true); +} +exports.getInputRequired = getInputRequired; +/** + * Gets the value of an input and converts to a bool. Convenience. + * If required is true and the value is not set, it will throw. + * If required is false and the value is not set, returns false. + * + * @param name name of the bool input to get + * @param required whether input is required. optional, defaults to false + * @returns boolean + */ +function getBoolInput(name, required) { + return (getInput(name, required) || '').toUpperCase() == "TRUE"; +} +exports.getBoolInput = getBoolInput; +/** + * Gets the value of an feature flag and converts to a bool. + * + * @param name name of the feature flag to get. + * @param defaultValue default value of the feature flag in case it's not found in env. (optional. Default value = false) + * @returns boolean + */ +function getBoolFeatureFlag(ffName, defaultValue) { + if (defaultValue === void 0) { defaultValue = false; } + var ffValue = process.env[ffName]; + if (!ffValue) { + exports.debug("Feature flag " + ffName + " not found. Returning " + defaultValue + " as default."); + return defaultValue; + } + exports.debug("Feature flag " + ffName + " = " + ffValue); + return ffValue.toLowerCase() === "true"; +} +exports.getBoolFeatureFlag = getBoolFeatureFlag; +/** + * Gets the value of an input and splits the value using a delimiter (space, comma, etc). + * Empty values are removed. This function is useful for splitting an input containing a simple + * list of items - such as build targets. + * IMPORTANT: Do not use this function for splitting additional args! Instead use argString(), which + * follows normal argument splitting rules and handles values encapsulated by quotes. + * If required is true and the value is not set, it will throw. + * + * @param name name of the input to get + * @param delim delimiter to split on + * @param required whether input is required. optional, defaults to false + * @returns string[] + */ +function getDelimitedInput(name, delim, required) { + var inputVal = getInput(name, required); + if (!inputVal) { + return []; + } + var result = []; + inputVal.split(delim).forEach(function (x) { + if (x) { + result.push(x); + } + }); + return result; +} +exports.getDelimitedInput = getDelimitedInput; +/** + * Checks whether a path inputs value was supplied by the user + * File paths are relative with a picker, so an empty path is the root of the repo. + * Useful if you need to condition work (like append an arg) if a value was supplied + * + * @param name name of the path input to check + * @returns boolean + */ +function filePathSupplied(name) { + // normalize paths + var pathValue = this.resolve(this.getPathInput(name) || ''); + var repoRoot = this.resolve(exports.getVariable('build.sourcesDirectory') || exports.getVariable('system.defaultWorkingDirectory') || ''); + var supplied = pathValue !== repoRoot; + exports.debug(name + 'path supplied :' + supplied); + return supplied; +} +exports.filePathSupplied = filePathSupplied; +/** + * Gets the value of a path input + * It will be quoted for you if it isn't already and contains spaces + * If required is true and the value is not set, it will throw. + * If check is true and the path does not exist, it will throw. + * + * @param name name of the input to get + * @param required whether input is required. optional, defaults to false + * @param check whether path is checked. optional, defaults to false + * @returns string + */ +function getPathInput(name, required, check) { + var inval = getInput(name, required); + if (inval) { + if (check) { + exports.checkPath(inval, name); + } + } + return inval; +} +exports.getPathInput = getPathInput; +/** + * Gets the value of a path input + * It will be quoted for you if it isn't already and contains spaces + * If the value is not set, it will throw. + * If check is true and the path does not exist, it will throw. + * + * @param name name of the input to get + * @param check whether path is checked. optional, defaults to false + * @returns string + */ +function getPathInputRequired(name, check) { + return getPathInput(name, true, check); +} +exports.getPathInputRequired = getPathInputRequired; +//----------------------------------------------------- +// Endpoint Helpers +//----------------------------------------------------- +/** + * Gets the url for a service endpoint + * If the url was not set and is not optional, it will throw. + * + * @param id name of the service endpoint + * @param optional whether the url is optional + * @returns string + */ +function getEndpointUrl(id, optional) { + var urlval = process.env['ENDPOINT_URL_' + id]; + if (!optional && !urlval) { + throw new Error(exports.loc('LIB_EndpointNotExist', id)); + } + exports.debug(id + '=' + urlval); + return urlval; +} +exports.getEndpointUrl = getEndpointUrl; +/** + * Gets the url for a service endpoint + * If the url was not set, it will throw. + * + * @param id name of the service endpoint + * @returns string + */ +function getEndpointUrlRequired(id) { + return getEndpointUrl(id, false); +} +exports.getEndpointUrlRequired = getEndpointUrlRequired; +/* + * Gets the endpoint data parameter value with specified key for a service endpoint + * If the endpoint data parameter was not set and is not optional, it will throw. + * + * @param id name of the service endpoint + * @param key of the parameter + * @param optional whether the endpoint data is optional + * @returns {string} value of the endpoint data parameter + */ +function getEndpointDataParameter(id, key, optional) { + var dataParamVal = process.env['ENDPOINT_DATA_' + id + '_' + key.toUpperCase()]; + if (!optional && !dataParamVal) { + throw new Error(exports.loc('LIB_EndpointDataNotExist', id, key)); + } + exports.debug(id + ' data ' + key + ' = ' + dataParamVal); + return dataParamVal; +} +exports.getEndpointDataParameter = getEndpointDataParameter; +/* + * Gets the endpoint data parameter value with specified key for a service endpoint + * If the endpoint data parameter was not set, it will throw. + * + * @param id name of the service endpoint + * @param key of the parameter + * @returns {string} value of the endpoint data parameter + */ +function getEndpointDataParameterRequired(id, key) { + return getEndpointDataParameter(id, key, false); +} +exports.getEndpointDataParameterRequired = getEndpointDataParameterRequired; +/** + * Gets the endpoint authorization scheme for a service endpoint + * If the endpoint authorization scheme is not set and is not optional, it will throw. + * + * @param id name of the service endpoint + * @param optional whether the endpoint authorization scheme is optional + * @returns {string} value of the endpoint authorization scheme + */ +function getEndpointAuthorizationScheme(id, optional) { + var authScheme = im._vault.retrieveSecret('ENDPOINT_AUTH_SCHEME_' + id); + if (!optional && !authScheme) { + throw new Error(exports.loc('LIB_EndpointAuthNotExist', id)); + } + exports.debug(id + ' auth scheme = ' + authScheme); + return authScheme; +} +exports.getEndpointAuthorizationScheme = getEndpointAuthorizationScheme; +/** + * Gets the endpoint authorization scheme for a service endpoint + * If the endpoint authorization scheme is not set, it will throw. + * + * @param id name of the service endpoint + * @returns {string} value of the endpoint authorization scheme + */ +function getEndpointAuthorizationSchemeRequired(id) { + return getEndpointAuthorizationScheme(id, false); +} +exports.getEndpointAuthorizationSchemeRequired = getEndpointAuthorizationSchemeRequired; +/** + * Gets the endpoint authorization parameter value for a service endpoint with specified key + * If the endpoint authorization parameter is not set and is not optional, it will throw. + * + * @param id name of the service endpoint + * @param key key to find the endpoint authorization parameter + * @param optional optional whether the endpoint authorization scheme is optional + * @returns {string} value of the endpoint authorization parameter value + */ +function getEndpointAuthorizationParameter(id, key, optional) { + var authParam = im._vault.retrieveSecret('ENDPOINT_AUTH_PARAMETER_' + id + '_' + key.toUpperCase()); + if (!optional && !authParam) { + throw new Error(exports.loc('LIB_EndpointAuthNotExist', id)); + } + exports.debug(id + ' auth param ' + key + ' = ' + authParam); + return authParam; +} +exports.getEndpointAuthorizationParameter = getEndpointAuthorizationParameter; +/** + * Gets the endpoint authorization parameter value for a service endpoint with specified key + * If the endpoint authorization parameter is not set, it will throw. + * + * @param id name of the service endpoint + * @param key key to find the endpoint authorization parameter + * @returns {string} value of the endpoint authorization parameter value + */ +function getEndpointAuthorizationParameterRequired(id, key) { + return getEndpointAuthorizationParameter(id, key, false); +} +exports.getEndpointAuthorizationParameterRequired = getEndpointAuthorizationParameterRequired; +/** + * Gets the authorization details for a service endpoint + * If the authorization was not set and is not optional, it will set the task result to Failed. + * + * @param id name of the service endpoint + * @param optional whether the url is optional + * @returns string + */ +function getEndpointAuthorization(id, optional) { + var aval = im._vault.retrieveSecret('ENDPOINT_AUTH_' + id); + if (!optional && !aval) { + setResult(TaskResult.Failed, exports.loc('LIB_EndpointAuthNotExist', id)); + } + exports.debug(id + ' exists ' + (!!aval)); + var auth; + try { + if (aval) { + auth = JSON.parse(aval); + } + } + catch (err) { + throw new Error(exports.loc('LIB_InvalidEndpointAuth', aval)); + } + return auth; +} +exports.getEndpointAuthorization = getEndpointAuthorization; +//----------------------------------------------------- +// SecureFile Helpers +//----------------------------------------------------- +/** + * Gets the name for a secure file + * + * @param id secure file id + * @returns string + */ +function getSecureFileName(id) { + var name = process.env['SECUREFILE_NAME_' + id]; + exports.debug('secure file name for id ' + id + ' = ' + name); + return name; +} +exports.getSecureFileName = getSecureFileName; +/** + * Gets the secure file ticket that can be used to download the secure file contents + * + * @param id name of the secure file + * @returns {string} secure file ticket + */ +function getSecureFileTicket(id) { + var ticket = im._vault.retrieveSecret('SECUREFILE_TICKET_' + id); + exports.debug('secure file ticket for id ' + id + ' = ' + ticket); + return ticket; +} +exports.getSecureFileTicket = getSecureFileTicket; +//----------------------------------------------------- +// Task Variable Helpers +//----------------------------------------------------- +/** + * Gets a variable value that is set by previous step from the same wrapper task. + * Requires a 2.115.0 agent or higher. + * + * @param name name of the variable to get + * @returns string + */ +function getTaskVariable(name) { + assertAgent('2.115.0'); + var inval = im._vault.retrieveSecret('VSTS_TASKVARIABLE_' + im._getVariableKey(name)); + if (inval) { + inval = inval.trim(); + } + exports.debug('task variable: ' + name + '=' + inval); + return inval; +} +exports.getTaskVariable = getTaskVariable; +/** + * Sets a task variable which will only be available to subsequent steps belong to the same wrapper task. + * Requires a 2.115.0 agent or higher. + * + * @param name name of the variable to set + * @param val value to set + * @param secret whether variable is secret. optional, defaults to false + * @returns void + */ +function setTaskVariable(name, val, secret) { + if (secret === void 0) { secret = false; } + assertAgent('2.115.0'); + var key = im._getVariableKey(name); + // store the value + var varValue = val || ''; + exports.debug('set task variable: ' + name + '=' + (secret && varValue ? '********' : varValue)); + im._vault.storeSecret('VSTS_TASKVARIABLE_' + key, varValue); + delete process.env[key]; + // write the command + exports.command('task.settaskvariable', { 'variable': name || '', 'issecret': (secret || false).toString() }, varValue); +} +exports.setTaskVariable = setTaskVariable; +//----------------------------------------------------- +// Cmd Helpers +//----------------------------------------------------- +exports.command = im._command; +exports.warning = im._warning; +exports.error = im._error; +exports.debug = im._debug; +//----------------------------------------------------- +// Disk Functions +//----------------------------------------------------- +function _checkShell(cmd, continueOnError) { + var se = shell.error(); + if (se) { + exports.debug(cmd + ' failed'); + var errMsg = exports.loc('LIB_OperationFailed', cmd, se); + exports.debug(errMsg); + if (!continueOnError) { + throw new Error(errMsg); + } + } +} +/** + * Get's stat on a path. + * Useful for checking whether a file or directory. Also getting created, modified and accessed time. + * see [fs.stat](https://nodejs.org/api/fs.html#fs_class_fs_stats) + * + * @param path path to check + * @returns fsStat + */ +function stats(path) { + return fs.statSync(path); +} +exports.stats = stats; +exports.exist = im._exist; +function writeFile(file, data, options) { + if (typeof (options) === 'string') { + fs.writeFileSync(file, data, { encoding: options }); + } + else { + fs.writeFileSync(file, data, options); + } +} +exports.writeFile = writeFile; +/** + * @deprecated Use `getPlatform` + * Useful for determining the host operating system. + * see [os.type](https://nodejs.org/api/os.html#os_os_type) + * + * @return the name of the operating system + */ +function osType() { + return os.type(); +} +exports.osType = osType; +/** + * Determine the operating system the build agent is running on. + * @returns {Platform} + * @throws {Error} Platform is not supported by our agent + */ +function getPlatform() { + switch (process.platform) { + case 'win32': return Platform.Windows; + case 'darwin': return Platform.MacOS; + case 'linux': return Platform.Linux; + default: throw Error(exports.loc('LIB_PlatformNotSupported', process.platform)); + } +} +exports.getPlatform = getPlatform; +/** + * Return hosted type of Agent + * @returns {AgentHostedMode} + */ +function getAgentMode() { + var agentCloudId = exports.getVariable('Agent.CloudId'); + if (agentCloudId === undefined) + return AgentHostedMode.Unknown; + if (agentCloudId) + return AgentHostedMode.MsHosted; + return AgentHostedMode.SelfHosted; +} +exports.getAgentMode = getAgentMode; +/** + * Returns the process's current working directory. + * see [process.cwd](https://nodejs.org/api/process.html#process_process_cwd) + * + * @return the path to the current working directory of the process + */ +function cwd() { + return process.cwd(); +} +exports.cwd = cwd; +exports.checkPath = im._checkPath; +/** + * Change working directory. + * + * @param path new working directory path + * @returns void + */ +function cd(path) { + if (path) { + shell.cd(path); + _checkShell('cd'); + } +} +exports.cd = cd; +/** + * Change working directory and push it on the stack + * + * @param path new working directory path + * @returns void + */ +function pushd(path) { + shell.pushd(path); + _checkShell('pushd'); +} +exports.pushd = pushd; +/** + * Change working directory back to previously pushed directory + * + * @returns void + */ +function popd() { + shell.popd(); + _checkShell('popd'); +} +exports.popd = popd; +/** + * Make a directory. Creates the full path with folders in between + * Will throw if it fails + * + * @param p path to create + * @returns void + */ +function mkdirP(p) { + if (!p) { + throw new Error(exports.loc('LIB_ParameterIsRequired', 'p')); + } + // build a stack of directories to create + var stack = []; + var testDir = p; + while (true) { + // validate the loop is not out of control + if (stack.length >= (process.env['TASKLIB_TEST_MKDIRP_FAILSAFE'] || 1000)) { + // let the framework throw + exports.debug('loop is out of control'); + fs.mkdirSync(p); + return; + } + exports.debug("testing directory '" + testDir + "'"); + var stats_1 = void 0; + try { + stats_1 = fs.statSync(testDir); + } + catch (err) { + if (err.code == 'ENOENT') { + // validate the directory is not the drive root + var parentDir = path.dirname(testDir); + if (testDir == parentDir) { + throw new Error(exports.loc('LIB_MkdirFailedInvalidDriveRoot', p, testDir)); // Unable to create directory '{p}'. Root directory does not exist: '{testDir}' + } + // push the dir and test the parent + stack.push(testDir); + testDir = parentDir; + continue; + } + else if (err.code == 'UNKNOWN') { + throw new Error(exports.loc('LIB_MkdirFailedInvalidShare', p, testDir)); // Unable to create directory '{p}'. Unable to verify the directory exists: '{testDir}'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share. + } + else { + throw err; + } + } + if (!stats_1.isDirectory()) { + throw new Error(exports.loc('LIB_MkdirFailedFileExists', p, testDir)); // Unable to create directory '{p}'. Conflicting file exists: '{testDir}' + } + // testDir exists + break; + } + // create each directory + while (stack.length) { + var dir = stack.pop(); // non-null because `stack.length` was truthy + exports.debug("mkdir '" + dir + "'"); + try { + fs.mkdirSync(dir); + } + catch (err) { + throw new Error(exports.loc('LIB_MkdirFailed', p, err.message)); // Unable to create directory '{p}'. {err.message} + } + } +} +exports.mkdirP = mkdirP; +/** + * Resolves a sequence of paths or path segments into an absolute path. + * Calls node.js path.resolve() + * Allows L0 testing with consistent path formats on Mac/Linux and Windows in the mock implementation + * @param pathSegments + * @returns {string} + */ +function resolve() { + var pathSegments = []; + for (var _i = 0; _i < arguments.length; _i++) { + pathSegments[_i] = arguments[_i]; + } + var absolutePath = path.resolve.apply(this, pathSegments); + exports.debug('Absolute path for pathSegments: ' + pathSegments + ' = ' + absolutePath); + return absolutePath; +} +exports.resolve = resolve; +exports.which = im._which; +/** + * Returns array of files in the given path, or in current directory if no path provided. See shelljs.ls + * @param {string} options Available options: -R (recursive), -A (all files, include files beginning with ., except for . and ..) + * @param {string[]} paths Paths to search. + * @return {string[]} An array of files in the given path(s). + */ +function ls(options, paths) { + if (options) { + return shell.ls(options, paths); + } + else { + return shell.ls(paths); + } +} +exports.ls = ls; +/** + * Copies a file or folder. + * + * @param source source path + * @param dest destination path + * @param options string -r, -f or -rf for recursive and force + * @param continueOnError optional. whether to continue on error + * @param retryCount optional. Retry count to copy the file. It might help to resolve intermittent issues e.g. with UNC target paths on a remote host. + */ +function cp(source, dest, options, continueOnError, retryCount) { + if (retryCount === void 0) { retryCount = 0; } + while (retryCount >= 0) { + try { + if (options) { + shell.cp(options, source, dest); + } + else { + shell.cp(source, dest); + } + _checkShell('cp', false); + break; + } + catch (e) { + if (retryCount <= 0) { + if (continueOnError) { + exports.warning(e); + break; + } + else { + throw e; + } + } + else { + console.log(exports.loc('LIB_CopyFileFailed', retryCount)); + retryCount--; + } + } + } +} +exports.cp = cp; +/** + * Moves a path. + * + * @param source source path + * @param dest destination path + * @param options string -f or -n for force and no clobber + * @param continueOnError optional. whether to continue on error + */ +function mv(source, dest, options, continueOnError) { + if (options) { + shell.mv(options, source, dest); + } + else { + shell.mv(source, dest); + } + _checkShell('mv', continueOnError); +} +exports.mv = mv; +/** + * Tries to execute a function a specified number of times. + * + * @param func a function to be executed. + * @param args executed function arguments array. + * @param retryOptions optional. Defaults to { continueOnError: false, retryCount: 0 }. + * @returns the same as the usual function. + */ +function retry(func, args, retryOptions) { + if (retryOptions === void 0) { retryOptions = { continueOnError: false, retryCount: 0 }; } + while (retryOptions.retryCount >= 0) { + try { + return func.apply(void 0, args); + } + catch (e) { + if (retryOptions.retryCount <= 0) { + if (retryOptions.continueOnError) { + exports.warning(e); + break; + } + else { + throw e; + } + } + else { + exports.debug("Attempt to execute function \"" + (func === null || func === void 0 ? void 0 : func.name) + "\" failed, retries left: " + retryOptions.retryCount); + retryOptions.retryCount--; + } + } + } +} +exports.retry = retry; +/** + * Gets info about item stats. + * + * @param path a path to the item to be processed. + * @param followSymbolicLink indicates whether to traverse descendants of symbolic link directories. + * @param allowBrokenSymbolicLinks when true, broken symbolic link will not cause an error. + * @returns fs.Stats + */ +function _getStats(path, followSymbolicLink, allowBrokenSymbolicLinks) { + // stat returns info about the target of a symlink (or symlink chain), + // lstat returns info about a symlink itself + var stats; + if (followSymbolicLink) { + try { + // use stat (following symlinks) + stats = fs.statSync(path); + } + catch (err) { + if (err.code == 'ENOENT' && allowBrokenSymbolicLinks) { + // fallback to lstat (broken symlinks allowed) + stats = fs.lstatSync(path); + exports.debug(" " + path + " (broken symlink)"); + } + else { + throw err; + } + } + } + else { + // use lstat (not following symlinks) + stats = fs.lstatSync(path); + } + return stats; +} +/** + * Recursively finds all paths a given path. Returns an array of paths. + * + * @param findPath path to search + * @param options optional. defaults to { followSymbolicLinks: true }. following soft links is generally appropriate unless deleting files. + * @returns string[] + */ +function find(findPath, options) { + if (!findPath) { + exports.debug('no path specified'); + return []; + } + // normalize the path, otherwise the first result is inconsistently formatted from the rest of the results + // because path.join() performs normalization. + findPath = path.normalize(findPath); + // debug trace the parameters + exports.debug("findPath: '" + findPath + "'"); + options = options || _getDefaultFindOptions(); + _debugFindOptions(options); + // return empty if not exists + try { + fs.lstatSync(findPath); + } + catch (err) { + if (err.code == 'ENOENT') { + exports.debug('0 results'); + return []; + } + throw err; + } + try { + var result = []; + // push the first item + var stack = [new _FindItem(findPath, 1)]; + var traversalChain = []; // used to detect cycles + var _loop_1 = function () { + // pop the next item and push to the result array + var item = stack.pop(); // non-null because `stack.length` was truthy + var stats_2 = void 0; + try { + // `item.path` equals `findPath` for the first item to be processed, when the `result` array is empty + var isPathToSearch = !result.length; + // following specified symlinks only if current path equals specified path + var followSpecifiedSymbolicLink = options.followSpecifiedSymbolicLink && isPathToSearch; + // following all symlinks or following symlink for the specified path + var followSymbolicLink = options.followSymbolicLinks || followSpecifiedSymbolicLink; + // stat the item. The stat info is used further below to determine whether to traverse deeper + stats_2 = _getStats(item.path, followSymbolicLink, options.allowBrokenSymbolicLinks); + } + catch (err) { + if (err.code == 'ENOENT' && options.skipMissingFiles) { + exports.warning("No such file or directory: \"" + item.path + "\" - skipping."); + return "continue"; + } + throw err; + } + result.push(item.path); + // note, isDirectory() returns false for the lstat of a symlink + if (stats_2.isDirectory()) { + exports.debug(" " + item.path + " (directory)"); + if (options.followSymbolicLinks) { + // get the realpath + var realPath_1; + if (im._isUncPath(item.path)) { + // Sometimes there are spontaneous issues when working with unc-paths, so retries have been added for them. + realPath_1 = retry(fs.realpathSync, [item.path], { continueOnError: false, retryCount: 5 }); + } + else { + realPath_1 = fs.realpathSync(item.path); + } + // fixup the traversal chain to match the item level + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + // test for a cycle + if (traversalChain.some(function (x) { return x == realPath_1; })) { + exports.debug(' cycle detected'); + return "continue"; + } + // update the traversal chain + traversalChain.push(realPath_1); + } + // push the child items in reverse onto the stack + var childLevel_1 = item.level + 1; + var childItems = fs.readdirSync(item.path) + .map(function (childName) { return new _FindItem(path.join(item.path, childName), childLevel_1); }); + for (var i = childItems.length - 1; i >= 0; i--) { + stack.push(childItems[i]); + } + } + else { + exports.debug(" " + item.path + " (file)"); + } + }; + while (stack.length) { + _loop_1(); + } + exports.debug(result.length + " results"); + return result; + } + catch (err) { + throw new Error(exports.loc('LIB_OperationFailed', 'find', err.message)); + } +} +exports.find = find; +var _FindItem = /** @class */ (function () { + function _FindItem(path, level) { + this.path = path; + this.level = level; + } + return _FindItem; +}()); +function _debugFindOptions(options) { + exports.debug("findOptions.allowBrokenSymbolicLinks: '" + options.allowBrokenSymbolicLinks + "'"); + exports.debug("findOptions.followSpecifiedSymbolicLink: '" + options.followSpecifiedSymbolicLink + "'"); + exports.debug("findOptions.followSymbolicLinks: '" + options.followSymbolicLinks + "'"); + exports.debug("findOptions.skipMissingFiles: '" + options.skipMissingFiles + "'"); +} +function _getDefaultFindOptions() { + return { + allowBrokenSymbolicLinks: false, + followSpecifiedSymbolicLink: true, + followSymbolicLinks: true, + skipMissingFiles: false + }; +} +/** + * Prefer tl.find() and tl.match() instead. This function is for backward compatibility + * when porting tasks to Node from the PowerShell or PowerShell3 execution handler. + * + * @param rootDirectory path to root unrooted patterns with + * @param pattern include and exclude patterns + * @param includeFiles whether to include files in the result. defaults to true when includeFiles and includeDirectories are both false + * @param includeDirectories whether to include directories in the result + * @returns string[] + */ +function legacyFindFiles(rootDirectory, pattern, includeFiles, includeDirectories) { + if (!pattern) { + throw new Error('pattern parameter cannot be empty'); + } + exports.debug("legacyFindFiles rootDirectory: '" + rootDirectory + "'"); + exports.debug("pattern: '" + pattern + "'"); + exports.debug("includeFiles: '" + includeFiles + "'"); + exports.debug("includeDirectories: '" + includeDirectories + "'"); + if (!includeFiles && !includeDirectories) { + includeFiles = true; + } + // organize the patterns into include patterns and exclude patterns + var includePatterns = []; + var excludePatterns = []; + pattern = pattern.replace(/;;/g, '\0'); + for (var _i = 0, _a = pattern.split(';'); _i < _a.length; _i++) { + var pat = _a[_i]; + if (!pat) { + continue; + } + pat = pat.replace(/\0/g, ';'); + // determine whether include pattern and remove any include/exclude prefix. + // include patterns start with +: or anything other than -: + // exclude patterns start with -: + var isIncludePattern = void 0; + if (im._startsWith(pat, '+:')) { + pat = pat.substring(2); + isIncludePattern = true; + } + else if (im._startsWith(pat, '-:')) { + pat = pat.substring(2); + isIncludePattern = false; + } + else { + isIncludePattern = true; + } + // validate pattern does not end with a slash + if (im._endsWith(pat, '/') || (process.platform == 'win32' && im._endsWith(pat, '\\'))) { + throw new Error(exports.loc('LIB_InvalidPattern', pat)); + } + // root the pattern + if (rootDirectory && !path.isAbsolute(pat)) { + pat = path.join(rootDirectory, pat); + // remove trailing slash sometimes added by path.join() on Windows, e.g. + // path.join('\\\\hello', 'world') => '\\\\hello\\world\\' + // path.join('//hello', 'world') => '\\\\hello\\world\\' + if (im._endsWith(pat, '\\')) { + pat = pat.substring(0, pat.length - 1); + } + } + if (isIncludePattern) { + includePatterns.push(pat); + } + else { + excludePatterns.push(im._legacyFindFiles_convertPatternToRegExp(pat)); + } + } + // find and apply patterns + var count = 0; + var result = _legacyFindFiles_getMatchingItems(includePatterns, excludePatterns, !!includeFiles, !!includeDirectories); + exports.debug('all matches:'); + for (var _b = 0, result_1 = result; _b < result_1.length; _b++) { + var resultItem = result_1[_b]; + exports.debug(' ' + resultItem); + } + exports.debug('total matched: ' + result.length); + return result; +} +exports.legacyFindFiles = legacyFindFiles; +function _legacyFindFiles_getMatchingItems(includePatterns, excludePatterns, includeFiles, includeDirectories) { + exports.debug('getMatchingItems()'); + for (var _i = 0, includePatterns_1 = includePatterns; _i < includePatterns_1.length; _i++) { + var pattern = includePatterns_1[_i]; + exports.debug("includePattern: '" + pattern + "'"); + } + for (var _a = 0, excludePatterns_1 = excludePatterns; _a < excludePatterns_1.length; _a++) { + var pattern = excludePatterns_1[_a]; + exports.debug("excludePattern: " + pattern); + } + exports.debug('includeFiles: ' + includeFiles); + exports.debug('includeDirectories: ' + includeDirectories); + var allFiles = {}; + var _loop_2 = function (pattern) { + // determine the directory to search + // + // note, getDirectoryName removes redundant path separators + var findPath = void 0; + var starIndex = pattern.indexOf('*'); + var questionIndex = pattern.indexOf('?'); + if (starIndex < 0 && questionIndex < 0) { + // if no wildcards are found, use the directory name portion of the path. + // if there is no directory name (file name only in pattern or drive root), + // this will return empty string. + findPath = im._getDirectoryName(pattern); + } + else { + // extract the directory prior to the first wildcard + var index = Math.min(starIndex >= 0 ? starIndex : questionIndex, questionIndex >= 0 ? questionIndex : starIndex); + findPath = im._getDirectoryName(pattern.substring(0, index)); + } + // note, due to this short-circuit and the above usage of getDirectoryName, this + // function has the same limitations regarding drive roots as the powershell + // implementation. + // + // also note, since getDirectoryName eliminates slash redundancies, some additional + // work may be required if removal of this limitation is attempted. + if (!findPath) { + return "continue"; + } + var patternRegex = im._legacyFindFiles_convertPatternToRegExp(pattern); + // find files/directories + var items = find(findPath, { followSymbolicLinks: true }) + .filter(function (item) { + if (includeFiles && includeDirectories) { + return true; + } + var isDir = fs.statSync(item).isDirectory(); + return (includeFiles && !isDir) || (includeDirectories && isDir); + }) + .forEach(function (item) { + var normalizedPath = process.platform == 'win32' ? item.replace(/\\/g, '/') : item; // normalize separators + // **/times/** will not match C:/fun/times because there isn't a trailing slash + // so try both if including directories + var alternatePath = normalizedPath + "/"; // potential bug: it looks like this will result in a false + // positive if the item is a regular file and not a directory + var isMatch = false; + if (patternRegex.test(normalizedPath) || (includeDirectories && patternRegex.test(alternatePath))) { + isMatch = true; + // test whether the path should be excluded + for (var _i = 0, excludePatterns_2 = excludePatterns; _i < excludePatterns_2.length; _i++) { + var regex = excludePatterns_2[_i]; + if (regex.test(normalizedPath) || (includeDirectories && regex.test(alternatePath))) { + isMatch = false; + break; + } + } + } + if (isMatch) { + allFiles[item] = item; + } + }); + }; + for (var _b = 0, includePatterns_2 = includePatterns; _b < includePatterns_2.length; _b++) { + var pattern = includePatterns_2[_b]; + _loop_2(pattern); + } + return Object.keys(allFiles).sort(); +} +/** + * Remove a path recursively with force + * + * @param inputPath path to remove + * @throws when the file or directory exists but could not be deleted. + */ +function rmRF(inputPath) { + exports.debug('rm -rf ' + inputPath); + if (getPlatform() == Platform.Windows) { + // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another + // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. + try { + if (fs.statSync(inputPath).isDirectory()) { + exports.debug('removing directory ' + inputPath); + childProcess.execSync("rd /s /q \"" + inputPath + "\""); + } + else { + exports.debug('removing file ' + inputPath); + childProcess.execSync("del /f /a \"" + inputPath + "\""); + } + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code != 'ENOENT') { + throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message)); + } + } + // Shelling out fails to remove a symlink folder with missing source, this unlink catches that + try { + fs.unlinkSync(inputPath); + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code != 'ENOENT') { + throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message)); + } + } + } + else { + // get the lstats in order to workaround a bug in shelljs@0.3.0 where symlinks + // with missing targets are not handled correctly by "rm('-rf', path)" + var lstats = void 0; + try { + lstats = fs.lstatSync(inputPath); + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code == 'ENOENT') { + return; + } + throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message)); + } + if (lstats.isDirectory()) { + exports.debug('removing directory'); + shell.rm('-rf', inputPath); + var errMsg = shell.error(); + if (errMsg) { + throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', errMsg)); + } + return; + } + exports.debug('removing file'); + try { + fs.unlinkSync(inputPath); + } + catch (err) { + throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message)); + } + } +} +exports.rmRF = rmRF; +/** + * Exec a tool. Convenience wrapper over ToolRunner to exec with args in one call. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param args an arg string or array of args + * @param options optional exec options. See IExecOptions + * @returns number + */ +function exec(tool, args, options) { + var tr = this.tool(tool); + tr.on('debug', function (data) { + exports.debug(data); + }); + if (args) { + if (args instanceof Array) { + tr.arg(args); + } + else if (typeof (args) === 'string') { + tr.line(args); + } + } + return tr.exec(options); +} +exports.exec = exec; +/** + * Exec a tool synchronously. Convenience wrapper over ToolRunner to execSync with args in one call. + * Output will be *not* be streamed to the live console. It will be returned after execution is complete. + * Appropriate for short running tools + * Returns IExecResult with output and return code + * + * @param tool path to tool to exec + * @param args an arg string or array of args + * @param options optional exec options. See IExecSyncOptions + * @returns IExecSyncResult + */ +function execSync(tool, args, options) { + var tr = this.tool(tool); + tr.on('debug', function (data) { + exports.debug(data); + }); + if (args) { + if (args instanceof Array) { + tr.arg(args); + } + else if (typeof (args) === 'string') { + tr.line(args); + } + } + return tr.execSync(options); +} +exports.execSync = execSync; +/** + * Convenience factory to create a ToolRunner. + * + * @param tool path to tool to exec + * @returns ToolRunner + */ +function tool(tool) { + var tr = new trm.ToolRunner(tool); + tr.on('debug', function (message) { + exports.debug(message); + }); + return tr; +} +exports.tool = tool; +/** + * Applies glob patterns to a list of paths. Supports interleaved exclude patterns. + * + * @param list array of paths + * @param patterns patterns to apply. supports interleaved exclude patterns. + * @param patternRoot optional. default root to apply to unrooted patterns. not applied to basename-only patterns when matchBase:true. + * @param options optional. defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' }. + */ +function match(list, patterns, patternRoot, options) { + // trace parameters + exports.debug("patternRoot: '" + patternRoot + "'"); + options = options || _getDefaultMatchOptions(); // default match options + _debugMatchOptions(options); + // convert pattern to an array + if (typeof patterns == 'string') { + patterns = [patterns]; + } + // hashtable to keep track of matches + var map = {}; + var originalOptions = options; + for (var _i = 0, patterns_1 = patterns; _i < patterns_1.length; _i++) { + var pattern = patterns_1[_i]; + exports.debug("pattern: '" + pattern + "'"); + // trim and skip empty + pattern = (pattern || '').trim(); + if (!pattern) { + exports.debug('skipping empty pattern'); + continue; + } + // clone match options + var options_1 = im._cloneMatchOptions(originalOptions); + // skip comments + if (!options_1.nocomment && im._startsWith(pattern, '#')) { + exports.debug('skipping comment'); + continue; + } + // set nocomment - brace expansion could result in a leading '#' + options_1.nocomment = true; + // determine whether pattern is include or exclude + var negateCount = 0; + if (!options_1.nonegate) { + while (pattern.charAt(negateCount) == '!') { + negateCount++; + } + pattern = pattern.substring(negateCount); // trim leading '!' + if (negateCount) { + exports.debug("trimmed leading '!'. pattern: '" + pattern + "'"); + } + } + var isIncludePattern = negateCount == 0 || + (negateCount % 2 == 0 && !options_1.flipNegate) || + (negateCount % 2 == 1 && options_1.flipNegate); + // set nonegate - brace expansion could result in a leading '!' + options_1.nonegate = true; + options_1.flipNegate = false; + // expand braces - required to accurately root patterns + var expanded = void 0; + var preExpanded = pattern; + if (options_1.nobrace) { + expanded = [pattern]; + } + else { + // convert slashes on Windows before calling braceExpand(). unfortunately this means braces cannot + // be escaped on Windows, this limitation is consistent with current limitations of minimatch (3.0.3). + exports.debug('expanding braces'); + var convertedPattern = process.platform == 'win32' ? pattern.replace(/\\/g, '/') : pattern; + expanded = minimatch.braceExpand(convertedPattern); + } + // set nobrace + options_1.nobrace = true; + for (var _a = 0, expanded_1 = expanded; _a < expanded_1.length; _a++) { + var pattern_1 = expanded_1[_a]; + if (expanded.length != 1 || pattern_1 != preExpanded) { + exports.debug("pattern: '" + pattern_1 + "'"); + } + // trim and skip empty + pattern_1 = (pattern_1 || '').trim(); + if (!pattern_1) { + exports.debug('skipping empty pattern'); + continue; + } + // root the pattern when all of the following conditions are true: + if (patternRoot && // patternRoot supplied + !im._isRooted(pattern_1) && // AND pattern not rooted + // AND matchBase:false or not basename only + (!options_1.matchBase || (process.platform == 'win32' ? pattern_1.replace(/\\/g, '/') : pattern_1).indexOf('/') >= 0)) { + pattern_1 = im._ensureRooted(patternRoot, pattern_1); + exports.debug("rooted pattern: '" + pattern_1 + "'"); + } + if (isIncludePattern) { + // apply the pattern + exports.debug('applying include pattern against original list'); + var matchResults = minimatch.match(list, pattern_1, options_1); + exports.debug(matchResults.length + ' matches'); + // union the results + for (var _b = 0, matchResults_1 = matchResults; _b < matchResults_1.length; _b++) { + var matchResult = matchResults_1[_b]; + map[matchResult] = true; + } + } + else { + // apply the pattern + exports.debug('applying exclude pattern against original list'); + var matchResults = minimatch.match(list, pattern_1, options_1); + exports.debug(matchResults.length + ' matches'); + // substract the results + for (var _c = 0, matchResults_2 = matchResults; _c < matchResults_2.length; _c++) { + var matchResult = matchResults_2[_c]; + delete map[matchResult]; + } + } + } + } + // return a filtered version of the original list (preserves order and prevents duplication) + var result = list.filter(function (item) { return map.hasOwnProperty(item); }); + exports.debug(result.length + ' final results'); + return result; +} +exports.match = match; +/** + * Filter to apply glob patterns + * + * @param pattern pattern to apply + * @param options optional. defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' }. + */ +function filter(pattern, options) { + options = options || _getDefaultMatchOptions(); + return minimatch.filter(pattern, options); +} +exports.filter = filter; +function _debugMatchOptions(options) { + exports.debug("matchOptions.debug: '" + options.debug + "'"); + exports.debug("matchOptions.nobrace: '" + options.nobrace + "'"); + exports.debug("matchOptions.noglobstar: '" + options.noglobstar + "'"); + exports.debug("matchOptions.dot: '" + options.dot + "'"); + exports.debug("matchOptions.noext: '" + options.noext + "'"); + exports.debug("matchOptions.nocase: '" + options.nocase + "'"); + exports.debug("matchOptions.nonull: '" + options.nonull + "'"); + exports.debug("matchOptions.matchBase: '" + options.matchBase + "'"); + exports.debug("matchOptions.nocomment: '" + options.nocomment + "'"); + exports.debug("matchOptions.nonegate: '" + options.nonegate + "'"); + exports.debug("matchOptions.flipNegate: '" + options.flipNegate + "'"); +} +function _getDefaultMatchOptions() { + return { + debug: false, + nobrace: true, + noglobstar: false, + dot: true, + noext: false, + nocase: process.platform == 'win32', + nonull: false, + matchBase: false, + nocomment: false, + nonegate: false, + flipNegate: false + }; +} +/** + * Determines the find root from a list of patterns. Performs the find and then applies the glob patterns. + * Supports interleaved exclude patterns. Unrooted patterns are rooted using defaultRoot, unless + * matchOptions.matchBase is specified and the pattern is a basename only. For matchBase cases, the + * defaultRoot is used as the find root. + * + * @param defaultRoot default path to root unrooted patterns. falls back to System.DefaultWorkingDirectory or process.cwd(). + * @param patterns pattern or array of patterns to apply + * @param findOptions defaults to { followSymbolicLinks: true }. following soft links is generally appropriate unless deleting files. + * @param matchOptions defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' } + */ +function findMatch(defaultRoot, patterns, findOptions, matchOptions) { + // apply defaults for parameters and trace + defaultRoot = defaultRoot || this.getVariable('system.defaultWorkingDirectory') || process.cwd(); + exports.debug("defaultRoot: '" + defaultRoot + "'"); + patterns = patterns || []; + patterns = typeof patterns == 'string' ? [patterns] : patterns; + findOptions = findOptions || _getDefaultFindOptions(); + _debugFindOptions(findOptions); + matchOptions = matchOptions || _getDefaultMatchOptions(); + _debugMatchOptions(matchOptions); + // normalize slashes for root dir + defaultRoot = im._normalizeSeparators(defaultRoot); + var results = {}; + var originalMatchOptions = matchOptions; + for (var _i = 0, _a = (patterns || []); _i < _a.length; _i++) { + var pattern = _a[_i]; + exports.debug("pattern: '" + pattern + "'"); + // trim and skip empty + pattern = (pattern || '').trim(); + if (!pattern) { + exports.debug('skipping empty pattern'); + continue; + } + // clone match options + var matchOptions_1 = im._cloneMatchOptions(originalMatchOptions); + // skip comments + if (!matchOptions_1.nocomment && im._startsWith(pattern, '#')) { + exports.debug('skipping comment'); + continue; + } + // set nocomment - brace expansion could result in a leading '#' + matchOptions_1.nocomment = true; + // determine whether pattern is include or exclude + var negateCount = 0; + if (!matchOptions_1.nonegate) { + while (pattern.charAt(negateCount) == '!') { + negateCount++; + } + pattern = pattern.substring(negateCount); // trim leading '!' + if (negateCount) { + exports.debug("trimmed leading '!'. pattern: '" + pattern + "'"); + } + } + var isIncludePattern = negateCount == 0 || + (negateCount % 2 == 0 && !matchOptions_1.flipNegate) || + (negateCount % 2 == 1 && matchOptions_1.flipNegate); + // set nonegate - brace expansion could result in a leading '!' + matchOptions_1.nonegate = true; + matchOptions_1.flipNegate = false; + // expand braces - required to accurately interpret findPath + var expanded = void 0; + var preExpanded = pattern; + if (matchOptions_1.nobrace) { + expanded = [pattern]; + } + else { + // convert slashes on Windows before calling braceExpand(). unfortunately this means braces cannot + // be escaped on Windows, this limitation is consistent with current limitations of minimatch (3.0.3). + exports.debug('expanding braces'); + var convertedPattern = process.platform == 'win32' ? pattern.replace(/\\/g, '/') : pattern; + expanded = minimatch.braceExpand(convertedPattern); + } + // set nobrace + matchOptions_1.nobrace = true; + for (var _b = 0, expanded_2 = expanded; _b < expanded_2.length; _b++) { + var pattern_2 = expanded_2[_b]; + if (expanded.length != 1 || pattern_2 != preExpanded) { + exports.debug("pattern: '" + pattern_2 + "'"); + } + // trim and skip empty + pattern_2 = (pattern_2 || '').trim(); + if (!pattern_2) { + exports.debug('skipping empty pattern'); + continue; + } + if (isIncludePattern) { + // determine the findPath + var findInfo = im._getFindInfoFromPattern(defaultRoot, pattern_2, matchOptions_1); + var findPath = findInfo.findPath; + exports.debug("findPath: '" + findPath + "'"); + if (!findPath) { + exports.debug('skipping empty path'); + continue; + } + // perform the find + exports.debug("statOnly: '" + findInfo.statOnly + "'"); + var findResults = []; + if (findInfo.statOnly) { + // simply stat the path - all path segments were used to build the path + try { + fs.statSync(findPath); + findResults.push(findPath); + } + catch (err) { + if (err.code != 'ENOENT') { + throw err; + } + exports.debug('ENOENT'); + } + } + else { + findResults = find(findPath, findOptions); + } + exports.debug("found " + findResults.length + " paths"); + // apply the pattern + exports.debug('applying include pattern'); + if (findInfo.adjustedPattern != pattern_2) { + exports.debug("adjustedPattern: '" + findInfo.adjustedPattern + "'"); + pattern_2 = findInfo.adjustedPattern; + } + var matchResults = minimatch.match(findResults, pattern_2, matchOptions_1); + exports.debug(matchResults.length + ' matches'); + // union the results + for (var _c = 0, matchResults_3 = matchResults; _c < matchResults_3.length; _c++) { + var matchResult = matchResults_3[_c]; + var key = process.platform == 'win32' ? matchResult.toUpperCase() : matchResult; + results[key] = matchResult; + } + } + else { + // check if basename only and matchBase=true + if (matchOptions_1.matchBase && + !im._isRooted(pattern_2) && + (process.platform == 'win32' ? pattern_2.replace(/\\/g, '/') : pattern_2).indexOf('/') < 0) { + // do not root the pattern + exports.debug('matchBase and basename only'); + } + else { + // root the exclude pattern + pattern_2 = im._ensurePatternRooted(defaultRoot, pattern_2); + exports.debug("after ensurePatternRooted, pattern: '" + pattern_2 + "'"); + } + // apply the pattern + exports.debug('applying exclude pattern'); + var matchResults = minimatch.match(Object.keys(results).map(function (key) { return results[key]; }), pattern_2, matchOptions_1); + exports.debug(matchResults.length + ' matches'); + // substract the results + for (var _d = 0, matchResults_4 = matchResults; _d < matchResults_4.length; _d++) { + var matchResult = matchResults_4[_d]; + var key = process.platform == 'win32' ? matchResult.toUpperCase() : matchResult; + delete results[key]; + } + } + } + } + var finalResult = Object.keys(results) + .map(function (key) { return results[key]; }) + .sort(); + exports.debug(finalResult.length + ' final results'); + return finalResult; +} +exports.findMatch = findMatch; +/** + * Build Proxy URL in the following format: protocol://username:password@hostname:port + * @param proxyUrl Url address of the proxy server (eg: http://example.com) + * @param proxyUsername Proxy username (optional) + * @param proxyPassword Proxy password (optional) + * @returns string + */ +function getProxyFormattedUrl(proxyUrl, proxyUsername, proxyPassword) { + var parsedUrl = new URL(proxyUrl); + var proxyAddress = parsedUrl.protocol + "//" + parsedUrl.host; + if (proxyUsername) { + proxyAddress = parsedUrl.protocol + "//" + proxyUsername + ":" + proxyPassword + "@" + parsedUrl.host; + } + return proxyAddress; +} +/** + * Gets http proxy configuration used by Build/Release agent + * + * @return ProxyConfiguration + */ +function getHttpProxyConfiguration(requestUrl) { + var proxyUrl = exports.getVariable('Agent.ProxyUrl'); + if (proxyUrl && proxyUrl.length > 0) { + var proxyUsername = exports.getVariable('Agent.ProxyUsername'); + var proxyPassword = exports.getVariable('Agent.ProxyPassword'); + var proxyBypassHosts = JSON.parse(exports.getVariable('Agent.ProxyBypassList') || '[]'); + var bypass_1 = false; + if (requestUrl) { + proxyBypassHosts.forEach(function (bypassHost) { + if (new RegExp(bypassHost, 'i').test(requestUrl)) { + bypass_1 = true; + } + }); + } + if (bypass_1) { + return null; + } + else { + var proxyAddress = getProxyFormattedUrl(proxyUrl, proxyUsername, proxyPassword); + return { + proxyUrl: proxyUrl, + proxyUsername: proxyUsername, + proxyPassword: proxyPassword, + proxyBypassHosts: proxyBypassHosts, + proxyFormattedUrl: proxyAddress + }; + } + } + else { + return null; + } +} +exports.getHttpProxyConfiguration = getHttpProxyConfiguration; +/** + * Gets http certificate configuration used by Build/Release agent + * + * @return CertConfiguration + */ +function getHttpCertConfiguration() { + var ca = exports.getVariable('Agent.CAInfo'); + var clientCert = exports.getVariable('Agent.ClientCert'); + if (ca || clientCert) { + var certConfig = {}; + certConfig.caFile = ca; + certConfig.certFile = clientCert; + if (clientCert) { + var clientCertKey = exports.getVariable('Agent.ClientCertKey'); + var clientCertArchive = exports.getVariable('Agent.ClientCertArchive'); + var clientCertPassword = exports.getVariable('Agent.ClientCertPassword'); + certConfig.keyFile = clientCertKey; + certConfig.certArchiveFile = clientCertArchive; + certConfig.passphrase = clientCertPassword; + } + return certConfig; + } + else { + return null; + } +} +exports.getHttpCertConfiguration = getHttpCertConfiguration; +//----------------------------------------------------- +// Test Publisher +//----------------------------------------------------- +var TestPublisher = /** @class */ (function () { + function TestPublisher(testRunner) { + this.testRunner = testRunner; + } + TestPublisher.prototype.publish = function (resultFiles, mergeResults, platform, config, runTitle, publishRunAttachments, testRunSystem) { + // Could have used an initializer, but wanted to avoid reordering parameters when converting to strict null checks + // (A parameter cannot both be optional and have an initializer) + testRunSystem = testRunSystem || "VSTSTask"; + var properties = {}; + properties['type'] = this.testRunner; + if (mergeResults) { + properties['mergeResults'] = mergeResults; + } + if (platform) { + properties['platform'] = platform; + } + if (config) { + properties['config'] = config; + } + if (runTitle) { + properties['runTitle'] = runTitle; + } + if (publishRunAttachments) { + properties['publishRunAttachments'] = publishRunAttachments; + } + if (resultFiles) { + properties['resultFiles'] = Array.isArray(resultFiles) ? resultFiles.join() : resultFiles; + } + properties['testRunSystem'] = testRunSystem; + exports.command('results.publish', properties, ''); + }; + return TestPublisher; +}()); +exports.TestPublisher = TestPublisher; +//----------------------------------------------------- +// Code coverage Publisher +//----------------------------------------------------- +var CodeCoveragePublisher = /** @class */ (function () { + function CodeCoveragePublisher() { + } + CodeCoveragePublisher.prototype.publish = function (codeCoverageTool, summaryFileLocation, reportDirectory, additionalCodeCoverageFiles) { + var properties = {}; + if (codeCoverageTool) { + properties['codecoveragetool'] = codeCoverageTool; + } + if (summaryFileLocation) { + properties['summaryfile'] = summaryFileLocation; + } + if (reportDirectory) { + properties['reportdirectory'] = reportDirectory; + } + if (additionalCodeCoverageFiles) { + properties['additionalcodecoveragefiles'] = Array.isArray(additionalCodeCoverageFiles) ? additionalCodeCoverageFiles.join() : additionalCodeCoverageFiles; + } + exports.command('codecoverage.publish', properties, ""); + }; + return CodeCoveragePublisher; +}()); +exports.CodeCoveragePublisher = CodeCoveragePublisher; +//----------------------------------------------------- +// Code coverage Publisher +//----------------------------------------------------- +var CodeCoverageEnabler = /** @class */ (function () { + function CodeCoverageEnabler(buildTool, ccTool) { + this.buildTool = buildTool; + this.ccTool = ccTool; + } + CodeCoverageEnabler.prototype.enableCodeCoverage = function (buildProps) { + buildProps['buildtool'] = this.buildTool; + buildProps['codecoveragetool'] = this.ccTool; + exports.command('codecoverage.enable', buildProps, ""); + }; + return CodeCoverageEnabler; +}()); +exports.CodeCoverageEnabler = CodeCoverageEnabler; +//----------------------------------------------------- +// Task Logging Commands +//----------------------------------------------------- /** - * Hash table of known variable info. The formatted env var name is the lookup key. + * Upload user interested file as additional log information + * to the current timeline record. * - * The purpose of this hash table is to keep track of known variables. The hash table - * needs to be maintained for multiple reasons: - * 1) to distinguish between env vars and job vars - * 2) to distinguish between secret vars and public - * 3) to know the real variable name and not just the formatted env var name. + * The file shall be available for download along with task logs. + * + * @param path Path to the file that should be uploaded. + * @returns void */ -exports._knownVariableMap = {}; -//----------------------------------------------------- -// Validation Checks -//----------------------------------------------------- -// async await needs generators in node 4.x+ -if (semver.lt(process.versions.node, '4.2.0')) { - _warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later'); +function uploadFile(path) { + exports.command("task.uploadfile", null, path); +} +exports.uploadFile = uploadFile; +/** + * Instruction for the agent to update the PATH environment variable. + * The specified directory is prepended to the PATH. + * The updated environment variable will be reflected in subsequent tasks. + * + * @param path Local directory path. + * @returns void + */ +function prependPath(path) { + assertAgent("2.115.0"); + exports.command("task.prependpath", null, path); +} +exports.prependPath = prependPath; +/** + * Upload and attach summary markdown to current timeline record. + * This summary shall be added to the build/release summary and + * not available for download with logs. + * + * @param path Local directory path. + * @returns void + */ +function uploadSummary(path) { + exports.command("task.uploadsummary", null, path); +} +exports.uploadSummary = uploadSummary; +/** + * Upload and attach attachment to current timeline record. + * These files are not available for download with logs. + * These can only be referred to by extensions using the type or name values. + * + * @param type Attachment type. + * @param name Attachment name. + * @param path Attachment path. + * @returns void + */ +function addAttachment(type, name, path) { + exports.command("task.addattachment", { "type": type, "name": name }, path); +} +exports.addAttachment = addAttachment; +/** + * Set an endpoint field with given value. + * Value updated will be retained in the endpoint for + * the subsequent tasks that execute within the same job. + * + * @param id Endpoint id. + * @param field FieldType enum of AuthParameter, DataParameter or Url. + * @param key Key. + * @param value Value for key or url. + * @returns void + */ +function setEndpoint(id, field, key, value) { + exports.command("task.setendpoint", { "id": id, "field": FieldType[field].toLowerCase(), "key": key }, value); +} +exports.setEndpoint = setEndpoint; +/** + * Set progress and current operation for current task. + * + * @param percent Percentage of completion. + * @param currentOperation Current pperation. + * @returns void + */ +function setProgress(percent, currentOperation) { + exports.command("task.setprogress", { "value": "" + percent }, currentOperation); +} +exports.setProgress = setProgress; +/** + * Indicates whether to write the logging command directly to the host or to the output pipeline. + * + * @param id Timeline record Guid. + * @param parentId Parent timeline record Guid. + * @param recordType Record type. + * @param recordName Record name. + * @param order Order of timeline record. + * @param startTime Start time. + * @param finishTime End time. + * @param progress Percentage of completion. + * @param state TaskState enum of Unknown, Initialized, InProgress or Completed. + * @param result TaskResult enum of Succeeded, SucceededWithIssues, Failed, Cancelled or Skipped. + * @param message current operation + * @returns void + */ +function logDetail(id, message, parentId, recordType, recordName, order, startTime, finishTime, progress, state, result) { + var properties = { + "id": id, + "parentid": parentId, + "type": recordType, + "name": recordName, + "order": order ? order.toString() : undefined, + "starttime": startTime, + "finishtime": finishTime, + "progress": progress ? progress.toString() : undefined, + "state": state ? TaskState[state] : undefined, + "result": result ? TaskResult[result] : undefined + }; + exports.command("task.logdetail", properties, message); +} +exports.logDetail = logDetail; +/** + * Log error or warning issue to timeline record of current task. + * + * @param type IssueType enum of Error or Warning. + * @param sourcePath Source file location. + * @param lineNumber Line number. + * @param columnNumber Column number. + * @param code Error or warning code. + * @param message Error or warning message. + * @returns void + */ +function logIssue(type, message, sourcePath, lineNumber, columnNumber, errorCode) { + var properties = { + "type": IssueType[type].toLowerCase(), + "code": errorCode, + "sourcepath": sourcePath, + "linenumber": lineNumber ? lineNumber.toString() : undefined, + "columnnumber": columnNumber ? columnNumber.toString() : undefined, + }; + exports.command("task.logissue", properties, message); } +exports.logIssue = logIssue; //----------------------------------------------------- -// String convenience +// Artifact Logging Commands //----------------------------------------------------- -function _startsWith(str, start) { - return str.slice(0, start.length) == start; +/** + * Upload user interested file as additional log information + * to the current timeline record. + * + * The file shall be available for download along with task logs. + * + * @param containerFolder Folder that the file will upload to, folder will be created if needed. + * @param path Path to the file that should be uploaded. + * @param name Artifact name. + * @returns void + */ +function uploadArtifact(containerFolder, path, name) { + exports.command("artifact.upload", { "containerfolder": containerFolder, "artifactname": name }, path); } -exports._startsWith = _startsWith; -function _endsWith(str, end) { - return str.slice(-end.length) == end; +exports.uploadArtifact = uploadArtifact; +/** + * Create an artifact link, artifact location is required to be + * a file container path, VC path or UNC share path. + * + * The file shall be available for download along with task logs. + * + * @param name Artifact name. + * @param path Path to the file that should be associated. + * @param artifactType ArtifactType enum of Container, FilePath, VersionControl, GitRef or TfvcLabel. + * @returns void + */ +function associateArtifact(name, path, artifactType) { + exports.command("artifact.associate", { "type": ArtifactType[artifactType].toLowerCase(), "artifactname": name }, path); } -exports._endsWith = _endsWith; +exports.associateArtifact = associateArtifact; //----------------------------------------------------- -// General Helpers +// Build Logging Commands //----------------------------------------------------- -var _outStream = process.stdout; -var _errStream = process.stderr; -function _writeLine(str) { - _outStream.write(str + os.EOL); +/** + * Upload user interested log to build’s container “logs\tool” folder. + * + * @param path Path to the file that should be uploaded. + * @returns void + */ +function uploadBuildLog(path) { + exports.command("build.uploadlog", null, path); } -exports._writeLine = _writeLine; -function _setStdStream(stdStream) { - _outStream = stdStream; +exports.uploadBuildLog = uploadBuildLog; +/** + * Update build number for current build. + * + * @param value Value to be assigned as the build number. + * @returns void + */ +function updateBuildNumber(value) { + exports.command("build.updatebuildnumber", null, value); } -exports._setStdStream = _setStdStream; -function _setErrStream(errStream) { - _errStream = errStream; +exports.updateBuildNumber = updateBuildNumber; +/** + * Add a tag for current build. + * + * @param value Tag value. + * @returns void + */ +function addBuildTag(value) { + exports.command("build.addbuildtag", null, value); } -exports._setErrStream = _setErrStream; +exports.addBuildTag = addBuildTag; //----------------------------------------------------- -// Loc Helpers +// Release Logging Commands //----------------------------------------------------- -var _locStringCache = {}; -var _resourceFiles = {}; -var _libResourceFileLoaded = false; -var _resourceCulture = 'en-US'; -function _loadResJson(resjsonFile) { - var resJson; - if (_exist(resjsonFile)) { - var resjsonContent = fs.readFileSync(resjsonFile, 'utf8').toString(); - // remove BOM - if (resjsonContent.indexOf('\uFEFF') == 0) { - resjsonContent = resjsonContent.slice(1); - } - try { - resJson = JSON.parse(resjsonContent); +/** + * Update release name for current release. + * + * @param value Value to be assigned as the release name. + * @returns void + */ +function updateReleaseName(name) { + assertAgent("2.132.0"); + exports.command("release.updatereleasename", null, name); +} +exports.updateReleaseName = updateReleaseName; +//----------------------------------------------------- +// Tools +//----------------------------------------------------- +exports.TaskCommand = tcm.TaskCommand; +exports.commandFromString = tcm.commandFromString; +exports.ToolRunner = trm.ToolRunner; +//----------------------------------------------------- +// Validation Checks +//----------------------------------------------------- +// async await needs generators in node 4.x+ +if (semver.lt(process.versions.node, '4.2.0')) { + exports.warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later'); +} +//------------------------------------------------------------------- +// Populate the vault with sensitive data. Inputs and Endpoints +//------------------------------------------------------------------- +// avoid loading twice (overwrites .taskkey) +if (!global['_vsts_task_lib_loaded']) { + im._loadData(); + im._exposeProxySettings(); + im._exposeCertSettings(); +} + + +/***/ }), + +/***/ 33011: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.commandFromString = exports.TaskCommand = void 0; +// +// Command Format: +// ##vso[artifact.command key=value;key=value]user message +// +// Examples: +// ##vso[task.progress value=58] +// ##vso[task.issue type=warning;]This is the user warning message +// +var CMD_PREFIX = '##vso['; +var TaskCommand = /** @class */ (function () { + function TaskCommand(command, properties, message) { + if (!command) { + command = 'missing.command'; } - catch (err) { - _debug('unable to parse resjson with err: ' + err.message); + this.command = command; + this.properties = properties; + this.message = message; + } + TaskCommand.prototype.toString = function () { + var cmdStr = CMD_PREFIX + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + for (var key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + var val = this.properties[key]; + if (val) { + // safely append the val - avoid blowing up when attempting to + // call .replace() if message is not a string for some reason + cmdStr += key + '=' + escape('' + (val || '')) + ';'; + } + } + } } + cmdStr += ']'; + // safely append the message - avoid blowing up when attempting to + // call .replace() if message is not a string for some reason + var message = '' + (this.message || ''); + cmdStr += escapedata(message); + return cmdStr; + }; + return TaskCommand; +}()); +exports.TaskCommand = TaskCommand; +function commandFromString(commandLine) { + var preLen = CMD_PREFIX.length; + var lbPos = commandLine.indexOf('['); + var rbPos = commandLine.indexOf(']'); + if (lbPos == -1 || rbPos == -1 || rbPos - lbPos < 3) { + throw new Error('Invalid command brackets'); } - else { - _debug('.resjson file not found: ' + resjsonFile); + var cmdInfo = commandLine.substring(lbPos + 1, rbPos); + var spaceIdx = cmdInfo.indexOf(' '); + var command = cmdInfo; + var properties = {}; + if (spaceIdx > 0) { + command = cmdInfo.trim().substring(0, spaceIdx); + var propSection = cmdInfo.trim().substring(spaceIdx + 1); + var propLines = propSection.split(';'); + propLines.forEach(function (propLine) { + propLine = propLine.trim(); + if (propLine.length > 0) { + var eqIndex = propLine.indexOf('='); + if (eqIndex == -1) { + throw new Error('Invalid property: ' + propLine); + } + var key = propLine.substring(0, eqIndex); + var val = propLine.substring(eqIndex + 1); + properties[key] = unescape(val); + } + }); } - return resJson; + var msg = unescapedata(commandLine.substring(rbPos + 1)); + var cmd = new TaskCommand(command, properties, msg); + return cmd; } -function _loadLocStrings(resourceFile, culture) { - var locStrings = {}; - if (_exist(resourceFile)) { - var resourceJson = require(resourceFile); - if (resourceJson && resourceJson.hasOwnProperty('messages')) { - var locResourceJson; - // load up resource resjson for different culture - var localizedResourceFile = path.join(path.dirname(resourceFile), 'Strings', 'resources.resjson'); - var upperCulture = culture.toUpperCase(); - var cultures = []; +exports.commandFromString = commandFromString; +function escapedata(s) { + return s.replace(/%/g, '%AZP25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function unescapedata(s) { + return s.replace(/%0D/g, '\r') + .replace(/%0A/g, '\n') + .replace(/%AZP25/g, '%'); +} +function escape(s) { + return s.replace(/%/g, '%AZP25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/]/g, '%5D') + .replace(/;/g, '%3B'); +} +function unescape(s) { + return s.replace(/%0D/g, '\r') + .replace(/%0A/g, '\n') + .replace(/%5D/g, ']') + .replace(/%3B/g, ';') + .replace(/%AZP25/g, '%'); +} + + +/***/ }), + +/***/ 17515: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ToolRunner = void 0; +var Q = __nccwpck_require__(56172); +var os = __nccwpck_require__(22037); +var events = __nccwpck_require__(82361); +var child = __nccwpck_require__(32081); +var im = __nccwpck_require__(36526); +var fs = __nccwpck_require__(57147); +var ToolRunner = /** @class */ (function (_super) { + __extends(ToolRunner, _super); + function ToolRunner(toolPath) { + var _this = _super.call(this) || this; + _this.cmdSpecialChars = [' ', '\t', '&', '(', ')', '[', ']', '{', '}', '^', '=', ';', '!', '\'', '+', ',', '`', '~', '|', '<', '>', '"']; + if (!toolPath) { + throw new Error('Parameter \'toolPath\' cannot be null or empty.'); + } + _this.toolPath = im._which(toolPath, true); + _this.args = []; + _this._debug('toolRunner toolPath: ' + toolPath); + return _this; + } + ToolRunner.prototype._debug = function (message) { + this.emit('debug', message); + }; + ToolRunner.prototype._argStringToArray = function (argString) { + var args = []; + var inQuotes = false; + var escaped = false; + var lastCharWasSpace = true; + var arg = ''; + var append = function (c) { + // we only escape double quotes. + if (escaped) { + if (c !== '"') { + arg += '\\'; + } + else { + arg.slice(0, -1); + } + } + arg += c; + escaped = false; + }; + for (var i = 0; i < argString.length; i++) { + var c = argString.charAt(i); + if (c === ' ' && !inQuotes) { + if (!lastCharWasSpace) { + args.push(arg); + arg = ''; + } + lastCharWasSpace = true; + continue; + } + else { + lastCharWasSpace = false; + } + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } + else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + append(c); + lastCharWasSpace = false; + } + if (!lastCharWasSpace) { + args.push(arg.trim()); + } + return args; + }; + ToolRunner.prototype._getCommandString = function (options, noPrefix) { + var _this = this; + var toolPath = this._getSpawnFileName(); + var args = this._getSpawnArgs(options); + var cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool + var commandParts = []; + if (process.platform == 'win32') { + // Windows + cmd file + if (this._isCmdFile()) { + commandParts.push(toolPath); + commandParts = commandParts.concat(args); + } + // Windows + verbatim + else if (options.windowsVerbatimArguments) { + commandParts.push("\"" + toolPath + "\""); + commandParts = commandParts.concat(args); + } + else if (options.shell) { + commandParts.push(this._windowsQuoteCmdArg(toolPath)); + commandParts = commandParts.concat(args); + } + // Windows (regular) + else { + commandParts.push(this._windowsQuoteCmdArg(toolPath)); + commandParts = commandParts.concat(args.map(function (arg) { return _this._windowsQuoteCmdArg(arg); })); + } + } + else { + // OSX/Linux - this can likely be improved with some form of quoting. + // creating processes on Unix is fundamentally different than Windows. + // on Unix, execvp() takes an arg array. + commandParts.push(toolPath); + commandParts = commandParts.concat(args); + } + cmd += commandParts.join(' '); + // append second tool + if (this.pipeOutputToTool) { + cmd += ' | ' + this.pipeOutputToTool._getCommandString(options, /*noPrefix:*/ true); + } + return cmd; + }; + ToolRunner.prototype._processLineBuffer = function (data, strBuffer, onLine) { + try { + var s = strBuffer + data.toString(); + var n = s.indexOf(os.EOL); + while (n > -1) { + var line = s.substring(0, n); + onLine(line); + // the rest of the string ... + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + strBuffer = s; + } + catch (err) { + // streaming lines to console is best effort. Don't fail a build. + this._debug('error processing line'); + } + }; + /** + * Wraps an arg string with specified char if it's not already wrapped + * @returns {string} Arg wrapped with specified char + * @param {string} arg Input argument string + * @param {string} wrapChar A char input string should be wrapped with + */ + ToolRunner.prototype._wrapArg = function (arg, wrapChar) { + if (!this._isWrapped(arg, wrapChar)) { + return "" + wrapChar + arg + wrapChar; + } + return arg; + }; + /** + * Unwraps an arg string wrapped with specified char + * @param arg Arg wrapped with specified char + * @param wrapChar A char to be removed + */ + ToolRunner.prototype._unwrapArg = function (arg, wrapChar) { + if (this._isWrapped(arg, wrapChar)) { + var pattern = new RegExp("(^\\\\?" + wrapChar + ")|(\\\\?" + wrapChar + "$)", 'g'); + return arg.trim().replace(pattern, ''); + } + return arg; + }; + /** + * Determine if arg string is wrapped with specified char + * @param arg Input arg string + */ + ToolRunner.prototype._isWrapped = function (arg, wrapChar) { + var pattern = new RegExp("^\\\\?" + wrapChar + ".+\\\\?" + wrapChar + "$"); + return pattern.test(arg.trim()); + }; + ToolRunner.prototype._getSpawnFileName = function (options) { + if (process.platform == 'win32') { + if (this._isCmdFile()) { + return process.env['COMSPEC'] || 'cmd.exe'; + } + } + if (options && options.shell) { + return this._wrapArg(this.toolPath, '"'); + } + return this.toolPath; + }; + ToolRunner.prototype._getSpawnArgs = function (options) { + var _this = this; + if (process.platform == 'win32') { + if (this._isCmdFile()) { + var argline = "/D /S /C \"" + this._windowsQuoteCmdArg(this.toolPath); + for (var i = 0; i < this.args.length; i++) { + argline += ' '; + argline += options.windowsVerbatimArguments ? this.args[i] : this._windowsQuoteCmdArg(this.args[i]); + } + argline += '"'; + return [argline]; + } + if (options.windowsVerbatimArguments) { + // note, in Node 6.x options.argv0 can be used instead of overriding args.slice and args.unshift. + // for more details, refer to https://github.com/nodejs/node/blob/v6.x/lib/child_process.js + var args_1 = this.args.slice(0); // copy the array + // override slice to prevent Node from creating a copy of the arg array. + // we need Node to use the "unshift" override below. + args_1.slice = function () { + if (arguments.length != 1 || arguments[0] != 0) { + throw new Error('Unexpected arguments passed to args.slice when windowsVerbatimArguments flag is set.'); + } + return args_1; + }; + // override unshift + // + // when using the windowsVerbatimArguments option, Node does not quote the tool path when building + // the cmdline parameter for the win32 function CreateProcess(). an unquoted space in the tool path + // causes problems for tools when attempting to parse their own command line args. tools typically + // assume their arguments begin after arg 0. + // + // by hijacking unshift, we can quote the tool path when it pushed onto the args array. Node builds + // the cmdline parameter from the args array. + // + // note, we can't simply pass a quoted tool path to Node for multiple reasons: + // 1) Node verifies the file exists (calls win32 function GetFileAttributesW) and the check returns + // false if the path is quoted. + // 2) Node passes the tool path as the application parameter to CreateProcess, which expects the + // path to be unquoted. + // + // also note, in addition to the tool path being embedded within the cmdline parameter, Node also + // passes the tool path to CreateProcess via the application parameter (optional parameter). when + // present, Windows uses the application parameter to determine which file to run, instead of + // interpreting the file from the cmdline parameter. + args_1.unshift = function () { + if (arguments.length != 1) { + throw new Error('Unexpected arguments passed to args.unshift when windowsVerbatimArguments flag is set.'); + } + return Array.prototype.unshift.call(args_1, "\"" + arguments[0] + "\""); // quote the file name + }; + return args_1; + } + else if (options.shell) { + var args = []; + for (var _i = 0, _a = this.args; _i < _a.length; _i++) { + var arg = _a[_i]; + if (this._needQuotesForCmd(arg, '%')) { + args.push(this._wrapArg(arg, '"')); + } + else { + args.push(arg); + } + } + return args; + } + } + else if (options.shell) { + return this.args.map(function (arg) { + if (_this._isWrapped(arg, "'")) { + return arg; + } + // remove wrapping double quotes to avoid escaping + arg = _this._unwrapArg(arg, '"'); + arg = _this._escapeChar(arg, '"'); + return _this._wrapArg(arg, '"'); + }); + } + return this.args; + }; + /** + * Escape specified character. + * @param arg String to escape char in + * @param charToEscape Char should be escaped + */ + ToolRunner.prototype._escapeChar = function (arg, charToEscape) { + var escChar = "\\"; + var output = ''; + var charIsEscaped = false; + for (var _i = 0, arg_1 = arg; _i < arg_1.length; _i++) { + var char = arg_1[_i]; + if (char === charToEscape && !charIsEscaped) { + output += escChar + char; + } + else { + output += char; + } + charIsEscaped = char === escChar && !charIsEscaped; + } + return output; + }; + ToolRunner.prototype._isCmdFile = function () { + var upperToolPath = this.toolPath.toUpperCase(); + return im._endsWith(upperToolPath, '.CMD') || im._endsWith(upperToolPath, '.BAT'); + }; + /** + * Determine whether the cmd arg needs to be quoted. Returns true if arg contains any of special chars array. + * @param arg The cmd command arg. + * @param additionalChars Additional chars which should be also checked. + */ + ToolRunner.prototype._needQuotesForCmd = function (arg, additionalChars) { + var specialChars = this.cmdSpecialChars; + if (additionalChars) { + specialChars = this.cmdSpecialChars.concat(additionalChars); + } + var _loop_1 = function (char) { + if (specialChars.some(function (x) { return x === char; })) { + return { value: true }; + } + }; + for (var _i = 0, arg_2 = arg; _i < arg_2.length; _i++) { + var char = arg_2[_i]; + var state_1 = _loop_1(char); + if (typeof state_1 === "object") + return state_1.value; + } + return false; + }; + ToolRunner.prototype._windowsQuoteCmdArg = function (arg) { + // for .exe, apply the normal quoting rules that libuv applies + if (!this._isCmdFile()) { + return this._uv_quote_cmd_arg(arg); + } + // otherwise apply quoting rules specific to the cmd.exe command line parser. + // the libuv rules are generic and are not designed specifically for cmd.exe + // command line parser. + // + // for a detailed description of the cmd.exe command line parser, refer to + // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 + // need quotes for empty arg + if (!arg) { + return '""'; + } + // determine whether the arg needs to be quoted + var needsQuotes = this._needQuotesForCmd(arg); + // short-circuit if quotes not needed + if (!needsQuotes) { + return arg; + } + // the following quoting rules are very similar to the rules that by libuv applies. + // + // 1) wrap the string in quotes + // + // 2) double-up quotes - i.e. " => "" + // + // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately + // doesn't work well with a cmd.exe command line. + // + // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. + // for example, the command line: + // foo.exe "myarg:""my val""" + // is parsed by a .NET console app into an arg array: + // [ "myarg:\"my val\"" ] + // which is the same end result when applying libuv quoting rules. although the actual + // command line from libuv quoting rules would look like: + // foo.exe "myarg:\"my val\"" + // + // 3) double-up slashes that preceed a quote, + // e.g. hello \world => "hello \world" + // hello\"world => "hello\\""world" + // hello\\"world => "hello\\\\""world" + // hello world\ => "hello world\\" + // + // technically this is not required for a cmd.exe command line, or the batch argument parser. + // the reasons for including this as a .cmd quoting rule are: + // + // a) this is optimized for the scenario where the argument is passed from the .cmd file to an + // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. + // + // b) it's what we've been doing previously (by deferring to node default behavior) and we + // haven't heard any complaints about that aspect. + // + // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be + // escaped when used on the command line directly - even though within a .cmd file % can be escaped + // by using %%. + // + // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts + // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. + // + // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would + // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the + // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args + // to an external program. + // + // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. + // % can be escaped within a .cmd file. + var reverse = '"'; + var quote_hit = true; + for (var i = arg.length; i > 0; i--) { // walk the string in reverse + reverse += arg[i - 1]; + if (quote_hit && arg[i - 1] == '\\') { + reverse += '\\'; // double the slash + } + else if (arg[i - 1] == '"') { + quote_hit = true; + reverse += '"'; // double the quote + } + else { + quote_hit = false; + } + } + reverse += '"'; + return reverse.split('').reverse().join(''); + }; + ToolRunner.prototype._uv_quote_cmd_arg = function (arg) { + // Tool runner wraps child_process.spawn() and needs to apply the same quoting as + // Node in certain cases where the undocumented spawn option windowsVerbatimArguments + // is used. + // + // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, + // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), + // pasting copyright notice from Node within this function: + // + // Copyright Joyent, Inc. and other Node contributors. All rights reserved. + // + // Permission is hereby granted, free of charge, to any person obtaining a copy + // of this software and associated documentation files (the "Software"), to + // deal in the Software without restriction, including without limitation the + // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + // sell copies of the Software, and to permit persons to whom the Software is + // furnished to do so, subject to the following conditions: + // + // The above copyright notice and this permission notice shall be included in + // all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + // IN THE SOFTWARE. + if (!arg) { + // Need double quotation for empty argument + return '""'; + } + if (arg.indexOf(' ') < 0 && arg.indexOf('\t') < 0 && arg.indexOf('"') < 0) { + // No quotation needed + return arg; + } + if (arg.indexOf('"') < 0 && arg.indexOf('\\') < 0) { + // No embedded double quotes or backslashes, so I can just wrap + // quote marks around the whole thing. + return "\"" + arg + "\""; + } + // Expected input/output: + // input : hello"world + // output: "hello\"world" + // input : hello""world + // output: "hello\"\"world" + // input : hello\world + // output: hello\world + // input : hello\\world + // output: hello\\world + // input : hello\"world + // output: "hello\\\"world" + // input : hello\\"world + // output: "hello\\\\\"world" + // input : hello world\ + // output: "hello world\\" - note the comment in libuv actually reads "hello world\" + // but it appears the comment is wrong, it should be "hello world\\" + var reverse = '"'; + var quote_hit = true; + for (var i = arg.length; i > 0; i--) { // walk the string in reverse + reverse += arg[i - 1]; + if (quote_hit && arg[i - 1] == '\\') { + reverse += '\\'; + } + else if (arg[i - 1] == '"') { + quote_hit = true; + reverse += '\\'; + } + else { + quote_hit = false; + } + } + reverse += '"'; + return reverse.split('').reverse().join(''); + }; + ToolRunner.prototype._cloneExecOptions = function (options) { + options = options || {}; + var result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + shell: options.shell || false + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + }; + ToolRunner.prototype._getSpawnOptions = function (options) { + options = options || {}; + var result = {}; + result.cwd = options.cwd; + result.env = options.env; + result.shell = options.shell; + result['windowsVerbatimArguments'] = options.windowsVerbatimArguments || this._isCmdFile(); + return result; + }; + ToolRunner.prototype._getSpawnSyncOptions = function (options) { + var result = {}; + result.maxBuffer = 1024 * 1024 * 1024; + result.cwd = options.cwd; + result.env = options.env; + result.shell = options.shell; + result['windowsVerbatimArguments'] = options.windowsVerbatimArguments || this._isCmdFile(); + return result; + }; + ToolRunner.prototype.execWithPiping = function (pipeOutputToTool, options) { + var _this = this; + var _a, _b, _c, _d; + var defer = Q.defer(); + this._debug('exec tool: ' + this.toolPath); + this._debug('arguments:'); + this.args.forEach(function (arg) { + _this._debug(' ' + arg); + }); + var success = true; + var optionsNonNull = this._cloneExecOptions(options); + if (!optionsNonNull.silent) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + var cp; + var toolPath = pipeOutputToTool.toolPath; + var toolPathFirst; + var successFirst = true; + var returnCodeFirst; + var fileStream; + var waitingEvents = 0; // number of process or stream events we are waiting on to complete + var returnCode = 0; + var error; + toolPathFirst = this.toolPath; + // Following node documentation example from this link on how to pipe output of one process to another + // https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options + //start the child process for both tools + waitingEvents++; + var cpFirst = child.spawn(this._getSpawnFileName(optionsNonNull), this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(optionsNonNull)); + waitingEvents++; + cp = child.spawn(pipeOutputToTool._getSpawnFileName(optionsNonNull), pipeOutputToTool._getSpawnArgs(optionsNonNull), pipeOutputToTool._getSpawnOptions(optionsNonNull)); + fileStream = this.pipeOutputToFile ? fs.createWriteStream(this.pipeOutputToFile) : null; + if (fileStream) { + waitingEvents++; + fileStream.on('finish', function () { + waitingEvents--; //file write is complete + fileStream = null; + if (waitingEvents == 0) { + if (error) { + defer.reject(error); + } + else { + defer.resolve(returnCode); + } + } + }); + fileStream.on('error', function (err) { + waitingEvents--; //there were errors writing to the file, write is done + _this._debug("Failed to pipe output of " + toolPathFirst + " to file " + _this.pipeOutputToFile + ". Error = " + err); + fileStream = null; + if (waitingEvents == 0) { + if (error) { + defer.reject(error); + } + else { + defer.resolve(returnCode); + } + } + }); + } + //pipe stdout of first tool to stdin of second tool + (_a = cpFirst.stdout) === null || _a === void 0 ? void 0 : _a.on('data', function (data) { + var _a; try { - cultures = fs.readdirSync(localizedResourceFile); + if (fileStream) { + fileStream.write(data); + } + (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.write(data); + } + catch (err) { + _this._debug('Failed to pipe output of ' + toolPathFirst + ' to ' + toolPath); + _this._debug(toolPath + ' might have exited due to errors prematurely. Verify the arguments passed are valid.'); + } + }); + (_b = cpFirst.stderr) === null || _b === void 0 ? void 0 : _b.on('data', function (data) { + if (fileStream) { + fileStream.write(data); + } + successFirst = !optionsNonNull.failOnStdErr; + if (!optionsNonNull.silent) { + var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + }); + cpFirst.on('error', function (err) { + var _a; + waitingEvents--; //first process is complete with errors + if (fileStream) { + fileStream.end(); + } + (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.end(); + error = new Error(toolPathFirst + ' failed. ' + err.message); + if (waitingEvents == 0) { + defer.reject(error); + } + }); + cpFirst.on('close', function (code, signal) { + var _a; + waitingEvents--; //first process is complete + if (code != 0 && !optionsNonNull.ignoreReturnCode) { + successFirst = false; + returnCodeFirst = code; + returnCode = returnCodeFirst; } - catch (ex) { } - for (var i = 0; i < cultures.length; i++) { - if (cultures[i].toUpperCase() == upperCulture) { - localizedResourceFile = path.join(localizedResourceFile, cultures[i], 'resources.resjson'); - if (_exist(localizedResourceFile)) { - locResourceJson = _loadResJson(localizedResourceFile); - } - break; + _this._debug('success of first tool:' + successFirst); + if (fileStream) { + fileStream.end(); + } + (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.end(); + if (waitingEvents == 0) { + if (error) { + defer.reject(error); + } + else { + defer.resolve(returnCode); } } - for (var key in resourceJson.messages) { - if (locResourceJson && locResourceJson.hasOwnProperty('loc.messages.' + key)) { - locStrings[key] = locResourceJson['loc.messages.' + key]; + }); + var stdbuffer = ''; + (_c = cp.stdout) === null || _c === void 0 ? void 0 : _c.on('data', function (data) { + _this.emit('stdout', data); + if (!optionsNonNull.silent) { + optionsNonNull.outStream.write(data); + } + _this._processLineBuffer(data, stdbuffer, function (line) { + _this.emit('stdline', line); + }); + }); + var errbuffer = ''; + (_d = cp.stderr) === null || _d === void 0 ? void 0 : _d.on('data', function (data) { + _this.emit('stderr', data); + success = !optionsNonNull.failOnStdErr; + if (!optionsNonNull.silent) { + var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + _this._processLineBuffer(data, errbuffer, function (line) { + _this.emit('errline', line); + }); + }); + cp.on('error', function (err) { + waitingEvents--; //process is done with errors + error = new Error(toolPath + ' failed. ' + err.message); + if (waitingEvents == 0) { + defer.reject(error); + } + }); + cp.on('close', function (code, signal) { + waitingEvents--; //process is complete + _this._debug('rc:' + code); + returnCode = code; + if (stdbuffer.length > 0) { + _this.emit('stdline', stdbuffer); + } + if (errbuffer.length > 0) { + _this.emit('errline', errbuffer); + } + if (code != 0 && !optionsNonNull.ignoreReturnCode) { + success = false; + } + _this._debug('success:' + success); + if (!successFirst) { //in the case output is piped to another tool, check exit code of both tools + error = new Error(toolPathFirst + ' failed with return code: ' + returnCodeFirst); + } + else if (!success) { + error = new Error(toolPath + ' failed with return code: ' + code); + } + if (waitingEvents == 0) { + if (error) { + defer.reject(error); } else { - locStrings[key] = resourceJson.messages[key]; + defer.resolve(returnCode); } } + }); + return defer.promise; + }; + /** + * Add argument + * Append an argument or an array of arguments + * returns ToolRunner for chaining + * + * @param val string cmdline or array of strings + * @returns ToolRunner + */ + ToolRunner.prototype.arg = function (val) { + if (!val) { + return this; } - } - else { - _warning('LIB_ResourceFile does not exist'); - } - return locStrings; -} -/** - * Sets the location of the resources json. This is typically the task.json file. - * Call once at the beginning of the script before any calls to loc. - * @param path Full path to the json. - * @param ignoreWarnings Won't throw warnings if path already set. - * @returns void - */ -function _setResourcePath(path, ignoreWarnings) { - if (ignoreWarnings === void 0) { ignoreWarnings = false; } - if (process.env['TASKLIB_INPROC_UNITS']) { - _resourceFiles = {}; - _libResourceFileLoaded = false; - _locStringCache = {}; - _resourceCulture = 'en-US'; - } - if (!_resourceFiles[path]) { - _checkPath(path, 'resource file path'); - _resourceFiles[path] = path; - _debug('adding resource file: ' + path); - _resourceCulture = _getVariable('system.culture') || _resourceCulture; - var locStrs = _loadLocStrings(path, _resourceCulture); - for (var key in locStrs) { - //cache loc string - _locStringCache[key] = locStrs[key]; - } - } - else { - if (ignoreWarnings) { - _debug(_loc('LIB_ResourceFileAlreadySet', path)); - } - else { - _warning(_loc('LIB_ResourceFileAlreadySet', path)); - } - } -} -exports._setResourcePath = _setResourcePath; -/** - * Gets the localized string from the json resource file. Optionally formats with additional params. - * - * @param key key of the resources string in the resource file - * @param param additional params for formatting the string - * @returns string - */ -function _loc(key) { - var param = []; - for (var _i = 1; _i < arguments.length; _i++) { - param[_i - 1] = arguments[_i]; - } - if (!_libResourceFileLoaded) { - // merge loc strings from azure-pipelines-task-lib. - var libResourceFile = __nccwpck_require__.ab + "lib.json"; - var libLocStrs = _loadLocStrings(__nccwpck_require__.ab + "lib.json", _resourceCulture); - for (var libKey in libLocStrs) { - //cache azure-pipelines-task-lib loc string - _locStringCache[libKey] = libLocStrs[libKey]; - } - _libResourceFileLoaded = true; - } - var locString; - ; - if (_locStringCache.hasOwnProperty(key)) { - locString = _locStringCache[key]; - } - else { - if (Object.keys(_resourceFiles).length <= 0) { - _warning("Resource file haven't been set, can't find loc string for key: " + key); + if (val instanceof Array) { + this._debug(this.toolPath + ' arg: ' + JSON.stringify(val)); + this.args = this.args.concat(val); } - else { - _warning("Can't find loc string for key: " + key); + else if (typeof (val) === 'string') { + this._debug(this.toolPath + ' arg: ' + val); + this.args = this.args.concat(val.trim()); } - locString = key; - } - if (param.length > 0) { - return util.format.apply(this, [locString].concat(param)); - } - else { - return locString; - } -} -exports._loc = _loc; -//----------------------------------------------------- -// Input Helpers -//----------------------------------------------------- -/** - * Gets a variable value that is defined on the build/release definition or set at runtime. - * - * @param name name of the variable to get - * @returns string - */ -function _getVariable(name) { - var varval; - // get the metadata - var info; - var key = _getVariableKey(name); - if (exports._knownVariableMap.hasOwnProperty(key)) { - info = exports._knownVariableMap[key]; - } - if (info && info.secret) { - // get the secret value - varval = exports._vault.retrieveSecret('SECRET_' + key); - } - else { - // get the public value - varval = process.env[key]; - // fallback for pre 2.104.1 agent - if (!varval && name.toUpperCase() == 'AGENT.JOBSTATUS') { - varval = process.env['agent.jobstatus']; + return this; + }; + /** + * Parses an argument line into one or more arguments + * e.g. .line('"arg one" two -z') is equivalent to .arg(['arg one', 'two', '-z']) + * returns ToolRunner for chaining + * + * @param val string argument line + * @returns ToolRunner + */ + ToolRunner.prototype.line = function (val) { + if (!val) { + return this; } - } - _debug(name + '=' + varval); - return varval; -} -exports._getVariable = _getVariable; -function _getVariableKey(name) { - if (!name) { - throw new Error(_loc('LIB_ParameterIsRequired', 'name')); - } - return name.replace(/\./g, '_').replace(/ /g, '_').toUpperCase(); -} -exports._getVariableKey = _getVariableKey; -//----------------------------------------------------- -// Cmd Helpers -//----------------------------------------------------- -function _command(command, properties, message) { - var taskCmd = new tcm.TaskCommand(command, properties, message); - _writeLine(taskCmd.toString()); -} -exports._command = _command; -function _warning(message) { - _command('task.issue', { 'type': 'warning' }, message); -} -exports._warning = _warning; -function _error(message) { - _command('task.issue', { 'type': 'error' }, message); -} -exports._error = _error; -function _debug(message) { - _command('task.debug', null, message); -} -exports._debug = _debug; -// //----------------------------------------------------- -// // Disk Functions -// //----------------------------------------------------- -/** - * Returns whether a path exists. - * - * @param path path to check - * @returns boolean - */ -function _exist(path) { - var exist = false; - try { - exist = !!(path && fs.statSync(path) != null); - } - catch (err) { - if (err && err.code === 'ENOENT') { - exist = false; + this._debug(this.toolPath + ' arg: ' + val); + this.args = this.args.concat(this._argStringToArray(val)); + return this; + }; + /** + * Add argument(s) if a condition is met + * Wraps arg(). See arg for details + * returns ToolRunner for chaining + * + * @param condition boolean condition + * @param val string cmdline or array of strings + * @returns ToolRunner + */ + ToolRunner.prototype.argIf = function (condition, val) { + if (condition) { + this.arg(val); } - else { - throw err; + return this; + }; + /** + * Pipe output of exec() to another tool + * @param tool + * @param file optional filename to additionally stream the output to. + * @returns {ToolRunner} + */ + ToolRunner.prototype.pipeExecOutputToTool = function (tool, file) { + this.pipeOutputToTool = tool; + this.pipeOutputToFile = file; + return this; + }; + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See IExecOptions + * @returns number + */ + ToolRunner.prototype.exec = function (options) { + var _this = this; + var _a, _b, _c; + if (this.pipeOutputToTool) { + return this.execWithPiping(this.pipeOutputToTool, options); } - } - return exist; -} -exports._exist = _exist; -/** - * Checks whether a path exists. - * If the path does not exist, it will throw. - * - * @param p path to check - * @param name name only used in error message to identify the path - * @returns void - */ -function _checkPath(p, name) { - _debug('check path : ' + p); - if (!_exist(p)) { - throw new Error(_loc('LIB_PathNotFound', name, p)); - } -} -exports._checkPath = _checkPath; -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns string - */ -function _which(tool, check) { - if (!tool) { - throw new Error('parameter \'tool\' is required'); - } - // recursive when check=true - if (check) { - var result = _which(tool, false); - if (result) { - return result; + var defer = Q.defer(); + this._debug('exec tool: ' + this.toolPath); + this._debug('arguments:'); + this.args.forEach(function (arg) { + _this._debug(' ' + arg); + }); + var optionsNonNull = this._cloneExecOptions(options); + if (!optionsNonNull.silent) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); } - else { - if (process.platform == 'win32') { - throw new Error(_loc('LIB_WhichNotFound_Win', tool)); - } - else { - throw new Error(_loc('LIB_WhichNotFound_Linux', tool)); + var state = new ExecState(optionsNonNull, this.toolPath); + state.on('debug', function (message) { + _this._debug(message); + }); + var cp = child.spawn(this._getSpawnFileName(options), this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(options)); + this.childProcess = cp; + // it is possible for the child process to end its last line without a new line. + // because stdout is buffered, this causes the last line to not get sent to the parent + // stream. Adding this event forces a flush before the child streams are closed. + (_a = cp.stdout) === null || _a === void 0 ? void 0 : _a.on('finish', function () { + if (!optionsNonNull.silent) { + optionsNonNull.outStream.write(os.EOL); } - } - } - _debug("which '" + tool + "'"); - try { - // build the list of extensions to try - var extensions = []; - if (process.platform == 'win32' && process.env['PATHEXT']) { - for (var _i = 0, _a = process.env['PATHEXT'].split(path.delimiter); _i < _a.length; _i++) { - var extension = _a[_i]; - if (extension) { - extensions.push(extension); - } + }); + var stdbuffer = ''; + (_b = cp.stdout) === null || _b === void 0 ? void 0 : _b.on('data', function (data) { + _this.emit('stdout', data); + if (!optionsNonNull.silent) { + optionsNonNull.outStream.write(data); } - } - // if it's rooted, return it if exists. otherwise return empty. - if (_isRooted(tool)) { - var filePath = _tryGetExecutablePath(tool, extensions); - if (filePath) { - _debug("found: '" + filePath + "'"); - return filePath; + _this._processLineBuffer(data, stdbuffer, function (line) { + _this.emit('stdline', line); + }); + }); + var errbuffer = ''; + (_c = cp.stderr) === null || _c === void 0 ? void 0 : _c.on('data', function (data) { + state.processStderr = true; + _this.emit('stderr', data); + if (!optionsNonNull.silent) { + var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); } - _debug('not found'); - return ''; - } - // if any path separators, return empty - if (tool.indexOf('/') >= 0 || (process.platform == 'win32' && tool.indexOf('\\') >= 0)) { - _debug('not found'); - return ''; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a task lib perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the task lib should strive for consistency - // across platforms. - var directories = []; - if (process.env['PATH']) { - for (var _b = 0, _c = process.env['PATH'].split(path.delimiter); _b < _c.length; _b++) { - var p = _c[_b]; - if (p) { - directories.push(p); - } + _this._processLineBuffer(data, errbuffer, function (line) { + _this.emit('errline', line); + }); + }); + cp.on('error', function (err) { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on('exit', function (code, signal) { + state.processExitCode = code; + state.processExited = true; + _this._debug("Exit code " + code + " received from tool '" + _this.toolPath + "'"); + state.CheckComplete(); + }); + cp.on('close', function (code, signal) { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + _this._debug("STDIO streams have closed for tool '" + _this.toolPath + "'"); + state.CheckComplete(); + }); + state.on('done', function (error, exitCode) { + if (stdbuffer.length > 0) { + _this.emit('stdline', stdbuffer); } - } - // return the first match - for (var _d = 0, directories_1 = directories; _d < directories_1.length; _d++) { - var directory = directories_1[_d]; - var filePath = _tryGetExecutablePath(directory + path.sep + tool, extensions); - if (filePath) { - _debug("found: '" + filePath + "'"); - return filePath; + if (errbuffer.length > 0) { + _this.emit('errline', errbuffer); } - } - _debug('not found'); - return ''; - } - catch (err) { - throw new Error(_loc('LIB_OperationFailed', 'which', err.message)); - } -} -exports._which = _which; -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function _tryGetExecutablePath(filePath, extensions) { - try { - // test file exists - var stats = fs.statSync(filePath); - if (stats.isFile()) { - if (process.platform == 'win32') { - // on Windows, test for valid extension - var isExecutable = false; - var fileName = path.basename(filePath); - var dotIndex = fileName.lastIndexOf('.'); - if (dotIndex >= 0) { - var upperExt_1 = fileName.substr(dotIndex).toUpperCase(); - if (extensions.some(function (validExt) { return validExt.toUpperCase() == upperExt_1; })) { - return filePath; - } - } + cp.removeAllListeners(); + if (error) { + defer.reject(error); } else { - if (isUnixExecutable(stats)) { - return filePath; - } + defer.resolve(exitCode); } + }); + return defer.promise; + }; + /** + * Exec a tool synchronously. + * Output will be *not* be streamed to the live console. It will be returned after execution is complete. + * Appropriate for short running tools + * Returns IExecSyncResult with output and return code + * + * @param tool path to tool to exec + * @param options optional exec options. See IExecSyncOptions + * @returns IExecSyncResult + */ + ToolRunner.prototype.execSync = function (options) { + var _this = this; + this._debug('exec tool: ' + this.toolPath); + this._debug('arguments:'); + this.args.forEach(function (arg) { + _this._debug(' ' + arg); + }); + var success = true; + options = this._cloneExecOptions(options); + if (!options.silent) { + options.outStream.write(this._getCommandString(options) + os.EOL); } - } - catch (err) { - if (err.code != 'ENOENT') { - _debug("Unexpected error attempting to determine if executable file exists '" + filePath + "': " + err); - } - } - // try each extension - var originalFilePath = filePath; - for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { - var extension = extensions_1[_i]; - var found = false; - var filePath_1 = originalFilePath + extension; - try { - var stats = fs.statSync(filePath_1); - if (stats.isFile()) { - if (process.platform == 'win32') { - // preserve the case of the actual file (since an extension was appended) - try { - var directory = path.dirname(filePath_1); - var upperName = path.basename(filePath_1).toUpperCase(); - for (var _a = 0, _b = fs.readdirSync(directory); _a < _b.length; _a++) { - var actualName = _b[_a]; - if (upperName == actualName.toUpperCase()) { - filePath_1 = path.join(directory, actualName); - break; - } - } - } - catch (err) { - _debug("Unexpected error attempting to determine the actual case of the file '" + filePath_1 + "': " + err); - } - return filePath_1; - } - else { - if (isUnixExecutable(stats)) { - return filePath_1; - } - } - } + var r = child.spawnSync(this._getSpawnFileName(options), this._getSpawnArgs(options), this._getSpawnSyncOptions(options)); + if (!options.silent && r.stdout && r.stdout.length > 0) { + options.outStream.write(r.stdout); } - catch (err) { - if (err.code != 'ENOENT') { - _debug("Unexpected error attempting to determine if executable file exists '" + filePath_1 + "': " + err); - } + if (!options.silent && r.stderr && r.stderr.length > 0) { + options.errStream.write(r.stderr); } - } - return ''; -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || ((stats.mode & 64) > 0 && stats.uid === process.getuid()); -} -function _legacyFindFiles_convertPatternToRegExp(pattern) { - pattern = (process.platform == 'win32' ? pattern.replace(/\\/g, '/') : pattern) // normalize separator on Windows - .replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') // regex escape - from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript - .replace(/\\\/\\\*\\\*\\\//g, '((\/.+/)|(\/))') // replace directory globstar, e.g. /hello/**/world - .replace(/\\\*\\\*/g, '.*') // replace remaining globstars with a wildcard that can span directory separators, e.g. /hello/**dll - .replace(/\\\*/g, '[^\/]*') // replace asterisks with a wildcard that cannot span directory separators, e.g. /hello/*.dll - .replace(/\\\?/g, '[^\/]'); // replace single character wildcards, e.g. /hello/log?.dll - pattern = "^" + pattern + "$"; - var flags = process.platform == 'win32' ? 'i' : ''; - return new RegExp(pattern, flags); -} -exports._legacyFindFiles_convertPatternToRegExp = _legacyFindFiles_convertPatternToRegExp; -function _cloneMatchOptions(matchOptions) { - return { - debug: matchOptions.debug, - nobrace: matchOptions.nobrace, - noglobstar: matchOptions.noglobstar, - dot: matchOptions.dot, - noext: matchOptions.noext, - nocase: matchOptions.nocase, - nonull: matchOptions.nonull, - matchBase: matchOptions.matchBase, - nocomment: matchOptions.nocomment, - nonegate: matchOptions.nonegate, - flipNegate: matchOptions.flipNegate + var res = { code: r.status, error: r.error }; + res.stdout = (r.stdout) ? r.stdout.toString() : ''; + res.stderr = (r.stderr) ? r.stderr.toString() : ''; + return res; }; -} -exports._cloneMatchOptions = _cloneMatchOptions; -function _getFindInfoFromPattern(defaultRoot, pattern, matchOptions) { - // parameter validation - if (!defaultRoot) { - throw new Error('getFindRootFromPattern() parameter defaultRoot cannot be empty'); - } - if (!pattern) { - throw new Error('getFindRootFromPattern() parameter pattern cannot be empty'); - } - if (!matchOptions.nobrace) { - throw new Error('getFindRootFromPattern() expected matchOptions.nobrace to be true'); - } - // for the sake of determining the findPath, pretend nocase=false - matchOptions = _cloneMatchOptions(matchOptions); - matchOptions.nocase = false; - // check if basename only and matchBase=true - if (matchOptions.matchBase && - !_isRooted(pattern) && - (process.platform == 'win32' ? pattern.replace(/\\/g, '/') : pattern).indexOf('/') < 0) { - return { - adjustedPattern: pattern, - findPath: defaultRoot, - statOnly: false, - }; - } - // the technique applied by this function is to use the information on the Minimatch object determine - // the findPath. Minimatch breaks the pattern into path segments, and exposes information about which - // segments are literal vs patterns. - // - // note, the technique currently imposes a limitation for drive-relative paths with a glob in the - // first segment, e.g. C:hello*/world. it's feasible to overcome this limitation, but is left unsolved - // for now. - var minimatchObj = new minimatch.Minimatch(pattern, matchOptions); - // the "set" property is an array of arrays of parsed path segment info. the outer array should only - // contain one item, otherwise something went wrong. brace expansion can result in multiple arrays, - // but that should be turned off by the time this function is reached. - if (minimatchObj.set.length != 1) { - throw new Error('getFindRootFromPattern() expected Minimatch(...).set.length to be 1. Actual: ' + minimatchObj.set.length); - } - var literalSegments = []; - for (var _i = 0, _a = minimatchObj.set[0]; _i < _a.length; _i++) { - var parsedSegment = _a[_i]; - if (typeof parsedSegment == 'string') { - // the item is a string when the original input for the path segment does not contain any - // unescaped glob characters. - // - // note, the string here is already unescaped (i.e. glob escaping removed), so it is ready - // to pass to find() as-is. for example, an input string 'hello\\*world' => 'hello*world'. - literalSegments.push(parsedSegment); - continue; + /** + * Used to close child process by sending SIGNINT signal. + * It allows executed script to have some additional logic on SIGINT, before exiting. + */ + ToolRunner.prototype.killChildProcess = function () { + if (this.childProcess) { + this.childProcess.kill(); } - break; - } - // join the literal segments back together. Minimatch converts '\' to '/' on Windows, then squashes - // consequetive slashes, and finally splits on slash. this means that UNC format is lost, but can - // be detected from the original pattern. - var joinedSegments = literalSegments.join('/'); - if (joinedSegments && process.platform == 'win32' && _startsWith(pattern.replace(/\\/g, '/'), '//')) { - joinedSegments = '/' + joinedSegments; // restore UNC format - } - // determine the find path - var findPath; - if (_isRooted(pattern)) { // the pattern was rooted - findPath = joinedSegments; - } - else if (joinedSegments) { // the pattern was not rooted, and literal segments were found - findPath = _ensureRooted(defaultRoot, joinedSegments); - } - else { // the pattern was not rooted, and no literal segments were found - findPath = defaultRoot; - } - // clean up the path - if (findPath) { - findPath = _getDirectoryName(_ensureRooted(findPath, '_')); // hack to remove unnecessary trailing slash - findPath = _normalizeSeparators(findPath); // normalize slashes - } - return { - adjustedPattern: _ensurePatternRooted(defaultRoot, pattern), - findPath: findPath, - statOnly: literalSegments.length == minimatchObj.set[0].length, }; -} -exports._getFindInfoFromPattern = _getFindInfoFromPattern; -function _ensurePatternRooted(root, p) { - if (!root) { - throw new Error('ensurePatternRooted() parameter "root" cannot be empty'); - } - if (!p) { - throw new Error('ensurePatternRooted() parameter "p" cannot be empty'); - } - if (_isRooted(p)) { - return p; - } - // normalize root - root = _normalizeSeparators(root); - // escape special glob characters - root = (process.platform == 'win32' ? root : root.replace(/\\/g, '\\\\')) // escape '\' on OSX/Linux - .replace(/(\[)(?=[^\/]+\])/g, '[[]') // escape '[' when ']' follows within the path segment - .replace(/\?/g, '[?]') // escape '?' - .replace(/\*/g, '[*]') // escape '*' - .replace(/\+\(/g, '[+](') // escape '+(' - .replace(/@\(/g, '[@](') // escape '@(' - .replace(/!\(/g, '[!]('); // escape '!(' - return _ensureRooted(root, p); -} -exports._ensurePatternRooted = _ensurePatternRooted; -//------------------------------------------------------------------- -// Populate the vault with sensitive data. Inputs and Endpoints -//------------------------------------------------------------------- -function _loadData() { - // in agent, prefer TempDirectory then workFolder. - // In interactive dev mode, it won't be - var keyPath = _getVariable("agent.TempDirectory") || _getVariable("agent.workFolder") || process.cwd(); - exports._vault = new vm.Vault(keyPath); - exports._knownVariableMap = {}; - _debug('loading inputs and endpoints'); - var loaded = 0; - for (var envvar in process.env) { - if (_startsWith(envvar, 'INPUT_') || - _startsWith(envvar, 'ENDPOINT_AUTH_') || - _startsWith(envvar, 'SECUREFILE_TICKET_') || - _startsWith(envvar, 'SECRET_') || - _startsWith(envvar, 'VSTS_TASKVARIABLE_')) { - // Record the secret variable metadata. This is required by getVariable to know whether - // to retrieve the value from the vault. In a 2.104.1 agent or higher, this metadata will - // be overwritten when the VSTS_SECRET_VARIABLES env var is processed below. - if (_startsWith(envvar, 'SECRET_')) { - var variableName = envvar.substring('SECRET_'.length); - if (variableName) { - // This is technically not the variable name (has underscores instead of dots), - // but it's good enough to make getVariable work in a pre-2.104.1 agent where - // the VSTS_SECRET_VARIABLES env var is not defined. - exports._knownVariableMap[_getVariableKey(variableName)] = { name: variableName, secret: true }; - } - } - // store the secret - var value = process.env[envvar]; - if (value) { - ++loaded; - _debug('loading ' + envvar); - exports._vault.storeSecret(envvar, value); - delete process.env[envvar]; - } + return ToolRunner; +}(events.EventEmitter)); +exports.ToolRunner = ToolRunner; +var ExecState = /** @class */ (function (_super) { + __extends(ExecState, _super); + function ExecState(options, toolPath) { + var _this = _super.call(this) || this; + _this.delay = 10000; // 10 seconds + _this.timeout = null; + if (!toolPath) { + throw new Error('toolPath must not be empty'); } + _this.options = options; + _this.toolPath = toolPath; + var delay = process.env['TASKLIB_TEST_TOOLRUNNER_EXITDELAY']; + if (delay) { + _this.delay = parseInt(delay); + } + return _this; } - _debug('loaded ' + loaded); - // store public variable metadata - var names; - try { - names = JSON.parse(process.env['VSTS_PUBLIC_VARIABLES'] || '[]'); - } - catch (err) { - throw new Error('Failed to parse VSTS_PUBLIC_VARIABLES as JSON. ' + err); // may occur during interactive testing - } - names.forEach(function (name) { - exports._knownVariableMap[_getVariableKey(name)] = { name: name, secret: false }; - }); - delete process.env['VSTS_PUBLIC_VARIABLES']; - // store secret variable metadata - try { - names = JSON.parse(process.env['VSTS_SECRET_VARIABLES'] || '[]'); - } - catch (err) { - throw new Error('Failed to parse VSTS_SECRET_VARIABLES as JSON. ' + err); // may occur during interactive testing - } - names.forEach(function (name) { - exports._knownVariableMap[_getVariableKey(name)] = { name: name, secret: true }; - }); - delete process.env['VSTS_SECRET_VARIABLES']; - // avoid loading twice (overwrites .taskkey) - global['_vsts_task_lib_loaded'] = true; -} -exports._loadData = _loadData; -//-------------------------------------------------------------------------------- -// Internal path helpers. -//-------------------------------------------------------------------------------- -/** - * Defines if path is unc-path. - * - * @param path a path to a file. - * @returns true if path starts with double backslash, otherwise returns false. - */ -function _isUncPath(path) { - return /^\\\\[^\\]/.test(path); -} -exports._isUncPath = _isUncPath; -function _ensureRooted(root, p) { - if (!root) { - throw new Error('ensureRooted() parameter "root" cannot be empty'); - } - if (!p) { - throw new Error('ensureRooted() parameter "p" cannot be empty'); - } - if (_isRooted(p)) { - return p; - } - if (process.platform == 'win32' && root.match(/^[A-Z]:$/i)) { // e.g. C: - return root + p; - } - // ensure root ends with a separator - if (_endsWith(root, '/') || (process.platform == 'win32' && _endsWith(root, '\\'))) { - // root already ends with a separator - } - else { - root += path.sep; // append separator - } - return root + p; -} -exports._ensureRooted = _ensureRooted; -/** - * Determines the parent path and trims trailing slashes (when safe). Path separators are normalized - * in the result. This function works similar to the .NET System.IO.Path.GetDirectoryName() method. - * For example, C:\hello\world\ returns C:\hello\world (trailing slash removed). Returns empty when - * no higher directory can be determined. - */ -function _getDirectoryName(p) { - // short-circuit if empty - if (!p) { - return ''; - } - // normalize separators - p = _normalizeSeparators(p); - // on Windows, the goal of this function is to match the behavior of - // [System.IO.Path]::GetDirectoryName(), e.g. - // C:/ => - // C:/hello => C:\ - // C:/hello/ => C:\hello - // C:/hello/world => C:\hello - // C:/hello/world/ => C:\hello\world - // C: => - // C:hello => C: - // C:hello/ => C:hello - // / => - // /hello => \ - // /hello/ => \hello - // //hello => - // //hello/ => - // //hello/world => - // //hello/world/ => \\hello\world - // - // unfortunately, path.dirname() can't simply be used. for example, on Windows - // it yields different results from Path.GetDirectoryName: - // C:/ => C:/ - // C:/hello => C:/ - // C:/hello/ => C:/ - // C:/hello/world => C:/hello - // C:/hello/world/ => C:/hello - // C: => C: - // C:hello => C: - // C:hello/ => C: - // / => / - // /hello => / - // /hello/ => / - // //hello => / - // //hello/ => / - // //hello/world => //hello/world - // //hello/world/ => //hello/world/ - // //hello/world/again => //hello/world/ - // //hello/world/again/ => //hello/world/ - // //hello/world/again/again => //hello/world/again - // //hello/world/again/again/ => //hello/world/again - if (process.platform == 'win32') { - if (/^[A-Z]:\\?[^\\]+$/i.test(p)) { // e.g. C:\hello or C:hello - return p.charAt(2) == '\\' ? p.substring(0, 3) : p.substring(0, 2); + ExecState.prototype.CheckComplete = function () { + if (this.done) { + return; } - else if (/^[A-Z]:\\?$/i.test(p)) { // e.g. C:\ or C: - return ''; + if (this.processClosed) { + this._setResult(); } - var lastSlashIndex = p.lastIndexOf('\\'); - if (lastSlashIndex < 0) { // file name only - return ''; + else if (this.processExited) { + this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this); } - else if (p == '\\') { // relative root - return ''; + }; + ExecState.prototype._debug = function (message) { + this.emit('debug', message); + }; + ExecState.prototype._setResult = function () { + // determine whether there is an error + var error; + if (this.processExited) { + if (this.processError) { + error = new Error(im._loc('LIB_ProcessError', this.toolPath, this.processError)); + } + else if (this.processExitCode != 0 && !this.options.ignoreReturnCode) { + error = new Error(im._loc('LIB_ProcessExitCode', this.toolPath, this.processExitCode)); + } + else if (this.processStderr && this.options.failOnStdErr) { + error = new Error(im._loc('LIB_ProcessStderr', this.toolPath)); + } } - else if (lastSlashIndex == 0) { // e.g. \\hello - return '\\'; + // clear the timeout + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; } - else if (/^\\\\[^\\]+(\\[^\\]*)?$/.test(p)) { // UNC root, e.g. \\hello or \\hello\ or \\hello\world - return ''; + this.done = true; + this.emit('done', error, this.processExitCode); + }; + ExecState.HandleTimeout = function (state) { + if (state.done) { + return; } - return p.substring(0, lastSlashIndex); // e.g. hello\world => hello or hello\world\ => hello\world - // note, this means trailing slashes for non-root directories - // (i.e. not C:\, \, or \\unc\) will simply be removed. - } - // OSX/Linux - if (p.indexOf('/') < 0) { // file name only - return ''; - } - else if (p == '/') { - return ''; - } - else if (_endsWith(p, '/')) { - return p.substring(0, p.length - 1); - } - return path.dirname(p); -} -exports._getDirectoryName = _getDirectoryName; -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function _isRooted(p) { - p = _normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (process.platform == 'win32') { - return _startsWith(p, '\\') || // e.g. \ or \hello or \\hello - /^[A-Z]:/i.test(p); // e.g. C: or C:\hello - } - return _startsWith(p, '/'); // e.g. /hello -} -exports._isRooted = _isRooted; -function _normalizeSeparators(p) { - p = p || ''; - if (process.platform == 'win32') { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - var isUnc = /^\\\\+[^\\]/.test(p); // e.g. \\hello - return (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\'); // preserve leading // for UNC + if (!state.processClosed && state.processExited) { + console.log(im._loc('LIB_StdioNotClosed', state.delay / 1000, state.toolPath)); + state._debug(im._loc('LIB_StdioNotClosed', state.delay / 1000, state.toolPath)); + } + state._setResult(); + }; + return ExecState; +}(events.EventEmitter)); + + +/***/ }), + +/***/ 26007: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Vault = void 0; +var fs = __nccwpck_require__(57147); +var path = __nccwpck_require__(71017); +var crypto = __nccwpck_require__(6113); +var uuidV4 = __nccwpck_require__(28087); +var algorithm = "aes-256-ctr"; +var encryptEncoding = 'hex'; +var unencryptedEncoding = 'utf8'; +// +// Store sensitive data in proc. +// Main goal: Protects tasks which would dump envvars from leaking secrets inadvertently +// the task lib clears after storing. +// Also protects against a dump of a process getting the secrets +// The secret is generated and stored externally for the lifetime of the task. +// +var Vault = /** @class */ (function () { + function Vault(keyPath) { + this._keyFile = path.join(keyPath, '.taskkey'); + this._store = {}; + this.genKey(); } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); + Vault.prototype.initialize = function () { + }; + Vault.prototype.storeSecret = function (name, data) { + if (!name || name.length == 0) { + return false; + } + name = name.toLowerCase(); + if (!data || data.length == 0) { + if (this._store.hasOwnProperty(name)) { + delete this._store[name]; + } + return false; + } + var key = this.getKey(); + var iv = crypto.randomBytes(16); + var cipher = crypto.createCipheriv(algorithm, key, iv); + var crypted = cipher.update(data, unencryptedEncoding, encryptEncoding); + var cryptedFinal = cipher.final(encryptEncoding); + this._store[name] = iv.toString(encryptEncoding) + crypted + cryptedFinal; + return true; + }; + Vault.prototype.retrieveSecret = function (name) { + var secret; + name = (name || '').toLowerCase(); + if (this._store.hasOwnProperty(name)) { + var key = this.getKey(); + var data = this._store[name]; + var ivDataBuffer = Buffer.from(data, encryptEncoding); + var iv = ivDataBuffer.slice(0, 16); + var encryptedText = ivDataBuffer.slice(16); + var decipher = crypto.createDecipheriv(algorithm, key, iv); + var dec = decipher.update(encryptedText); + var decFinal = decipher.final(unencryptedEncoding); + secret = dec + decFinal; + } + return secret; + }; + Vault.prototype.getKey = function () { + var key = fs.readFileSync(this._keyFile).toString('utf8'); + // Key needs to be hashed to correct length to match algorithm (aes-256-ctr) + return crypto.createHash('sha256').update(key).digest(); + }; + Vault.prototype.genKey = function () { + fs.writeFileSync(this._keyFile, uuidV4(), { encoding: 'utf8' }); + }; + return Vault; +}()); +exports.Vault = Vault; + + +/***/ }), + +/***/ 9417: +/***/ ((module) => { + +"use strict"; + +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; } -exports._normalizeSeparators = _normalizeSeparators; -//----------------------------------------------------- -// Expose proxy information to vsts-node-api -//----------------------------------------------------- -function _exposeProxySettings() { - var proxyUrl = _getVariable('Agent.ProxyUrl'); - if (proxyUrl && proxyUrl.length > 0) { - var proxyUsername = _getVariable('Agent.ProxyUsername'); - var proxyPassword = _getVariable('Agent.ProxyPassword'); - var proxyBypassHostsJson = _getVariable('Agent.ProxyBypassList'); - global['_vsts_task_lib_proxy_url'] = proxyUrl; - global['_vsts_task_lib_proxy_username'] = proxyUsername; - global['_vsts_task_lib_proxy_bypass'] = proxyBypassHostsJson; - global['_vsts_task_lib_proxy_password'] = _exposeTaskLibSecret('proxy', proxyPassword || ''); - _debug('expose agent proxy configuration.'); - global['_vsts_task_lib_proxy'] = true; - } + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; } -exports._exposeProxySettings = _exposeProxySettings; -//----------------------------------------------------- -// Expose certificate information to vsts-node-api -//----------------------------------------------------- -function _exposeCertSettings() { - var ca = _getVariable('Agent.CAInfo'); - if (ca) { - global['_vsts_task_lib_cert_ca'] = ca; - } - var clientCert = _getVariable('Agent.ClientCert'); - if (clientCert) { - var clientCertKey = _getVariable('Agent.ClientCertKey'); - var clientCertArchive = _getVariable('Agent.ClientCertArchive'); - var clientCertPassword = _getVariable('Agent.ClientCertPassword'); - global['_vsts_task_lib_cert_clientcert'] = clientCert; - global['_vsts_task_lib_cert_key'] = clientCertKey; - global['_vsts_task_lib_cert_archive'] = clientCertArchive; - global['_vsts_task_lib_cert_passphrase'] = _exposeTaskLibSecret('cert', clientCertPassword || ''); + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; } - if (ca || clientCert) { - _debug('expose agent certificate configuration.'); - global['_vsts_task_lib_cert'] = true; + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; } - var skipCertValidation = _getVariable('Agent.SkipCertValidation') || 'false'; - if (skipCertValidation) { - global['_vsts_task_lib_skip_cert_validation'] = skipCertValidation.toUpperCase() === 'TRUE'; + + if (begs.length) { + result = [ left, right ]; } + } + + return result; } -exports._exposeCertSettings = _exposeCertSettings; -// We store the encryption key on disk and hold the encrypted content and key file in memory -// return base64encoded:base64encoded -// downstream vsts-node-api will retrieve the secret later -function _exposeTaskLibSecret(keyFile, secret) { - if (secret) { - var encryptKey = crypto.randomBytes(256); - var cipher = crypto.createCipher("aes-256-ctr", encryptKey); - var encryptedContent = cipher.update(secret, "utf8", "hex"); - encryptedContent += cipher.final("hex"); - var storageFile = path.join(_getVariable('Agent.TempDirectory') || _getVariable("agent.workFolder") || process.cwd(), keyFile); - fs.writeFileSync(storageFile, encryptKey.toString('base64'), { encoding: 'utf8' }); - return new Buffer(storageFile).toString('base64') + ':' + new Buffer(encryptedContent).toString('base64'); - } + + +/***/ }), + +/***/ 83682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var register = __nccwpck_require__(44670); +var addHook = __nccwpck_require__(5549); +var removeHook = __nccwpck_require__(6819); + +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind; +var bindable = bind.bind(bind); + +function bindApi(hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); +} + +function HookSingular() { + var singularHookName = "h"; + var singularHookState = { + registry: {}, + }; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; +} + +function HookCollection() { + var state = { + registry: {}, + }; + + var hook = register.bind(null, state); + bindApi(hook, state); + + return hook; +} + +var collectionHookDeprecationMessageDisplayed = false; +function Hook() { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; + } + return HookCollection(); } +Hook.Singular = HookSingular.bind(); +Hook.Collection = HookCollection.bind(); + +module.exports = Hook; +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook; +module.exports.Singular = Hook.Singular; +module.exports.Collection = Hook.Collection; + /***/ }), -/***/ 242: -/***/ ((module, exports) => { +/***/ 5549: +/***/ ((module) => { -exports = module.exports = SemVer +module.exports = addHook; -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) +function addHook(state, kind, name, hook) { + var orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; } -} else { - debug = function () {} + + if (kind === "before") { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)); + }; + } + + if (kind === "after") { + hook = function (method, options) { + var result; + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_; + return orig(result, options); + }) + .then(function () { + return result; + }); + }; + } + + if (kind === "error") { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options); + }); + }; + } + + state.registry[name].push({ + hook: hook, + orig: orig, + }); } -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 +/***/ }), -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 +/***/ 44670: +/***/ ((module) => { -var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 +module.exports = register; -// The actual regexps go on exports.re -var re = exports.re = [] -var safeRe = exports.safeRe = [] -var src = exports.src = [] -var R = 0 +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } -var LETTERDASHNUMBER = '[a-zA-Z0-9-]' + if (!options) { + options = {}; + } -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -var safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options); + }, method)(); + } -function makeSafeRe (value) { - for (var i = 0; i < safeRegexReplacements.length; i++) { - var token = safeRegexReplacements[i][0] - var max = safeRegexReplacements[i][1] - value = value - .split(token + '*').join(token + '{0,' + max + '}') - .split(token + '+').join(token + '{1,' + max + '}') + return Promise.resolve().then(function () { + if (!state.registry[name]) { + return method(options); + } + + return state.registry[name].reduce(function (method, registered) { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} + + +/***/ }), + +/***/ 6819: +/***/ ((module) => { + +module.exports = removeHook; + +function removeHook(state, name, method) { + if (!state.registry[name]) { + return; } - return value + + var index = state.registry[name] + .map(function (registered) { + return registered.orig; + }) + .indexOf(method); + + if (index === -1) { + return; + } + + state.registry[name].splice(index, 1); } -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. +/***/ }), -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '\\d+' +/***/ 11174: +/***/ (function(module) { -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. +/** + * This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support. + * https://github.com/SGrondin/bottleneck + */ +(function (global, factory) { + true ? module.exports = factory() : + 0; +}(this, (function () { 'use strict'; -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -// ## Main Version -// Three dot-separated numeric identifiers. + function getCjsExportFromNamespace (n) { + return n && n['default'] || n; + } -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' + var load = function(received, defaults, onto = {}) { + var k, ref, v; + for (k in defaults) { + v = defaults[k]; + onto[k] = (ref = received[k]) != null ? ref : v; + } + return onto; + }; -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + var overwrite = function(received, defaults, onto = {}) { + var k, v; + for (k in received) { + v = received[k]; + if (defaults[k] !== void 0) { + onto[k] = v; + } + } + return onto; + }; -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. + var parser = { + load: load, + overwrite: overwrite + }; -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' + var DLList; -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' + DLList = class DLList { + constructor(incr, decr) { + this.incr = incr; + this.decr = decr; + this._first = null; + this._last = null; + this.length = 0; + } -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. + push(value) { + var node; + this.length++; + if (typeof this.incr === "function") { + this.incr(); + } + node = { + value, + prev: this._last, + next: null + }; + if (this._last != null) { + this._last.next = node; + this._last = node; + } else { + this._first = this._last = node; + } + return void 0; + } -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + shift() { + var value; + if (this._first == null) { + return; + } else { + this.length--; + if (typeof this.decr === "function") { + this.decr(); + } + } + value = this._first.value; + if ((this._first = this._first.next) != null) { + this._first.prev = null; + } else { + this._last = null; + } + return value; + } -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + first() { + if (this._first != null) { + return this._first.value; + } + } -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. + getArray() { + var node, ref, results; + node = this._first; + results = []; + while (node != null) { + results.push((ref = node, node = node.next, ref.value)); + } + return results; + } -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' + forEachShift(cb) { + var node; + node = this.shift(); + while (node != null) { + (cb(node), node = this.shift()); + } + return void 0; + } -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. + debug() { + var node, ref, ref1, ref2, results; + node = this._first; + results = []; + while (node != null) { + results.push((ref = node, node = node.next, { + value: ref.value, + prev: (ref1 = ref.prev) != null ? ref1.value : void 0, + next: (ref2 = ref.next) != null ? ref2.value : void 0 + })); + } + return results; + } -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + }; -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. + var DLList_1 = DLList; -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. + var Events; -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' + Events = class Events { + constructor(instance) { + this.instance = instance; + this._events = {}; + if ((this.instance.on != null) || (this.instance.once != null) || (this.instance.removeAllListeners != null)) { + throw new Error("An Emitter already exists for this object"); + } + this.instance.on = (name, cb) => { + return this._addListener(name, "many", cb); + }; + this.instance.once = (name, cb) => { + return this._addListener(name, "once", cb); + }; + this.instance.removeAllListeners = (name = null) => { + if (name != null) { + return delete this._events[name]; + } else { + return this._events = {}; + } + }; + } -src[FULL] = '^' + FULLPLAIN + '$' + _addListener(name, status, cb) { + var base; + if ((base = this._events)[name] == null) { + base[name] = []; + } + this._events[name].push({cb, status}); + return this.instance; + } -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' + listenerCount(name) { + if (this._events[name] != null) { + return this._events[name].length; + } else { + return 0; + } + } -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' + async trigger(name, ...args) { + var e, promises; + try { + if (name !== "debug") { + this.trigger("debug", `Event triggered: ${name}`, args); + } + if (this._events[name] == null) { + return; + } + this._events[name] = this._events[name].filter(function(listener) { + return listener.status !== "none"; + }); + promises = this._events[name].map(async(listener) => { + var e, returned; + if (listener.status === "none") { + return; + } + if (listener.status === "once") { + listener.status = "none"; + } + try { + returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; + if (typeof (returned != null ? returned.then : void 0) === "function") { + return (await returned); + } else { + return returned; + } + } catch (error) { + e = error; + { + this.trigger("error", e); + } + return null; + } + }); + return ((await Promise.all(promises))).find(function(x) { + return x != null; + }); + } catch (error) { + e = error; + { + this.trigger("error", e); + } + return null; + } + } -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' + }; -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + var Events_1 = Events; -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' + var DLList$1, Events$1, Queues; -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' + DLList$1 = DLList_1; -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + Events$1 = Events_1; -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' + Queues = class Queues { + constructor(num_priorities) { + var i; + this.Events = new Events$1(this); + this._length = 0; + this._lists = (function() { + var j, ref, results; + results = []; + for (i = j = 1, ref = num_priorities; (1 <= ref ? j <= ref : j >= ref); i = 1 <= ref ? ++j : --j) { + results.push(new DLList$1((() => { + return this.incr(); + }), (() => { + return this.decr(); + }))); + } + return results; + }).call(this); + } -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' + incr() { + if (this._length++ === 0) { + return this.Events.trigger("leftzero"); + } + } -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -safeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g') -var tildeTrimReplace = '$1~' + decr() { + if (--this._length === 0) { + return this.Events.trigger("zero"); + } + } -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + push(job) { + return this._lists[job.options.priority].push(job); + } -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' + queued(priority) { + if (priority != null) { + return this._lists[priority].length; + } else { + return this._length; + } + } -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -safeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g') -var caretTrimReplace = '$1^' + shiftAll(fn) { + return this._lists.forEach(function(list) { + return list.forEachShift(fn); + }); + } -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + getFirst(arr = this._lists) { + var j, len, list; + for (j = 0, len = arr.length; j < len; j++) { + list = arr[j]; + if (list.length > 0) { + return list; + } + } + return []; + } + + shiftLastFrom(priority) { + return this.getFirst(this._lists.slice(priority).reverse()).shift(); + } + + }; + + var Queues_1 = Queues; + + var BottleneckError; + + BottleneckError = class BottleneckError extends Error {}; + + var BottleneckError_1 = BottleneckError; + + var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; + + NUM_PRIORITIES = 10; + + DEFAULT_PRIORITY = 5; + + parser$1 = parser; + + BottleneckError$1 = BottleneckError_1; + + Job = class Job { + constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) { + this.task = task; + this.args = args; + this.rejectOnDrop = rejectOnDrop; + this.Events = Events; + this._states = _states; + this.Promise = Promise; + this.options = parser$1.load(options, jobDefaults); + this.options.priority = this._sanitizePriority(this.options.priority); + if (this.options.id === jobDefaults.id) { + this.options.id = `${this.options.id}-${this._randomIndex()}`; + } + this.promise = new this.Promise((_resolve, _reject) => { + this._resolve = _resolve; + this._reject = _reject; + }); + this.retryCount = 0; + } + + _sanitizePriority(priority) { + var sProperty; + sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; + if (sProperty < 0) { + return 0; + } else if (sProperty > NUM_PRIORITIES - 1) { + return NUM_PRIORITIES - 1; + } else { + return sProperty; + } + } + + _randomIndex() { + return Math.random().toString(36).slice(2); + } + + doDrop({error, message = "This job has been dropped by Bottleneck"} = {}) { + if (this._states.remove(this.options.id)) { + if (this.rejectOnDrop) { + this._reject(error != null ? error : new BottleneckError$1(message)); + } + this.Events.trigger("dropped", {args: this.args, options: this.options, task: this.task, promise: this.promise}); + return true; + } else { + return false; + } + } + + _assertStatus(expected) { + var status; + status = this._states.jobStatus(this.options.id); + if (!(status === expected || (expected === "DONE" && status === null))) { + throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); + } + } + + doReceive() { + this._states.start(this.options.id); + return this.Events.trigger("received", {args: this.args, options: this.options}); + } + + doQueue(reachedHWM, blocked) { + this._assertStatus("RECEIVED"); + this._states.next(this.options.id); + return this.Events.trigger("queued", {args: this.args, options: this.options, reachedHWM, blocked}); + } + + doRun() { + if (this.retryCount === 0) { + this._assertStatus("QUEUED"); + this._states.next(this.options.id); + } else { + this._assertStatus("EXECUTING"); + } + return this.Events.trigger("scheduled", {args: this.args, options: this.options}); + } + + async doExecute(chained, clearGlobalState, run, free) { + var error, eventInfo, passed; + if (this.retryCount === 0) { + this._assertStatus("RUNNING"); + this._states.next(this.options.id); + } else { + this._assertStatus("EXECUTING"); + } + eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; + this.Events.trigger("executing", eventInfo); + try { + passed = (await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args))); + if (clearGlobalState()) { + this.doDone(eventInfo); + await free(this.options, eventInfo); + this._assertStatus("DONE"); + return this._resolve(passed); + } + } catch (error1) { + error = error1; + return this._onFailure(error, eventInfo, clearGlobalState, run, free); + } + } + + doExpire(clearGlobalState, run, free) { + var error, eventInfo; + if (this._states.jobStatus(this.options.id === "RUNNING")) { + this._states.next(this.options.id); + } + this._assertStatus("EXECUTING"); + eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; + error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); + return this._onFailure(error, eventInfo, clearGlobalState, run, free); + } + + async _onFailure(error, eventInfo, clearGlobalState, run, free) { + var retry, retryAfter; + if (clearGlobalState()) { + retry = (await this.Events.trigger("failed", error, eventInfo)); + if (retry != null) { + retryAfter = ~~retry; + this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); + this.retryCount++; + return run(retryAfter); + } else { + this.doDone(eventInfo); + await free(this.options, eventInfo); + this._assertStatus("DONE"); + return this._reject(error); + } + } + } + + doDone(eventInfo) { + this._assertStatus("EXECUTING"); + this._states.next(this.options.id); + return this.Events.trigger("done", eventInfo); + } + + }; + + var Job_1 = Job; + + var BottleneckError$2, LocalDatastore, parser$2; + + parser$2 = parser; + + BottleneckError$2 = BottleneckError_1; + + LocalDatastore = class LocalDatastore { + constructor(instance, storeOptions, storeInstanceOptions) { + this.instance = instance; + this.storeOptions = storeOptions; + this.clientId = this.instance._randomIndex(); + parser$2.load(storeInstanceOptions, storeInstanceOptions, this); + this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); + this._running = 0; + this._done = 0; + this._unblockTime = 0; + this.ready = this.Promise.resolve(); + this.clients = {}; + this._startHeartbeat(); + } + + _startHeartbeat() { + var base; + if ((this.heartbeat == null) && (((this.storeOptions.reservoirRefreshInterval != null) && (this.storeOptions.reservoirRefreshAmount != null)) || ((this.storeOptions.reservoirIncreaseInterval != null) && (this.storeOptions.reservoirIncreaseAmount != null)))) { + return typeof (base = (this.heartbeat = setInterval(() => { + var amount, incr, maximum, now, reservoir; + now = Date.now(); + if ((this.storeOptions.reservoirRefreshInterval != null) && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { + this._lastReservoirRefresh = now; + this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; + this.instance._drainAll(this.computeCapacity()); + } + if ((this.storeOptions.reservoirIncreaseInterval != null) && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { + ({ + reservoirIncreaseAmount: amount, + reservoirIncreaseMaximum: maximum, + reservoir + } = this.storeOptions); + this._lastReservoirIncrease = now; + incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; + if (incr > 0) { + this.storeOptions.reservoir += incr; + return this.instance._drainAll(this.computeCapacity()); + } + } + }, this.heartbeatInterval))).unref === "function" ? base.unref() : void 0; + } else { + return clearInterval(this.heartbeat); + } + } + + async __publish__(message) { + await this.yieldLoop(); + return this.instance.Events.trigger("message", message.toString()); + } + + async __disconnect__(flush) { + await this.yieldLoop(); + clearInterval(this.heartbeat); + return this.Promise.resolve(); + } + + yieldLoop(t = 0) { + return new this.Promise(function(resolve, reject) { + return setTimeout(resolve, t); + }); + } + + computePenalty() { + var ref; + return (ref = this.storeOptions.penalty) != null ? ref : (15 * this.storeOptions.minTime) || 5000; + } + + async __updateSettings__(options) { + await this.yieldLoop(); + parser$2.overwrite(options, options, this.storeOptions); + this._startHeartbeat(); + this.instance._drainAll(this.computeCapacity()); + return true; + } + + async __running__() { + await this.yieldLoop(); + return this._running; + } + + async __queued__() { + await this.yieldLoop(); + return this.instance.queued(); + } -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + async __done__() { + await this.yieldLoop(); + return this._done; + } -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + async __groupCheck__(time) { + await this.yieldLoop(); + return (this._nextRequest + this.timeout) < time; + } -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -safeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g') -var comparatorTrimReplace = '$1$2$3' + computeCapacity() { + var maxConcurrent, reservoir; + ({maxConcurrent, reservoir} = this.storeOptions); + if ((maxConcurrent != null) && (reservoir != null)) { + return Math.min(maxConcurrent - this._running, reservoir); + } else if (maxConcurrent != null) { + return maxConcurrent - this._running; + } else if (reservoir != null) { + return reservoir; + } else { + return null; + } + } -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' + conditionsCheck(weight) { + var capacity; + capacity = this.computeCapacity(); + return (capacity == null) || weight <= capacity; + } -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' + async __incrementReservoir__(incr) { + var reservoir; + await this.yieldLoop(); + reservoir = this.storeOptions.reservoir += incr; + this.instance._drainAll(this.computeCapacity()); + return reservoir; + } -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' + async __currentReservoir__() { + await this.yieldLoop(); + return this.storeOptions.reservoir; + } -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) + isBlocked(now) { + return this._unblockTime >= now; + } - // Replace all greedy whitespace to prevent regex dos issues. These regex are - // used internally via the safeRe object since all inputs in this library get - // normalized first to trim and collapse all extra whitespace. The original - // regexes are exported for userland consumption and lower level usage. A - // future breaking change could export the safer regex only with a note that - // all input should have extra whitespace removed. - safeRe[i] = new RegExp(makeSafeRe(src[i])) - } -} + check(weight, now) { + return this.conditionsCheck(weight) && (this._nextRequest - now) <= 0; + } -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } + async __check__(weight) { + var now; + await this.yieldLoop(); + now = Date.now(); + return this.check(weight, now); + } - if (version instanceof SemVer) { - return version - } + async __register__(index, weight, expiration) { + var now, wait; + await this.yieldLoop(); + now = Date.now(); + if (this.conditionsCheck(weight)) { + this._running += weight; + if (this.storeOptions.reservoir != null) { + this.storeOptions.reservoir -= weight; + } + wait = Math.max(this._nextRequest - now, 0); + this._nextRequest = now + wait + this.storeOptions.minTime; + return { + success: true, + wait, + reservoir: this.storeOptions.reservoir + }; + } else { + return { + success: false + }; + } + } - if (typeof version !== 'string') { - return null - } + strategyIsBlock() { + return this.storeOptions.strategy === 3; + } - if (version.length > MAX_LENGTH) { - return null - } + async __submit__(queueLength, weight) { + var blocked, now, reachedHWM; + await this.yieldLoop(); + if ((this.storeOptions.maxConcurrent != null) && weight > this.storeOptions.maxConcurrent) { + throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`); + } + now = Date.now(); + reachedHWM = (this.storeOptions.highWater != null) && queueLength === this.storeOptions.highWater && !this.check(weight, now); + blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now)); + if (blocked) { + this._unblockTime = now + this.computePenalty(); + this._nextRequest = this._unblockTime + this.storeOptions.minTime; + this.instance._dropAllQueued(); + } + return { + reachedHWM, + blocked, + strategy: this.storeOptions.strategy + }; + } - var r = options.loose ? safeRe[LOOSE] : safeRe[FULL] - if (!r.test(version)) { - return null - } + async __free__(index, weight) { + await this.yieldLoop(); + this._running -= weight; + this._done += weight; + this.instance._drainAll(this.computeCapacity()); + return { + running: this._running + }; + } - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} + }; -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} + var LocalDatastore_1 = LocalDatastore; -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} + var BottleneckError$3, States; -exports.SemVer = SemVer + BottleneckError$3 = BottleneckError_1; -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } + States = class States { + constructor(status1) { + this.status = status1; + this._jobs = {}; + this.counts = this.status.map(function() { + return 0; + }); + } - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } + next(id) { + var current, next; + current = this._jobs[id]; + next = current + 1; + if ((current != null) && next < this.status.length) { + this.counts[current]--; + this.counts[next]++; + return this._jobs[id]++; + } else if (current != null) { + this.counts[current]--; + return delete this._jobs[id]; + } + } - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } + start(id) { + var initial; + initial = 0; + this._jobs[id] = initial; + return this.counts[initial]++; + } - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose + remove(id) { + var current; + current = this._jobs[id]; + if (current != null) { + this.counts[current]--; + delete this._jobs[id]; + } + return current != null; + } - var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL]) + jobStatus(id) { + var ref; + return (ref = this.status[this._jobs[id]]) != null ? ref : null; + } - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } + statusJobs(status) { + var k, pos, ref, results, v; + if (status != null) { + pos = this.status.indexOf(status); + if (pos < 0) { + throw new BottleneckError$3(`status must be one of ${this.status.join(', ')}`); + } + ref = this._jobs; + results = []; + for (k in ref) { + v = ref[k]; + if (v === pos) { + results.push(k); + } + } + return results; + } else { + return Object.keys(this._jobs); + } + } - this.raw = version + statusCounts() { + return this.counts.reduce(((acc, v, i) => { + acc[this.status[i]] = v; + return acc; + }), {}); + } - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] + }; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } + var States_1 = States; - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } + var DLList$2, Sync; - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } + DLList$2 = DLList_1; - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } + Sync = class Sync { + constructor(name, Promise) { + this.schedule = this.schedule.bind(this); + this.name = name; + this.Promise = Promise; + this._running = 0; + this._queue = new DLList$2(); + } - this.build = m[5] ? m[5].split('.') : [] - this.format() -} + isEmpty() { + return this._queue.length === 0; + } -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} + async _tryToRun() { + var args, cb, error, reject, resolve, returned, task; + if ((this._running < 1) && this._queue.length > 0) { + this._running++; + ({task, args, resolve, reject} = this._queue.shift()); + cb = (await (async function() { + try { + returned = (await task(...args)); + return function() { + return resolve(returned); + }; + } catch (error1) { + error = error1; + return function() { + return reject(error); + }; + } + })()); + this._running--; + this._tryToRun(); + return cb(); + } + } -SemVer.prototype.toString = function () { - return this.version -} + schedule(task, ...args) { + var promise, reject, resolve; + resolve = reject = null; + promise = new this.Promise(function(_resolve, _reject) { + resolve = _resolve; + return reject = _reject; + }); + this._queue.push({task, args, resolve, reject}); + this._tryToRun(); + return promise; + } -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } + }; - return this.compareMain(other) || this.comparePre(other) -} + var Sync_1 = Sync; -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } + var version = "2.19.5"; + var version$1 = { + version: version + }; - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} + var version$2 = /*#__PURE__*/Object.freeze({ + version: version, + default: version$1 + }); -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } + var require$$2 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } + var require$$3 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} + var require$$4 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break + var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3; - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break + parser$3 = parser; - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} + Events$2 = Events_1; -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } + RedisConnection$1 = require$$2; - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} + IORedisConnection$1 = require$$3; -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} + Scripts$1 = require$$4; -exports.compareIdentifiers = compareIdentifiers + Group = (function() { + class Group { + constructor(limiterOptions = {}) { + this.deleteKey = this.deleteKey.bind(this); + this.limiterOptions = limiterOptions; + parser$3.load(this.limiterOptions, this.defaults, this); + this.Events = new Events$2(this); + this.instances = {}; + this.Bottleneck = Bottleneck_1; + this._startAutoCleanup(); + this.sharedConnection = this.connection != null; + if (this.connection == null) { + if (this.limiterOptions.datastore === "redis") { + this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); + } else if (this.limiterOptions.datastore === "ioredis") { + this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); + } + } + } -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) + key(key = "") { + var ref; + return (ref = this.instances[key]) != null ? ref : (() => { + var limiter; + limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { + id: `${this.id}-${key}`, + timeout: this.timeout, + connection: this.connection + })); + this.Events.trigger("created", limiter, key); + return limiter; + })(); + } - if (anum && bnum) { - a = +a - b = +b - } + async deleteKey(key = "") { + var deleted, instance; + instance = this.instances[key]; + if (this.connection) { + deleted = (await this.connection.__runCommand__(['del', ...Scripts$1.allKeys(`${this.id}-${key}`)])); + } + if (instance != null) { + delete this.instances[key]; + await instance.disconnect(); + } + return (instance != null) || deleted > 0; + } - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} + limiters() { + var k, ref, results, v; + ref = this.instances; + results = []; + for (k in ref) { + v = ref[k]; + results.push({ + key: k, + limiter: v + }); + } + return results; + } -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} + keys() { + return Object.keys(this.instances); + } -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} + async clusterKeys() { + var cursor, end, found, i, k, keys, len, next, start; + if (this.connection == null) { + return this.Promise.resolve(this.keys()); + } + keys = []; + cursor = null; + start = `b_${this.id}-`.length; + end = "_settings".length; + while (cursor !== 0) { + [next, found] = (await this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${this.id}-*_settings`, "count", 10000])); + cursor = ~~next; + for (i = 0, len = found.length; i < len; i++) { + k = found[i]; + keys.push(k.slice(start, -end)); + } + } + return keys; + } -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} + _startAutoCleanup() { + var base; + clearInterval(this.interval); + return typeof (base = (this.interval = setInterval(async() => { + var e, k, ref, results, time, v; + time = Date.now(); + ref = this.instances; + results = []; + for (k in ref) { + v = ref[k]; + try { + if ((await v._store.__groupCheck__(time))) { + results.push(this.deleteKey(k)); + } else { + results.push(void 0); + } + } catch (error) { + e = error; + results.push(v.Events.trigger("error", e)); + } + } + return results; + }, this.timeout / 2))).unref === "function" ? base.unref() : void 0; + } -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} + updateSettings(options = {}) { + parser$3.overwrite(options, this.defaults, this); + parser$3.overwrite(options, options, this.limiterOptions); + if (options.timeout != null) { + return this._startAutoCleanup(); + } + } -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} + disconnect(flush = true) { + var ref; + if (!this.sharedConnection) { + return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; + } + } -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} + } + Group.prototype.defaults = { + timeout: 1000 * 60 * 5, + connection: null, + Promise: Promise, + id: "group-key" + }; -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} + return Group; -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} + }).call(commonjsGlobal); -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} + var Group_1 = Group; -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} + var Batcher, Events$3, parser$4; -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} + parser$4 = parser; -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} + Events$3 = Events_1; -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} + Batcher = (function() { + class Batcher { + constructor(options = {}) { + this.options = options; + parser$4.load(this.options, this.defaults, this); + this.Events = new Events$3(this); + this._arr = []; + this._resetPromise(); + this._lastFlush = Date.now(); + } -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} + _resetPromise() { + return this._promise = new this.Promise((res, rej) => { + return this._resolve = res; + }); + } -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} + _flush() { + clearTimeout(this._timeout); + this._lastFlush = Date.now(); + this._resolve(); + this.Events.trigger("batch", this._arr); + this._arr = []; + return this._resetPromise(); + } -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b + add(data) { + var ret; + this._arr.push(data); + ret = this._promise; + if (this._arr.length === this.maxSize) { + this._flush(); + } else if ((this.maxTime != null) && this._arr.length === 1) { + this._timeout = setTimeout(() => { + return this._flush(); + }, this.maxTime); + } + return ret; + } - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b + } + Batcher.prototype.defaults = { + maxTime: null, + maxSize: null, + Promise: Promise + }; - case '': - case '=': - case '==': - return eq(a, b, loose) + return Batcher; - case '!=': - return neq(a, b, loose) + }).call(commonjsGlobal); - case '>': - return gt(a, b, loose) + var Batcher_1 = Batcher; - case '>=': - return gte(a, b, loose) + var require$$4$1 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - case '<': - return lt(a, b, loose) + var require$$8 = getCjsExportFromNamespace(version$2); - case '<=': - return lte(a, b, loose) + var Bottleneck, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, + splice = [].splice; - default: - throw new TypeError('Invalid operator: ' + op) - } -} + NUM_PRIORITIES$1 = 10; -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } + DEFAULT_PRIORITY$1 = 5; - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } + parser$5 = parser; - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } + Queues$1 = Queues_1; - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) + Job$1 = Job_1; - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } + LocalDatastore$1 = LocalDatastore_1; - debug('comp', this) -} + RedisDatastore$1 = require$$4$1; -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] - var m = comp.match(r) + Events$4 = Events_1; - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } + States$1 = States_1; - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } + Sync$1 = Sync_1; - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} + Bottleneck = (function() { + class Bottleneck { + constructor(options = {}, ...invalid) { + var storeInstanceOptions, storeOptions; + this._addToQueue = this._addToQueue.bind(this); + this._validateOptions(options, invalid); + parser$5.load(options, this.instanceDefaults, this); + this._queues = new Queues$1(NUM_PRIORITIES$1); + this._scheduled = {}; + this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); + this._limiter = null; + this.Events = new Events$4(this); + this._submitLock = new Sync$1("submit", this.Promise); + this._registerLock = new Sync$1("register", this.Promise); + storeOptions = parser$5.load(options, this.storeDefaults, {}); + this._store = (function() { + if (this.datastore === "redis" || this.datastore === "ioredis" || (this.connection != null)) { + storeInstanceOptions = parser$5.load(options, this.redisStoreDefaults, {}); + return new RedisDatastore$1(this, storeOptions, storeInstanceOptions); + } else if (this.datastore === "local") { + storeInstanceOptions = parser$5.load(options, this.localStoreDefaults, {}); + return new LocalDatastore$1(this, storeOptions, storeInstanceOptions); + } else { + throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); + } + }).call(this); + this._queues.on("leftzero", () => { + var ref; + return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; + }); + this._queues.on("zero", () => { + var ref; + return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; + }); + } -Comparator.prototype.toString = function () { - return this.value -} + _validateOptions(options, invalid) { + if (!((options != null) && typeof options === "object" && invalid.length === 0)) { + throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); + } + } -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) + ready() { + return this._store.ready; + } - if (this.semver === ANY) { - return true - } + clients() { + return this._store.clients; + } - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } + channel() { + return `b_${this.id}`; + } - return cmp(version, this.operator, this.semver, this.options) -} + channel_client() { + return `b_${this.id}_${this._store.clientId}`; + } -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } + publish(message) { + return this._store.__publish__(message); + } - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } + disconnect(flush = true) { + return this._store.__disconnect__(flush); + } - var rangeTmp + chain(_limiter) { + this._limiter = _limiter; + return this; + } - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } + queued(priority) { + return this._queues.queued(priority); + } + + clusterQueued() { + return this._store.__queued__(); + } - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) + empty() { + return this.queued() === 0 && this._submitLock.isEmpty(); + } - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} + running() { + return this._store.__running__(); + } -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } + done() { + return this._store.__done__(); + } - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } + jobStatus(id) { + return this._states.jobStatus(id); + } - if (range instanceof Comparator) { - return new Range(range.value, options) - } + jobs(status) { + return this._states.statusJobs(status); + } - if (!(this instanceof Range)) { - return new Range(range, options) - } + counts() { + return this._states.statusCounts(); + } - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease + _randomIndex() { + return Math.random().toString(36).slice(2); + } - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range - .trim() - .split(/\s+/) - .join(' ') + check(weight = 1) { + return this._store.__check__(weight); + } - // First, split based on boolean or || - this.set = this.raw.split('||').map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) + _clearGlobalState(index) { + if (this._scheduled[index] != null) { + clearTimeout(this._scheduled[index].expiration); + delete this._scheduled[index]; + return true; + } else { + return false; + } + } - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + this.raw) - } + async _free(index, job, options, eventInfo) { + var e, running; + try { + ({running} = (await this._store.__free__(index, options.weight))); + this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); + if (running === 0 && this.empty()) { + return this.Events.trigger("idle"); + } + } catch (error1) { + e = error1; + return this.Events.trigger("error", e); + } + } - this.format() -} + _run(index, job, wait) { + var clearGlobalState, free, run; + job.doRun(); + clearGlobalState = this._clearGlobalState.bind(this, index); + run = this._run.bind(this, index, job); + free = this._free.bind(this, index, job); + return this._scheduled[index] = { + timeout: setTimeout(() => { + return job.doExecute(this._limiter, clearGlobalState, run, free); + }, wait), + expiration: job.options.expiration != null ? setTimeout(function() { + return job.doExpire(clearGlobalState, run, free); + }, wait + job.options.expiration) : void 0, + job: job + }; + } -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} + _drainOne(capacity) { + return this._registerLock.schedule(() => { + var args, index, next, options, queue; + if (this.queued() === 0) { + return this.Promise.resolve(null); + } + queue = this._queues.getFirst(); + ({options, args} = next = queue.first()); + if ((capacity != null) && options.weight > capacity) { + return this.Promise.resolve(null); + } + this.Events.trigger("debug", `Draining ${options.id}`, {args, options}); + index = this._randomIndex(); + return this._store.__register__(index, options.weight, options.expiration).then(({success, wait, reservoir}) => { + var empty; + this.Events.trigger("debug", `Drained ${options.id}`, {success, args, options}); + if (success) { + queue.shift(); + empty = this.empty(); + if (empty) { + this.Events.trigger("empty"); + } + if (reservoir === 0) { + this.Events.trigger("depleted", empty); + } + this._run(index, next, wait); + return this.Promise.resolve(options.weight); + } else { + return this.Promise.resolve(null); + } + }); + }); + } -Range.prototype.toString = function () { - return this.range -} + _drainAll(capacity, total = 0) { + return this._drainOne(capacity).then((drained) => { + var newCapacity; + if (drained != null) { + newCapacity = capacity != null ? capacity - drained : capacity; + return this._drainAll(newCapacity, total + drained); + } else { + return this.Promise.resolve(total); + } + }).catch((e) => { + return this.Events.trigger("error", e); + }); + } -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, safeRe[COMPARATORTRIM]) + _dropAllQueued(message) { + return this._queues.shiftAll(function(job) { + return job.doDrop({message}); + }); + } - // `~ 1.2.3` => `~1.2.3` - range = range.replace(safeRe[TILDETRIM], tildeTrimReplace) + stop(options = {}) { + var done, waitForExecuting; + options = parser$5.load(options, this.stopDefaults); + waitForExecuting = (at) => { + var finished; + finished = () => { + var counts; + counts = this._states.counts; + return (counts[0] + counts[1] + counts[2] + counts[3]) === at; + }; + return new this.Promise((resolve, reject) => { + if (finished()) { + return resolve(); + } else { + return this.on("done", () => { + if (finished()) { + this.removeAllListeners("done"); + return resolve(); + } + }); + } + }); + }; + done = options.dropWaitingJobs ? (this._run = function(index, next) { + return next.doDrop({ + message: options.dropErrorMessage + }); + }, this._drainOne = () => { + return this.Promise.resolve(null); + }, this._registerLock.schedule(() => { + return this._submitLock.schedule(() => { + var k, ref, v; + ref = this._scheduled; + for (k in ref) { + v = ref[k]; + if (this.jobStatus(v.job.options.id) === "RUNNING") { + clearTimeout(v.timeout); + clearTimeout(v.expiration); + v.job.doDrop({ + message: options.dropErrorMessage + }); + } + } + this._dropAllQueued(options.dropErrorMessage); + return waitForExecuting(0); + }); + })) : this.schedule({ + priority: NUM_PRIORITIES$1 - 1, + weight: 0 + }, () => { + return waitForExecuting(1); + }); + this._receive = function(job) { + return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage)); + }; + this.stop = () => { + return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called")); + }; + return done; + } - // `^ 1.2.3` => `^1.2.3` - range = range.replace(safeRe[CARETTRIM], caretTrimReplace) + async _addToQueue(job) { + var args, blocked, error, options, reachedHWM, shifted, strategy; + ({args, options} = job); + try { + ({reachedHWM, blocked, strategy} = (await this._store.__submit__(this.queued(), options.weight))); + } catch (error1) { + error = error1; + this.Events.trigger("debug", `Could not queue ${options.id}`, {args, options, error}); + job.doDrop({error}); + return false; + } + if (blocked) { + job.doDrop(); + return true; + } else if (reachedHWM) { + shifted = strategy === Bottleneck.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0; + if (shifted != null) { + shifted.doDrop(); + } + if ((shifted == null) || strategy === Bottleneck.prototype.strategy.OVERFLOW) { + if (shifted == null) { + job.doDrop(); + } + return reachedHWM; + } + } + job.doQueue(reachedHWM, blocked); + this._queues.push(job); + await this._drainAll(); + return reachedHWM; + } - // At this point, the range is completely trimmed and - // ready to be split into comparators. - var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) + _receive(job) { + if (this._states.jobStatus(job.options.id) != null) { + job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); + return false; + } else { + job.doReceive(); + return this._submitLock.schedule(this._addToQueue, job); + } + } - return set -} + submit(...args) { + var cb, fn, job, options, ref, ref1, task; + if (typeof args[0] === "function") { + ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); + options = parser$5.load({}, this.jobDefaults); + } else { + ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); + options = parser$5.load(options, this.jobDefaults); + } + task = (...args) => { + return new this.Promise(function(resolve, reject) { + return fn(...args, function(...args) { + return (args[0] != null ? reject : resolve)(args); + }); + }); + }; + job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + job.promise.then(function(args) { + return typeof cb === "function" ? cb(...args) : void 0; + }).catch(function(args) { + if (Array.isArray(args)) { + return typeof cb === "function" ? cb(...args) : void 0; + } else { + return typeof cb === "function" ? cb(args) : void 0; + } + }); + return this._receive(job); + } -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } + schedule(...args) { + var job, options, task; + if (typeof args[0] === "function") { + [task, ...args] = args; + options = {}; + } else { + [options, task, ...args] = args; + } + job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + this._receive(job); + return job.promise; + } - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} + wrap(fn) { + var schedule, wrapped; + schedule = this.schedule.bind(this); + wrapped = function(...args) { + return schedule(fn.bind(this), ...args); + }; + wrapped.withOptions = function(options, ...args) { + return schedule(options, fn, ...args); + }; + return wrapped; + } -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} + async updateSettings(options = {}) { + await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); + parser$5.overwrite(options, this.instanceDefaults, this); + return this; + } -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} + currentReservoir() { + return this._store.__currentReservoir__(); + } -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} + incrementReservoir(incr = 0) { + return this._store.__incrementReservoir__(incr); + } -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} + } + Bottleneck.default = Bottleneck; -function replaceTilde (comp, options) { - var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret + Bottleneck.Events = Events$4; - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } + Bottleneck.version = Bottleneck.prototype.version = require$$8.version; - debug('tilde return', ret) - return ret - }) -} + Bottleneck.strategy = Bottleneck.prototype.strategy = { + LEAK: 1, + OVERFLOW: 2, + OVERFLOW_PRIORITY: 4, + BLOCK: 3 + }; -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} + Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1; -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret + Bottleneck.Group = Bottleneck.prototype.Group = Group_1; - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } + Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require$$2; - debug('caret return', ret) - return ret - }) -} + Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require$$3; -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} + Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1; -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp + Bottleneck.prototype.jobDefaults = { + priority: DEFAULT_PRIORITY$1, + weight: 1, + expiration: null, + id: "" + }; - if (gtlt === '=' && anyX) { - gtlt = '' - } + Bottleneck.prototype.storeDefaults = { + maxConcurrent: null, + minTime: 0, + highWater: null, + strategy: Bottleneck.prototype.strategy.LEAK, + penalty: null, + reservoir: null, + reservoirRefreshInterval: null, + reservoirRefreshAmount: null, + reservoirIncreaseInterval: null, + reservoirIncreaseAmount: null, + reservoirIncreaseMaximum: null + }; - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 + Bottleneck.prototype.localStoreDefaults = { + Promise: Promise, + timeout: null, + heartbeatInterval: 250 + }; - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } + Bottleneck.prototype.redisStoreDefaults = { + Promise: Promise, + timeout: null, + heartbeatInterval: 5000, + clientTimeout: 10000, + Redis: null, + clientOptions: {}, + clusterNodes: null, + clearDatastore: false, + connection: null + }; - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } + Bottleneck.prototype.instanceDefaults = { + datastore: "local", + connection: null, + id: "", + rejectOnDrop: true, + trackDoneStatus: false, + Promise: Promise + }; - debug('xRange return', ret) + Bottleneck.prototype.stopDefaults = { + enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", + dropWaitingJobs: true, + dropErrorMessage: "This limiter has been stopped." + }; - return ret - }) -} + return Bottleneck; -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(safeRe[STAR], '') -} + }).call(commonjsGlobal); -// This function is passed to string.replace(safeRe[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } + var Bottleneck_1 = Bottleneck; - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } + var lib = Bottleneck_1; - return (from + ' ' + to).trim() -} + return lib; -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } +}))); - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} +/***/ }), -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } +/***/ 33717: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } +var concatMap = __nccwpck_require__(86891); +var balanced = __nccwpck_require__(9417); - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } +module.exports = expandTop; - // Version has a -pre, but it's not one of the ones we like. - return false - } +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; - return true +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); } -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); } -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); } -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } + var parts = []; + var m = balanced('{', '}', str); - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } + if (!m) + return str.split(','); - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); } - if (minver && range.test(minver)) { - return minver - } + parts.push.apply(parts, p); - return null + return parts; } -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); } + + return expand(escapeBraces(str), true).map(unescapeBraces); } -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) +function identity(e) { + return e; } -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); } -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; } - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } } - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; - var high = null - var low = null + var N; - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false + N.push(c); } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); } } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) + return expansions; } -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - if (typeof version !== 'string') { - return null - } - var match = version.match(safeRe[COERCE]) +/***/ }), - if (match == null) { - return null - } +/***/ 72358: +/***/ ((module) => { - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) +module.exports = function btoa(str) { + return new Buffer(str).toString('base64') } /***/ }), -/***/ 6782: -/***/ ((module) => { +/***/ 9239: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} +"use strict"; +/*jshint node:true */ -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([ - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]] - ]).join(''); -} +var Buffer = (__nccwpck_require__(14300).Buffer); // browserify +var SlowBuffer = (__nccwpck_require__(14300).SlowBuffer); -module.exports = bytesToUuid; +module.exports = bufferEq; +function bufferEq(a, b) { -/***/ }), + // shortcutting on type is necessary for correctness + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + return false; + } -/***/ 5059: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // buffer sizes should be well-known information, so despite this + // shortcutting, it doesn't leak any information about the *contents* of the + // buffers. + if (a.length !== b.length) { + return false; + } -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. + var c = 0; + for (var i = 0; i < a.length; i++) { + /*jshint bitwise:false */ + c |= a[i] ^ b[i]; // XOR + } + return c === 0; +} -var crypto = __nccwpck_require__(6113); +bufferEq.install = function() { + Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { + return bufferEq(this, that); + }; +}; -module.exports = function nodeRNG() { - return crypto.randomBytes(16); +var origBufEqual = Buffer.prototype.equal; +var origSlowBufEqual = SlowBuffer.prototype.equal; +bufferEq.restore = function() { + Buffer.prototype.equal = origBufEqual; + SlowBuffer.prototype.equal = origSlowBufEqual; }; /***/ }), -/***/ 8087: +/***/ 66472: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var rng = __nccwpck_require__(5059); -var bytesToUuid = __nccwpck_require__(6782); +"use strict"; -function v4(options, buf, offset) { - var i = buf && offset || 0; - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; +const { parseContentType } = __nccwpck_require__(61305); - var rnds = options.random || (options.rng || rng)(); +function getInstance(cfg) { + const headers = cfg.headers; + const conType = parseContentType(headers['content-type']); + if (!conType) + throw new Error('Malformed content type'); - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; + for (const type of TYPES) { + const matched = type.detect(conType); + if (!matched) + continue; - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } + const instanceCfg = { + limits: cfg.limits, + headers, + conType, + highWaterMark: undefined, + fileHwm: undefined, + defCharset: undefined, + defParamCharset: undefined, + preservePath: false, + }; + if (cfg.highWaterMark) + instanceCfg.highWaterMark = cfg.highWaterMark; + if (cfg.fileHwm) + instanceCfg.fileHwm = cfg.fileHwm; + instanceCfg.defCharset = cfg.defCharset; + instanceCfg.defParamCharset = cfg.defParamCharset; + instanceCfg.preservePath = cfg.preservePath; + return new type(instanceCfg); } - return buf || bytesToUuid(rnds); + throw new Error(`Unsupported content type: ${headers['content-type']}`); } -module.exports = v4; +// Note: types are explicitly listed here for easier bundling +// See: https://github.com/mscdex/busboy/issues/121 +const TYPES = [ + __nccwpck_require__(65634), + __nccwpck_require__(84041), +].filter(function(typemod) { return typeof typemod.detect === 'function'; }); + +module.exports = (cfg) => { + if (typeof cfg !== 'object' || cfg === null) + cfg = {}; + + if (typeof cfg.headers !== 'object' + || cfg.headers === null + || typeof cfg.headers['content-type'] !== 'string') { + throw new Error('Missing Content-Type'); + } + + return getInstance(cfg); +}; /***/ }), -/***/ 347: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 65634: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.updateReleaseName = exports.addBuildTag = exports.updateBuildNumber = exports.uploadBuildLog = exports.associateArtifact = exports.uploadArtifact = exports.logIssue = exports.logDetail = exports.setProgress = exports.setEndpoint = exports.addAttachment = exports.uploadSummary = exports.prependPath = exports.uploadFile = exports.CodeCoverageEnabler = exports.CodeCoveragePublisher = exports.TestPublisher = exports.getHttpCertConfiguration = exports.getHttpProxyConfiguration = exports.findMatch = exports.filter = exports.match = exports.tool = exports.execSync = exports.exec = exports.rmRF = exports.legacyFindFiles = exports.find = exports.retry = exports.mv = exports.cp = exports.ls = exports.which = exports.resolve = exports.mkdirP = exports.popd = exports.pushd = exports.cd = exports.checkPath = exports.cwd = exports.getAgentMode = exports.getPlatform = exports.osType = exports.writeFile = exports.exist = exports.stats = exports.debug = exports.error = exports.warning = exports.command = exports.setTaskVariable = exports.getTaskVariable = exports.getSecureFileTicket = exports.getSecureFileName = exports.getEndpointAuthorization = exports.getEndpointAuthorizationParameterRequired = exports.getEndpointAuthorizationParameter = exports.getEndpointAuthorizationSchemeRequired = exports.getEndpointAuthorizationScheme = exports.getEndpointDataParameterRequired = exports.getEndpointDataParameter = exports.getEndpointUrlRequired = exports.getEndpointUrl = exports.getPathInputRequired = exports.getPathInput = exports.filePathSupplied = exports.getDelimitedInput = exports.getBoolFeatureFlag = exports.getBoolInput = exports.getInputRequired = exports.getInput = exports.setSecret = exports.setVariable = exports.getVariables = exports.assertAgent = exports.getVariable = exports.loc = exports.setResourcePath = exports.setResult = exports.setErrStream = exports.setStdStream = exports.AgentHostedMode = exports.Platform = exports.FieldType = exports.ArtifactType = exports.IssueType = exports.TaskState = exports.TaskResult = void 0; -var shell = __nccwpck_require__(3516); -var childProcess = __nccwpck_require__(2081); -var fs = __nccwpck_require__(7147); -var path = __nccwpck_require__(1017); -var os = __nccwpck_require__(2037); -var minimatch = __nccwpck_require__(3973); -var im = __nccwpck_require__(6526); -var tcm = __nccwpck_require__(3011); -var trm = __nccwpck_require__(7515); -var semver = __nccwpck_require__(242); -var TaskResult; -(function (TaskResult) { - TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; - TaskResult[TaskResult["SucceededWithIssues"] = 1] = "SucceededWithIssues"; - TaskResult[TaskResult["Failed"] = 2] = "Failed"; - TaskResult[TaskResult["Cancelled"] = 3] = "Cancelled"; - TaskResult[TaskResult["Skipped"] = 4] = "Skipped"; -})(TaskResult = exports.TaskResult || (exports.TaskResult = {})); -var TaskState; -(function (TaskState) { - TaskState[TaskState["Unknown"] = 0] = "Unknown"; - TaskState[TaskState["Initialized"] = 1] = "Initialized"; - TaskState[TaskState["InProgress"] = 2] = "InProgress"; - TaskState[TaskState["Completed"] = 3] = "Completed"; -})(TaskState = exports.TaskState || (exports.TaskState = {})); -var IssueType; -(function (IssueType) { - IssueType[IssueType["Error"] = 0] = "Error"; - IssueType[IssueType["Warning"] = 1] = "Warning"; -})(IssueType = exports.IssueType || (exports.IssueType = {})); -var ArtifactType; -(function (ArtifactType) { - ArtifactType[ArtifactType["Container"] = 0] = "Container"; - ArtifactType[ArtifactType["FilePath"] = 1] = "FilePath"; - ArtifactType[ArtifactType["VersionControl"] = 2] = "VersionControl"; - ArtifactType[ArtifactType["GitRef"] = 3] = "GitRef"; - ArtifactType[ArtifactType["TfvcLabel"] = 4] = "TfvcLabel"; -})(ArtifactType = exports.ArtifactType || (exports.ArtifactType = {})); -var FieldType; -(function (FieldType) { - FieldType[FieldType["AuthParameter"] = 0] = "AuthParameter"; - FieldType[FieldType["DataParameter"] = 1] = "DataParameter"; - FieldType[FieldType["Url"] = 2] = "Url"; -})(FieldType = exports.FieldType || (exports.FieldType = {})); -/** Platforms supported by our build agent */ -var Platform; -(function (Platform) { - Platform[Platform["Windows"] = 0] = "Windows"; - Platform[Platform["MacOS"] = 1] = "MacOS"; - Platform[Platform["Linux"] = 2] = "Linux"; -})(Platform = exports.Platform || (exports.Platform = {})); -var AgentHostedMode; -(function (AgentHostedMode) { - AgentHostedMode[AgentHostedMode["Unknown"] = 0] = "Unknown"; - AgentHostedMode[AgentHostedMode["SelfHosted"] = 1] = "SelfHosted"; - AgentHostedMode[AgentHostedMode["MsHosted"] = 2] = "MsHosted"; -})(AgentHostedMode = exports.AgentHostedMode || (exports.AgentHostedMode = {})); -//----------------------------------------------------- -// General Helpers -//----------------------------------------------------- -exports.setStdStream = im._setStdStream; -exports.setErrStream = im._setErrStream; -//----------------------------------------------------- -// Results -//----------------------------------------------------- -/** - * Sets the result of the task. - * Execution will continue. - * If not set, task will be Succeeded. - * If multiple calls are made to setResult the most pessimistic call wins (Failed) regardless of the order of calls. - * - * @param result TaskResult enum of Succeeded, SucceededWithIssues, Failed, Cancelled or Skipped. - * @param message A message which will be logged as an error issue if the result is Failed. - * @param done Optional. Instructs the agent the task is done. This is helpful when child processes - * may still be running and prevent node from fully exiting. This argument is supported - * from agent version 2.142.0 or higher (otherwise will no-op). - * @returns void - */ -function setResult(result, message, done) { - exports.debug('task result: ' + TaskResult[result]); - // add an error issue - if (result == TaskResult.Failed && message) { - exports.error(message); - } - else if (result == TaskResult.SucceededWithIssues && message) { - exports.warning(message); - } - // task.complete - var properties = { 'result': TaskResult[result] }; - if (done) { - properties['done'] = 'true'; - } - exports.command('task.complete', properties, message); -} -exports.setResult = setResult; -// -// Catching all exceptions -// -process.on('uncaughtException', function (err) { - setResult(TaskResult.Failed, exports.loc('LIB_UnhandledEx', err.message)); - exports.error(String(err.stack)); -}); -// -// Catching unhandled rejections from promises and rethrowing them as exceptions -// For example, a promise that is rejected but not handled by a .catch() handler in node 10 -// doesn't cause an uncaughtException but causes in Node 16. -// For types definitions(Error | Any) see https://nodejs.org/docs/latest-v16.x/api/process.html#event-unhandledrejection -// -process.on('unhandledRejection', function (reason) { - if (reason instanceof Error) { - throw reason; - } - else { - throw new Error(reason); - } -}); -//----------------------------------------------------- -// Loc Helpers -//----------------------------------------------------- -exports.setResourcePath = im._setResourcePath; -exports.loc = im._loc; -//----------------------------------------------------- -// Input Helpers -//----------------------------------------------------- -exports.getVariable = im._getVariable; -/** - * Asserts the agent version is at least the specified minimum. - * - * @param minimum minimum version version - must be 2.104.1 or higher - */ -function assertAgent(minimum) { - if (semver.lt(minimum, '2.104.1')) { - throw new Error('assertAgent() requires the parameter to be 2.104.1 or higher'); - } - var agent = exports.getVariable('Agent.Version'); - if (agent && semver.lt(agent, minimum)) { - throw new Error("Agent version " + minimum + " or higher is required"); - } -} -exports.assertAgent = assertAgent; -/** - * Gets a snapshot of the current state of all job variables available to the task. - * Requires a 2.104.1 agent or higher for full functionality. - * - * Limitations on an agent prior to 2.104.1: - * 1) The return value does not include all public variables. Only public variables - * that have been added using setVariable are returned. - * 2) The name returned for each secret variable is the formatted environment variable - * name, not the actual variable name (unless it was set explicitly at runtime using - * setVariable). - * - * @returns VariableInfo[] - */ -function getVariables() { - return Object.keys(im._knownVariableMap) - .map(function (key) { - var info = im._knownVariableMap[key]; - return { name: info.name, value: exports.getVariable(info.name), secret: info.secret }; - }); -} -exports.getVariables = getVariables; -/** - * Sets a variable which will be available to subsequent tasks as well. - * - * @param name name of the variable to set - * @param val value to set - * @param secret whether variable is secret. Multi-line secrets are not allowed. Optional, defaults to false - * @param isOutput whether variable is an output variable. Optional, defaults to false - * @returns void - */ -function setVariable(name, val, secret, isOutput) { - if (secret === void 0) { secret = false; } - if (isOutput === void 0) { isOutput = false; } - // once a secret always a secret - var key = im._getVariableKey(name); - if (im._knownVariableMap.hasOwnProperty(key)) { - secret = secret || im._knownVariableMap[key].secret; - } - // store the value - var varValue = val || ''; - exports.debug('set ' + name + '=' + (secret && varValue ? '********' : varValue)); - if (secret) { - if (varValue && varValue.match(/\r|\n/) && ("" + process.env['SYSTEM_UNSAFEALLOWMULTILINESECRET']).toUpperCase() != 'TRUE') { - throw new Error(exports.loc('LIB_MultilineSecret')); - } - im._vault.storeSecret('SECRET_' + key, varValue); - delete process.env[key]; - } - else { - process.env[key] = varValue; - } - // store the metadata - im._knownVariableMap[key] = { name: name, secret: secret }; - // write the setvariable command - exports.command('task.setvariable', { 'variable': name || '', isOutput: (isOutput || false).toString(), 'issecret': (secret || false).toString() }, varValue); -} -exports.setVariable = setVariable; -/** - * Registers a value with the logger, so the value will be masked from the logs. Multi-line secrets are not allowed. - * - * @param val value to register - */ -function setSecret(val) { - if (val) { - if (val.match(/\r|\n/) && ("" + process.env['SYSTEM_UNSAFEALLOWMULTILINESECRET']).toUpperCase() !== 'TRUE') { - throw new Error(exports.loc('LIB_MultilineSecret')); - } - exports.command('task.setsecret', {}, val); - } -} -exports.setSecret = setSecret; -/** - * Gets the value of an input. - * If required is true and the value is not set, it will throw. - * - * @param name name of the input to get - * @param required whether input is required. optional, defaults to false - * @returns string - */ -function getInput(name, required) { - var inval = im._vault.retrieveSecret('INPUT_' + im._getVariableKey(name)); - if (required && !inval) { - throw new Error(exports.loc('LIB_InputRequired', name)); - } - exports.debug(name + '=' + inval); - return inval; -} -exports.getInput = getInput; -/** - * Gets the value of an input. - * If the value is not set, it will throw. - * - * @param name name of the input to get - * @returns string - */ -function getInputRequired(name) { - return getInput(name, true); -} -exports.getInputRequired = getInputRequired; -/** - * Gets the value of an input and converts to a bool. Convenience. - * If required is true and the value is not set, it will throw. - * If required is false and the value is not set, returns false. - * - * @param name name of the bool input to get - * @param required whether input is required. optional, defaults to false - * @returns boolean - */ -function getBoolInput(name, required) { - return (getInput(name, required) || '').toUpperCase() == "TRUE"; -} -exports.getBoolInput = getBoolInput; -/** - * Gets the value of an feature flag and converts to a bool. - * - * @param name name of the feature flag to get. - * @param defaultValue default value of the feature flag in case it's not found in env. (optional. Default value = false) - * @returns boolean - */ -function getBoolFeatureFlag(ffName, defaultValue) { - if (defaultValue === void 0) { defaultValue = false; } - var ffValue = process.env[ffName]; - if (!ffValue) { - exports.debug("Feature flag " + ffName + " not found. Returning " + defaultValue + " as default."); - return defaultValue; - } - exports.debug("Feature flag " + ffName + " = " + ffValue); - return ffValue.toLowerCase() === "true"; -} -exports.getBoolFeatureFlag = getBoolFeatureFlag; -/** - * Gets the value of an input and splits the value using a delimiter (space, comma, etc). - * Empty values are removed. This function is useful for splitting an input containing a simple - * list of items - such as build targets. - * IMPORTANT: Do not use this function for splitting additional args! Instead use argString(), which - * follows normal argument splitting rules and handles values encapsulated by quotes. - * If required is true and the value is not set, it will throw. - * - * @param name name of the input to get - * @param delim delimiter to split on - * @param required whether input is required. optional, defaults to false - * @returns string[] - */ -function getDelimitedInput(name, delim, required) { - var inputVal = getInput(name, required); - if (!inputVal) { - return []; - } - var result = []; - inputVal.split(delim).forEach(function (x) { - if (x) { - result.push(x); - } - }); - return result; -} -exports.getDelimitedInput = getDelimitedInput; -/** - * Checks whether a path inputs value was supplied by the user - * File paths are relative with a picker, so an empty path is the root of the repo. - * Useful if you need to condition work (like append an arg) if a value was supplied - * - * @param name name of the path input to check - * @returns boolean - */ -function filePathSupplied(name) { - // normalize paths - var pathValue = this.resolve(this.getPathInput(name) || ''); - var repoRoot = this.resolve(exports.getVariable('build.sourcesDirectory') || exports.getVariable('system.defaultWorkingDirectory') || ''); - var supplied = pathValue !== repoRoot; - exports.debug(name + 'path supplied :' + supplied); - return supplied; -} -exports.filePathSupplied = filePathSupplied; -/** - * Gets the value of a path input - * It will be quoted for you if it isn't already and contains spaces - * If required is true and the value is not set, it will throw. - * If check is true and the path does not exist, it will throw. - * - * @param name name of the input to get - * @param required whether input is required. optional, defaults to false - * @param check whether path is checked. optional, defaults to false - * @returns string - */ -function getPathInput(name, required, check) { - var inval = getInput(name, required); - if (inval) { - if (check) { - exports.checkPath(inval, name); - } - } - return inval; -} -exports.getPathInput = getPathInput; -/** - * Gets the value of a path input - * It will be quoted for you if it isn't already and contains spaces - * If the value is not set, it will throw. - * If check is true and the path does not exist, it will throw. - * - * @param name name of the input to get - * @param check whether path is checked. optional, defaults to false - * @returns string - */ -function getPathInputRequired(name, check) { - return getPathInput(name, true, check); -} -exports.getPathInputRequired = getPathInputRequired; -//----------------------------------------------------- -// Endpoint Helpers -//----------------------------------------------------- -/** - * Gets the url for a service endpoint - * If the url was not set and is not optional, it will throw. - * - * @param id name of the service endpoint - * @param optional whether the url is optional - * @returns string - */ -function getEndpointUrl(id, optional) { - var urlval = process.env['ENDPOINT_URL_' + id]; - if (!optional && !urlval) { - throw new Error(exports.loc('LIB_EndpointNotExist', id)); - } - exports.debug(id + '=' + urlval); - return urlval; -} -exports.getEndpointUrl = getEndpointUrl; -/** - * Gets the url for a service endpoint - * If the url was not set, it will throw. - * - * @param id name of the service endpoint - * @returns string - */ -function getEndpointUrlRequired(id) { - return getEndpointUrl(id, false); -} -exports.getEndpointUrlRequired = getEndpointUrlRequired; -/* - * Gets the endpoint data parameter value with specified key for a service endpoint - * If the endpoint data parameter was not set and is not optional, it will throw. - * - * @param id name of the service endpoint - * @param key of the parameter - * @param optional whether the endpoint data is optional - * @returns {string} value of the endpoint data parameter - */ -function getEndpointDataParameter(id, key, optional) { - var dataParamVal = process.env['ENDPOINT_DATA_' + id + '_' + key.toUpperCase()]; - if (!optional && !dataParamVal) { - throw new Error(exports.loc('LIB_EndpointDataNotExist', id, key)); - } - exports.debug(id + ' data ' + key + ' = ' + dataParamVal); - return dataParamVal; -} -exports.getEndpointDataParameter = getEndpointDataParameter; -/* - * Gets the endpoint data parameter value with specified key for a service endpoint - * If the endpoint data parameter was not set, it will throw. - * - * @param id name of the service endpoint - * @param key of the parameter - * @returns {string} value of the endpoint data parameter - */ -function getEndpointDataParameterRequired(id, key) { - return getEndpointDataParameter(id, key, false); -} -exports.getEndpointDataParameterRequired = getEndpointDataParameterRequired; -/** - * Gets the endpoint authorization scheme for a service endpoint - * If the endpoint authorization scheme is not set and is not optional, it will throw. - * - * @param id name of the service endpoint - * @param optional whether the endpoint authorization scheme is optional - * @returns {string} value of the endpoint authorization scheme - */ -function getEndpointAuthorizationScheme(id, optional) { - var authScheme = im._vault.retrieveSecret('ENDPOINT_AUTH_SCHEME_' + id); - if (!optional && !authScheme) { - throw new Error(exports.loc('LIB_EndpointAuthNotExist', id)); - } - exports.debug(id + ' auth scheme = ' + authScheme); - return authScheme; -} -exports.getEndpointAuthorizationScheme = getEndpointAuthorizationScheme; -/** - * Gets the endpoint authorization scheme for a service endpoint - * If the endpoint authorization scheme is not set, it will throw. - * - * @param id name of the service endpoint - * @returns {string} value of the endpoint authorization scheme - */ -function getEndpointAuthorizationSchemeRequired(id) { - return getEndpointAuthorizationScheme(id, false); -} -exports.getEndpointAuthorizationSchemeRequired = getEndpointAuthorizationSchemeRequired; -/** - * Gets the endpoint authorization parameter value for a service endpoint with specified key - * If the endpoint authorization parameter is not set and is not optional, it will throw. - * - * @param id name of the service endpoint - * @param key key to find the endpoint authorization parameter - * @param optional optional whether the endpoint authorization scheme is optional - * @returns {string} value of the endpoint authorization parameter value - */ -function getEndpointAuthorizationParameter(id, key, optional) { - var authParam = im._vault.retrieveSecret('ENDPOINT_AUTH_PARAMETER_' + id + '_' + key.toUpperCase()); - if (!optional && !authParam) { - throw new Error(exports.loc('LIB_EndpointAuthNotExist', id)); - } - exports.debug(id + ' auth param ' + key + ' = ' + authParam); - return authParam; -} -exports.getEndpointAuthorizationParameter = getEndpointAuthorizationParameter; -/** - * Gets the endpoint authorization parameter value for a service endpoint with specified key - * If the endpoint authorization parameter is not set, it will throw. - * - * @param id name of the service endpoint - * @param key key to find the endpoint authorization parameter - * @returns {string} value of the endpoint authorization parameter value - */ -function getEndpointAuthorizationParameterRequired(id, key) { - return getEndpointAuthorizationParameter(id, key, false); -} -exports.getEndpointAuthorizationParameterRequired = getEndpointAuthorizationParameterRequired; -/** - * Gets the authorization details for a service endpoint - * If the authorization was not set and is not optional, it will set the task result to Failed. - * - * @param id name of the service endpoint - * @param optional whether the url is optional - * @returns string - */ -function getEndpointAuthorization(id, optional) { - var aval = im._vault.retrieveSecret('ENDPOINT_AUTH_' + id); - if (!optional && !aval) { - setResult(TaskResult.Failed, exports.loc('LIB_EndpointAuthNotExist', id)); - } - exports.debug(id + ' exists ' + (!!aval)); - var auth; - try { - if (aval) { - auth = JSON.parse(aval); - } - } - catch (err) { - throw new Error(exports.loc('LIB_InvalidEndpointAuth', aval)); - } - return auth; -} -exports.getEndpointAuthorization = getEndpointAuthorization; -//----------------------------------------------------- -// SecureFile Helpers -//----------------------------------------------------- -/** - * Gets the name for a secure file - * - * @param id secure file id - * @returns string - */ -function getSecureFileName(id) { - var name = process.env['SECUREFILE_NAME_' + id]; - exports.debug('secure file name for id ' + id + ' = ' + name); - return name; -} -exports.getSecureFileName = getSecureFileName; -/** - * Gets the secure file ticket that can be used to download the secure file contents - * - * @param id name of the secure file - * @returns {string} secure file ticket - */ -function getSecureFileTicket(id) { - var ticket = im._vault.retrieveSecret('SECUREFILE_TICKET_' + id); - exports.debug('secure file ticket for id ' + id + ' = ' + ticket); - return ticket; -} -exports.getSecureFileTicket = getSecureFileTicket; -//----------------------------------------------------- -// Task Variable Helpers -//----------------------------------------------------- -/** - * Gets a variable value that is set by previous step from the same wrapper task. - * Requires a 2.115.0 agent or higher. - * - * @param name name of the variable to get - * @returns string - */ -function getTaskVariable(name) { - assertAgent('2.115.0'); - var inval = im._vault.retrieveSecret('VSTS_TASKVARIABLE_' + im._getVariableKey(name)); - if (inval) { - inval = inval.trim(); - } - exports.debug('task variable: ' + name + '=' + inval); - return inval; -} -exports.getTaskVariable = getTaskVariable; -/** - * Sets a task variable which will only be available to subsequent steps belong to the same wrapper task. - * Requires a 2.115.0 agent or higher. - * - * @param name name of the variable to set - * @param val value to set - * @param secret whether variable is secret. optional, defaults to false - * @returns void - */ -function setTaskVariable(name, val, secret) { - if (secret === void 0) { secret = false; } - assertAgent('2.115.0'); - var key = im._getVariableKey(name); - // store the value - var varValue = val || ''; - exports.debug('set task variable: ' + name + '=' + (secret && varValue ? '********' : varValue)); - im._vault.storeSecret('VSTS_TASKVARIABLE_' + key, varValue); - delete process.env[key]; - // write the command - exports.command('task.settaskvariable', { 'variable': name || '', 'issecret': (secret || false).toString() }, varValue); -} -exports.setTaskVariable = setTaskVariable; -//----------------------------------------------------- -// Cmd Helpers -//----------------------------------------------------- -exports.command = im._command; -exports.warning = im._warning; -exports.error = im._error; -exports.debug = im._debug; -//----------------------------------------------------- -// Disk Functions -//----------------------------------------------------- -function _checkShell(cmd, continueOnError) { - var se = shell.error(); - if (se) { - exports.debug(cmd + ' failed'); - var errMsg = exports.loc('LIB_OperationFailed', cmd, se); - exports.debug(errMsg); - if (!continueOnError) { - throw new Error(errMsg); - } - } -} -/** - * Get's stat on a path. - * Useful for checking whether a file or directory. Also getting created, modified and accessed time. - * see [fs.stat](https://nodejs.org/api/fs.html#fs_class_fs_stats) - * - * @param path path to check - * @returns fsStat - */ -function stats(path) { - return fs.statSync(path); -} -exports.stats = stats; -exports.exist = im._exist; -function writeFile(file, data, options) { - if (typeof (options) === 'string') { - fs.writeFileSync(file, data, { encoding: options }); - } - else { - fs.writeFileSync(file, data, options); - } -} -exports.writeFile = writeFile; -/** - * @deprecated Use `getPlatform` - * Useful for determining the host operating system. - * see [os.type](https://nodejs.org/api/os.html#os_os_type) - * - * @return the name of the operating system - */ -function osType() { - return os.type(); -} -exports.osType = osType; -/** - * Determine the operating system the build agent is running on. - * @returns {Platform} - * @throws {Error} Platform is not supported by our agent - */ -function getPlatform() { - switch (process.platform) { - case 'win32': return Platform.Windows; - case 'darwin': return Platform.MacOS; - case 'linux': return Platform.Linux; - default: throw Error(exports.loc('LIB_PlatformNotSupported', process.platform)); - } -} -exports.getPlatform = getPlatform; -/** - * Return hosted type of Agent - * @returns {AgentHostedMode} - */ -function getAgentMode() { - var agentCloudId = exports.getVariable('Agent.CloudId'); - if (agentCloudId === undefined) - return AgentHostedMode.Unknown; - if (agentCloudId) - return AgentHostedMode.MsHosted; - return AgentHostedMode.SelfHosted; -} -exports.getAgentMode = getAgentMode; -/** - * Returns the process's current working directory. - * see [process.cwd](https://nodejs.org/api/process.html#process_process_cwd) - * - * @return the path to the current working directory of the process - */ -function cwd() { - return process.cwd(); -} -exports.cwd = cwd; -exports.checkPath = im._checkPath; -/** - * Change working directory. - * - * @param path new working directory path - * @returns void - */ -function cd(path) { - if (path) { - shell.cd(path); - _checkShell('cd'); - } -} -exports.cd = cd; -/** - * Change working directory and push it on the stack - * - * @param path new working directory path - * @returns void - */ -function pushd(path) { - shell.pushd(path); - _checkShell('pushd'); -} -exports.pushd = pushd; -/** - * Change working directory back to previously pushed directory - * - * @returns void - */ -function popd() { - shell.popd(); - _checkShell('popd'); -} -exports.popd = popd; -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param p path to create - * @returns void - */ -function mkdirP(p) { - if (!p) { - throw new Error(exports.loc('LIB_ParameterIsRequired', 'p')); - } - // build a stack of directories to create - var stack = []; - var testDir = p; - while (true) { - // validate the loop is not out of control - if (stack.length >= (process.env['TASKLIB_TEST_MKDIRP_FAILSAFE'] || 1000)) { - // let the framework throw - exports.debug('loop is out of control'); - fs.mkdirSync(p); - return; - } - exports.debug("testing directory '" + testDir + "'"); - var stats_1 = void 0; - try { - stats_1 = fs.statSync(testDir); - } - catch (err) { - if (err.code == 'ENOENT') { - // validate the directory is not the drive root - var parentDir = path.dirname(testDir); - if (testDir == parentDir) { - throw new Error(exports.loc('LIB_MkdirFailedInvalidDriveRoot', p, testDir)); // Unable to create directory '{p}'. Root directory does not exist: '{testDir}' - } - // push the dir and test the parent - stack.push(testDir); - testDir = parentDir; - continue; - } - else if (err.code == 'UNKNOWN') { - throw new Error(exports.loc('LIB_MkdirFailedInvalidShare', p, testDir)); // Unable to create directory '{p}'. Unable to verify the directory exists: '{testDir}'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share. - } - else { - throw err; - } - } - if (!stats_1.isDirectory()) { - throw new Error(exports.loc('LIB_MkdirFailedFileExists', p, testDir)); // Unable to create directory '{p}'. Conflicting file exists: '{testDir}' - } - // testDir exists - break; - } - // create each directory - while (stack.length) { - var dir = stack.pop(); // non-null because `stack.length` was truthy - exports.debug("mkdir '" + dir + "'"); - try { - fs.mkdirSync(dir); - } - catch (err) { - throw new Error(exports.loc('LIB_MkdirFailed', p, err.message)); // Unable to create directory '{p}'. {err.message} - } - } -} -exports.mkdirP = mkdirP; -/** - * Resolves a sequence of paths or path segments into an absolute path. - * Calls node.js path.resolve() - * Allows L0 testing with consistent path formats on Mac/Linux and Windows in the mock implementation - * @param pathSegments - * @returns {string} - */ -function resolve() { - var pathSegments = []; - for (var _i = 0; _i < arguments.length; _i++) { - pathSegments[_i] = arguments[_i]; - } - var absolutePath = path.resolve.apply(this, pathSegments); - exports.debug('Absolute path for pathSegments: ' + pathSegments + ' = ' + absolutePath); - return absolutePath; -} -exports.resolve = resolve; -exports.which = im._which; -/** - * Returns array of files in the given path, or in current directory if no path provided. See shelljs.ls - * @param {string} options Available options: -R (recursive), -A (all files, include files beginning with ., except for . and ..) - * @param {string[]} paths Paths to search. - * @return {string[]} An array of files in the given path(s). - */ -function ls(options, paths) { - if (options) { - return shell.ls(options, paths); - } - else { - return shell.ls(paths); - } -} -exports.ls = ls; -/** - * Copies a file or folder. - * - * @param source source path - * @param dest destination path - * @param options string -r, -f or -rf for recursive and force - * @param continueOnError optional. whether to continue on error - * @param retryCount optional. Retry count to copy the file. It might help to resolve intermittent issues e.g. with UNC target paths on a remote host. - */ -function cp(source, dest, options, continueOnError, retryCount) { - if (retryCount === void 0) { retryCount = 0; } - while (retryCount >= 0) { - try { - if (options) { - shell.cp(options, source, dest); - } - else { - shell.cp(source, dest); + +const { Readable, Writable } = __nccwpck_require__(12781); + +const StreamSearch = __nccwpck_require__(52405); + +const { + basename, + convertToUTF8, + getDecoder, + parseContentType, + parseDisposition, +} = __nccwpck_require__(61305); + +const BUF_CRLF = Buffer.from('\r\n'); +const BUF_CR = Buffer.from('\r'); +const BUF_DASH = Buffer.from('-'); + +function noop() {} + +const MAX_HEADER_PAIRS = 2000; // From node +const MAX_HEADER_SIZE = 16 * 1024; // From node (its default value) + +const HPARSER_NAME = 0; +const HPARSER_PRE_OWS = 1; +const HPARSER_VALUE = 2; +class HeaderParser { + constructor(cb) { + this.header = Object.create(null); + this.pairCount = 0; + this.byteCount = 0; + this.state = HPARSER_NAME; + this.name = ''; + this.value = ''; + this.crlf = 0; + this.cb = cb; + } + + reset() { + this.header = Object.create(null); + this.pairCount = 0; + this.byteCount = 0; + this.state = HPARSER_NAME; + this.name = ''; + this.value = ''; + this.crlf = 0; + } + + push(chunk, pos, end) { + let start = pos; + while (pos < end) { + switch (this.state) { + case HPARSER_NAME: { + let done = false; + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (TOKEN[code] !== 1) { + if (code !== 58/* ':' */) + return -1; + this.name += chunk.latin1Slice(start, pos); + if (this.name.length === 0) + return -1; + ++pos; + done = true; + this.state = HPARSER_PRE_OWS; + break; } - _checkShell('cp', false); + } + if (!done) { + this.name += chunk.latin1Slice(start, pos); break; - } - catch (e) { - if (retryCount <= 0) { - if (continueOnError) { - exports.warning(e); - break; - } - else { - throw e; - } - } - else { - console.log(exports.loc('LIB_CopyFileFailed', retryCount)); - retryCount--; + } + // FALLTHROUGH + } + case HPARSER_PRE_OWS: { + // Skip optional whitespace + let done = false; + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) { + start = pos; + done = true; + this.state = HPARSER_VALUE; + break; } - } - } -} -exports.cp = cp; -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options string -f or -n for force and no clobber - * @param continueOnError optional. whether to continue on error - */ -function mv(source, dest, options, continueOnError) { - if (options) { - shell.mv(options, source, dest); - } - else { - shell.mv(source, dest); - } - _checkShell('mv', continueOnError); -} -exports.mv = mv; -/** - * Tries to execute a function a specified number of times. - * - * @param func a function to be executed. - * @param args executed function arguments array. - * @param retryOptions optional. Defaults to { continueOnError: false, retryCount: 0 }. - * @returns the same as the usual function. - */ -function retry(func, args, retryOptions) { - if (retryOptions === void 0) { retryOptions = { continueOnError: false, retryCount: 0 }; } - while (retryOptions.retryCount >= 0) { - try { - return func.apply(void 0, args); - } - catch (e) { - if (retryOptions.retryCount <= 0) { - if (retryOptions.continueOnError) { - exports.warning(e); - break; + } + if (!done) + break; + // FALLTHROUGH + } + case HPARSER_VALUE: + switch (this.crlf) { + case 0: // Nothing yet + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (FIELD_VCHAR[code] !== 1) { + if (code !== 13/* '\r' */) + return -1; + ++this.crlf; + break; } - else { - throw e; + } + this.value += chunk.latin1Slice(start, pos++); + break; + case 1: // Received CR + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + if (chunk[pos++] !== 10/* '\n' */) + return -1; + ++this.crlf; + break; + case 2: { // Received CR LF + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (code === 32/* ' ' */ || code === 9/* '\t' */) { + // Folded value + start = pos; + this.crlf = 0; + } else { + if (++this.pairCount < MAX_HEADER_PAIRS) { + this.name = this.name.toLowerCase(); + if (this.header[this.name] === undefined) + this.header[this.name] = [this.value]; + else + this.header[this.name].push(this.value); + } + if (code === 13/* '\r' */) { + ++this.crlf; + ++pos; + } else { + // Assume start of next header field name + start = pos; + this.crlf = 0; + this.state = HPARSER_NAME; + this.name = ''; + this.value = ''; } + } + break; } - else { - exports.debug("Attempt to execute function \"" + (func === null || func === void 0 ? void 0 : func.name) + "\" failed, retries left: " + retryOptions.retryCount); - retryOptions.retryCount--; + case 3: { // Received CR LF CR + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + if (chunk[pos++] !== 10/* '\n' */) + return -1; + // End of header + const header = this.header; + this.reset(); + this.cb(header); + return pos; } - } + } + break; + } } + + return pos; + } } -exports.retry = retry; -/** - * Gets info about item stats. - * - * @param path a path to the item to be processed. - * @param followSymbolicLink indicates whether to traverse descendants of symbolic link directories. - * @param allowBrokenSymbolicLinks when true, broken symbolic link will not cause an error. - * @returns fs.Stats - */ -function _getStats(path, followSymbolicLink, allowBrokenSymbolicLinks) { - // stat returns info about the target of a symlink (or symlink chain), - // lstat returns info about a symlink itself - var stats; - if (followSymbolicLink) { - try { - // use stat (following symlinks) - stats = fs.statSync(path); + +class FileStream extends Readable { + constructor(opts, owner) { + super(opts); + this.truncated = false; + this._readcb = null; + this.once('end', () => { + // We need to make sure that we call any outstanding _writecb() that is + // associated with this file so that processing of the rest of the form + // can continue. This may not happen if the file stream ends right after + // backpressure kicks in, so we force it here. + this._read(); + if (--owner._fileEndsLeft === 0 && owner._finalcb) { + const cb = owner._finalcb; + owner._finalcb = null; + // Make sure other 'end' event handlers get a chance to be executed + // before busboy's 'finish' event is emitted + process.nextTick(cb); + } + }); + } + _read(n) { + const cb = this._readcb; + if (cb) { + this._readcb = null; + cb(); + } + } +} + +const ignoreData = { + push: (chunk, pos) => {}, + destroy: () => {}, +}; + +function callAndUnsetCb(self, err) { + const cb = self._writecb; + self._writecb = null; + if (err) + self.destroy(err); + else if (cb) + cb(); +} + +function nullDecoder(val, hint) { + return val; +} + +class Multipart extends Writable { + constructor(cfg) { + const streamOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: (typeof cfg.highWaterMark === 'number' + ? cfg.highWaterMark + : undefined), + }; + super(streamOpts); + + if (!cfg.conType.params || typeof cfg.conType.params.boundary !== 'string') + throw new Error('Multipart: Boundary not found'); + + const boundary = cfg.conType.params.boundary; + const paramDecoder = (typeof cfg.defParamCharset === 'string' + && cfg.defParamCharset + ? getDecoder(cfg.defParamCharset) + : nullDecoder); + const defCharset = (cfg.defCharset || 'utf8'); + const preservePath = cfg.preservePath; + const fileOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: (typeof cfg.fileHwm === 'number' + ? cfg.fileHwm + : undefined), + }; + + const limits = cfg.limits; + const fieldSizeLimit = (limits && typeof limits.fieldSize === 'number' + ? limits.fieldSize + : 1 * 1024 * 1024); + const fileSizeLimit = (limits && typeof limits.fileSize === 'number' + ? limits.fileSize + : Infinity); + const filesLimit = (limits && typeof limits.files === 'number' + ? limits.files + : Infinity); + const fieldsLimit = (limits && typeof limits.fields === 'number' + ? limits.fields + : Infinity); + const partsLimit = (limits && typeof limits.parts === 'number' + ? limits.parts + : Infinity); + + let parts = -1; // Account for initial boundary + let fields = 0; + let files = 0; + let skipPart = false; + + this._fileEndsLeft = 0; + this._fileStream = undefined; + this._complete = false; + let fileSize = 0; + + let field; + let fieldSize = 0; + let partCharset; + let partEncoding; + let partType; + let partName; + let partTruncated = false; + + let hitFilesLimit = false; + let hitFieldsLimit = false; + + this._hparser = null; + const hparser = new HeaderParser((header) => { + this._hparser = null; + skipPart = false; + + partType = 'text/plain'; + partCharset = defCharset; + partEncoding = '7bit'; + partName = undefined; + partTruncated = false; + + let filename; + if (!header['content-disposition']) { + skipPart = true; + return; + } + + const disp = parseDisposition(header['content-disposition'][0], + paramDecoder); + if (!disp || disp.type !== 'form-data') { + skipPart = true; + return; + } + + if (disp.params) { + if (disp.params.name) + partName = disp.params.name; + + if (disp.params['filename*']) + filename = disp.params['filename*']; + else if (disp.params.filename) + filename = disp.params.filename; + + if (filename !== undefined && !preservePath) + filename = basename(filename); + } + + if (header['content-type']) { + const conType = parseContentType(header['content-type'][0]); + if (conType) { + partType = `${conType.type}/${conType.subtype}`; + if (conType.params && typeof conType.params.charset === 'string') + partCharset = conType.params.charset.toLowerCase(); } - catch (err) { - if (err.code == 'ENOENT' && allowBrokenSymbolicLinks) { - // fallback to lstat (broken symlinks allowed) - stats = fs.lstatSync(path); - exports.debug(" " + path + " (broken symlink)"); + } + + if (header['content-transfer-encoding']) + partEncoding = header['content-transfer-encoding'][0].toLowerCase(); + + if (partType === 'application/octet-stream' || filename !== undefined) { + // File + + if (files === filesLimit) { + if (!hitFilesLimit) { + hitFilesLimit = true; + this.emit('filesLimit'); + } + skipPart = true; + return; + } + ++files; + + if (this.listenerCount('file') === 0) { + skipPart = true; + return; + } + + fileSize = 0; + this._fileStream = new FileStream(fileOpts, this); + ++this._fileEndsLeft; + this.emit( + 'file', + partName, + this._fileStream, + { filename, + encoding: partEncoding, + mimeType: partType } + ); + } else { + // Non-file + + if (fields === fieldsLimit) { + if (!hitFieldsLimit) { + hitFieldsLimit = true; + this.emit('fieldsLimit'); + } + skipPart = true; + return; + } + ++fields; + + if (this.listenerCount('field') === 0) { + skipPart = true; + return; + } + + field = []; + fieldSize = 0; + } + }); + + let matchPostBoundary = 0; + const ssCb = (isMatch, data, start, end, isDataSafe) => { +retrydata: + while (data) { + if (this._hparser !== null) { + const ret = this._hparser.push(data, start, end); + if (ret === -1) { + this._hparser = null; + hparser.reset(); + this.emit('error', new Error('Malformed part header')); + break; + } + start = ret; + } + + if (start === end) + break; + + if (matchPostBoundary !== 0) { + if (matchPostBoundary === 1) { + switch (data[start]) { + case 45: // '-' + // Try matching '--' after boundary + matchPostBoundary = 2; + ++start; + break; + case 13: // '\r' + // Try matching CR LF before header + matchPostBoundary = 3; + ++start; + break; + default: + matchPostBoundary = 0; } - else { - throw err; + if (start === end) + return; + } + + if (matchPostBoundary === 2) { + matchPostBoundary = 0; + if (data[start] === 45/* '-' */) { + // End of multipart data + this._complete = true; + this._bparser = ignoreData; + return; } + // We saw something other than '-', so put the dash we consumed + // "back" + const writecb = this._writecb; + this._writecb = noop; + ssCb(false, BUF_DASH, 0, 1, false); + this._writecb = writecb; + } else if (matchPostBoundary === 3) { + matchPostBoundary = 0; + if (data[start] === 10/* '\n' */) { + ++start; + if (parts >= partsLimit) + break; + // Prepare the header parser + this._hparser = hparser; + if (start === end) + break; + // Process the remaining data as a header + continue retrydata; + } else { + // We saw something other than LF, so put the CR we consumed + // "back" + const writecb = this._writecb; + this._writecb = noop; + ssCb(false, BUF_CR, 0, 1, false); + this._writecb = writecb; + } + } } - } - else { - // use lstat (not following symlinks) - stats = fs.lstatSync(path); - } - return stats; -} -/** - * Recursively finds all paths a given path. Returns an array of paths. - * - * @param findPath path to search - * @param options optional. defaults to { followSymbolicLinks: true }. following soft links is generally appropriate unless deleting files. - * @returns string[] - */ -function find(findPath, options) { - if (!findPath) { - exports.debug('no path specified'); - return []; - } - // normalize the path, otherwise the first result is inconsistently formatted from the rest of the results - // because path.join() performs normalization. - findPath = path.normalize(findPath); - // debug trace the parameters - exports.debug("findPath: '" + findPath + "'"); - options = options || _getDefaultFindOptions(); - _debugFindOptions(options); - // return empty if not exists - try { - fs.lstatSync(findPath); - } - catch (err) { - if (err.code == 'ENOENT') { - exports.debug('0 results'); - return []; - } - throw err; - } - try { - var result = []; - // push the first item - var stack = [new _FindItem(findPath, 1)]; - var traversalChain = []; // used to detect cycles - var _loop_1 = function () { - // pop the next item and push to the result array - var item = stack.pop(); // non-null because `stack.length` was truthy - var stats_2 = void 0; - try { - // `item.path` equals `findPath` for the first item to be processed, when the `result` array is empty - var isPathToSearch = !result.length; - // following specified symlinks only if current path equals specified path - var followSpecifiedSymbolicLink = options.followSpecifiedSymbolicLink && isPathToSearch; - // following all symlinks or following symlink for the specified path - var followSymbolicLink = options.followSymbolicLinks || followSpecifiedSymbolicLink; - // stat the item. The stat info is used further below to determine whether to traverse deeper - stats_2 = _getStats(item.path, followSymbolicLink, options.allowBrokenSymbolicLinks); + + if (!skipPart) { + if (this._fileStream) { + let chunk; + const actualLen = Math.min(end - start, fileSizeLimit - fileSize); + if (!isDataSafe) { + chunk = Buffer.allocUnsafe(actualLen); + data.copy(chunk, 0, start, start + actualLen); + } else { + chunk = data.slice(start, start + actualLen); } - catch (err) { - if (err.code == 'ENOENT' && options.skipMissingFiles) { - exports.warning("No such file or directory: \"" + item.path + "\" - skipping."); - return "continue"; - } - throw err; + + fileSize += chunk.length; + if (fileSize === fileSizeLimit) { + if (chunk.length > 0) + this._fileStream.push(chunk); + this._fileStream.emit('limit'); + this._fileStream.truncated = true; + skipPart = true; + } else if (!this._fileStream.push(chunk)) { + if (this._writecb) + this._fileStream._readcb = this._writecb; + this._writecb = null; } - result.push(item.path); - // note, isDirectory() returns false for the lstat of a symlink - if (stats_2.isDirectory()) { - exports.debug(" " + item.path + " (directory)"); - if (options.followSymbolicLinks) { - // get the realpath - var realPath_1; - if (im._isUncPath(item.path)) { - // Sometimes there are spontaneous issues when working with unc-paths, so retries have been added for them. - realPath_1 = retry(fs.realpathSync, [item.path], { continueOnError: false, retryCount: 5 }); - } - else { - realPath_1 = fs.realpathSync(item.path); - } - // fixup the traversal chain to match the item level - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - // test for a cycle - if (traversalChain.some(function (x) { return x == realPath_1; })) { - exports.debug(' cycle detected'); - return "continue"; - } - // update the traversal chain - traversalChain.push(realPath_1); - } - // push the child items in reverse onto the stack - var childLevel_1 = item.level + 1; - var childItems = fs.readdirSync(item.path) - .map(function (childName) { return new _FindItem(path.join(item.path, childName), childLevel_1); }); - for (var i = childItems.length - 1; i >= 0; i--) { - stack.push(childItems[i]); - } + } else if (field !== undefined) { + let chunk; + const actualLen = Math.min( + end - start, + fieldSizeLimit - fieldSize + ); + if (!isDataSafe) { + chunk = Buffer.allocUnsafe(actualLen); + data.copy(chunk, 0, start, start + actualLen); + } else { + chunk = data.slice(start, start + actualLen); } - else { - exports.debug(" " + item.path + " (file)"); + + fieldSize += actualLen; + field.push(chunk); + if (fieldSize === fieldSizeLimit) { + skipPart = true; + partTruncated = true; } - }; - while (stack.length) { - _loop_1(); + } } - exports.debug(result.length + " results"); - return result; + + break; + } + + if (isMatch) { + matchPostBoundary = 1; + + if (this._fileStream) { + // End the active file stream if the previous part was a file + this._fileStream.push(null); + this._fileStream = null; + } else if (field !== undefined) { + let data; + switch (field.length) { + case 0: + data = ''; + break; + case 1: + data = convertToUTF8(field[0], partCharset, 0); + break; + default: + data = convertToUTF8( + Buffer.concat(field, fieldSize), + partCharset, + 0 + ); + } + field = undefined; + fieldSize = 0; + this.emit( + 'field', + partName, + data, + { nameTruncated: false, + valueTruncated: partTruncated, + encoding: partEncoding, + mimeType: partType } + ); + } + + if (++parts === partsLimit) + this.emit('partsLimit'); + } + }; + this._bparser = new StreamSearch(`\r\n--${boundary}`, ssCb); + + this._writecb = null; + this._finalcb = null; + + // Just in case there is no preamble + this.write(BUF_CRLF); + } + + static detect(conType) { + return (conType.type === 'multipart' && conType.subtype === 'form-data'); + } + + _write(chunk, enc, cb) { + this._writecb = cb; + this._bparser.push(chunk, 0); + if (this._writecb) + callAndUnsetCb(this); + } + + _destroy(err, cb) { + this._hparser = null; + this._bparser = ignoreData; + if (!err) + err = checkEndState(this); + const fileStream = this._fileStream; + if (fileStream) { + this._fileStream = null; + fileStream.destroy(err); } - catch (err) { - throw new Error(exports.loc('LIB_OperationFailed', 'find', err.message)); + cb(err); + } + + _final(cb) { + this._bparser.destroy(); + if (!this._complete) + return cb(new Error('Unexpected end of form')); + if (this._fileEndsLeft) + this._finalcb = finalcb.bind(null, this, cb); + else + finalcb(this, cb); + } +} + +function finalcb(self, cb, err) { + if (err) + return cb(err); + err = checkEndState(self); + cb(err); +} + +function checkEndState(self) { + if (self._hparser) + return new Error('Malformed part header'); + const fileStream = self._fileStream; + if (fileStream) { + self._fileStream = null; + fileStream.destroy(new Error('Unexpected end of file')); + } + if (!self._complete) + return new Error('Unexpected end of form'); +} + +const TOKEN = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +]; + +const FIELD_VCHAR = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +]; + +module.exports = Multipart; + + +/***/ }), + +/***/ 84041: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { Writable } = __nccwpck_require__(12781); + +const { getDecoder } = __nccwpck_require__(61305); + +class URLEncoded extends Writable { + constructor(cfg) { + const streamOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: (typeof cfg.highWaterMark === 'number' + ? cfg.highWaterMark + : undefined), + }; + super(streamOpts); + + let charset = (cfg.defCharset || 'utf8'); + if (cfg.conType.params && typeof cfg.conType.params.charset === 'string') + charset = cfg.conType.params.charset; + + this.charset = charset; + + const limits = cfg.limits; + this.fieldSizeLimit = (limits && typeof limits.fieldSize === 'number' + ? limits.fieldSize + : 1 * 1024 * 1024); + this.fieldsLimit = (limits && typeof limits.fields === 'number' + ? limits.fields + : Infinity); + this.fieldNameSizeLimit = ( + limits && typeof limits.fieldNameSize === 'number' + ? limits.fieldNameSize + : 100 + ); + + this._inKey = true; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + this._fields = 0; + this._key = ''; + this._val = ''; + this._byte = -2; + this._lastPos = 0; + this._encode = 0; + this._decoder = getDecoder(charset); + } + + static detect(conType) { + return (conType.type === 'application' + && conType.subtype === 'x-www-form-urlencoded'); + } + + _write(chunk, enc, cb) { + if (this._fields >= this.fieldsLimit) + return cb(); + + let i = 0; + const len = chunk.length; + this._lastPos = 0; + + // Check if we last ended mid-percent-encoded byte + if (this._byte !== -2) { + i = readPctEnc(this, chunk, i, len); + if (i === -1) + return cb(new Error('Malformed urlencoded form')); + if (i >= len) + return cb(); + if (this._inKey) + ++this._bytesKey; + else + ++this._bytesVal; + } + +main: + while (i < len) { + if (this._inKey) { + // Parsing key + + i = skipKeyBytes(this, chunk, i, len); + + while (i < len) { + switch (chunk[i]) { + case 61: // '=' + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._key = this._decoder(this._key, this._encode); + this._encode = 0; + this._inKey = false; + continue main; + case 38: // '&' + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._key = this._decoder(this._key, this._encode); + this._encode = 0; + if (this._bytesKey > 0) { + this.emit( + 'field', + this._key, + '', + { nameTruncated: this._keyTrunc, + valueTruncated: false, + encoding: this.charset, + mimeType: 'text/plain' } + ); + } + this._key = ''; + this._val = ''; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + if (++this._fields >= this.fieldsLimit) { + this.emit('fieldsLimit'); + return cb(); + } + continue; + case 43: // '+' + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._key += ' '; + this._lastPos = i + 1; + break; + case 37: // '%' + if (this._encode === 0) + this._encode = 1; + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = i + 1; + this._byte = -1; + i = readPctEnc(this, chunk, i + 1, len); + if (i === -1) + return cb(new Error('Malformed urlencoded form')); + if (i >= len) + return cb(); + ++this._bytesKey; + i = skipKeyBytes(this, chunk, i, len); + continue; + } + ++i; + ++this._bytesKey; + i = skipKeyBytes(this, chunk, i, len); + } + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + } else { + // Parsing value + + i = skipValBytes(this, chunk, i, len); + + while (i < len) { + switch (chunk[i]) { + case 38: // '&' + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._inKey = true; + this._val = this._decoder(this._val, this._encode); + this._encode = 0; + if (this._bytesKey > 0 || this._bytesVal > 0) { + this.emit( + 'field', + this._key, + this._val, + { nameTruncated: this._keyTrunc, + valueTruncated: this._valTrunc, + encoding: this.charset, + mimeType: 'text/plain' } + ); + } + this._key = ''; + this._val = ''; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + if (++this._fields >= this.fieldsLimit) { + this.emit('fieldsLimit'); + return cb(); + } + continue main; + case 43: // '+' + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._val += ' '; + this._lastPos = i + 1; + break; + case 37: // '%' + if (this._encode === 0) + this._encode = 1; + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._lastPos = i + 1; + this._byte = -1; + i = readPctEnc(this, chunk, i + 1, len); + if (i === -1) + return cb(new Error('Malformed urlencoded form')); + if (i >= len) + return cb(); + ++this._bytesVal; + i = skipValBytes(this, chunk, i, len); + continue; + } + ++i; + ++this._bytesVal; + i = skipValBytes(this, chunk, i, len); + } + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + } } + + cb(); + } + + _final(cb) { + if (this._byte !== -2) + return cb(new Error('Malformed urlencoded form')); + if (!this._inKey || this._bytesKey > 0 || this._bytesVal > 0) { + if (this._inKey) + this._key = this._decoder(this._key, this._encode); + else + this._val = this._decoder(this._val, this._encode); + this.emit( + 'field', + this._key, + this._val, + { nameTruncated: this._keyTrunc, + valueTruncated: this._valTrunc, + encoding: this.charset, + mimeType: 'text/plain' } + ); + } + cb(); + } } -exports.find = find; -var _FindItem = /** @class */ (function () { - function _FindItem(path, level) { - this.path = path; - this.level = level; + +function readPctEnc(self, chunk, pos, len) { + if (pos >= len) + return len; + + if (self._byte === -1) { + // We saw a '%' but no hex characters yet + const hexUpper = HEX_VALUES[chunk[pos++]]; + if (hexUpper === -1) + return -1; + + if (hexUpper >= 8) + self._encode = 2; // Indicate high bits detected + + if (pos < len) { + // Both hex characters are in this chunk + const hexLower = HEX_VALUES[chunk[pos++]]; + if (hexLower === -1) + return -1; + + if (self._inKey) + self._key += String.fromCharCode((hexUpper << 4) + hexLower); + else + self._val += String.fromCharCode((hexUpper << 4) + hexLower); + + self._byte = -2; + self._lastPos = pos; + } else { + // Only one hex character was available in this chunk + self._byte = hexUpper; } - return _FindItem; -}()); -function _debugFindOptions(options) { - exports.debug("findOptions.allowBrokenSymbolicLinks: '" + options.allowBrokenSymbolicLinks + "'"); - exports.debug("findOptions.followSpecifiedSymbolicLink: '" + options.followSpecifiedSymbolicLink + "'"); - exports.debug("findOptions.followSymbolicLinks: '" + options.followSymbolicLinks + "'"); - exports.debug("findOptions.skipMissingFiles: '" + options.skipMissingFiles + "'"); + } else { + // We saw only one hex character so far + const hexLower = HEX_VALUES[chunk[pos++]]; + if (hexLower === -1) + return -1; + + if (self._inKey) + self._key += String.fromCharCode((self._byte << 4) + hexLower); + else + self._val += String.fromCharCode((self._byte << 4) + hexLower); + + self._byte = -2; + self._lastPos = pos; + } + + return pos; } -function _getDefaultFindOptions() { - return { - allowBrokenSymbolicLinks: false, - followSpecifiedSymbolicLink: true, - followSymbolicLinks: true, - skipMissingFiles: false - }; + +function skipKeyBytes(self, chunk, pos, len) { + // Skip bytes if we've truncated + if (self._bytesKey > self.fieldNameSizeLimit) { + if (!self._keyTrunc) { + if (self._lastPos < pos) + self._key += chunk.latin1Slice(self._lastPos, pos - 1); + } + self._keyTrunc = true; + for (; pos < len; ++pos) { + const code = chunk[pos]; + if (code === 61/* '=' */ || code === 38/* '&' */) + break; + ++self._bytesKey; + } + self._lastPos = pos; + } + + return pos; } -/** - * Prefer tl.find() and tl.match() instead. This function is for backward compatibility - * when porting tasks to Node from the PowerShell or PowerShell3 execution handler. - * - * @param rootDirectory path to root unrooted patterns with - * @param pattern include and exclude patterns - * @param includeFiles whether to include files in the result. defaults to true when includeFiles and includeDirectories are both false - * @param includeDirectories whether to include directories in the result - * @returns string[] - */ -function legacyFindFiles(rootDirectory, pattern, includeFiles, includeDirectories) { - if (!pattern) { - throw new Error('pattern parameter cannot be empty'); + +function skipValBytes(self, chunk, pos, len) { + // Skip bytes if we've truncated + if (self._bytesVal > self.fieldSizeLimit) { + if (!self._valTrunc) { + if (self._lastPos < pos) + self._val += chunk.latin1Slice(self._lastPos, pos - 1); } - exports.debug("legacyFindFiles rootDirectory: '" + rootDirectory + "'"); - exports.debug("pattern: '" + pattern + "'"); - exports.debug("includeFiles: '" + includeFiles + "'"); - exports.debug("includeDirectories: '" + includeDirectories + "'"); - if (!includeFiles && !includeDirectories) { - includeFiles = true; + self._valTrunc = true; + for (; pos < len; ++pos) { + if (chunk[pos] === 38/* '&' */) + break; + ++self._bytesVal; + } + self._lastPos = pos; + } + + return pos; +} + +/* eslint-disable no-multi-spaces */ +const HEX_VALUES = [ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +]; +/* eslint-enable no-multi-spaces */ + +module.exports = URLEncoded; + + +/***/ }), + +/***/ 61305: +/***/ (function(module) { + +"use strict"; + + +function parseContentType(str) { + if (str.length === 0) + return; + + const params = Object.create(null); + let i = 0; + + // Parse type + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code !== 47/* '/' */ || i === 0) + return; + break; } - // organize the patterns into include patterns and exclude patterns - var includePatterns = []; - var excludePatterns = []; - pattern = pattern.replace(/;;/g, '\0'); - for (var _i = 0, _a = pattern.split(';'); _i < _a.length; _i++) { - var pat = _a[_i]; - if (!pat) { - continue; - } - pat = pat.replace(/\0/g, ';'); - // determine whether include pattern and remove any include/exclude prefix. - // include patterns start with +: or anything other than -: - // exclude patterns start with -: - var isIncludePattern = void 0; - if (im._startsWith(pat, '+:')) { - pat = pat.substring(2); - isIncludePattern = true; - } - else if (im._startsWith(pat, '-:')) { - pat = pat.substring(2); - isIncludePattern = false; - } - else { - isIncludePattern = true; - } - // validate pattern does not end with a slash - if (im._endsWith(pat, '/') || (process.platform == 'win32' && im._endsWith(pat, '\\'))) { - throw new Error(exports.loc('LIB_InvalidPattern', pat)); + } + // Check for type without subtype + if (i === str.length) + return; + + const type = str.slice(0, i).toLowerCase(); + + // Parse subtype + const subtypeStart = ++i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + // Make sure we have a subtype + if (i === subtypeStart) + return; + + if (parseContentTypeParams(str, i, params) === undefined) + return; + break; + } + } + // Make sure we have a subtype + if (i === subtypeStart) + return; + + const subtype = str.slice(subtypeStart, i).toLowerCase(); + + return { type, subtype, params }; +} + +function parseContentTypeParams(str, i, params) { + while (i < str.length) { + // Consume whitespace + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) + break; + } + + // Ended on whitespace + if (i === str.length) + break; + + // Check for malformed parameter + if (str.charCodeAt(i++) !== 59/* ';' */) + return; + + // Consume whitespace + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) + break; + } + + // Ended on whitespace (malformed) + if (i === str.length) + return; + + let name; + const nameStart = i; + // Parse parameter name + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code !== 61/* '=' */) + return; + break; + } + } + + // No value (malformed) + if (i === str.length) + return; + + name = str.slice(nameStart, i); + ++i; // Skip over '=' + + // No value (malformed) + if (i === str.length) + return; + + let value = ''; + let valueStart; + if (str.charCodeAt(i) === 34/* '"' */) { + valueStart = ++i; + let escaping = false; + // Parse quoted value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 92/* '\\' */) { + if (escaping) { + valueStart = i; + escaping = false; + } else { + value += str.slice(valueStart, i); + escaping = true; + } + continue; } - // root the pattern - if (rootDirectory && !path.isAbsolute(pat)) { - pat = path.join(rootDirectory, pat); - // remove trailing slash sometimes added by path.join() on Windows, e.g. - // path.join('\\\\hello', 'world') => '\\\\hello\\world\\' - // path.join('//hello', 'world') => '\\\\hello\\world\\' - if (im._endsWith(pat, '\\')) { - pat = pat.substring(0, pat.length - 1); - } + if (code === 34/* '"' */) { + if (escaping) { + valueStart = i; + escaping = false; + continue; + } + value += str.slice(valueStart, i); + break; } - if (isIncludePattern) { - includePatterns.push(pat); + if (escaping) { + valueStart = i - 1; + escaping = false; } - else { - excludePatterns.push(im._legacyFindFiles_convertPatternToRegExp(pat)); + // Invalid unescaped quoted character (malformed) + if (QDTEXT[code] !== 1) + return; + } + + // No end quote (malformed) + if (i === str.length) + return; + + ++i; // Skip over double quote + } else { + valueStart = i; + // Parse unquoted value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + // No value (malformed) + if (i === valueStart) + return; + break; } + } + value = str.slice(valueStart, i); } - // find and apply patterns - var count = 0; - var result = _legacyFindFiles_getMatchingItems(includePatterns, excludePatterns, !!includeFiles, !!includeDirectories); - exports.debug('all matches:'); - for (var _b = 0, result_1 = result; _b < result_1.length; _b++) { - var resultItem = result_1[_b]; - exports.debug(' ' + resultItem); + + name = name.toLowerCase(); + if (params[name] === undefined) + params[name] = value; + } + + return params; +} + +function parseDisposition(str, defDecoder) { + if (str.length === 0) + return; + + const params = Object.create(null); + let i = 0; + + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (parseDispositionParams(str, i, params, defDecoder) === undefined) + return; + break; } - exports.debug('total matched: ' + result.length); - return result; + } + + const type = str.slice(0, i).toLowerCase(); + + return { type, params }; } -exports.legacyFindFiles = legacyFindFiles; -function _legacyFindFiles_getMatchingItems(includePatterns, excludePatterns, includeFiles, includeDirectories) { - exports.debug('getMatchingItems()'); - for (var _i = 0, includePatterns_1 = includePatterns; _i < includePatterns_1.length; _i++) { - var pattern = includePatterns_1[_i]; - exports.debug("includePattern: '" + pattern + "'"); + +function parseDispositionParams(str, i, params, defDecoder) { + while (i < str.length) { + // Consume whitespace + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) + break; } - for (var _a = 0, excludePatterns_1 = excludePatterns; _a < excludePatterns_1.length; _a++) { - var pattern = excludePatterns_1[_a]; - exports.debug("excludePattern: " + pattern); + + // Ended on whitespace + if (i === str.length) + break; + + // Check for malformed parameter + if (str.charCodeAt(i++) !== 59/* ';' */) + return; + + // Consume whitespace + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) + break; } - exports.debug('includeFiles: ' + includeFiles); - exports.debug('includeDirectories: ' + includeDirectories); - var allFiles = {}; - var _loop_2 = function (pattern) { - // determine the directory to search - // - // note, getDirectoryName removes redundant path separators - var findPath = void 0; - var starIndex = pattern.indexOf('*'); - var questionIndex = pattern.indexOf('?'); - if (starIndex < 0 && questionIndex < 0) { - // if no wildcards are found, use the directory name portion of the path. - // if there is no directory name (file name only in pattern or drive root), - // this will return empty string. - findPath = im._getDirectoryName(pattern); - } - else { - // extract the directory prior to the first wildcard - var index = Math.min(starIndex >= 0 ? starIndex : questionIndex, questionIndex >= 0 ? questionIndex : starIndex); - findPath = im._getDirectoryName(pattern.substring(0, index)); - } - // note, due to this short-circuit and the above usage of getDirectoryName, this - // function has the same limitations regarding drive roots as the powershell - // implementation. - // - // also note, since getDirectoryName eliminates slash redundancies, some additional - // work may be required if removal of this limitation is attempted. - if (!findPath) { - return "continue"; - } - var patternRegex = im._legacyFindFiles_convertPatternToRegExp(pattern); - // find files/directories - var items = find(findPath, { followSymbolicLinks: true }) - .filter(function (item) { - if (includeFiles && includeDirectories) { - return true; - } - var isDir = fs.statSync(item).isDirectory(); - return (includeFiles && !isDir) || (includeDirectories && isDir); - }) - .forEach(function (item) { - var normalizedPath = process.platform == 'win32' ? item.replace(/\\/g, '/') : item; // normalize separators - // **/times/** will not match C:/fun/times because there isn't a trailing slash - // so try both if including directories - var alternatePath = normalizedPath + "/"; // potential bug: it looks like this will result in a false - // positive if the item is a regular file and not a directory - var isMatch = false; - if (patternRegex.test(normalizedPath) || (includeDirectories && patternRegex.test(alternatePath))) { - isMatch = true; - // test whether the path should be excluded - for (var _i = 0, excludePatterns_2 = excludePatterns; _i < excludePatterns_2.length; _i++) { - var regex = excludePatterns_2[_i]; - if (regex.test(normalizedPath) || (includeDirectories && regex.test(alternatePath))) { - isMatch = false; - break; - } - } - } - if (isMatch) { - allFiles[item] = item; - } - }); - }; - for (var _b = 0, includePatterns_2 = includePatterns; _b < includePatterns_2.length; _b++) { - var pattern = includePatterns_2[_b]; - _loop_2(pattern); + + // Ended on whitespace (malformed) + if (i === str.length) + return; + + let name; + const nameStart = i; + // Parse parameter name + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code === 61/* '=' */) + break; + return; + } } - return Object.keys(allFiles).sort(); -} -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - * @throws when the file or directory exists but could not be deleted. - */ -function rmRF(inputPath) { - exports.debug('rm -rf ' + inputPath); - if (getPlatform() == Platform.Windows) { - // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another - // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. - try { - if (fs.statSync(inputPath).isDirectory()) { - exports.debug('removing directory ' + inputPath); - childProcess.execSync("rd /s /q \"" + inputPath + "\""); - } - else { - exports.debug('removing file ' + inputPath); - childProcess.execSync("del /f /a \"" + inputPath + "\""); - } - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code != 'ENOENT') { - throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message)); - } - } - // Shelling out fails to remove a symlink folder with missing source, this unlink catches that - try { - fs.unlinkSync(inputPath); + + // No value (malformed) + if (i === str.length) + return; + + let value = ''; + let valueStart; + let charset; + //~ let lang; + name = str.slice(nameStart, i); + if (name.charCodeAt(name.length - 1) === 42/* '*' */) { + // Extended value + + const charsetStart = ++i; + // Parse charset name + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (CHARSET[code] !== 1) { + if (code !== 39/* '\'' */) + return; + break; } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code != 'ENOENT') { - throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message)); + } + + // Incomplete charset (malformed) + if (i === str.length) + return; + + charset = str.slice(charsetStart, i); + ++i; // Skip over the '\'' + + //~ const langStart = ++i; + // Parse language name + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 39/* '\'' */) + break; + } + + // Incomplete language (malformed) + if (i === str.length) + return; + + //~ lang = str.slice(langStart, i); + ++i; // Skip over the '\'' + + // No value (malformed) + if (i === str.length) + return; + + valueStart = i; + + let encode = 0; + // Parse value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (EXTENDED_VALUE[code] !== 1) { + if (code === 37/* '%' */) { + let hexUpper; + let hexLower; + if (i + 2 < str.length + && (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1 + && (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) { + const byteVal = (hexUpper << 4) + hexLower; + value += str.slice(valueStart, i); + value += String.fromCharCode(byteVal); + i += 2; + valueStart = i + 1; + if (byteVal >= 128) + encode = 2; + else if (encode === 0) + encode = 1; + continue; } + // '%' disallowed in non-percent encoded contexts (malformed) + return; + } + break; } - } - else { - // get the lstats in order to workaround a bug in shelljs@0.3.0 where symlinks - // with missing targets are not handled correctly by "rm('-rf', path)" - var lstats = void 0; - try { - lstats = fs.lstatSync(inputPath); - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code == 'ENOENT') { - return; + } + + value += str.slice(valueStart, i); + value = convertToUTF8(value, charset, encode); + if (value === undefined) + return; + } else { + // Non-extended value + + ++i; // Skip over '=' + + // No value (malformed) + if (i === str.length) + return; + + if (str.charCodeAt(i) === 34/* '"' */) { + valueStart = ++i; + let escaping = false; + // Parse quoted value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 92/* '\\' */) { + if (escaping) { + valueStart = i; + escaping = false; + } else { + value += str.slice(valueStart, i); + escaping = true; } - throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message)); - } - if (lstats.isDirectory()) { - exports.debug('removing directory'); - shell.rm('-rf', inputPath); - var errMsg = shell.error(); - if (errMsg) { - throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', errMsg)); + continue; + } + if (code === 34/* '"' */) { + if (escaping) { + valueStart = i; + escaping = false; + continue; } + value += str.slice(valueStart, i); + break; + } + if (escaping) { + valueStart = i - 1; + escaping = false; + } + // Invalid unescaped quoted character (malformed) + if (QDTEXT[code] !== 1) return; } - exports.debug('removing file'); - try { - fs.unlinkSync(inputPath); + + // No end quote (malformed) + if (i === str.length) + return; + + ++i; // Skip over double quote + } else { + valueStart = i; + // Parse unquoted value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + // No value (malformed) + if (i === valueStart) + return; + break; + } } - catch (err) { - throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message)); + value = str.slice(valueStart, i); + } + + value = defDecoder(value, 2); + if (value === undefined) + return; + } + + name = name.toLowerCase(); + if (params[name] === undefined) + params[name] = value; + } + + return params; +} + +function getDecoder(charset) { + let lc; + while (true) { + switch (charset) { + case 'utf-8': + case 'utf8': + return decoders.utf8; + case 'latin1': + case 'ascii': // TODO: Make these a separate, strict decoder? + case 'us-ascii': + case 'iso-8859-1': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'windows-1252': + case 'iso_8859-1:1987': + case 'cp1252': + case 'x-cp1252': + return decoders.latin1; + case 'utf16le': + case 'utf-16le': + case 'ucs2': + case 'ucs-2': + return decoders.utf16le; + case 'base64': + return decoders.base64; + default: + if (lc === undefined) { + lc = true; + charset = charset.toLowerCase(); + continue; } + return decoders.other.bind(charset); + } + } +} + +const decoders = { + utf8: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') { + // If `data` never had any percent-encoded bytes or never had any that + // were outside of the ASCII range, then we can safely just return the + // input since UTF-8 is ASCII compatible + if (hint < 2) + return data; + + data = Buffer.from(data, 'latin1'); + } + return data.utf8Slice(0, data.length); + }, + + latin1: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') + return data; + return data.latin1Slice(0, data.length); + }, + + utf16le: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') + data = Buffer.from(data, 'latin1'); + return data.ucs2Slice(0, data.length); + }, + + base64: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') + data = Buffer.from(data, 'latin1'); + return data.base64Slice(0, data.length); + }, + + other: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') + data = Buffer.from(data, 'latin1'); + try { + const decoder = new TextDecoder(this); + return decoder.decode(data); + } catch {} + }, +}; + +function convertToUTF8(data, charset, hint) { + const decode = getDecoder(charset); + if (decode) + return decode(data, hint); +} + +function basename(path) { + if (typeof path !== 'string') + return ''; + for (let i = path.length - 1; i >= 0; --i) { + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1); + return (path === '..' || path === '.' ? '' : path); + } + } + return (path === '..' || path === '.' ? '' : path); +} + +const TOKEN = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +]; + +const QDTEXT = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +]; + +const CHARSET = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +]; + +const EXTENDED_VALUE = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +]; + +/* eslint-disable no-multi-spaces */ +const HEX_VALUES = [ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +]; +/* eslint-enable no-multi-spaces */ + +module.exports = { + basename, + convertToUTF8, + getDecoder, + parseContentType, + parseDisposition, +}; + + +/***/ }), + +/***/ 28803: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(74538); + +var callBind = __nccwpck_require__(62977); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 62977: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bind = __nccwpck_require__(88334); +var GetIntrinsic = __nccwpck_require__(74538); + +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 27972: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const os = __nccwpck_require__(22037); + +const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; +const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; +const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); + +module.exports = (stack, options) => { + options = Object.assign({pretty: false}, options); + + return stack.replace(/\\/g, '/') + .split('\n') + .filter(line => { + const pathMatches = line.match(extractPathRegex); + if (pathMatches === null || !pathMatches[1]) { + return true; + } + + const match = pathMatches[1]; + + // Electron + if ( + match.includes('.app/Contents/Resources/electron.asar') || + match.includes('.app/Contents/Resources/default_app.asar') + ) { + return false; + } + + return !pathRegex.test(match); + }) + .filter(line => line.trim() !== '') + .map(line => { + if (options.pretty) { + return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); + } + + return line; + }) + .join('\n'); +}; + + +/***/ }), + +/***/ 85443: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(73837); +var Stream = (__nccwpck_require__(12781).Stream); +var DelayedStream = __nccwpck_require__(18611); + +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); + +CombinedStream.create = function(options) { + var combinedStream = new this(); + + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + + return combinedStream; +}; + +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; + +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } + + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); + } + } + + this._streams.push(stream); + return this; +}; + +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call + } + + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } +}; + +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); + + + if (typeof stream == 'undefined') { + this.end(); + return; + } + + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } + + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } + + this._pipeNext(stream); + }.bind(this)); +}; + +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; + + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } + + var value = stream; + this.write(value); + this._getNext(); +}; + +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; + +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; + +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; + +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; + +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; + +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; + +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; + +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; } -} -exports.rmRF = rmRF; + + self.dataSize += stream.dataSize; + }); + + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; + +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; + + +/***/ }), + +/***/ 86891: +/***/ ((module) => { + +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + + +/***/ }), + +/***/ 28222: +/***/ ((module, exports, __nccwpck_require__) => { + +/* eslint-env browser */ + /** - * Exec a tool. Convenience wrapper over ToolRunner to exec with args in one call. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param args an arg string or array of args - * @param options optional exec options. See IExecOptions - * @returns number + * This is the web browser implementation of `debug()`. */ -function exec(tool, args, options) { - var tr = this.tool(tool); - tr.on('debug', function (data) { - exports.debug(data); - }); - if (args) { - if (args instanceof Array) { - tr.arg(args); - } - else if (typeof (args) === 'string') { - tr.line(args); - } - } - return tr.exec(options); -} -exports.exec = exec; + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + /** - * Exec a tool synchronously. Convenience wrapper over ToolRunner to execSync with args in one call. - * Output will be *not* be streamed to the live console. It will be returned after execution is complete. - * Appropriate for short running tools - * Returns IExecResult with output and return code - * - * @param tool path to tool to exec - * @param args an arg string or array of args - * @param options optional exec options. See IExecSyncOptions - * @returns IExecSyncResult + * Colors. */ -function execSync(tool, args, options) { - var tr = this.tool(tool); - tr.on('debug', function (data) { - exports.debug(data); - }); - if (args) { - if (args instanceof Array) { - tr.arg(args); - } - else if (typeof (args) === 'string') { - tr.line(args); - } - } - return tr.execSync(options); -} -exports.execSync = execSync; + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + /** - * Convenience factory to create a ToolRunner. + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. * - * @param tool path to tool to exec - * @returns ToolRunner + * TODO: add a `localStorage` variable to explicitly enable/disable colors */ -function tool(tool) { - var tr = new trm.ToolRunner(tool); - tr.on('debug', function (message) { - exports.debug(message); - }); - return tr; + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); } -exports.tool = tool; + /** - * Applies glob patterns to a list of paths. Supports interleaved exclude patterns. + * Colorize log arguments if enabled. * - * @param list array of paths - * @param patterns patterns to apply. supports interleaved exclude patterns. - * @param patternRoot optional. default root to apply to unrooted patterns. not applied to basename-only patterns when matchBase:true. - * @param options optional. defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' }. + * @api public */ -function match(list, patterns, patternRoot, options) { - // trace parameters - exports.debug("patternRoot: '" + patternRoot + "'"); - options = options || _getDefaultMatchOptions(); // default match options - _debugMatchOptions(options); - // convert pattern to an array - if (typeof patterns == 'string') { - patterns = [patterns]; - } - // hashtable to keep track of matches - var map = {}; - var originalOptions = options; - for (var _i = 0, patterns_1 = patterns; _i < patterns_1.length; _i++) { - var pattern = patterns_1[_i]; - exports.debug("pattern: '" + pattern + "'"); - // trim and skip empty - pattern = (pattern || '').trim(); - if (!pattern) { - exports.debug('skipping empty pattern'); - continue; - } - // clone match options - var options_1 = im._cloneMatchOptions(originalOptions); - // skip comments - if (!options_1.nocomment && im._startsWith(pattern, '#')) { - exports.debug('skipping comment'); - continue; - } - // set nocomment - brace expansion could result in a leading '#' - options_1.nocomment = true; - // determine whether pattern is include or exclude - var negateCount = 0; - if (!options_1.nonegate) { - while (pattern.charAt(negateCount) == '!') { - negateCount++; - } - pattern = pattern.substring(negateCount); // trim leading '!' - if (negateCount) { - exports.debug("trimmed leading '!'. pattern: '" + pattern + "'"); - } - } - var isIncludePattern = negateCount == 0 || - (negateCount % 2 == 0 && !options_1.flipNegate) || - (negateCount % 2 == 1 && options_1.flipNegate); - // set nonegate - brace expansion could result in a leading '!' - options_1.nonegate = true; - options_1.flipNegate = false; - // expand braces - required to accurately root patterns - var expanded = void 0; - var preExpanded = pattern; - if (options_1.nobrace) { - expanded = [pattern]; - } - else { - // convert slashes on Windows before calling braceExpand(). unfortunately this means braces cannot - // be escaped on Windows, this limitation is consistent with current limitations of minimatch (3.0.3). - exports.debug('expanding braces'); - var convertedPattern = process.platform == 'win32' ? pattern.replace(/\\/g, '/') : pattern; - expanded = minimatch.braceExpand(convertedPattern); - } - // set nobrace - options_1.nobrace = true; - for (var _a = 0, expanded_1 = expanded; _a < expanded_1.length; _a++) { - var pattern_1 = expanded_1[_a]; - if (expanded.length != 1 || pattern_1 != preExpanded) { - exports.debug("pattern: '" + pattern_1 + "'"); - } - // trim and skip empty - pattern_1 = (pattern_1 || '').trim(); - if (!pattern_1) { - exports.debug('skipping empty pattern'); - continue; - } - // root the pattern when all of the following conditions are true: - if (patternRoot && // patternRoot supplied - !im._isRooted(pattern_1) && // AND pattern not rooted - // AND matchBase:false or not basename only - (!options_1.matchBase || (process.platform == 'win32' ? pattern_1.replace(/\\/g, '/') : pattern_1).indexOf('/') >= 0)) { - pattern_1 = im._ensureRooted(patternRoot, pattern_1); - exports.debug("rooted pattern: '" + pattern_1 + "'"); - } - if (isIncludePattern) { - // apply the pattern - exports.debug('applying include pattern against original list'); - var matchResults = minimatch.match(list, pattern_1, options_1); - exports.debug(matchResults.length + ' matches'); - // union the results - for (var _b = 0, matchResults_1 = matchResults; _b < matchResults_1.length; _b++) { - var matchResult = matchResults_1[_b]; - map[matchResult] = true; - } - } - else { - // apply the pattern - exports.debug('applying exclude pattern against original list'); - var matchResults = minimatch.match(list, pattern_1, options_1); - exports.debug(matchResults.length + ' matches'); - // substract the results - for (var _c = 0, matchResults_2 = matchResults; _c < matchResults_2.length; _c++) { - var matchResult = matchResults_2[_c]; - delete map[matchResult]; - } - } - } - } - // return a filtered version of the original list (preserves order and prevents duplication) - var result = list.filter(function (item) { return map.hasOwnProperty(item); }); - exports.debug(result.length + ' final results'); - return result; + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); } -exports.match = match; + /** - * Filter to apply glob patterns + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. * - * @param pattern pattern to apply - * @param options optional. defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' }. + * @api public */ -function filter(pattern, options) { - options = options || _getDefaultMatchOptions(); - return minimatch.filter(pattern, options); -} -exports.filter = filter; -function _debugMatchOptions(options) { - exports.debug("matchOptions.debug: '" + options.debug + "'"); - exports.debug("matchOptions.nobrace: '" + options.nobrace + "'"); - exports.debug("matchOptions.noglobstar: '" + options.noglobstar + "'"); - exports.debug("matchOptions.dot: '" + options.dot + "'"); - exports.debug("matchOptions.noext: '" + options.noext + "'"); - exports.debug("matchOptions.nocase: '" + options.nocase + "'"); - exports.debug("matchOptions.nonull: '" + options.nonull + "'"); - exports.debug("matchOptions.matchBase: '" + options.matchBase + "'"); - exports.debug("matchOptions.nocomment: '" + options.nocomment + "'"); - exports.debug("matchOptions.nonegate: '" + options.nonegate + "'"); - exports.debug("matchOptions.flipNegate: '" + options.flipNegate + "'"); -} -function _getDefaultMatchOptions() { - return { - debug: false, - nobrace: true, - noglobstar: false, - dot: true, - noext: false, - nocase: process.platform == 'win32', - nonull: false, - matchBase: false, - nocomment: false, - nonegate: false, - flipNegate: false - }; -} +exports.log = console.debug || console.log || (() => {}); + /** - * Determines the find root from a list of patterns. Performs the find and then applies the glob patterns. - * Supports interleaved exclude patterns. Unrooted patterns are rooted using defaultRoot, unless - * matchOptions.matchBase is specified and the pattern is a basename only. For matchBase cases, the - * defaultRoot is used as the find root. + * Save `namespaces`. * - * @param defaultRoot default path to root unrooted patterns. falls back to System.DefaultWorkingDirectory or process.cwd(). - * @param patterns pattern or array of patterns to apply - * @param findOptions defaults to { followSymbolicLinks: true }. following soft links is generally appropriate unless deleting files. - * @param matchOptions defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' } + * @param {String} namespaces + * @api private */ -function findMatch(defaultRoot, patterns, findOptions, matchOptions) { - // apply defaults for parameters and trace - defaultRoot = defaultRoot || this.getVariable('system.defaultWorkingDirectory') || process.cwd(); - exports.debug("defaultRoot: '" + defaultRoot + "'"); - patterns = patterns || []; - patterns = typeof patterns == 'string' ? [patterns] : patterns; - findOptions = findOptions || _getDefaultFindOptions(); - _debugFindOptions(findOptions); - matchOptions = matchOptions || _getDefaultMatchOptions(); - _debugMatchOptions(matchOptions); - // normalize slashes for root dir - defaultRoot = im._normalizeSeparators(defaultRoot); - var results = {}; - var originalMatchOptions = matchOptions; - for (var _i = 0, _a = (patterns || []); _i < _a.length; _i++) { - var pattern = _a[_i]; - exports.debug("pattern: '" + pattern + "'"); - // trim and skip empty - pattern = (pattern || '').trim(); - if (!pattern) { - exports.debug('skipping empty pattern'); - continue; - } - // clone match options - var matchOptions_1 = im._cloneMatchOptions(originalMatchOptions); - // skip comments - if (!matchOptions_1.nocomment && im._startsWith(pattern, '#')) { - exports.debug('skipping comment'); - continue; - } - // set nocomment - brace expansion could result in a leading '#' - matchOptions_1.nocomment = true; - // determine whether pattern is include or exclude - var negateCount = 0; - if (!matchOptions_1.nonegate) { - while (pattern.charAt(negateCount) == '!') { - negateCount++; - } - pattern = pattern.substring(negateCount); // trim leading '!' - if (negateCount) { - exports.debug("trimmed leading '!'. pattern: '" + pattern + "'"); - } - } - var isIncludePattern = negateCount == 0 || - (negateCount % 2 == 0 && !matchOptions_1.flipNegate) || - (negateCount % 2 == 1 && matchOptions_1.flipNegate); - // set nonegate - brace expansion could result in a leading '!' - matchOptions_1.nonegate = true; - matchOptions_1.flipNegate = false; - // expand braces - required to accurately interpret findPath - var expanded = void 0; - var preExpanded = pattern; - if (matchOptions_1.nobrace) { - expanded = [pattern]; - } - else { - // convert slashes on Windows before calling braceExpand(). unfortunately this means braces cannot - // be escaped on Windows, this limitation is consistent with current limitations of minimatch (3.0.3). - exports.debug('expanding braces'); - var convertedPattern = process.platform == 'win32' ? pattern.replace(/\\/g, '/') : pattern; - expanded = minimatch.braceExpand(convertedPattern); - } - // set nobrace - matchOptions_1.nobrace = true; - for (var _b = 0, expanded_2 = expanded; _b < expanded_2.length; _b++) { - var pattern_2 = expanded_2[_b]; - if (expanded.length != 1 || pattern_2 != preExpanded) { - exports.debug("pattern: '" + pattern_2 + "'"); - } - // trim and skip empty - pattern_2 = (pattern_2 || '').trim(); - if (!pattern_2) { - exports.debug('skipping empty pattern'); - continue; - } - if (isIncludePattern) { - // determine the findPath - var findInfo = im._getFindInfoFromPattern(defaultRoot, pattern_2, matchOptions_1); - var findPath = findInfo.findPath; - exports.debug("findPath: '" + findPath + "'"); - if (!findPath) { - exports.debug('skipping empty path'); - continue; - } - // perform the find - exports.debug("statOnly: '" + findInfo.statOnly + "'"); - var findResults = []; - if (findInfo.statOnly) { - // simply stat the path - all path segments were used to build the path - try { - fs.statSync(findPath); - findResults.push(findPath); - } - catch (err) { - if (err.code != 'ENOENT') { - throw err; - } - exports.debug('ENOENT'); - } - } - else { - findResults = find(findPath, findOptions); - } - exports.debug("found " + findResults.length + " paths"); - // apply the pattern - exports.debug('applying include pattern'); - if (findInfo.adjustedPattern != pattern_2) { - exports.debug("adjustedPattern: '" + findInfo.adjustedPattern + "'"); - pattern_2 = findInfo.adjustedPattern; - } - var matchResults = minimatch.match(findResults, pattern_2, matchOptions_1); - exports.debug(matchResults.length + ' matches'); - // union the results - for (var _c = 0, matchResults_3 = matchResults; _c < matchResults_3.length; _c++) { - var matchResult = matchResults_3[_c]; - var key = process.platform == 'win32' ? matchResult.toUpperCase() : matchResult; - results[key] = matchResult; - } - } - else { - // check if basename only and matchBase=true - if (matchOptions_1.matchBase && - !im._isRooted(pattern_2) && - (process.platform == 'win32' ? pattern_2.replace(/\\/g, '/') : pattern_2).indexOf('/') < 0) { - // do not root the pattern - exports.debug('matchBase and basename only'); - } - else { - // root the exclude pattern - pattern_2 = im._ensurePatternRooted(defaultRoot, pattern_2); - exports.debug("after ensurePatternRooted, pattern: '" + pattern_2 + "'"); - } - // apply the pattern - exports.debug('applying exclude pattern'); - var matchResults = minimatch.match(Object.keys(results).map(function (key) { return results[key]; }), pattern_2, matchOptions_1); - exports.debug(matchResults.length + ' matches'); - // substract the results - for (var _d = 0, matchResults_4 = matchResults; _d < matchResults_4.length; _d++) { - var matchResult = matchResults_4[_d]; - var key = process.platform == 'win32' ? matchResult.toUpperCase() : matchResult; - delete results[key]; - } - } - } - } - var finalResult = Object.keys(results) - .map(function (key) { return results[key]; }) - .sort(); - exports.debug(finalResult.length + ' final results'); - return finalResult; +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } -exports.findMatch = findMatch; + /** - * Build Proxy URL in the following format: protocol://username:password@hostname:port - * @param proxyUrl Url address of the proxy server (eg: http://example.com) - * @param proxyUsername Proxy username (optional) - * @param proxyPassword Proxy password (optional) - * @returns string + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private */ -function getProxyFormattedUrl(proxyUrl, proxyUsername, proxyPassword) { - var parsedUrl = new URL(proxyUrl); - var proxyAddress = parsedUrl.protocol + "//" + parsedUrl.host; - if (proxyUsername) { - proxyAddress = parsedUrl.protocol + "//" + proxyUsername + ":" + proxyPassword + "@" + parsedUrl.host; - } - return proxyAddress; +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; } + /** - * Gets http proxy configuration used by Build/Release agent + * Localstorage attempts to return the localstorage. * - * @return ProxyConfiguration + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private */ -function getHttpProxyConfiguration(requestUrl) { - var proxyUrl = exports.getVariable('Agent.ProxyUrl'); - if (proxyUrl && proxyUrl.length > 0) { - var proxyUsername = exports.getVariable('Agent.ProxyUsername'); - var proxyPassword = exports.getVariable('Agent.ProxyPassword'); - var proxyBypassHosts = JSON.parse(exports.getVariable('Agent.ProxyBypassList') || '[]'); - var bypass_1 = false; - if (requestUrl) { - proxyBypassHosts.forEach(function (bypassHost) { - if (new RegExp(bypassHost, 'i').test(requestUrl)) { - bypass_1 = true; - } - }); - } - if (bypass_1) { - return null; - } - else { - var proxyAddress = getProxyFormattedUrl(proxyUrl, proxyUsername, proxyPassword); - return { - proxyUrl: proxyUrl, - proxyUsername: proxyUsername, - proxyPassword: proxyPassword, - proxyBypassHosts: proxyBypassHosts, - proxyFormattedUrl: proxyAddress - }; - } - } - else { - return null; - } + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } -exports.getHttpProxyConfiguration = getHttpProxyConfiguration; + +module.exports = __nccwpck_require__(46243)(exports); + +const {formatters} = module.exports; + /** - * Gets http certificate configuration used by Build/Release agent - * - * @return CertConfiguration + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ -function getHttpCertConfiguration() { - var ca = exports.getVariable('Agent.CAInfo'); - var clientCert = exports.getVariable('Agent.ClientCert'); - if (ca || clientCert) { - var certConfig = {}; - certConfig.caFile = ca; - certConfig.certFile = clientCert; - if (clientCert) { - var clientCertKey = exports.getVariable('Agent.ClientCertKey'); - var clientCertArchive = exports.getVariable('Agent.ClientCertArchive'); - var clientCertPassword = exports.getVariable('Agent.ClientCertPassword'); - certConfig.keyFile = clientCertKey; - certConfig.certArchiveFile = clientCertArchive; - certConfig.passphrase = clientCertPassword; - } - return certConfig; - } - else { - return null; - } -} -exports.getHttpCertConfiguration = getHttpCertConfiguration; -//----------------------------------------------------- -// Test Publisher -//----------------------------------------------------- -var TestPublisher = /** @class */ (function () { - function TestPublisher(testRunner) { - this.testRunner = testRunner; - } - TestPublisher.prototype.publish = function (resultFiles, mergeResults, platform, config, runTitle, publishRunAttachments, testRunSystem) { - // Could have used an initializer, but wanted to avoid reordering parameters when converting to strict null checks - // (A parameter cannot both be optional and have an initializer) - testRunSystem = testRunSystem || "VSTSTask"; - var properties = {}; - properties['type'] = this.testRunner; - if (mergeResults) { - properties['mergeResults'] = mergeResults; - } - if (platform) { - properties['platform'] = platform; - } - if (config) { - properties['config'] = config; - } - if (runTitle) { - properties['runTitle'] = runTitle; - } - if (publishRunAttachments) { - properties['publishRunAttachments'] = publishRunAttachments; - } - if (resultFiles) { - properties['resultFiles'] = Array.isArray(resultFiles) ? resultFiles.join() : resultFiles; - } - properties['testRunSystem'] = testRunSystem; - exports.command('results.publish', properties, ''); - }; - return TestPublisher; -}()); -exports.TestPublisher = TestPublisher; -//----------------------------------------------------- -// Code coverage Publisher -//----------------------------------------------------- -var CodeCoveragePublisher = /** @class */ (function () { - function CodeCoveragePublisher() { - } - CodeCoveragePublisher.prototype.publish = function (codeCoverageTool, summaryFileLocation, reportDirectory, additionalCodeCoverageFiles) { - var properties = {}; - if (codeCoverageTool) { - properties['codecoveragetool'] = codeCoverageTool; - } - if (summaryFileLocation) { - properties['summaryfile'] = summaryFileLocation; - } - if (reportDirectory) { - properties['reportdirectory'] = reportDirectory; - } - if (additionalCodeCoverageFiles) { - properties['additionalcodecoveragefiles'] = Array.isArray(additionalCodeCoverageFiles) ? additionalCodeCoverageFiles.join() : additionalCodeCoverageFiles; - } - exports.command('codecoverage.publish', properties, ""); - }; - return CodeCoveragePublisher; -}()); -exports.CodeCoveragePublisher = CodeCoveragePublisher; -//----------------------------------------------------- -// Code coverage Publisher -//----------------------------------------------------- -var CodeCoverageEnabler = /** @class */ (function () { - function CodeCoverageEnabler(buildTool, ccTool) { - this.buildTool = buildTool; - this.ccTool = ccTool; - } - CodeCoverageEnabler.prototype.enableCodeCoverage = function (buildProps) { - buildProps['buildtool'] = this.buildTool; - buildProps['codecoveragetool'] = this.ccTool; - exports.command('codecoverage.enable', buildProps, ""); - }; - return CodeCoverageEnabler; -}()); -exports.CodeCoverageEnabler = CodeCoverageEnabler; -//----------------------------------------------------- -// Task Logging Commands -//----------------------------------------------------- + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; + + +/***/ }), + +/***/ 46243: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + /** - * Upload user interested file as additional log information - * to the current timeline record. - * - * The file shall be available for download along with task logs. - * - * @param path Path to the file that should be uploaded. - * @returns void + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. */ -function uploadFile(path) { - exports.command("task.uploadfile", null, path); + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __nccwpck_require__(80900); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; } -exports.uploadFile = uploadFile; + +module.exports = setup; + + +/***/ }), + +/***/ 38237: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** - * Instruction for the agent to update the PATH environment variable. - * The specified directory is prepended to the PATH. - * The updated environment variable will be reflected in subsequent tasks. - * - * @param path Local directory path. - * @returns void + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. */ -function prependPath(path) { - assertAgent("2.115.0"); - exports.command("task.prependpath", null, path); + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = __nccwpck_require__(28222); +} else { + module.exports = __nccwpck_require__(35332); } -exports.prependPath = prependPath; + + +/***/ }), + +/***/ 35332: +/***/ ((module, exports, __nccwpck_require__) => { + /** - * Upload and attach summary markdown to current timeline record. - * This summary shall be added to the build/release summary and - * not available for download with logs. - * - * @param path Local directory path. - * @returns void + * Module dependencies. */ -function uploadSummary(path) { - exports.command("task.uploadsummary", null, path); -} -exports.uploadSummary = uploadSummary; + +const tty = __nccwpck_require__(76224); +const util = __nccwpck_require__(73837); + /** - * Upload and attach attachment to current timeline record. - * These files are not available for download with logs. - * These can only be referred to by extensions using the type or name values. - * - * @param type Attachment type. - * @param name Attachment name. - * @param path Attachment path. - * @returns void + * This is the Node.js implementation of `debug()`. */ -function addAttachment(type, name, path) { - exports.command("task.addattachment", { "type": type, "name": name }, path); -} -exports.addAttachment = addAttachment; + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + /** - * Set an endpoint field with given value. - * Value updated will be retained in the endpoint for - * the subsequent tasks that execute within the same job. - * - * @param id Endpoint id. - * @param field FieldType enum of AuthParameter, DataParameter or Url. - * @param key Key. - * @param value Value for key or url. - * @returns void + * Colors. */ -function setEndpoint(id, field, key, value) { - exports.command("task.setendpoint", { "id": id, "field": FieldType[field].toLowerCase(), "key": key }, value); + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = __nccwpck_require__(59318); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. } -exports.setEndpoint = setEndpoint; + /** - * Set progress and current operation for current task. + * Build up the default `inspectOpts` object from the environment variables. * - * @param percent Percentage of completion. - * @param currentOperation Current pperation. - * @returns void + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ -function setProgress(percent, currentOperation) { - exports.command("task.setprogress", { "value": "" + percent }, currentOperation); -} -exports.setProgress = setProgress; + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + /** - * Indicates whether to write the logging command directly to the host or to the output pipeline. - * - * @param id Timeline record Guid. - * @param parentId Parent timeline record Guid. - * @param recordType Record type. - * @param recordName Record name. - * @param order Order of timeline record. - * @param startTime Start time. - * @param finishTime End time. - * @param progress Percentage of completion. - * @param state TaskState enum of Unknown, Initialized, InProgress or Completed. - * @param result TaskResult enum of Succeeded, SucceededWithIssues, Failed, Cancelled or Skipped. - * @param message current operation - * @returns void + * Is stdout a TTY? Colored output is enabled when `true`. */ -function logDetail(id, message, parentId, recordType, recordName, order, startTime, finishTime, progress, state, result) { - var properties = { - "id": id, - "parentid": parentId, - "type": recordType, - "name": recordName, - "order": order ? order.toString() : undefined, - "starttime": startTime, - "finishtime": finishTime, - "progress": progress ? progress.toString() : undefined, - "state": state ? TaskState[state] : undefined, - "result": result ? TaskResult[result] : undefined - }; - exports.command("task.logdetail", properties, message); + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); } -exports.logDetail = logDetail; + /** - * Log error or warning issue to timeline record of current task. + * Adds ANSI color escape codes if enabled. * - * @param type IssueType enum of Error or Warning. - * @param sourcePath Source file location. - * @param lineNumber Line number. - * @param columnNumber Column number. - * @param code Error or warning code. - * @param message Error or warning message. - * @returns void + * @api public */ -function logIssue(type, message, sourcePath, lineNumber, columnNumber, errorCode) { - var properties = { - "type": IssueType[type].toLowerCase(), - "code": errorCode, - "sourcepath": sourcePath, - "linenumber": lineNumber ? lineNumber.toString() : undefined, - "columnnumber": columnNumber ? columnNumber.toString() : undefined, - }; - exports.command("task.logissue", properties, message); + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } } -exports.logIssue = logIssue; -//----------------------------------------------------- -// Artifact Logging Commands -//----------------------------------------------------- + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + /** - * Upload user interested file as additional log information - * to the current timeline record. - * - * The file shall be available for download along with task logs. - * - * @param containerFolder Folder that the file will upload to, folder will be created if needed. - * @param path Path to the file that should be uploaded. - * @param name Artifact name. - * @returns void + * Invokes `util.format()` with the specified arguments and writes to stderr. */ -function uploadArtifact(containerFolder, path, name) { - exports.command("artifact.upload", { "containerfolder": containerFolder, "artifactname": name }, path); + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); } -exports.uploadArtifact = uploadArtifact; + /** - * Create an artifact link, artifact location is required to be - * a file container path, VC path or UNC share path. - * - * The file shall be available for download along with task logs. + * Save `namespaces`. * - * @param name Artifact name. - * @param path Path to the file that should be associated. - * @param artifactType ArtifactType enum of Container, FilePath, VersionControl, GitRef or TfvcLabel. - * @returns void + * @param {String} namespaces + * @api private */ -function associateArtifact(name, path, artifactType) { - exports.command("artifact.associate", { "type": ArtifactType[artifactType].toLowerCase(), "artifactname": name }, path); +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } } -exports.associateArtifact = associateArtifact; -//----------------------------------------------------- -// Build Logging Commands -//----------------------------------------------------- + /** - * Upload user interested log to build’s container “logs\tool” folder. + * Load `namespaces`. * - * @param path Path to the file that should be uploaded. - * @returns void + * @return {String} returns the previously persisted debug modes + * @api private */ -function uploadBuildLog(path) { - exports.command("build.uploadlog", null, path); + +function load() { + return process.env.DEBUG; } -exports.uploadBuildLog = uploadBuildLog; + /** - * Update build number for current build. + * Init logic for `debug` instances. * - * @param value Value to be assigned as the build number. - * @returns void + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. */ -function updateBuildNumber(value) { - exports.command("build.updatebuildnumber", null, value); + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } } -exports.updateBuildNumber = updateBuildNumber; + +module.exports = __nccwpck_require__(46243)(exports); + +const {formatters} = module.exports; + /** - * Add a tag for current build. - * - * @param value Tag value. - * @returns void + * Map %o to `util.inspect()`, all on a single line. */ -function addBuildTag(value) { - exports.command("build.addbuildtag", null, value); -} -exports.addBuildTag = addBuildTag; -//----------------------------------------------------- -// Release Logging Commands -//----------------------------------------------------- + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + /** - * Update release name for current release. - * - * @param value Value to be assigned as the release name. - * @returns void + * Map %O to `util.inspect()`, allowing multiple lines if needed. */ -function updateReleaseName(name) { - assertAgent("2.132.0"); - exports.command("release.updatereleasename", null, name); -} -exports.updateReleaseName = updateReleaseName; -//----------------------------------------------------- -// Tools -//----------------------------------------------------- -exports.TaskCommand = tcm.TaskCommand; -exports.commandFromString = tcm.commandFromString; -exports.ToolRunner = trm.ToolRunner; -//----------------------------------------------------- -// Validation Checks -//----------------------------------------------------- -// async await needs generators in node 4.x+ -if (semver.lt(process.versions.node, '4.2.0')) { - exports.warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later'); -} -//------------------------------------------------------------------- -// Populate the vault with sensitive data. Inputs and Endpoints -//------------------------------------------------------------------- -// avoid loading twice (overwrites .taskkey) -if (!global['_vsts_task_lib_loaded']) { - im._loadData(); - im._exposeProxySettings(); - im._exposeCertSettings(); + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + + +/***/ }), + +/***/ 18611: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Stream = (__nccwpck_require__(12781).Stream); +var util = __nccwpck_require__(73837); + +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; + + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; } +util.inherits(DelayedStream, Stream); + +DelayedStream.create = function(source, options) { + var delayedStream = new this(); + + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } + + delayedStream.source = source; + + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; + + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } + + return delayedStream; +}; + +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); + +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; + +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } + + this.source.resume(); +}; + +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; + +DelayedStream.prototype.release = function() { + this._released = true; + + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; + +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; + +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } + + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } + + this._bufferedEvents.push(args); +}; + +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } + + if (this.dataSize <= this.maxDataSize) { + return; + } + + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; /***/ }), -/***/ 3011: +/***/ 58932: /***/ ((__unused_webpack_module, exports) => { "use strict"; + Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.commandFromString = exports.TaskCommand = void 0; -// -// Command Format: -// ##vso[artifact.command key=value;key=value]user message -// -// Examples: -// ##vso[task.progress value=58] -// ##vso[task.issue type=warning;]This is the user warning message -// -var CMD_PREFIX = '##vso['; -var TaskCommand = /** @class */ (function () { - function TaskCommand(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - TaskCommand.prototype.toString = function () { - var cmdStr = CMD_PREFIX + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - for (var key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - var val = this.properties[key]; - if (val) { - // safely append the val - avoid blowing up when attempting to - // call .replace() if message is not a string for some reason - cmdStr += key + '=' + escape('' + (val || '')) + ';'; - } - } - } - } - cmdStr += ']'; - // safely append the message - avoid blowing up when attempting to - // call .replace() if message is not a string for some reason - var message = '' + (this.message || ''); - cmdStr += escapedata(message); - return cmdStr; - }; - return TaskCommand; -}()); -exports.TaskCommand = TaskCommand; -function commandFromString(commandLine) { - var preLen = CMD_PREFIX.length; - var lbPos = commandLine.indexOf('['); - var rbPos = commandLine.indexOf(']'); - if (lbPos == -1 || rbPos == -1 || rbPos - lbPos < 3) { - throw new Error('Invalid command brackets'); - } - var cmdInfo = commandLine.substring(lbPos + 1, rbPos); - var spaceIdx = cmdInfo.indexOf(' '); - var command = cmdInfo; - var properties = {}; - if (spaceIdx > 0) { - command = cmdInfo.trim().substring(0, spaceIdx); - var propSection = cmdInfo.trim().substring(spaceIdx + 1); - var propLines = propSection.split(';'); - propLines.forEach(function (propLine) { - propLine = propLine.trim(); - if (propLine.length > 0) { - var eqIndex = propLine.indexOf('='); - if (eqIndex == -1) { - throw new Error('Invalid property: ' + propLine); - } - var key = propLine.substring(0, eqIndex); - var val = propLine.substring(eqIndex + 1); - properties[key] = unescape(val); - } - }); + +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } - var msg = unescapedata(commandLine.substring(rbPos + 1)); - var cmd = new TaskCommand(command, properties, msg); - return cmd; + + this.name = 'Deprecation'; + } + } -exports.commandFromString = commandFromString; -function escapedata(s) { - return s.replace(/%/g, '%AZP25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); + +exports.Deprecation = Deprecation; + + +/***/ }), + +/***/ 11728: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Buffer = (__nccwpck_require__(21867).Buffer); + +var getParamBytesForAlg = __nccwpck_require__(30528); + +var MAX_OCTET = 0x80, + CLASS_UNIVERSAL = 0, + PRIMITIVE_BIT = 0x20, + TAG_SEQ = 0x10, + TAG_INT = 0x02, + ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6), + ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6); + +function base64Url(base64) { + return base64 + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); } -function unescapedata(s) { - return s.replace(/%0D/g, '\r') - .replace(/%0A/g, '\n') - .replace(/%AZP25/g, '%'); + +function signatureAsBuffer(signature) { + if (Buffer.isBuffer(signature)) { + return signature; + } else if ('string' === typeof signature) { + return Buffer.from(signature, 'base64'); + } + + throw new TypeError('ECDSA signature must be a Base64 string or a Buffer'); } -function escape(s) { - return s.replace(/%/g, '%AZP25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/]/g, '%5D') - .replace(/;/g, '%3B'); + +function derToJose(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); + + // the DER encoded param should at most be the param size, plus a padding + // zero, since due to being a signed integer + var maxEncodedParamLength = paramBytes + 1; + + var inputLength = signature.length; + + var offset = 0; + if (signature[offset++] !== ENCODED_TAG_SEQ) { + throw new Error('Could not find expected "seq"'); + } + + var seqLength = signature[offset++]; + if (seqLength === (MAX_OCTET | 1)) { + seqLength = signature[offset++]; + } + + if (inputLength - offset < seqLength) { + throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); + } + + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "r"'); + } + + var rLength = signature[offset++]; + + if (inputLength - offset - 2 < rLength) { + throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); + } + + if (maxEncodedParamLength < rLength) { + throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } + + var rOffset = offset; + offset += rLength; + + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "s"'); + } + + var sLength = signature[offset++]; + + if (inputLength - offset !== sLength) { + throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); + } + + if (maxEncodedParamLength < sLength) { + throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } + + var sOffset = offset; + offset += sLength; + + if (offset !== inputLength) { + throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); + } + + var rPadding = paramBytes - rLength, + sPadding = paramBytes - sLength; + + var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength); + + for (offset = 0; offset < rPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); + + offset = paramBytes; + + for (var o = offset; offset < o + sPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); + + dst = dst.toString('base64'); + dst = base64Url(dst); + + return dst; } -function unescape(s) { - return s.replace(/%0D/g, '\r') - .replace(/%0A/g, '\n') - .replace(/%5D/g, ']') - .replace(/%3B/g, ';') - .replace(/%AZP25/g, '%'); + +function countPadding(buf, start, stop) { + var padding = 0; + while (start + padding < stop && buf[start + padding] === 0) { + ++padding; + } + + var needsSign = buf[start + padding] >= MAX_OCTET; + if (needsSign) { + --padding; + } + + return padding; +} + +function joseToDer(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); + + var signatureBytes = signature.length; + if (signatureBytes !== paramBytes * 2) { + throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); + } + + var rPadding = countPadding(signature, 0, paramBytes); + var sPadding = countPadding(signature, paramBytes, signature.length); + var rLength = paramBytes - rPadding; + var sLength = paramBytes - sPadding; + + var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; + + var shortLength = rsBytes < MAX_OCTET; + + var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes); + + var offset = 0; + dst[offset++] = ENCODED_TAG_SEQ; + if (shortLength) { + // Bit 8 has value "0" + // bits 7-1 give the length. + dst[offset++] = rsBytes; + } else { + // Bit 8 of first octet has value "1" + // bits 7-1 give the number of additional length octets. + dst[offset++] = MAX_OCTET | 1; + // length, base 256 + dst[offset++] = rsBytes & 0xff; + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = rLength; + if (rPadding < 0) { + dst[offset++] = 0; + offset += signature.copy(dst, offset, 0, paramBytes); + } else { + offset += signature.copy(dst, offset, rPadding, paramBytes); + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = sLength; + if (sPadding < 0) { + dst[offset++] = 0; + signature.copy(dst, offset, paramBytes); + } else { + signature.copy(dst, offset, paramBytes + sPadding); + } + + return dst; +} + +module.exports = { + derToJose: derToJose, + joseToDer: joseToDer +}; + + +/***/ }), + +/***/ 30528: +/***/ ((module) => { + +"use strict"; + + +function getParamSize(keySize) { + var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1); + return result; +} + +var paramBytesForAlg = { + ES256: getParamSize(256), + ES384: getParamSize(384), + ES512: getParamSize(521) +}; + +function getParamBytesForAlg(alg) { + var paramBytes = paramBytesForAlg[alg]; + if (paramBytes) { + return paramBytes; + } + + throw new Error('Unknown algorithm "' + alg + '"'); +} + +module.exports = getParamBytesForAlg; + + +/***/ }), + +/***/ 31133: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var debug; + +module.exports = function () { + if (!debug) { + try { + /* eslint global-require: off */ + debug = __nccwpck_require__(38237)("follow-redirects"); + } + catch (error) { /* */ } + if (typeof debug !== "function") { + debug = function () { /* */ }; + } + } + debug.apply(null, arguments); +}; + + +/***/ }), + +/***/ 67707: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var url = __nccwpck_require__(57310); +var URL = url.URL; +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var Writable = (__nccwpck_require__(12781).Writable); +var assert = __nccwpck_require__(39491); +var debug = __nccwpck_require__(31133); + +// Create handlers that pass events from native requests +var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; +var eventHandlers = Object.create(null); +events.forEach(function (event) { + eventHandlers[event] = function (arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; +}); + +var InvalidUrlError = createErrorType( + "ERR_INVALID_URL", + "Invalid URL", + TypeError +); +// Error types with codes +var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "Redirected request failed" +); +var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded" +); +var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" +); +var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" +); + +// An HTTP(S) request that can be redirected +function RedirectableRequest(options, responseCallback) { + // Initialize the request + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; + + // Attach a callback if passed + if (responseCallback) { + this.on("response", responseCallback); + } + + // React to responses of native requests + var self = this; + this._onNativeResponse = function (response) { + self._processResponse(response); + }; + + // Perform the first request + this._performRequest(); } +RedirectableRequest.prototype = Object.create(Writable.prototype); +RedirectableRequest.prototype.abort = function () { + abortRequest(this._currentRequest); + this.emit("abort"); +}; -/***/ }), +// Writes buffered data to the current native request +RedirectableRequest.prototype.write = function (data, encoding, callback) { + // Writing is not allowed if end has been called + if (this._ending) { + throw new WriteAfterEndError(); + } -/***/ 7515: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + // Validate input and shift parameters if necessary + if (!isString(data) && !isBuffer(data)) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } -"use strict"; + // Ignore empty buffers, since writing them doesn't invoke the callback + // https://github.com/nodejs/node/issues/22066 + if (data.length === 0) { + if (callback) { + callback(); + } + return; + } + // Only write when we don't exceed the maximum body length + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data: data, encoding: encoding }); + this._currentRequest.write(data, encoding, callback); + } + // Error when we exceed the maximum body length + else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); + } +}; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ToolRunner = void 0; -var Q = __nccwpck_require__(6172); -var os = __nccwpck_require__(2037); -var events = __nccwpck_require__(2361); -var child = __nccwpck_require__(2081); -var im = __nccwpck_require__(6526); -var fs = __nccwpck_require__(7147); -var ToolRunner = /** @class */ (function (_super) { - __extends(ToolRunner, _super); - function ToolRunner(toolPath) { - var _this = _super.call(this) || this; - _this.cmdSpecialChars = [' ', '\t', '&', '(', ')', '[', ']', '{', '}', '^', '=', ';', '!', '\'', '+', ',', '`', '~', '|', '<', '>', '"']; - if (!toolPath) { - throw new Error('Parameter \'toolPath\' cannot be null or empty.'); - } - _this.toolPath = im._which(toolPath, true); - _this.args = []; - _this._debug('toolRunner toolPath: ' + toolPath); - return _this; +// Ends the current native request +RedirectableRequest.prototype.end = function (data, encoding, callback) { + // Shift parameters if necessary + if (isFunction(data)) { + callback = data; + data = encoding = null; + } + else if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Write data if needed and end + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } + else { + var self = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function () { + self._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; + } +}; + +// Sets a header value on the current native request +RedirectableRequest.prototype.setHeader = function (name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); +}; + +// Clears a header value on the current native request +RedirectableRequest.prototype.removeHeader = function (name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); +}; + +// Global timeout for all underlying requests +RedirectableRequest.prototype.setTimeout = function (msecs, callback) { + var self = this; + + // Destroys the socket on timeout + function destroyOnTimeout(socket) { + socket.setTimeout(msecs); + socket.removeListener("timeout", socket.destroy); + socket.addListener("timeout", socket.destroy); + } + + // Sets up a timer to trigger a timeout event + function startTimer(socket) { + if (self._timeout) { + clearTimeout(self._timeout); } - ToolRunner.prototype._debug = function (message) { - this.emit('debug', message); - }; - ToolRunner.prototype._argStringToArray = function (argString) { - var args = []; - var inQuotes = false; - var escaped = false; - var lastCharWasSpace = true; - var arg = ''; - var append = function (c) { - // we only escape double quotes. - if (escaped) { - if (c !== '"') { - arg += '\\'; - } - else { - arg.slice(0, -1); - } - } - arg += c; - escaped = false; - }; - for (var i = 0; i < argString.length; i++) { - var c = argString.charAt(i); - if (c === ' ' && !inQuotes) { - if (!lastCharWasSpace) { - args.push(arg); - arg = ''; - } - lastCharWasSpace = true; - continue; - } - else { - lastCharWasSpace = false; - } - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; - } - if (c === "\\" && escaped) { - append(c); - continue; - } - if (c === "\\" && inQuotes) { - escaped = true; - continue; - } - append(c); - lastCharWasSpace = false; - } - if (!lastCharWasSpace) { - args.push(arg.trim()); - } - return args; - }; - ToolRunner.prototype._getCommandString = function (options, noPrefix) { - var _this = this; - var toolPath = this._getSpawnFileName(); - var args = this._getSpawnArgs(options); - var cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - var commandParts = []; - if (process.platform == 'win32') { - // Windows + cmd file - if (this._isCmdFile()) { - commandParts.push(toolPath); - commandParts = commandParts.concat(args); - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - commandParts.push("\"" + toolPath + "\""); - commandParts = commandParts.concat(args); - } - else if (options.shell) { - commandParts.push(this._windowsQuoteCmdArg(toolPath)); - commandParts = commandParts.concat(args); - } - // Windows (regular) - else { - commandParts.push(this._windowsQuoteCmdArg(toolPath)); - commandParts = commandParts.concat(args.map(function (arg) { return _this._windowsQuoteCmdArg(arg); })); - } - } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - commandParts.push(toolPath); - commandParts = commandParts.concat(args); - } - cmd += commandParts.join(' '); - // append second tool - if (this.pipeOutputToTool) { - cmd += ' | ' + this.pipeOutputToTool._getCommandString(options, /*noPrefix:*/ true); - } - return cmd; - }; - ToolRunner.prototype._processLineBuffer = function (data, strBuffer, onLine) { - try { - var s = strBuffer + data.toString(); - var n = s.indexOf(os.EOL); - while (n > -1) { - var line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + os.EOL.length); - n = s.indexOf(os.EOL); - } - strBuffer = s; - } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug('error processing line'); - } - }; - /** - * Wraps an arg string with specified char if it's not already wrapped - * @returns {string} Arg wrapped with specified char - * @param {string} arg Input argument string - * @param {string} wrapChar A char input string should be wrapped with - */ - ToolRunner.prototype._wrapArg = function (arg, wrapChar) { - if (!this._isWrapped(arg, wrapChar)) { - return "" + wrapChar + arg + wrapChar; - } - return arg; - }; - /** - * Unwraps an arg string wrapped with specified char - * @param arg Arg wrapped with specified char - * @param wrapChar A char to be removed - */ - ToolRunner.prototype._unwrapArg = function (arg, wrapChar) { - if (this._isWrapped(arg, wrapChar)) { - var pattern = new RegExp("(^\\\\?" + wrapChar + ")|(\\\\?" + wrapChar + "$)", 'g'); - return arg.trim().replace(pattern, ''); - } - return arg; - }; - /** - * Determine if arg string is wrapped with specified char - * @param arg Input arg string - */ - ToolRunner.prototype._isWrapped = function (arg, wrapChar) { - var pattern = new RegExp("^\\\\?" + wrapChar + ".+\\\\?" + wrapChar + "$"); - return pattern.test(arg.trim()); - }; - ToolRunner.prototype._getSpawnFileName = function (options) { - if (process.platform == 'win32') { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - if (options && options.shell) { - return this._wrapArg(this.toolPath, '"'); - } - return this.toolPath; - }; - ToolRunner.prototype._getSpawnArgs = function (options) { - var _this = this; - if (process.platform == 'win32') { - if (this._isCmdFile()) { - var argline = "/D /S /C \"" + this._windowsQuoteCmdArg(this.toolPath); - for (var i = 0; i < this.args.length; i++) { - argline += ' '; - argline += options.windowsVerbatimArguments ? this.args[i] : this._windowsQuoteCmdArg(this.args[i]); - } - argline += '"'; - return [argline]; - } - if (options.windowsVerbatimArguments) { - // note, in Node 6.x options.argv0 can be used instead of overriding args.slice and args.unshift. - // for more details, refer to https://github.com/nodejs/node/blob/v6.x/lib/child_process.js - var args_1 = this.args.slice(0); // copy the array - // override slice to prevent Node from creating a copy of the arg array. - // we need Node to use the "unshift" override below. - args_1.slice = function () { - if (arguments.length != 1 || arguments[0] != 0) { - throw new Error('Unexpected arguments passed to args.slice when windowsVerbatimArguments flag is set.'); - } - return args_1; - }; - // override unshift - // - // when using the windowsVerbatimArguments option, Node does not quote the tool path when building - // the cmdline parameter for the win32 function CreateProcess(). an unquoted space in the tool path - // causes problems for tools when attempting to parse their own command line args. tools typically - // assume their arguments begin after arg 0. - // - // by hijacking unshift, we can quote the tool path when it pushed onto the args array. Node builds - // the cmdline parameter from the args array. - // - // note, we can't simply pass a quoted tool path to Node for multiple reasons: - // 1) Node verifies the file exists (calls win32 function GetFileAttributesW) and the check returns - // false if the path is quoted. - // 2) Node passes the tool path as the application parameter to CreateProcess, which expects the - // path to be unquoted. - // - // also note, in addition to the tool path being embedded within the cmdline parameter, Node also - // passes the tool path to CreateProcess via the application parameter (optional parameter). when - // present, Windows uses the application parameter to determine which file to run, instead of - // interpreting the file from the cmdline parameter. - args_1.unshift = function () { - if (arguments.length != 1) { - throw new Error('Unexpected arguments passed to args.unshift when windowsVerbatimArguments flag is set.'); - } - return Array.prototype.unshift.call(args_1, "\"" + arguments[0] + "\""); // quote the file name - }; - return args_1; - } - else if (options.shell) { - var args = []; - for (var _i = 0, _a = this.args; _i < _a.length; _i++) { - var arg = _a[_i]; - if (this._needQuotesForCmd(arg, '%')) { - args.push(this._wrapArg(arg, '"')); - } - else { - args.push(arg); - } - } - return args; - } - } - else if (options.shell) { - return this.args.map(function (arg) { - if (_this._isWrapped(arg, "'")) { - return arg; - } - // remove wrapping double quotes to avoid escaping - arg = _this._unwrapArg(arg, '"'); - arg = _this._escapeChar(arg, '"'); - return _this._wrapArg(arg, '"'); - }); - } - return this.args; - }; - /** - * Escape specified character. - * @param arg String to escape char in - * @param charToEscape Char should be escaped - */ - ToolRunner.prototype._escapeChar = function (arg, charToEscape) { - var escChar = "\\"; - var output = ''; - var charIsEscaped = false; - for (var _i = 0, arg_1 = arg; _i < arg_1.length; _i++) { - var char = arg_1[_i]; - if (char === charToEscape && !charIsEscaped) { - output += escChar + char; - } - else { - output += char; - } - charIsEscaped = char === escChar && !charIsEscaped; - } - return output; - }; - ToolRunner.prototype._isCmdFile = function () { - var upperToolPath = this.toolPath.toUpperCase(); - return im._endsWith(upperToolPath, '.CMD') || im._endsWith(upperToolPath, '.BAT'); - }; - /** - * Determine whether the cmd arg needs to be quoted. Returns true if arg contains any of special chars array. - * @param arg The cmd command arg. - * @param additionalChars Additional chars which should be also checked. - */ - ToolRunner.prototype._needQuotesForCmd = function (arg, additionalChars) { - var specialChars = this.cmdSpecialChars; - if (additionalChars) { - specialChars = this.cmdSpecialChars.concat(additionalChars); - } - var _loop_1 = function (char) { - if (specialChars.some(function (x) { return x === char; })) { - return { value: true }; - } - }; - for (var _i = 0, arg_2 = arg; _i < arg_2.length; _i++) { - var char = arg_2[_i]; - var state_1 = _loop_1(char); - if (typeof state_1 === "object") - return state_1.value; - } - return false; - }; - ToolRunner.prototype._windowsQuoteCmdArg = function (arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uv_quote_cmd_arg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; - } - // determine whether the arg needs to be quoted - var needsQuotes = this._needQuotesForCmd(arg); - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that preceed a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - var reverse = '"'; - var quote_hit = true; - for (var i = arg.length; i > 0; i--) { // walk the string in reverse - reverse += arg[i - 1]; - if (quote_hit && arg[i - 1] == '\\') { - reverse += '\\'; // double the slash - } - else if (arg[i - 1] == '"') { - quote_hit = true; - reverse += '"'; // double the quote - } - else { - quote_hit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - }; - ToolRunner.prototype._uv_quote_cmd_arg = function (arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (arg.indexOf(' ') < 0 && arg.indexOf('\t') < 0 && arg.indexOf('"') < 0) { - // No quotation needed - return arg; - } - if (arg.indexOf('"') < 0 && arg.indexOf('\\') < 0) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return "\"" + arg + "\""; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - var reverse = '"'; - var quote_hit = true; - for (var i = arg.length; i > 0; i--) { // walk the string in reverse - reverse += arg[i - 1]; - if (quote_hit && arg[i - 1] == '\\') { - reverse += '\\'; - } - else if (arg[i - 1] == '"') { - quote_hit = true; - reverse += '\\'; - } - else { - quote_hit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - }; - ToolRunner.prototype._cloneExecOptions = function (options) { - options = options || {}; - var result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - shell: options.shell || false - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - }; - ToolRunner.prototype._getSpawnOptions = function (options) { - options = options || {}; - var result = {}; - result.cwd = options.cwd; - result.env = options.env; - result.shell = options.shell; - result['windowsVerbatimArguments'] = options.windowsVerbatimArguments || this._isCmdFile(); - return result; - }; - ToolRunner.prototype._getSpawnSyncOptions = function (options) { - var result = {}; - result.maxBuffer = 1024 * 1024 * 1024; - result.cwd = options.cwd; - result.env = options.env; - result.shell = options.shell; - result['windowsVerbatimArguments'] = options.windowsVerbatimArguments || this._isCmdFile(); - return result; - }; - ToolRunner.prototype.execWithPiping = function (pipeOutputToTool, options) { - var _this = this; - var _a, _b, _c, _d; - var defer = Q.defer(); - this._debug('exec tool: ' + this.toolPath); - this._debug('arguments:'); - this.args.forEach(function (arg) { - _this._debug(' ' + arg); - }); - var success = true; - var optionsNonNull = this._cloneExecOptions(options); - if (!optionsNonNull.silent) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); - } - var cp; - var toolPath = pipeOutputToTool.toolPath; - var toolPathFirst; - var successFirst = true; - var returnCodeFirst; - var fileStream; - var waitingEvents = 0; // number of process or stream events we are waiting on to complete - var returnCode = 0; - var error; - toolPathFirst = this.toolPath; - // Following node documentation example from this link on how to pipe output of one process to another - // https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options - //start the child process for both tools - waitingEvents++; - var cpFirst = child.spawn(this._getSpawnFileName(optionsNonNull), this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(optionsNonNull)); - waitingEvents++; - cp = child.spawn(pipeOutputToTool._getSpawnFileName(optionsNonNull), pipeOutputToTool._getSpawnArgs(optionsNonNull), pipeOutputToTool._getSpawnOptions(optionsNonNull)); - fileStream = this.pipeOutputToFile ? fs.createWriteStream(this.pipeOutputToFile) : null; - if (fileStream) { - waitingEvents++; - fileStream.on('finish', function () { - waitingEvents--; //file write is complete - fileStream = null; - if (waitingEvents == 0) { - if (error) { - defer.reject(error); - } - else { - defer.resolve(returnCode); - } - } - }); - fileStream.on('error', function (err) { - waitingEvents--; //there were errors writing to the file, write is done - _this._debug("Failed to pipe output of " + toolPathFirst + " to file " + _this.pipeOutputToFile + ". Error = " + err); - fileStream = null; - if (waitingEvents == 0) { - if (error) { - defer.reject(error); - } - else { - defer.resolve(returnCode); - } - } - }); - } - //pipe stdout of first tool to stdin of second tool - (_a = cpFirst.stdout) === null || _a === void 0 ? void 0 : _a.on('data', function (data) { - var _a; - try { - if (fileStream) { - fileStream.write(data); - } - (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.write(data); - } - catch (err) { - _this._debug('Failed to pipe output of ' + toolPathFirst + ' to ' + toolPath); - _this._debug(toolPath + ' might have exited due to errors prematurely. Verify the arguments passed are valid.'); - } - }); - (_b = cpFirst.stderr) === null || _b === void 0 ? void 0 : _b.on('data', function (data) { - if (fileStream) { - fileStream.write(data); - } - successFirst = !optionsNonNull.failOnStdErr; - if (!optionsNonNull.silent) { - var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); - } - }); - cpFirst.on('error', function (err) { - var _a; - waitingEvents--; //first process is complete with errors - if (fileStream) { - fileStream.end(); - } - (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.end(); - error = new Error(toolPathFirst + ' failed. ' + err.message); - if (waitingEvents == 0) { - defer.reject(error); - } - }); - cpFirst.on('close', function (code, signal) { - var _a; - waitingEvents--; //first process is complete - if (code != 0 && !optionsNonNull.ignoreReturnCode) { - successFirst = false; - returnCodeFirst = code; - returnCode = returnCodeFirst; - } - _this._debug('success of first tool:' + successFirst); - if (fileStream) { - fileStream.end(); - } - (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.end(); - if (waitingEvents == 0) { - if (error) { - defer.reject(error); - } - else { - defer.resolve(returnCode); - } - } - }); - var stdbuffer = ''; - (_c = cp.stdout) === null || _c === void 0 ? void 0 : _c.on('data', function (data) { - _this.emit('stdout', data); - if (!optionsNonNull.silent) { - optionsNonNull.outStream.write(data); - } - _this._processLineBuffer(data, stdbuffer, function (line) { - _this.emit('stdline', line); - }); - }); - var errbuffer = ''; - (_d = cp.stderr) === null || _d === void 0 ? void 0 : _d.on('data', function (data) { - _this.emit('stderr', data); - success = !optionsNonNull.failOnStdErr; - if (!optionsNonNull.silent) { - var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); - } - _this._processLineBuffer(data, errbuffer, function (line) { - _this.emit('errline', line); - }); - }); - cp.on('error', function (err) { - waitingEvents--; //process is done with errors - error = new Error(toolPath + ' failed. ' + err.message); - if (waitingEvents == 0) { - defer.reject(error); - } - }); - cp.on('close', function (code, signal) { - waitingEvents--; //process is complete - _this._debug('rc:' + code); - returnCode = code; - if (stdbuffer.length > 0) { - _this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - _this.emit('errline', errbuffer); - } - if (code != 0 && !optionsNonNull.ignoreReturnCode) { - success = false; - } - _this._debug('success:' + success); - if (!successFirst) { //in the case output is piped to another tool, check exit code of both tools - error = new Error(toolPathFirst + ' failed with return code: ' + returnCodeFirst); - } - else if (!success) { - error = new Error(toolPath + ' failed with return code: ' + code); - } - if (waitingEvents == 0) { - if (error) { - defer.reject(error); - } - else { - defer.resolve(returnCode); - } - } - }); - return defer.promise; - }; - /** - * Add argument - * Append an argument or an array of arguments - * returns ToolRunner for chaining - * - * @param val string cmdline or array of strings - * @returns ToolRunner - */ - ToolRunner.prototype.arg = function (val) { - if (!val) { - return this; - } - if (val instanceof Array) { - this._debug(this.toolPath + ' arg: ' + JSON.stringify(val)); - this.args = this.args.concat(val); - } - else if (typeof (val) === 'string') { - this._debug(this.toolPath + ' arg: ' + val); - this.args = this.args.concat(val.trim()); - } - return this; - }; - /** - * Parses an argument line into one or more arguments - * e.g. .line('"arg one" two -z') is equivalent to .arg(['arg one', 'two', '-z']) - * returns ToolRunner for chaining - * - * @param val string argument line - * @returns ToolRunner - */ - ToolRunner.prototype.line = function (val) { - if (!val) { - return this; - } - this._debug(this.toolPath + ' arg: ' + val); - this.args = this.args.concat(this._argStringToArray(val)); - return this; - }; - /** - * Add argument(s) if a condition is met - * Wraps arg(). See arg for details - * returns ToolRunner for chaining - * - * @param condition boolean condition - * @param val string cmdline or array of strings - * @returns ToolRunner - */ - ToolRunner.prototype.argIf = function (condition, val) { - if (condition) { - this.arg(val); - } - return this; - }; - /** - * Pipe output of exec() to another tool - * @param tool - * @param file optional filename to additionally stream the output to. - * @returns {ToolRunner} - */ - ToolRunner.prototype.pipeExecOutputToTool = function (tool, file) { - this.pipeOutputToTool = tool; - this.pipeOutputToFile = file; - return this; - }; - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See IExecOptions - * @returns number - */ - ToolRunner.prototype.exec = function (options) { - var _this = this; - var _a, _b, _c; - if (this.pipeOutputToTool) { - return this.execWithPiping(this.pipeOutputToTool, options); - } - var defer = Q.defer(); - this._debug('exec tool: ' + this.toolPath); - this._debug('arguments:'); - this.args.forEach(function (arg) { - _this._debug(' ' + arg); - }); - var optionsNonNull = this._cloneExecOptions(options); - if (!optionsNonNull.silent) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); - } - var state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', function (message) { - _this._debug(message); - }); - var cp = child.spawn(this._getSpawnFileName(options), this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(options)); - this.childProcess = cp; - // it is possible for the child process to end its last line without a new line. - // because stdout is buffered, this causes the last line to not get sent to the parent - // stream. Adding this event forces a flush before the child streams are closed. - (_a = cp.stdout) === null || _a === void 0 ? void 0 : _a.on('finish', function () { - if (!optionsNonNull.silent) { - optionsNonNull.outStream.write(os.EOL); - } - }); - var stdbuffer = ''; - (_b = cp.stdout) === null || _b === void 0 ? void 0 : _b.on('data', function (data) { - _this.emit('stdout', data); - if (!optionsNonNull.silent) { - optionsNonNull.outStream.write(data); - } - _this._processLineBuffer(data, stdbuffer, function (line) { - _this.emit('stdline', line); - }); - }); - var errbuffer = ''; - (_c = cp.stderr) === null || _c === void 0 ? void 0 : _c.on('data', function (data) { - state.processStderr = true; - _this.emit('stderr', data); - if (!optionsNonNull.silent) { - var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); - } - _this._processLineBuffer(data, errbuffer, function (line) { - _this.emit('errline', line); - }); - }); - cp.on('error', function (err) { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', function (code, signal) { - state.processExitCode = code; - state.processExited = true; - _this._debug("Exit code " + code + " received from tool '" + _this.toolPath + "'"); - state.CheckComplete(); - }); - cp.on('close', function (code, signal) { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - _this._debug("STDIO streams have closed for tool '" + _this.toolPath + "'"); - state.CheckComplete(); - }); - state.on('done', function (error, exitCode) { - if (stdbuffer.length > 0) { - _this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - _this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - defer.reject(error); - } - else { - defer.resolve(exitCode); - } - }); - return defer.promise; - }; - /** - * Exec a tool synchronously. - * Output will be *not* be streamed to the live console. It will be returned after execution is complete. - * Appropriate for short running tools - * Returns IExecSyncResult with output and return code - * - * @param tool path to tool to exec - * @param options optional exec options. See IExecSyncOptions - * @returns IExecSyncResult - */ - ToolRunner.prototype.execSync = function (options) { - var _this = this; - this._debug('exec tool: ' + this.toolPath); - this._debug('arguments:'); - this.args.forEach(function (arg) { - _this._debug(' ' + arg); - }); - var success = true; - options = this._cloneExecOptions(options); - if (!options.silent) { - options.outStream.write(this._getCommandString(options) + os.EOL); - } - var r = child.spawnSync(this._getSpawnFileName(options), this._getSpawnArgs(options), this._getSpawnSyncOptions(options)); - if (!options.silent && r.stdout && r.stdout.length > 0) { - options.outStream.write(r.stdout); - } - if (!options.silent && r.stderr && r.stderr.length > 0) { - options.errStream.write(r.stderr); - } - var res = { code: r.status, error: r.error }; - res.stdout = (r.stdout) ? r.stdout.toString() : ''; - res.stderr = (r.stderr) ? r.stderr.toString() : ''; - return res; - }; - /** - * Used to close child process by sending SIGNINT signal. - * It allows executed script to have some additional logic on SIGINT, before exiting. - */ - ToolRunner.prototype.killChildProcess = function () { - if (this.childProcess) { - this.childProcess.kill(); - } - }; - return ToolRunner; -}(events.EventEmitter)); -exports.ToolRunner = ToolRunner; -var ExecState = /** @class */ (function (_super) { - __extends(ExecState, _super); - function ExecState(options, toolPath) { - var _this = _super.call(this) || this; - _this.delay = 10000; // 10 seconds - _this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); - } - _this.options = options; - _this.toolPath = toolPath; - var delay = process.env['TASKLIB_TEST_TOOLRUNNER_EXITDELAY']; - if (delay) { - _this.delay = parseInt(delay); - } - return _this; + self._timeout = setTimeout(function () { + self.emit("timeout"); + clearTimer(); + }, msecs); + destroyOnTimeout(socket); + } + + // Stops a timeout from triggering + function clearTimer() { + // Clear the timeout + if (self._timeout) { + clearTimeout(self._timeout); + self._timeout = null; } - ExecState.prototype.CheckComplete = function () { - if (this.done) { - return; + + // Clean up all attached listeners + self.removeListener("abort", clearTimer); + self.removeListener("error", clearTimer); + self.removeListener("response", clearTimer); + if (callback) { + self.removeListener("timeout", callback); + } + if (!self.socket) { + self._currentRequest.removeListener("socket", startTimer); + } + } + + // Attach callback if passed + if (callback) { + this.on("timeout", callback); + } + + // Start the timer if or when the socket is opened + if (this.socket) { + startTimer(this.socket); + } + else { + this._currentRequest.once("socket", startTimer); + } + + // Clean up on events + this.on("socket", destroyOnTimeout); + this.on("abort", clearTimer); + this.on("error", clearTimer); + this.on("response", clearTimer); + + return this; +}; + +// Proxy all other public ClientRequest methods +[ + "flushHeaders", "getHeader", + "setNoDelay", "setSocketKeepAlive", +].forEach(function (method) { + RedirectableRequest.prototype[method] = function (a, b) { + return this._currentRequest[method](a, b); + }; +}); + +// Proxy all public ClientRequest properties +["aborted", "connection", "socket"].forEach(function (property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function () { return this._currentRequest[property]; }, + }); +}); + +RedirectableRequest.prototype._sanitizeOptions = function (options) { + // Ensure headers are always present + if (!options.headers) { + options.headers = {}; + } + + // Since http.request treats host as an alias of hostname, + // but the url module interprets host as hostname plus port, + // eliminate the host property to avoid confusion. + if (options.host) { + // Use hostname if set, because it has precedence + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; + } + + // Complete the URL object when necessary + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } + else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } + } +}; + + +// Executes the next native request (initial or redirect) +RedirectableRequest.prototype._performRequest = function () { + // Load the native protocol + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + this.emit("error", new TypeError("Unsupported protocol " + protocol)); + return; + } + + // If specified, use the agent corresponding to the protocol + // (HTTP and HTTPS use different types of agents) + if (this._options.agents) { + var scheme = protocol.slice(0, -1); + this._options.agent = this._options.agents[scheme]; + } + + // Create the native request and set up its event handlers + var request = this._currentRequest = + nativeProtocol.request(this._options, this._onNativeResponse); + request._redirectable = this; + for (var event of events) { + request.on(event, eventHandlers[event]); + } + + // RFC7230§5.3.1: When making a request directly to an origin server, […] + // a client MUST send only the absolute path […] as the request-target. + this._currentUrl = /^\//.test(this._options.path) ? + url.format(this._options) : + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path; + + // End a redirected request + // (The first request must be ended explicitly with RedirectableRequest#end) + if (this._isRedirect) { + // Write the request entity and end + var i = 0; + var self = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + // Only write if this request has not been redirected yet + /* istanbul ignore else */ + if (request === self._currentRequest) { + // Report any write errors + /* istanbul ignore if */ + if (error) { + self.emit("error", error); } - if (this.processClosed) { - this._setResult(); + // Write the next buffer if there are still left + else if (i < buffers.length) { + var buffer = buffers[i++]; + /* istanbul ignore else */ + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } } - else if (this.processExited) { - this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this); + // End the request if `end` has been called on us + else if (self._ended) { + request.end(); } + } + }()); + } +}; + +// Processes a response from the current native request +RedirectableRequest.prototype._processResponse = function (response) { + // Store the redirected response + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode: statusCode, + }); + } + + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates + // that further action needs to be taken by the user agent in order to + // fulfill the request. If a Location header field is provided, + // the user agent MAY automatically redirect its request to the URI + // referenced by the Location field value, + // even if the specific status code is not understood. + + // If the response is not a redirect; return it as-is + var location = response.headers.location; + if (!location || this._options.followRedirects === false || + statusCode < 300 || statusCode >= 400) { + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + + // Clean up + this._requestBodyBuffers = []; + return; + } + + // The response is a redirect, so abort the current request + abortRequest(this._currentRequest); + // Discard the remainder of the response to avoid waiting for data + response.destroy(); + + // RFC7231§6.4: A client SHOULD detect and intervene + // in cyclical redirections (i.e., "infinite" redirection loops). + if (++this._redirectCount > this._options.maxRedirects) { + this.emit("error", new TooManyRedirectsError()); + return; + } + + // Store the request headers if applicable + var requestHeaders; + var beforeRedirect = this._options.beforeRedirect; + if (beforeRedirect) { + requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request + Host: response.req.getHeader("host"), + }, this._options.headers); + } + + // RFC7231§6.4: Automatic redirection needs to done with + // care for methods not known to be safe, […] + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change + // the request method from POST to GET for the subsequent request. + var method = this._options.method; + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || + // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + // Drop a possible entity and headers related to it + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); + } + + // Drop the Host header, as the redirect might lead to a different host + var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + + // If the redirect is relative, carry over the host of the last request + var currentUrlParts = url.parse(this._currentUrl); + var currentHost = currentHostHeader || currentUrlParts.host; + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : + url.format(Object.assign(currentUrlParts, { host: currentHost })); + + // Determine the URL of the redirection + var redirectUrl; + try { + redirectUrl = url.resolve(currentUrl, location); + } + catch (cause) { + this.emit("error", new RedirectionError({ cause: cause })); + return; + } + + // Create the redirected request + debug("redirecting to", redirectUrl); + this._isRedirect = true; + var redirectUrlParts = url.parse(redirectUrl); + Object.assign(this._options, redirectUrlParts); + + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if (redirectUrlParts.protocol !== currentUrlParts.protocol && + redirectUrlParts.protocol !== "https:" || + redirectUrlParts.host !== currentHost && + !isSubdomain(redirectUrlParts.host, currentHost)) { + removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); + } + + // Evaluate the beforeRedirect callback + if (isFunction(beforeRedirect)) { + var responseDetails = { + headers: response.headers, + statusCode: statusCode, }; - ExecState.prototype._debug = function (message) { - this.emit('debug', message); + var requestDetails = { + url: currentUrl, + method: method, + headers: requestHeaders, }; - ExecState.prototype._setResult = function () { - // determine whether there is an error - var error; - if (this.processExited) { - if (this.processError) { - error = new Error(im._loc('LIB_ProcessError', this.toolPath, this.processError)); - } - else if (this.processExitCode != 0 && !this.options.ignoreReturnCode) { - error = new Error(im._loc('LIB_ProcessExitCode', this.toolPath, this.processExitCode)); - } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(im._loc('LIB_ProcessStderr', this.toolPath)); - } + try { + beforeRedirect(this._options, responseDetails, requestDetails); + } + catch (err) { + this.emit("error", err); + return; + } + this._sanitizeOptions(this._options); + } + + // Perform the redirected request + try { + this._performRequest(); + } + catch (cause) { + this.emit("error", new RedirectionError({ cause: cause })); + } +}; + +// Wraps the key/value object of protocols with redirect functionality +function wrap(protocols) { + // Default settings + var exports = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024, + }; + + // Wrap each protocol + var nativeProtocols = {}; + Object.keys(protocols).forEach(function (scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); + + // Executes a request, following redirects + function request(input, options, callback) { + // Parse parameters + if (isString(input)) { + var parsed; + try { + parsed = urlToOptions(new URL(input)); } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; + catch (err) { + /* istanbul ignore next */ + parsed = url.parse(input); } - this.done = true; - this.emit('done', error, this.processExitCode); - }; - ExecState.HandleTimeout = function (state) { - if (state.done) { - return; + if (!isString(parsed.protocol)) { + throw new InvalidUrlError({ input }); } - if (!state.processClosed && state.processExited) { - console.log(im._loc('LIB_StdioNotClosed', state.delay / 1000, state.toolPath)); - state._debug(im._loc('LIB_StdioNotClosed', state.delay / 1000, state.toolPath)); + input = parsed; + } + else if (URL && (input instanceof URL)) { + input = urlToOptions(input); + } + else { + callback = options; + options = input; + input = { protocol: protocol }; + } + if (isFunction(options)) { + callback = options; + options = null; + } + + // Set defaults + options = Object.assign({ + maxRedirects: exports.maxRedirects, + maxBodyLength: exports.maxBodyLength, + }, input, options); + options.nativeProtocols = nativeProtocols; + if (!isString(options.host) && !isString(options.hostname)) { + options.hostname = "::1"; + } + + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); + } + + // Executes a GET request, following redirects + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } + + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); + }); + return exports; +} + +/* istanbul ignore next */ +function noop() { /* empty */ } + +// from https://github.com/nodejs/node/blob/master/lib/internal/url.js +function urlToOptions(urlObject) { + var options = { + protocol: urlObject.protocol, + hostname: urlObject.hostname.startsWith("[") ? + /* istanbul ignore next */ + urlObject.hostname.slice(1, -1) : + urlObject.hostname, + hash: urlObject.hash, + search: urlObject.search, + pathname: urlObject.pathname, + path: urlObject.pathname + urlObject.search, + href: urlObject.href, + }; + if (urlObject.port !== "") { + options.port = Number(urlObject.port); + } + return options; +} + +function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } + } + return (lastValue === null || typeof lastValue === "undefined") ? + undefined : String(lastValue).trim(); +} + +function createErrorType(code, message, baseClass) { + // Create constructor + function CustomError(properties) { + Error.captureStackTrace(this, this.constructor); + Object.assign(this, properties || {}); + this.code = code; + this.message = this.cause ? message + ": " + this.cause.message : message; + } + + // Attach constructor and set default properties + CustomError.prototype = new (baseClass || Error)(); + CustomError.prototype.constructor = CustomError; + CustomError.prototype.name = "Error [" + code + "]"; + return CustomError; +} + +function abortRequest(request) { + for (var event of events) { + request.removeListener(event, eventHandlers[event]); + } + request.on("error", noop); + request.abort(); +} + +function isSubdomain(subdomain, domain) { + assert(isString(subdomain) && isString(domain)); + var dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); +} + +function isString(value) { + return typeof value === "string" || value instanceof String; +} + +function isFunction(value) { + return typeof value === "function"; +} + +function isBuffer(value) { + return typeof value === "object" && ("length" in value); +} + +// Exports +module.exports = wrap({ http: http, https: https }); +module.exports.wrap = wrap; + + +/***/ }), + +/***/ 64334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var CombinedStream = __nccwpck_require__(85443); +var util = __nccwpck_require__(73837); +var path = __nccwpck_require__(71017); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var parseUrl = (__nccwpck_require__(57310).parse); +var fs = __nccwpck_require__(57147); +var Stream = (__nccwpck_require__(12781).Stream); +var mime = __nccwpck_require__(43583); +var asynckit = __nccwpck_require__(14812); +var populate = __nccwpck_require__(17142); + +// Public API +module.exports = FormData; + +// make it a Stream +util.inherits(FormData, CombinedStream); + +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(options); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } +} + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function(field, value, options) { + + options = options || {}; + + // allow filename as single option + if (typeof options == 'string') { + options = {filename: options}; + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value == 'number') { + value = '' + value; + } + + // https://github.com/felixge/node-form-data/issues/38 + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function(header, value, options) { + var valueLength = 0; + + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. + if (options.knownLength != null) { + valueLength += +options.knownLength; + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response or not a stream + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function(err, stat) { + + var fileSize; + + if (err) { + callback(err); + return; } - state._setResult(); - }; - return ExecState; -}(events.EventEmitter)); + + // update final size based on the range options + fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); + + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { + // wait till response come back + value.on('response', function(response) { + value.pause(); + callback(null, +response.headers['content-length']); + }); + value.resume(); + + // something else + } else { + callback('Unknown stream'); + } +}; + +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header == 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); + } + + if (filename) { + contentDisposition = 'filename="' + filename + '"'; + } + + return contentDisposition; +}; + +FormData.prototype._getContentType = function(value, options) { + + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && typeof value == 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData.LINE_BREAK; + + var lastPart = (this._streams.length === 0); + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function() { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + + return formHeaders; +}; + +FormData.prototype.setBoundary = function(boundary) { + this._boundary = boundary; +}; + +FormData.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); + } + + return this._boundary; +}; + +FormData.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc( 0 ); + var boundary = this.getBoundary(); + + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { + + // Add content to the buffer. + if(Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); + }else { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); + } + + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); + } + } + } + + // Add the footer and return the Buffer object. + return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); +}; + +FormData.prototype._generateBoundary = function() { + // This generates a 50 character boundary similar to those used by Firefox. + // They are optimized for boyer-moore parsing. + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + + this._boundary = boundary; +}; + +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; + + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } + + return knownLength; +}; + +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function() { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + + return hasKnownLength; +}; + +FormData.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); + return; + } + + values.forEach(function(length) { + knownLength += length; + }); + + cb(null, knownLength); + }); +}; + +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; + + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { + + params = parseUrl(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + + // use custom params + } else { + + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol == 'https:' ? 443 : 80; + } + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol == 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function(err, length) { + if (err && err !== 'Unknown stream') { + this._error(err); + return; + } + + // add content length + if (length) { + request.setHeader('Content-Length', length); + } + + this.pipe(request); + if (cb) { + var onResponse; + + var callback = function (error, responce) { + request.removeListener('error', callback); + request.removeListener('response', onResponse); + + return cb.call(this, error, responce); + }; + + onResponse = callback.bind(this, null); + + request.on('error', callback); + request.on('response', onResponse); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; + + +/***/ }), + +/***/ 17142: +/***/ ((module) => { + +// populates missing values +module.exports = function(dst, src) { + + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; + }); + + return dst; +}; + + +/***/ }), + +/***/ 46863: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = __nccwpck_require__(57147) +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = __nccwpck_require__(71734) + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} /***/ }), -/***/ 6007: +/***/ 71734: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Vault = void 0; -var fs = __nccwpck_require__(7147); -var path = __nccwpck_require__(1017); -var crypto = __nccwpck_require__(6113); -var uuidV4 = __nccwpck_require__(8087); -var algorithm = "aes-256-ctr"; -var encryptEncoding = 'hex'; -var unencryptedEncoding = 'utf8'; +// Copyright Joyent, Inc. and other Node contributors. // -// Store sensitive data in proc. -// Main goal: Protects tasks which would dump envvars from leaking secrets inadvertently -// the task lib clears after storing. -// Also protects against a dump of a process getting the secrets -// The secret is generated and stored externally for the lifetime of the task. +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: // -var Vault = /** @class */ (function () { - function Vault(keyPath) { - this._keyFile = path.join(keyPath, '.taskkey'); - this._store = {}; - this.genKey(); +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var pathModule = __nccwpck_require__(71017); +var isWindows = process.platform === 'win32'; +var fs = __nccwpck_require__(57147); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); } - Vault.prototype.initialize = function () { - }; - Vault.prototype.storeSecret = function (name, data) { - if (!name || name.length == 0) { - return false; + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; } - name = name.toLowerCase(); - if (!data || data.length == 0) { - if (this._store.hasOwnProperty(name)) { - delete this._store[name]; + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; + + +/***/ }), + +/***/ 19320: +/***/ ((module) => { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; } - return false; - } - var key = this.getKey(); - var iv = crypto.randomBytes(16); - var cipher = crypto.createCipheriv(algorithm, key, iv); - var crypted = cipher.update(data, unencryptedEncoding, encryptEncoding); - var cryptedFinal = cipher.final(encryptEncoding); - this._store[name] = iv.toString(encryptEncoding) + crypted + cryptedFinal; - return true; - }; - Vault.prototype.retrieveSecret = function (name) { - var secret; - name = (name || '').toLowerCase(); - if (this._store.hasOwnProperty(name)) { - var key = this.getKey(); - var data = this._store[name]; - var ivDataBuffer = Buffer.from(data, encryptEncoding); - var iv = ivDataBuffer.slice(0, 16); - var encryptedText = ivDataBuffer.slice(16); - var decipher = crypto.createDecipheriv(algorithm, key, iv); - var dec = decipher.update(encryptedText); - var decFinal = decipher.final(unencryptedEncoding); - secret = dec + decFinal; + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); } - return secret; - }; - Vault.prototype.getKey = function () { - var key = fs.readFileSync(this._keyFile).toString('utf8'); - // Key needs to be hashed to correct length to match algorithm (aes-256-ctr) - return crypto.createHash('sha256').update(key).digest(); - }; - Vault.prototype.genKey = function () { - fs.writeFileSync(this._keyFile, uuidV4(), { encoding: 'utf8' }); }; - return Vault; -}()); -exports.Vault = Vault; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; /***/ }), -/***/ 9417: +/***/ 88334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var implementation = __nccwpck_require__(19320); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 74538: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __nccwpck_require__(40587)(); +var hasProto = __nccwpck_require__(45894)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __nccwpck_require__(88334); +var hasOwn = __nccwpck_require__(76339); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 31621: /***/ ((module) => { "use strict"; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); +module.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; + + +/***/ }), + +/***/ 45894: +/***/ ((module) => { + +"use strict"; + + +var test = { + foo: {} +}; + +var $Object = Object; + +module.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); +}; + + +/***/ }), + +/***/ 40587: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __nccwpck_require__(57747); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 57747: +/***/ ((module) => { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 76339: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bind = __nccwpck_require__(88334); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + + +/***/ }), + +/***/ 98043: +/***/ ((module) => { + +"use strict"; + + +module.exports = (string, count = 1, options) => { + options = { + indent: ' ', + includeEmptyLines: false, + ...options + }; + + if (typeof string !== 'string') { + throw new TypeError( + `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` + ); + } + + if (typeof count !== 'number') { + throw new TypeError( + `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` + ); + } + + if (typeof options.indent !== 'string') { + throw new TypeError( + `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` + ); + } + + if (count === 0) { + return string; + } + + const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + + return string.replace(regex, options.indent.repeat(count)); +}; + + +/***/ }), + +/***/ 52492: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(62940) +var reqs = Object.create(null) +var once = __nccwpck_require__(1223) + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} + + +/***/ }), - var r = range(a, b, str); +/***/ 44124: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; +try { + var util = __nccwpck_require__(73837); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = __nccwpck_require__(8544); } -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; +/***/ }), - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; +/***/ 8544: +/***/ ((module) => { - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; + }) } - - if (begs.length) { - result = [ left, right ]; + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor } } - - return result; } /***/ }), -/***/ 3682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 63287: +/***/ ((__unused_webpack_module, exports) => { -var register = __nccwpck_require__(4670); -var addHook = __nccwpck_require__(5549); -var removeHook = __nccwpck_require__(6819); +"use strict"; -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind; -var bindable = bind.bind(bind); -function bindApi(hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); - }); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); -function HookSingular() { - var singularHookName = "h"; - var singularHookState = { - registry: {}, - }; - var singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; } -function HookCollection() { - var state = { - registry: {}, - }; +function isPlainObject(o) { + var ctor,prot; - var hook = register.bind(null, state); - bindApi(hook, state); + if (isObject(o) === false) return false; - return hook; -} + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; -var collectionHookDeprecationMessageDisplayed = false; -function Hook() { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn( - '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' - ); - collectionHookDeprecationMessageDisplayed = true; + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; } - return HookCollection(); -} -Hook.Singular = HookSingular.bind(); -Hook.Collection = HookCollection.bind(); + // Most likely a plain Object + return true; +} -module.exports = Hook; -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook; -module.exports.Singular = Hook.Singular; -module.exports.Collection = Hook.Collection; +exports.isPlainObject = isPlainObject; /***/ }), -/***/ 5549: -/***/ ((module) => { +/***/ 53359: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = addHook; +var jws = __nccwpck_require__(4636); -function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } +module.exports = function (jwt, options) { + options = options || {}; + var decoded = jws.decode(jwt, options); + if (!decoded) { return null; } + var payload = decoded.payload; - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; + //try parse the payload + if(typeof payload === 'string') { + try { + var obj = JSON.parse(payload); + if(obj !== null && typeof obj === 'object') { + payload = obj; + } + } catch (e) { } } - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; - }); + //return header if `complete` option is enabled. header includes claims + //such as `kid` and `alg` used to select the key within a JWKS needed to + //verify the signature + if (options.complete === true) { + return { + header: decoded.header, + payload: payload, + signature: decoded.signature }; } + return payload; +}; - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); - }); - }; - } - state.registry[name].push({ - hook: hook, - orig: orig, - }); -} +/***/ }), + +/***/ 77486: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + decode: __nccwpck_require__(53359), + verify: __nccwpck_require__(12327), + sign: __nccwpck_require__(82022), + JsonWebTokenError: __nccwpck_require__(405), + NotBeforeError: __nccwpck_require__(4383), + TokenExpiredError: __nccwpck_require__(46637), +}; /***/ }), -/***/ 4670: +/***/ 405: /***/ ((module) => { -module.exports = register; - -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); +var JsonWebTokenError = function (message, error) { + Error.call(this, message); + if(Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } + this.name = 'JsonWebTokenError'; + this.message = message; + if (error) this.inner = error; +}; - if (!options) { - options = {}; - } +JsonWebTokenError.prototype = Object.create(Error.prototype); +JsonWebTokenError.prototype.constructor = JsonWebTokenError; - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } +module.exports = JsonWebTokenError; - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); - } - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); -} +/***/ }), + +/***/ 4383: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var JsonWebTokenError = __nccwpck_require__(405); + +var NotBeforeError = function (message, date) { + JsonWebTokenError.call(this, message); + this.name = 'NotBeforeError'; + this.date = date; +}; + +NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype); + +NotBeforeError.prototype.constructor = NotBeforeError; +module.exports = NotBeforeError; /***/ }), -/***/ 6819: -/***/ ((module) => { +/***/ 46637: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = removeHook; +var JsonWebTokenError = __nccwpck_require__(405); -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } +var TokenExpiredError = function (message, expiredAt) { + JsonWebTokenError.call(this, message); + this.name = 'TokenExpiredError'; + this.expiredAt = expiredAt; +}; - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); +TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype); - if (index === -1) { - return; - } +TokenExpiredError.prototype.constructor = TokenExpiredError; - state.registry[name].splice(index, 1); -} +module.exports = TokenExpiredError; + +/***/ }), + +/***/ 7622: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const semver = __nccwpck_require__(43998); + +module.exports = semver.satisfies(process.version, '>=15.7.0'); /***/ }), -/***/ 1174: -/***/ (function(module) { +/***/ 59085: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support. - * https://github.com/SGrondin/bottleneck - */ -(function (global, factory) { - true ? module.exports = factory() : - 0; -}(this, (function () { 'use strict'; +var semver = __nccwpck_require__(43998); - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; +module.exports = semver.satisfies(process.version, '^6.12.0 || >=8.0.0'); - function getCjsExportFromNamespace (n) { - return n && n['default'] || n; - } - var load = function(received, defaults, onto = {}) { - var k, ref, v; - for (k in defaults) { - v = defaults[k]; - onto[k] = (ref = received[k]) != null ? ref : v; - } - return onto; - }; +/***/ }), - var overwrite = function(received, defaults, onto = {}) { - var k, v; - for (k in received) { - v = received[k]; - if (defaults[k] !== void 0) { - onto[k] = v; - } - } - return onto; - }; +/***/ 45170: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var parser = { - load: load, - overwrite: overwrite - }; +const semver = __nccwpck_require__(43998); - var DLList; +module.exports = semver.satisfies(process.version, '>=16.9.0'); - DLList = class DLList { - constructor(incr, decr) { - this.incr = incr; - this.decr = decr; - this._first = null; - this._last = null; - this.length = 0; - } - push(value) { - var node; - this.length++; - if (typeof this.incr === "function") { - this.incr(); - } - node = { - value, - prev: this._last, - next: null - }; - if (this._last != null) { - this._last.next = node; - this._last = node; - } else { - this._first = this._last = node; - } - return void 0; - } +/***/ }), - shift() { - var value; - if (this._first == null) { - return; - } else { - this.length--; - if (typeof this.decr === "function") { - this.decr(); - } - } - value = this._first.value; - if ((this._first = this._first.next) != null) { - this._first.prev = null; - } else { - this._last = null; - } - return value; - } +/***/ 46098: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - first() { - if (this._first != null) { - return this._first.value; - } - } +var ms = __nccwpck_require__(80900); - getArray() { - var node, ref, results; - node = this._first; - results = []; - while (node != null) { - results.push((ref = node, node = node.next, ref.value)); - } - return results; - } +module.exports = function (time, iat) { + var timestamp = iat || Math.floor(Date.now() / 1000); - forEachShift(cb) { - var node; - node = this.shift(); - while (node != null) { - (cb(node), node = this.shift()); - } - return void 0; - } + if (typeof time === 'string') { + var milliseconds = ms(time); + if (typeof milliseconds === 'undefined') { + return; + } + return Math.floor(timestamp + milliseconds / 1000); + } else if (typeof time === 'number') { + return timestamp + time; + } else { + return; + } - debug() { - var node, ref, ref1, ref2, results; - node = this._first; - results = []; - while (node != null) { - results.push((ref = node, node = node.next, { - value: ref.value, - prev: (ref1 = ref.prev) != null ? ref1.value : void 0, - next: (ref2 = ref.next) != null ? ref2.value : void 0 - })); - } - return results; - } +}; - }; +/***/ }), - var DLList_1 = DLList; +/***/ 47596: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var Events; +const ASYMMETRIC_KEY_DETAILS_SUPPORTED = __nccwpck_require__(7622); +const RSA_PSS_KEY_DETAILS_SUPPORTED = __nccwpck_require__(45170); - Events = class Events { - constructor(instance) { - this.instance = instance; - this._events = {}; - if ((this.instance.on != null) || (this.instance.once != null) || (this.instance.removeAllListeners != null)) { - throw new Error("An Emitter already exists for this object"); - } - this.instance.on = (name, cb) => { - return this._addListener(name, "many", cb); - }; - this.instance.once = (name, cb) => { - return this._addListener(name, "once", cb); - }; - this.instance.removeAllListeners = (name = null) => { - if (name != null) { - return delete this._events[name]; - } else { - return this._events = {}; - } - }; - } +const allowedAlgorithmsForKeys = { + 'ec': ['ES256', 'ES384', 'ES512'], + 'rsa': ['RS256', 'PS256', 'RS384', 'PS384', 'RS512', 'PS512'], + 'rsa-pss': ['PS256', 'PS384', 'PS512'] +}; - _addListener(name, status, cb) { - var base; - if ((base = this._events)[name] == null) { - base[name] = []; - } - this._events[name].push({cb, status}); - return this.instance; - } +const allowedCurves = { + ES256: 'prime256v1', + ES384: 'secp384r1', + ES512: 'secp521r1', +}; - listenerCount(name) { - if (this._events[name] != null) { - return this._events[name].length; - } else { - return 0; - } - } +module.exports = function(algorithm, key) { + if (!algorithm || !key) return; - async trigger(name, ...args) { - var e, promises; - try { - if (name !== "debug") { - this.trigger("debug", `Event triggered: ${name}`, args); - } - if (this._events[name] == null) { - return; - } - this._events[name] = this._events[name].filter(function(listener) { - return listener.status !== "none"; - }); - promises = this._events[name].map(async(listener) => { - var e, returned; - if (listener.status === "none") { - return; - } - if (listener.status === "once") { - listener.status = "none"; - } - try { - returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; - if (typeof (returned != null ? returned.then : void 0) === "function") { - return (await returned); - } else { - return returned; - } - } catch (error) { - e = error; - { - this.trigger("error", e); - } - return null; - } - }); - return ((await Promise.all(promises))).find(function(x) { - return x != null; - }); - } catch (error) { - e = error; - { - this.trigger("error", e); - } - return null; - } - } + const keyType = key.asymmetricKeyType; + if (!keyType) return; - }; + const allowedAlgorithms = allowedAlgorithmsForKeys[keyType]; - var Events_1 = Events; + if (!allowedAlgorithms) { + throw new Error(`Unknown key type "${keyType}".`); + } - var DLList$1, Events$1, Queues; + if (!allowedAlgorithms.includes(algorithm)) { + throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(', ')}.`) + } - DLList$1 = DLList_1; + /* + * Ignore the next block from test coverage because it gets executed + * conditionally depending on the Node version. Not ignoring it would + * prevent us from reaching the target % of coverage for versions of + * Node under 15.7.0. + */ + /* istanbul ignore next */ + if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) { + switch (keyType) { + case 'ec': + const keyCurve = key.asymmetricKeyDetails.namedCurve; + const allowedCurve = allowedCurves[algorithm]; - Events$1 = Events_1; + if (keyCurve !== allowedCurve) { + throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`); + } + break; - Queues = class Queues { - constructor(num_priorities) { - var i; - this.Events = new Events$1(this); - this._length = 0; - this._lists = (function() { - var j, ref, results; - results = []; - for (i = j = 1, ref = num_priorities; (1 <= ref ? j <= ref : j >= ref); i = 1 <= ref ? ++j : --j) { - results.push(new DLList$1((() => { - return this.incr(); - }), (() => { - return this.decr(); - }))); - } - return results; - }).call(this); - } + case 'rsa-pss': + if (RSA_PSS_KEY_DETAILS_SUPPORTED) { + const length = parseInt(algorithm.slice(-3), 10); + const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; - incr() { - if (this._length++ === 0) { - return this.Events.trigger("leftzero"); - } - } + if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) { + throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`); + } - decr() { - if (--this._length === 0) { - return this.Events.trigger("zero"); - } - } + if (saltLength !== undefined && saltLength > length >> 3) { + throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`) + } + } + break; + } + } +} - push(job) { - return this._lists[job.options.priority].push(job); - } - queued(priority) { - if (priority != null) { - return this._lists[priority].length; - } else { - return this._length; - } - } +/***/ }), - shiftAll(fn) { - return this._lists.forEach(function(list) { - return list.forEachShift(fn); - }); - } +/***/ 23269: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - getFirst(arr = this._lists) { - var j, len, list; - for (j = 0, len = arr.length; j < len; j++) { - list = arr[j]; - if (list.length > 0) { - return list; - } - } - return []; - } +"use strict"; - shiftLastFrom(priority) { - return this.getFirst(this._lists.slice(priority).reverse()).shift(); - } - }; +// A linked list to keep track of recently-used-ness +const Yallist = __nccwpck_require__(69885) - var Queues_1 = Queues; +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') - var BottleneckError; +const naiveLength = () => 1 - BottleneckError = class BottleneckError extends Error {}; +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } - var BottleneckError_1 = BottleneckError; + if (!options) + options = {} - var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity - NUM_PRIORITIES = 10; + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } - DEFAULT_PRIORITY = 5; + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') - parser$1 = parser; + this[MAX] = mL || Infinity + trim(this) + } + get max () { + return this[MAX] + } - BottleneckError$1 = BottleneckError_1; + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] + } - Job = class Job { - constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) { - this.task = task; - this.args = args; - this.rejectOnDrop = rejectOnDrop; - this.Events = Events; - this._states = _states; - this.Promise = Promise; - this.options = parser$1.load(options, jobDefaults); - this.options.priority = this._sanitizePriority(this.options.priority); - if (this.options.id === jobDefaults.id) { - this.options.id = `${this.options.id}-${this._randomIndex()}`; - } - this.promise = new this.Promise((_resolve, _reject) => { - this._resolve = _resolve; - this._reject = _reject; - }); - this.retryCount = 0; - } + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') - _sanitizePriority(priority) { - var sProperty; - sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; - if (sProperty < 0) { - return 0; - } else if (sProperty > NUM_PRIORITIES - 1) { - return NUM_PRIORITIES - 1; - } else { - return sProperty; - } - } + this[MAX_AGE] = mA + trim(this) + } + get maxAge () { + return this[MAX_AGE] + } - _randomIndex() { - return Math.random().toString(36).slice(2); - } + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') + lC = naiveLength - doDrop({error, message = "This job has been dropped by Bottleneck"} = {}) { - if (this._states.remove(this.options.id)) { - if (this.rejectOnDrop) { - this._reject(error != null ? error : new BottleneckError$1(message)); - } - this.Events.trigger("dropped", {args: this.args, options: this.options, task: this.task, promise: this.promise}); - return true; - } else { - return false; - } - } + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(hit => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator () { return this[LENGTH_CALCULATOR] } - _assertStatus(expected) { - var status; - status = this._states.jobStatus(this.options.id); - if (!(status === expected || (expected === "DONE" && status === null))) { - throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); - } - } + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } - doReceive() { - this._states.start(this.options.id); - return this.Events.trigger("received", {args: this.args, options: this.options}); - } + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } - doQueue(reachedHWM, blocked) { - this._assertStatus("RECEIVED"); - this._states.next(this.options.id); - return this.Events.trigger("queued", {args: this.args, options: this.options, reachedHWM, blocked}); - } + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } - doRun() { - if (this.retryCount === 0) { - this._assertStatus("QUEUED"); - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - return this.Events.trigger("scheduled", {args: this.args, options: this.options}); - } + keys () { + return this[LRU_LIST].toArray().map(k => k.key) + } - async doExecute(chained, clearGlobalState, run, free) { - var error, eventInfo, passed; - if (this.retryCount === 0) { - this._assertStatus("RUNNING"); - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; - this.Events.trigger("executing", eventInfo); - try { - passed = (await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args))); - if (clearGlobalState()) { - this.doDone(eventInfo); - await free(this.options, eventInfo); - this._assertStatus("DONE"); - return this._resolve(passed); - } - } catch (error1) { - error = error1; - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - } + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } - doExpire(clearGlobalState, run, free) { - var error, eventInfo; - if (this._states.jobStatus(this.options.id === "RUNNING")) { - this._states.next(this.options.id); - } - this._assertStatus("EXECUTING"); - eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; - error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } - async _onFailure(error, eventInfo, clearGlobalState, run, free) { - var retry, retryAfter; - if (clearGlobalState()) { - retry = (await this.Events.trigger("failed", error, eventInfo)); - if (retry != null) { - retryAfter = ~~retry; - this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); - this.retryCount++; - return run(retryAfter); - } else { - this.doDone(eventInfo); - await free(this.options, eventInfo); - this._assertStatus("DONE"); - return this._reject(error); - } - } - } + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list + } - doDone(eventInfo) { - this._assertStatus("EXECUTING"); - this._states.next(this.options.id); - return this.Events.trigger("done", eventInfo); - } + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter(h => h) + } - }; + dumpLru () { + return this[LRU_LIST] + } - var Job_1 = Job; + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] - var BottleneckError$2, LocalDatastore, parser$2; + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') - parser$2 = parser; + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) - BottleneckError$2 = BottleneckError_1; + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } - LocalDatastore = class LocalDatastore { - constructor(instance, storeOptions, storeInstanceOptions) { - this.instance = instance; - this.storeOptions = storeOptions; - this.clientId = this.instance._randomIndex(); - parser$2.load(storeInstanceOptions, storeInstanceOptions, this); - this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); - this._running = 0; - this._done = 0; - this._unblockTime = 0; - this.ready = this.Promise.resolve(); - this.clients = {}; - this._startHeartbeat(); - } + const node = this[CACHE].get(key) + const item = node.value - _startHeartbeat() { - var base; - if ((this.heartbeat == null) && (((this.storeOptions.reservoirRefreshInterval != null) && (this.storeOptions.reservoirRefreshAmount != null)) || ((this.storeOptions.reservoirIncreaseInterval != null) && (this.storeOptions.reservoirIncreaseAmount != null)))) { - return typeof (base = (this.heartbeat = setInterval(() => { - var amount, incr, maximum, now, reservoir; - now = Date.now(); - if ((this.storeOptions.reservoirRefreshInterval != null) && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { - this._lastReservoirRefresh = now; - this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; - this.instance._drainAll(this.computeCapacity()); - } - if ((this.storeOptions.reservoirIncreaseInterval != null) && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { - ({ - reservoirIncreaseAmount: amount, - reservoirIncreaseMaximum: maximum, - reservoir - } = this.storeOptions); - this._lastReservoirIncrease = now; - incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; - if (incr > 0) { - this.storeOptions.reservoir += incr; - return this.instance._drainAll(this.computeCapacity()); - } - } - }, this.heartbeatInterval))).unref === "function" ? base.unref() : void 0; - } else { - return clearInterval(this.heartbeat); - } - } + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } - async __publish__(message) { - await this.yieldLoop(); - return this.instance.Events.trigger("message", message.toString()); - } + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } - async __disconnect__(flush) { - await this.yieldLoop(); - clearInterval(this.heartbeat); - return this.Promise.resolve(); - } + const hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) + + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } - yieldLoop(t = 0) { - return new this.Promise(function(resolve, reject) { - return setTimeout(resolve, t); - }); - } + get (key) { + return get(this, key, true) + } - computePenalty() { - var ref; - return (ref = this.storeOptions.penalty) != null ? ref : (15 * this.storeOptions.minTime) || 5000; - } + peek (key) { + return get(this, key, false) + } - async __updateSettings__(options) { - await this.yieldLoop(); - parser$2.overwrite(options, options, this.storeOptions); - this._startHeartbeat(); - this.instance._drainAll(this.computeCapacity()); - return true; - } + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null - async __running__() { - await this.yieldLoop(); - return this._running; - } + del(this, node) + return node.value + } - async __queued__() { - await this.yieldLoop(); - return this.instance.queued(); - } + del (key) { + del(this, this[CACHE].get(key)) + } - async __done__() { - await this.yieldLoop(); - return this._done; - } + load (arr) { + // reset the cache + this.reset() - async __groupCheck__(time) { - await this.yieldLoop(); - return (this._nextRequest + this.timeout) < time; - } + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } - computeCapacity() { - var maxConcurrent, reservoir; - ({maxConcurrent, reservoir} = this.storeOptions); - if ((maxConcurrent != null) && (reservoir != null)) { - return Math.min(maxConcurrent - this._running, reservoir); - } else if (maxConcurrent != null) { - return maxConcurrent - this._running; - } else if (reservoir != null) { - return reservoir; - } else { - return null; - } - } + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } +} - conditionsCheck(weight) { - var capacity; - capacity = this.computeCapacity(); - return (capacity == null) || weight <= capacity; - } +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + return undefined + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() + self[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } +} - async __incrementReservoir__(incr) { - var reservoir; - await this.yieldLoop(); - reservoir = this.storeOptions.reservoir += incr; - this.instance._drainAll(this.computeCapacity()); - return reservoir; - } +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) + return false - async __currentReservoir__() { - await this.yieldLoop(); - return this.storeOptions.reservoir; - } + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) +} - isBlocked(now) { - return this._unblockTime >= now; - } +const trim = self => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + const prev = walker.prev + del(self, walker) + walker = prev + } + } +} - check(weight, now) { - return this.conditionsCheck(weight) && (this._nextRequest - now) <= 0; - } +const del = (self, node) => { + if (node) { + const hit = node.value + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value) - async __check__(weight) { - var now; - await this.yieldLoop(); - now = Date.now(); - return this.check(weight, now); - } + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} - async __register__(index, weight, expiration) { - var now, wait; - await this.yieldLoop(); - now = Date.now(); - if (this.conditionsCheck(weight)) { - this._running += weight; - if (this.storeOptions.reservoir != null) { - this.storeOptions.reservoir -= weight; - } - wait = Math.max(this._nextRequest - now, 0); - this._nextRequest = now + wait + this.storeOptions.minTime; - return { - success: true, - wait, - reservoir: this.storeOptions.reservoir - }; - } else { - return { - success: false - }; - } - } +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} - strategyIsBlock() { - return this.storeOptions.strategy === 3; - } +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) +} - async __submit__(queueLength, weight) { - var blocked, now, reachedHWM; - await this.yieldLoop(); - if ((this.storeOptions.maxConcurrent != null) && weight > this.storeOptions.maxConcurrent) { - throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`); - } - now = Date.now(); - reachedHWM = (this.storeOptions.highWater != null) && queueLength === this.storeOptions.highWater && !this.check(weight, now); - blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now)); - if (blocked) { - this._unblockTime = now + this.computePenalty(); - this._nextRequest = this._unblockTime + this.storeOptions.minTime; - this.instance._dropAllQueued(); - } - return { - reachedHWM, - blocked, - strategy: this.storeOptions.strategy - }; - } +module.exports = LRUCache - async __free__(index, weight) { - await this.yieldLoop(); - this._running -= weight; - this._done += weight; - this.instance._drainAll(this.computeCapacity()); - return { - running: this._running - }; - } - }; +/***/ }), - var LocalDatastore_1 = LocalDatastore; +/***/ 24644: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var BottleneckError$3, States; +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } - BottleneckError$3 = BottleneckError_1; + constructor (comp, options) { + options = parseOptions(options) - States = class States { - constructor(status1) { - this.status = status1; - this._jobs = {}; - this.counts = this.status.map(function() { - return 0; - }); - } + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } - next(id) { - var current, next; - current = this._jobs[id]; - next = current + 1; - if ((current != null) && next < this.status.length) { - this.counts[current]--; - this.counts[next]++; - return this._jobs[id]++; - } else if (current != null) { - this.counts[current]--; - return delete this._jobs[id]; - } - } + comp = comp.trim().split(/\s+/).join(' ') + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) - start(id) { - var initial; - initial = 0; - this._jobs[id] = initial; - return this.counts[initial]++; - } + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } - remove(id) { - var current; - current = this._jobs[id]; - if (current != null) { - this.counts[current]--; - delete this._jobs[id]; - } - return current != null; - } + debug('comp', this) + } - jobStatus(id) { - var ref; - return (ref = this.status[this._jobs[id]]) != null ? ref : null; - } + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) - statusJobs(status) { - var k, pos, ref, results, v; - if (status != null) { - pos = this.status.indexOf(status); - if (pos < 0) { - throw new BottleneckError$3(`status must be one of ${this.status.join(', ')}`); - } - ref = this._jobs; - results = []; - for (k in ref) { - v = ref[k]; - if (v === pos) { - results.push(k); - } - } - return results; - } else { - return Object.keys(this._jobs); - } - } + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } - statusCounts() { - return this.counts.reduce(((acc, v, i) => { - acc[this.status[i]] = v; - return acc; - }), {}); - } + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } - }; + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } - var States_1 = States; + toString () { + return this.value + } - var DLList$2, Sync; + test (version) { + debug('Comparator.test', version, this.options.loose) - DLList$2 = DLList_1; + if (this.semver === ANY || version === ANY) { + return true + } - Sync = class Sync { - constructor(name, Promise) { - this.schedule = this.schedule.bind(this); - this.name = name; - this.Promise = Promise; - this._running = 0; - this._queue = new DLList$2(); - } + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } - isEmpty() { - return this._queue.length === 0; - } + return cmp(version, this.operator, this.semver, this.options) + } - async _tryToRun() { - var args, cb, error, reject, resolve, returned, task; - if ((this._running < 1) && this._queue.length > 0) { - this._running++; - ({task, args, resolve, reject} = this._queue.shift()); - cb = (await (async function() { - try { - returned = (await task(...args)); - return function() { - return resolve(returned); - }; - } catch (error1) { - error = error1; - return function() { - return reject(error); - }; - } - })()); - this._running--; - this._tryToRun(); - return cb(); - } - } + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } - schedule(task, ...args) { - var promise, reject, resolve; - resolve = reject = null; - promise = new this.Promise(function(_resolve, _reject) { - resolve = _resolve; - return reject = _reject; - }); - this._queue.push({task, args, resolve, reject}); - this._tryToRun(); - return promise; - } + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } - }; + options = parseOptions(options) - var Sync_1 = Sync; + // Special cases where nothing can possibly be lower + if (options.includePrerelease && + (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { + return false + } + if (!options.includePrerelease && + (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { + return false + } - var version = "2.19.5"; - var version$1 = { - version: version - }; + // Same direction increasing (> or >=) + if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { + return true + } + // Same direction decreasing (< or <=) + if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { + return true + } + // same SemVer and both sides are inclusive (<= or >=) + if ( + (this.semver.version === comp.semver.version) && + this.operator.includes('=') && comp.operator.includes('=')) { + return true + } + // opposite directions less than + if (cmp(this.semver, '<', comp.semver, options) && + this.operator.startsWith('>') && comp.operator.startsWith('<')) { + return true + } + // opposite directions greater than + if (cmp(this.semver, '>', comp.semver, options) && + this.operator.startsWith('<') && comp.operator.startsWith('>')) { + return true + } + return false + } +} - var version$2 = /*#__PURE__*/Object.freeze({ - version: version, - default: version$1 - }); +module.exports = Comparator - var require$$2 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); +const parseOptions = __nccwpck_require__(85185) +const { safeRe: re, t } = __nccwpck_require__(3682) +const cmp = __nccwpck_require__(23621) +const debug = __nccwpck_require__(22935) +const SemVer = __nccwpck_require__(93402) +const Range = __nccwpck_require__(34502) - var require$$3 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - var require$$4 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); +/***/ }), - var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3; +/***/ 34502: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - parser$3 = parser; +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) - Events$2 = Events_1; + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } - RedisConnection$1 = require$$2; + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.format() + return this + } - IORedisConnection$1 = require$$3; + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease - Scripts$1 = require$$4; + // First reduce all whitespace as much as possible so we do not have to rely + // on potentially slow regexes like \s*. This is then stored and used for + // future error messages as well. + this.raw = range + .trim() + .split(/\s+/) + .join(' ') - Group = (function() { - class Group { - constructor(limiterOptions = {}) { - this.deleteKey = this.deleteKey.bind(this); - this.limiterOptions = limiterOptions; - parser$3.load(this.limiterOptions, this.defaults, this); - this.Events = new Events$2(this); - this.instances = {}; - this.Bottleneck = Bottleneck_1; - this._startAutoCleanup(); - this.sharedConnection = this.connection != null; - if (this.connection == null) { - if (this.limiterOptions.datastore === "redis") { - this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); - } else if (this.limiterOptions.datastore === "ioredis") { - this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); - } - } - } + // First, split on || + this.set = this.raw + .split('||') + // map the range to a 2d array of comparators + .map(r => this.parseRange(r.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) - key(key = "") { - var ref; - return (ref = this.instances[key]) != null ? ref : (() => { - var limiter; - limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { - id: `${this.id}-${key}`, - timeout: this.timeout, - connection: this.connection - })); - this.Events.trigger("created", limiter, key); - return limiter; - })(); - } + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`) + } - async deleteKey(key = "") { - var deleted, instance; - instance = this.instances[key]; - if (this.connection) { - deleted = (await this.connection.__runCommand__(['del', ...Scripts$1.allKeys(`${this.id}-${key}`)])); - } - if (instance != null) { - delete this.instances[key]; - await instance.disconnect(); - } - return (instance != null) || deleted > 0; - } + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) { + this.set = [first] + } else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } - limiters() { - var k, ref, results, v; - ref = this.instances; - results = []; - for (k in ref) { - v = ref[k]; - results.push({ - key: k, - limiter: v - }); - } - return results; - } + this.format() + } - keys() { - return Object.keys(this.instances); - } + format () { + this.range = this.set + .map((comps) => comps.join(' ').trim()) + .join('||') + .trim() + return this.range + } - async clusterKeys() { - var cursor, end, found, i, k, keys, len, next, start; - if (this.connection == null) { - return this.Promise.resolve(this.keys()); - } - keys = []; - cursor = null; - start = `b_${this.id}-`.length; - end = "_settings".length; - while (cursor !== 0) { - [next, found] = (await this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${this.id}-*_settings`, "count", 10000])); - cursor = ~~next; - for (i = 0, len = found.length; i < len; i++) { - k = found[i]; - keys.push(k.slice(start, -end)); - } - } - return keys; - } + toString () { + return this.range + } - _startAutoCleanup() { - var base; - clearInterval(this.interval); - return typeof (base = (this.interval = setInterval(async() => { - var e, k, ref, results, time, v; - time = Date.now(); - ref = this.instances; - results = []; - for (k in ref) { - v = ref[k]; - try { - if ((await v._store.__groupCheck__(time))) { - results.push(this.deleteKey(k)); - } else { - results.push(void 0); - } - } catch (error) { - e = error; - results.push(v.Events.trigger("error", e)); - } - } - return results; - }, this.timeout / 2))).unref === "function" ? base.unref() : void 0; - } + parseRange (range) { + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = + (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | + (this.options.loose && FLAG_LOOSE) + const memoKey = memoOpts + ':' + range + const cached = cache.get(memoKey) + if (cached) { + return cached + } - updateSettings(options = {}) { - parser$3.overwrite(options, this.defaults, this); - parser$3.overwrite(options, options, this.limiterOptions); - if (options.timeout != null) { - return this._startAutoCleanup(); - } - } + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) - disconnect(flush = true) { - var ref; - if (!this.sharedConnection) { - return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; - } - } + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range) - } - Group.prototype.defaults = { - timeout: 1000 * 60 * 5, - connection: null, - Promise: Promise, - id: "group-key" - }; + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + debug('tilde trim', range) - return Group; + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + debug('caret trim', range) - }).call(commonjsGlobal); + // At this point, the range is completely trimmed and + // ready to be split into comparators. - var Group_1 = Group; + let rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) - var Batcher, Events$3, parser$4; + if (loose) { + // in loose mode, throw out any that are not valid comparators + rangeList = rangeList.filter(comp => { + debug('loose invalid filter', comp, this.options) + return !!comp.match(re[t.COMPARATORLOOSE]) + }) + } + debug('range list', rangeList) - parser$4 = parser; + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const rangeMap = new Map() + const comparators = rangeList.map(comp => new Comparator(comp, this.options)) + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp] + } + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) { + rangeMap.delete('') + } - Events$3 = Events_1; + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } - Batcher = (function() { - class Batcher { - constructor(options = {}) { - this.options = options; - parser$4.load(this.options, this.defaults, this); - this.Events = new Events$3(this); - this._arr = []; - this._resetPromise(); - this._lastFlush = Date.now(); - } + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } - _resetPromise() { - return this._promise = new this.Promise((res, rej) => { - return this._resolve = res; - }); - } + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } - _flush() { - clearTimeout(this._timeout); - this._lastFlush = Date.now(); - this._resolve(); - this.Events.trigger("batch", this._arr); - this._arr = []; - return this._resetPromise(); - } + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false + } - add(data) { - var ret; - this._arr.push(data); - ret = this._promise; - if (this._arr.length === this.maxSize) { - this._flush(); - } else if ((this.maxTime != null) && this._arr.length === 1) { - this._timeout = setTimeout(() => { - return this._flush(); - }, this.maxTime); - } - return ret; - } + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } - } - Batcher.prototype.defaults = { - maxTime: null, - maxSize: null, - Promise: Promise - }; + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false + } +} - return Batcher; +module.exports = Range - }).call(commonjsGlobal); +const LRU = __nccwpck_require__(23269) +const cache = new LRU({ max: 1000 }) - var Batcher_1 = Batcher; +const parseOptions = __nccwpck_require__(85185) +const Comparator = __nccwpck_require__(24644) +const debug = __nccwpck_require__(22935) +const SemVer = __nccwpck_require__(93402) +const { + safeRe: re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace, +} = __nccwpck_require__(3682) +const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(97344) - var require$$4$1 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' - var require$$8 = getCjsExportFromNamespace(version$2); +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() - var Bottleneck, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, - splice = [].splice; + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) - NUM_PRIORITIES$1 = 10; + testComparator = remainingComparators.pop() + } - DEFAULT_PRIORITY$1 = 5; + return result +} - parser$5 = parser; +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} - Queues$1 = Queues_1; +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - Job$1 = Job_1; +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +// ~0.0.1 --> >=0.0.1 <0.1.0-0 +const replaceTildes = (comp, options) => { + return comp + .trim() + .split(/\s+/) + .map((c) => replaceTilde(c, options)) + .join(' ') +} - LocalDatastore$1 = LocalDatastore_1; +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret - RedisDatastore$1 = require$$4$1; + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } - Events$4 = Events_1; + debug('tilde return', ret) + return ret + }) +} - States$1 = States_1; +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +// ^0.0.1 --> >=0.0.1 <0.0.2-0 +// ^0.1.0 --> >=0.1.0 <0.2.0-0 +const replaceCarets = (comp, options) => { + return comp + .trim() + .split(/\s+/) + .map((c) => replaceCaret(c, options)) + .join(' ') +} - Sync$1 = Sync_1; +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret - Bottleneck = (function() { - class Bottleneck { - constructor(options = {}, ...invalid) { - var storeInstanceOptions, storeOptions; - this._addToQueue = this._addToQueue.bind(this); - this._validateOptions(options, invalid); - parser$5.load(options, this.instanceDefaults, this); - this._queues = new Queues$1(NUM_PRIORITIES$1); - this._scheduled = {}; - this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); - this._limiter = null; - this.Events = new Events$4(this); - this._submitLock = new Sync$1("submit", this.Promise); - this._registerLock = new Sync$1("register", this.Promise); - storeOptions = parser$5.load(options, this.storeDefaults, {}); - this._store = (function() { - if (this.datastore === "redis" || this.datastore === "ioredis" || (this.connection != null)) { - storeInstanceOptions = parser$5.load(options, this.redisStoreDefaults, {}); - return new RedisDatastore$1(this, storeOptions, storeInstanceOptions); - } else if (this.datastore === "local") { - storeInstanceOptions = parser$5.load(options, this.localStoreDefaults, {}); - return new LocalDatastore$1(this, storeOptions, storeInstanceOptions); - } else { - throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); - } - }).call(this); - this._queues.on("leftzero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; - }); - this._queues.on("zero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; - }); - } + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + }${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + }${z} <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` + } + } - _validateOptions(options, invalid) { - if (!((options != null) && typeof options === "object" && invalid.length === 0)) { - throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); - } - } + debug('caret return', ret) + return ret + }) +} - ready() { - return this._store.ready; - } +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp + .split(/\s+/) + .map((c) => replaceXRange(c, options)) + .join(' ') +} - clients() { - return this._store.clients; - } +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp - channel() { - return `b_${this.id}`; - } + if (gtlt === '=' && anyX) { + gtlt = '' + } - channel_client() { - return `b_${this.id}_${this._store.clientId}`; - } + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' - publish(message) { - return this._store.__publish__(message); - } + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 - disconnect(flush = true) { - return this._store.__disconnect__(flush); - } + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } - chain(_limiter) { - this._limiter = _limiter; - return this; - } + if (gtlt === '<') { + pr = '-0' + } - queued(priority) { - return this._queues.queued(priority); - } + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` + } - clusterQueued() { - return this._store.__queued__(); - } + debug('xRange return', ret) - empty() { - return this.queued() === 0 && this._submitLock.isEmpty(); - } + return ret + }) +} - running() { - return this._store.__running__(); - } +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp + .trim() + .replace(re[t.STAR], '') +} - done() { - return this._store.__done__(); - } +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp + .trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} - jobStatus(id) { - return this._states.jobStatus(id); - } +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } - jobs(status) { - return this._states.statusJobs(status); - } + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } - counts() { - return this._states.statusCounts(); - } + return `${from} ${to}`.trim() +} - _randomIndex() { - return Math.random().toString(36).slice(2); - } +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } - check(weight = 1) { - return this._store.__check__(weight); - } + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } - _clearGlobalState(index) { - if (this._scheduled[index] != null) { - clearTimeout(this._scheduled[index].expiration); - delete this._scheduled[index]; - return true; - } else { - return false; - } - } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } - async _free(index, job, options, eventInfo) { - var e, running; - try { - ({running} = (await this._store.__free__(index, options.weight))); - this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); - if (running === 0 && this.empty()) { - return this.Events.trigger("idle"); - } - } catch (error1) { - e = error1; - return this.Events.trigger("error", e); - } - } + // Version has a -pre, but it's not one of the ones we like. + return false + } - _run(index, job, wait) { - var clearGlobalState, free, run; - job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { - timeout: setTimeout(() => { - return job.doExecute(this._limiter, clearGlobalState, run, free); - }, wait), - expiration: job.options.expiration != null ? setTimeout(function() { - return job.doExpire(clearGlobalState, run, free); - }, wait + job.options.expiration) : void 0, - job: job - }; - } + return true +} - _drainOne(capacity) { - return this._registerLock.schedule(() => { - var args, index, next, options, queue; - if (this.queued() === 0) { - return this.Promise.resolve(null); - } - queue = this._queues.getFirst(); - ({options, args} = next = queue.first()); - if ((capacity != null) && options.weight > capacity) { - return this.Promise.resolve(null); - } - this.Events.trigger("debug", `Draining ${options.id}`, {args, options}); - index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({success, wait, reservoir}) => { - var empty; - this.Events.trigger("debug", `Drained ${options.id}`, {success, args, options}); - if (success) { - queue.shift(); - empty = this.empty(); - if (empty) { - this.Events.trigger("empty"); - } - if (reservoir === 0) { - this.Events.trigger("depleted", empty); - } - this._run(index, next, wait); - return this.Promise.resolve(options.weight); - } else { - return this.Promise.resolve(null); - } - }); - }); - } - _drainAll(capacity, total = 0) { - return this._drainOne(capacity).then((drained) => { - var newCapacity; - if (drained != null) { - newCapacity = capacity != null ? capacity - drained : capacity; - return this._drainAll(newCapacity, total + drained); - } else { - return this.Promise.resolve(total); - } - }).catch((e) => { - return this.Events.trigger("error", e); - }); - } +/***/ }), - _dropAllQueued(message) { - return this._queues.shiftAll(function(job) { - return job.doDrop({message}); - }); - } +/***/ 93402: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - stop(options = {}) { - var done, waitForExecuting; - options = parser$5.load(options, this.stopDefaults); - waitForExecuting = (at) => { - var finished; - finished = () => { - var counts; - counts = this._states.counts; - return (counts[0] + counts[1] + counts[2] + counts[3]) === at; - }; - return new this.Promise((resolve, reject) => { - if (finished()) { - return resolve(); - } else { - return this.on("done", () => { - if (finished()) { - this.removeAllListeners("done"); - return resolve(); - } - }); - } - }); - }; - done = options.dropWaitingJobs ? (this._run = function(index, next) { - return next.doDrop({ - message: options.dropErrorMessage - }); - }, this._drainOne = () => { - return this.Promise.resolve(null); - }, this._registerLock.schedule(() => { - return this._submitLock.schedule(() => { - var k, ref, v; - ref = this._scheduled; - for (k in ref) { - v = ref[k]; - if (this.jobStatus(v.job.options.id) === "RUNNING") { - clearTimeout(v.timeout); - clearTimeout(v.expiration); - v.job.doDrop({ - message: options.dropErrorMessage - }); - } - } - this._dropAllQueued(options.dropErrorMessage); - return waitForExecuting(0); - }); - })) : this.schedule({ - priority: NUM_PRIORITIES$1 - 1, - weight: 0 - }, () => { - return waitForExecuting(1); - }); - this._receive = function(job) { - return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage)); - }; - this.stop = () => { - return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called")); - }; - return done; - } +const debug = __nccwpck_require__(22935) +const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(97344) +const { safeRe: re, t } = __nccwpck_require__(3682) - async _addToQueue(job) { - var args, blocked, error, options, reachedHWM, shifted, strategy; - ({args, options} = job); - try { - ({reachedHWM, blocked, strategy} = (await this._store.__submit__(this.queued(), options.weight))); - } catch (error1) { - error = error1; - this.Events.trigger("debug", `Could not queue ${options.id}`, {args, options, error}); - job.doDrop({error}); - return false; - } - if (blocked) { - job.doDrop(); - return true; - } else if (reachedHWM) { - shifted = strategy === Bottleneck.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0; - if (shifted != null) { - shifted.doDrop(); - } - if ((shifted == null) || strategy === Bottleneck.prototype.strategy.OVERFLOW) { - if (shifted == null) { - job.doDrop(); - } - return reachedHWM; - } - } - job.doQueue(reachedHWM, blocked); - this._queues.push(job); - await this._drainAll(); - return reachedHWM; - } +const parseOptions = __nccwpck_require__(85185) +const { compareIdentifiers } = __nccwpck_require__(22179) +class SemVer { + constructor (version, options) { + options = parseOptions(options) - _receive(job) { - if (this._states.jobStatus(job.options.id) != null) { - job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); - return false; - } else { - job.doReceive(); - return this._submitLock.schedule(this._addToQueue, job); - } - } + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) + } - submit(...args) { - var cb, fn, job, options, ref, ref1, task; - if (typeof args[0] === "function") { - ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); - options = parser$5.load({}, this.jobDefaults); - } else { - ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); - options = parser$5.load(options, this.jobDefaults); - } - task = (...args) => { - return new this.Promise(function(resolve, reject) { - return fn(...args, function(...args) { - return (args[0] != null ? reject : resolve)(args); - }); - }); - }; - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - job.promise.then(function(args) { - return typeof cb === "function" ? cb(...args) : void 0; - }).catch(function(args) { - if (Array.isArray(args)) { - return typeof cb === "function" ? cb(...args) : void 0; - } else { - return typeof cb === "function" ? cb(args) : void 0; - } - }); - return this._receive(job); - } + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) + } - schedule(...args) { - var job, options, task; - if (typeof args[0] === "function") { - [task, ...args] = args; - options = {}; - } else { - [options, task, ...args] = args; - } - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - this._receive(job); - return job.promise; - } + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease - wrap(fn) { - var schedule, wrapped; - schedule = this.schedule.bind(this); - wrapped = function(...args) { - return schedule(fn.bind(this), ...args); - }; - wrapped.withOptions = function(options, ...args) { - return schedule(options, fn, ...args); - }; - return wrapped; - } + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - async updateSettings(options = {}) { - await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); - parser$5.overwrite(options, this.instanceDefaults, this); - return this; - } + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } - currentReservoir() { - return this._store.__currentReservoir__(); - } + this.raw = version - incrementReservoir(incr = 0) { - return this._store.__incrementReservoir__(incr); - } + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] - } - Bottleneck.default = Bottleneck; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } - Bottleneck.Events = Events$4; + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } - Bottleneck.version = Bottleneck.prototype.version = require$$8.version; + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } - Bottleneck.strategy = Bottleneck.prototype.strategy = { - LEAK: 1, - OVERFLOW: 2, - OVERFLOW_PRIORITY: 4, - BLOCK: 3 - }; + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } - Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1; + this.build = m[5] ? m[5].split('.') : [] + this.format() + } - Bottleneck.Group = Bottleneck.prototype.Group = Group_1; + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } - Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require$$2; + toString () { + return this.version + } - Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require$$3; + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } - Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1; + if (other.version === this.version) { + return 0 + } - Bottleneck.prototype.jobDefaults = { - priority: DEFAULT_PRIORITY$1, - weight: 1, - expiration: null, - id: "" - }; + return this.compareMain(other) || this.comparePre(other) + } - Bottleneck.prototype.storeDefaults = { - maxConcurrent: null, - minTime: 0, - highWater: null, - strategy: Bottleneck.prototype.strategy.LEAK, - penalty: null, - reservoir: null, - reservoirRefreshInterval: null, - reservoirRefreshAmount: null, - reservoirIncreaseInterval: null, - reservoirIncreaseAmount: null, - reservoirIncreaseMaximum: null - }; + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } - Bottleneck.prototype.localStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 250 - }; + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } - Bottleneck.prototype.redisStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 5000, - clientTimeout: 10000, - Redis: null, - clientOptions: {}, - clusterNodes: null, - clearDatastore: false, - connection: null - }; + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } - Bottleneck.prototype.instanceDefaults = { - datastore: "local", - connection: null, - id: "", - rejectOnDrop: true, - trackDoneStatus: false, - Promise: Promise - }; + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } - Bottleneck.prototype.stopDefaults = { - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", - dropWaitingJobs: true, - dropErrorMessage: "This limiter has been stopped." - }; + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } - return Bottleneck; + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } - }).call(commonjsGlobal); + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } - var Bottleneck_1 = Bottleneck; + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier, identifierBase) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier, identifierBase) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier, identifierBase) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier, identifierBase) + this.inc('pre', identifier, identifierBase) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier, identifierBase) + } + this.inc('pre', identifier, identifierBase) + break - var lib = Bottleneck_1; + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': { + const base = Number(identifierBase) ? 1 : 0 - return lib; + if (!identifier && identifierBase === false) { + throw new Error('invalid increment argument: identifier is empty') + } -}))); + if (this.prerelease.length === 0) { + this.prerelease = [base] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + if (identifier === this.prerelease.join('.') && identifierBase === false) { + throw new Error('invalid increment argument: identifier already exists') + } + this.prerelease.push(base) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + let prerelease = [identifier, base] + if (identifierBase === false) { + prerelease = [identifier] + } + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = prerelease + } + } else { + this.prerelease = prerelease + } + } + break + } + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.raw = this.format() + if (this.build.length) { + this.raw += `+${this.build.join('.')}` + } + return this + } +} + +module.exports = SemVer /***/ }), -/***/ 3717: +/***/ 18751: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var concatMap = __nccwpck_require__(6891); -var balanced = __nccwpck_require__(9417); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); +const parse = __nccwpck_require__(53371) +const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null } +module.exports = clean -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} +/***/ }), -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; +/***/ 23621: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var parts = []; - var m = balanced('{', '}', str); +const eq = __nccwpck_require__(59792) +const neq = __nccwpck_require__(30658) +const gt = __nccwpck_require__(47040) +const gte = __nccwpck_require__(97445) +const lt = __nccwpck_require__(16054) +const lte = __nccwpck_require__(79387) - if (!m) - return str.split(','); +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') { + a = a.version + } + if (typeof b === 'object') { + b = b.version + } + return a === b - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); + case '!==': + if (typeof a === 'object') { + a = a.version + } + if (typeof b === 'object') { + b = b.version + } + return a !== b - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } + case '': + case '=': + case '==': + return eq(a, b, loose) - parts.push.apply(parts, p); + case '!=': + return neq(a, b, loose) - return parts; -} + case '>': + return gt(a, b, loose) -function expandTop(str) { - if (!str) - return []; + case '>=': + return gte(a, b, loose) - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } + case '<': + return lt(a, b, loose) - return expand(escapeBraces(str), true).map(unescapeBraces); -} + case '<=': + return lte(a, b, loose) -function identity(e) { - return e; + default: + throw new TypeError(`Invalid operator: ${op}`) + } } +module.exports = cmp -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} +/***/ }), -function expand(str, isTop) { - var expansions = []; +/***/ 85766: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; +const SemVer = __nccwpck_require__(93402) +const parse = __nccwpck_require__(53371) +const { safeRe: re, t } = __nccwpck_require__(3682) - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; +const coerce = (version, options) => { + if (version instanceof SemVer) { + return version } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } + if (typeof version === 'number') { + version = String(version) } - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); + if (typeof version !== 'string') { + return null + } - N = []; + options = options || {} - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } + let match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + let next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next } - N.push(c); + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } + if (match === null) { + return null } - return expansions; + return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) } - +module.exports = coerce /***/ }), -/***/ 2358: -/***/ ((module) => { +/***/ 1036: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = function btoa(str) { - return new Buffer(str).toString('base64') +const SemVer = __nccwpck_require__(93402) +const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) } +module.exports = compareBuild /***/ }), -/***/ 9239: +/***/ 4626: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -/*jshint node:true */ +const compare = __nccwpck_require__(24343) +const compareLoose = (a, b) => compare(a, b, true) +module.exports = compareLoose -var Buffer = (__nccwpck_require__(4300).Buffer); // browserify -var SlowBuffer = (__nccwpck_require__(4300).SlowBuffer); -module.exports = bufferEq; +/***/ }), -function bufferEq(a, b) { +/***/ 24343: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // shortcutting on type is necessary for correctness - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - return false; - } +const SemVer = __nccwpck_require__(93402) +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) - // buffer sizes should be well-known information, so despite this - // shortcutting, it doesn't leak any information about the *contents* of the - // buffers. - if (a.length !== b.length) { - return false; - } +module.exports = compare - var c = 0; - for (var i = 0; i < a.length; i++) { - /*jshint bitwise:false */ - c |= a[i] ^ b[i]; // XOR + +/***/ }), + +/***/ 94836: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const parse = __nccwpck_require__(53371) + +const diff = (version1, version2) => { + const v1 = parse(version1, null, true) + const v2 = parse(version2, null, true) + const comparison = v1.compare(v2) + + if (comparison === 0) { + return null } - return c === 0; -} -bufferEq.install = function() { - Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { - return bufferEq(this, that); - }; -}; + const v1Higher = comparison > 0 + const highVersion = v1Higher ? v1 : v2 + const lowVersion = v1Higher ? v2 : v1 + const highHasPre = !!highVersion.prerelease.length + const lowHasPre = !!lowVersion.prerelease.length -var origBufEqual = Buffer.prototype.equal; -var origSlowBufEqual = SlowBuffer.prototype.equal; -bufferEq.restore = function() { - Buffer.prototype.equal = origBufEqual; - SlowBuffer.prototype.equal = origSlowBufEqual; -}; + if (lowHasPre && !highHasPre) { + // Going from prerelease -> no prerelease requires some special casing + // If the low version has only a major, then it will always be a major + // Some examples: + // 1.0.0-1 -> 1.0.0 + // 1.0.0-1 -> 1.1.1 + // 1.0.0-1 -> 2.0.0 + if (!lowVersion.patch && !lowVersion.minor) { + return 'major' + } -/***/ }), + // Otherwise it can be determined by checking the high version -/***/ 8803: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (highVersion.patch) { + // anything higher than a patch bump would result in the wrong version + return 'patch' + } -"use strict"; + if (highVersion.minor) { + // anything higher than a minor bump would result in the wrong version + return 'minor' + } + // bumping major/minor/patch all have same result + return 'major' + } -var GetIntrinsic = __nccwpck_require__(4538); + // add the `pre` prefix if we are going to a prerelease version + const prefix = highHasPre ? 'pre' : '' -var callBind = __nccwpck_require__(2977); + if (v1.major !== v2.major) { + return prefix + 'major' + } -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + if (v1.minor !== v2.minor) { + return prefix + 'minor' + } -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBind(intrinsic); - } - return intrinsic; -}; + if (v1.patch !== v2.patch) { + return prefix + 'patch' + } + + // high and low are preleases + return 'prerelease' +} + +module.exports = diff /***/ }), -/***/ 2977: +/***/ 59792: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const compare = __nccwpck_require__(24343) +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq -var bind = __nccwpck_require__(8334); -var GetIntrinsic = __nccwpck_require__(4538); +/***/ }), -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); +/***/ 47040: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); -var $max = GetIntrinsic('%Math.max%'); +const compare = __nccwpck_require__(24343) +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} -module.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, 'length'); - if (desc.configurable) { - // original length, plus the receiver, minus any additional arguments (after the receiver) - $defineProperty( - func, - 'length', - { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } - ); - } - } - return func; -}; +/***/ }), -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; +/***/ 97445: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { value: applyBind }); -} else { - module.exports.apply = applyBind; -} +const compare = __nccwpck_require__(24343) +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte /***/ }), -/***/ 7972: +/***/ 88877: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; - -const os = __nccwpck_require__(2037); - -const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; -const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; -const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); +const SemVer = __nccwpck_require__(93402) -module.exports = (stack, options) => { - options = Object.assign({pretty: false}, options); +const inc = (version, release, options, identifier, identifierBase) => { + if (typeof (options) === 'string') { + identifierBase = identifier + identifier = options + options = undefined + } - return stack.replace(/\\/g, '/') - .split('\n') - .filter(line => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } + try { + return new SemVer( + version instanceof SemVer ? version.version : version, + options + ).inc(release, identifier, identifierBase).version + } catch (er) { + return null + } +} +module.exports = inc - const match = pathMatches[1]; - // Electron - if ( - match.includes('.app/Contents/Resources/electron.asar') || - match.includes('.app/Contents/Resources/default_app.asar') - ) { - return false; - } +/***/ }), - return !pathRegex.test(match); - }) - .filter(line => line.trim() !== '') - .map(line => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); - } +/***/ 16054: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return line; - }) - .join('\n'); -}; +const compare = __nccwpck_require__(24343) +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt /***/ }), -/***/ 5443: +/***/ 79387: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var util = __nccwpck_require__(3837); -var Stream = (__nccwpck_require__(2781).Stream); -var DelayedStream = __nccwpck_require__(8611); +const compare = __nccwpck_require__(24343) +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; -} -util.inherits(CombinedStream, Stream); +/***/ }), -CombinedStream.create = function(options) { - var combinedStream = new this(); +/***/ 57269: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } +const SemVer = __nccwpck_require__(93402) +const major = (a, loose) => new SemVer(a, loose).major +module.exports = major - return combinedStream; -}; -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; +/***/ }), -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); +/***/ 59725: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } +const SemVer = __nccwpck_require__(93402) +const minor = (a, loose) => new SemVer(a, loose).minor +module.exports = minor - this._handleErrors(stream); - if (this.pauseStreams) { - stream.pause(); - } - } +/***/ }), - this._streams.push(stream); - return this; -}; +/***/ 30658: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; +const compare = __nccwpck_require__(24343) +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } +/***/ }), - this._insideLoop = true; +/***/ 53371: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(93402) +const parse = (version, options, throwErrors = false) => { + if (version instanceof SemVer) { + return version + } try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; + return new SemVer(version, options) + } catch (er) { + if (!throwErrors) { + return null + } + throw er } -}; +} -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); +module.exports = parse - if (typeof stream == 'undefined') { - this.end(); - return; - } +/***/ }), - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } +/***/ 98691: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } +const SemVer = __nccwpck_require__(93402) +const patch = (a, loose) => new SemVer(a, loose).patch +module.exports = patch - this._pipeNext(stream); - }.bind(this)); -}; -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; +/***/ }), - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } +/***/ 47892: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var value = stream; - this.write(value); - this._getNext(); -}; +const parse = __nccwpck_require__(53371) +const prerelease = (version, options) => { + const parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} +module.exports = prerelease -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; +/***/ }), -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } +/***/ 98227: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; +const compare = __nccwpck_require__(24343) +const rcompare = (a, b, loose) => compare(b, a, loose) +module.exports = rcompare -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; +/***/ }), -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; +/***/ 24590: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; +const compareBuild = __nccwpck_require__(1036) +const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) +module.exports = rsort -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } +/***/ }), - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); -}; +/***/ 45056: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; +const Range = __nccwpck_require__(34502) +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} +module.exports = satisfies - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - self.dataSize += stream.dataSize; - }); +/***/ }), - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; +/***/ 52340: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; +const compareBuild = __nccwpck_require__(1036) +const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) +module.exports = sort /***/ }), -/***/ 6891: -/***/ ((module) => { - -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; +/***/ 85715: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; +const parse = __nccwpck_require__(53371) +const valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null +} +module.exports = valid /***/ }), -/***/ 8222: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 43998: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/* eslint-env browser */ +// just pre-load all the stuff that index.js lazily exports +const internalRe = __nccwpck_require__(3682) +const constants = __nccwpck_require__(97344) +const SemVer = __nccwpck_require__(93402) +const identifiers = __nccwpck_require__(22179) +const parse = __nccwpck_require__(53371) +const valid = __nccwpck_require__(85715) +const clean = __nccwpck_require__(18751) +const inc = __nccwpck_require__(88877) +const diff = __nccwpck_require__(94836) +const major = __nccwpck_require__(57269) +const minor = __nccwpck_require__(59725) +const patch = __nccwpck_require__(98691) +const prerelease = __nccwpck_require__(47892) +const compare = __nccwpck_require__(24343) +const rcompare = __nccwpck_require__(98227) +const compareLoose = __nccwpck_require__(4626) +const compareBuild = __nccwpck_require__(1036) +const sort = __nccwpck_require__(52340) +const rsort = __nccwpck_require__(24590) +const gt = __nccwpck_require__(47040) +const lt = __nccwpck_require__(16054) +const eq = __nccwpck_require__(59792) +const neq = __nccwpck_require__(30658) +const gte = __nccwpck_require__(97445) +const lte = __nccwpck_require__(79387) +const cmp = __nccwpck_require__(23621) +const coerce = __nccwpck_require__(85766) +const Comparator = __nccwpck_require__(24644) +const Range = __nccwpck_require__(34502) +const satisfies = __nccwpck_require__(45056) +const toComparators = __nccwpck_require__(54676) +const maxSatisfying = __nccwpck_require__(5471) +const minSatisfying = __nccwpck_require__(65356) +const minVersion = __nccwpck_require__(7825) +const validRange = __nccwpck_require__(66895) +const outside = __nccwpck_require__(8629) +const gtr = __nccwpck_require__(98360) +const ltr = __nccwpck_require__(53270) +const intersects = __nccwpck_require__(1373) +const simplifyRange = __nccwpck_require__(94336) +const subset = __nccwpck_require__(54979) +module.exports = { + parse, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers, +} -/** - * This is the web browser implementation of `debug()`. - */ -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; +/***/ }), - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); +/***/ 97344: +/***/ ((module) => { -/** - * Colors. - */ +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || +/* istanbul ignore next */ 9007199254740991 -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } +// Max safe length for a build identifier. The max length minus 6 characters for +// the shortest version with a build 0.0.0+BUILD. +const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } +const RELEASE_TYPES = [ + 'major', + 'premajor', + 'minor', + 'preminor', + 'patch', + 'prepatch', + 'prerelease', +] - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +module.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 0b001, + FLAG_LOOSE: 0b010, } -/** - * Colorize log arguments if enabled. - * - * @api public - */ -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); +/***/ }), - if (!this.useColors) { - return; - } +/***/ 22935: +/***/ ((module) => { - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); +module.exports = debug - args.splice(lastC, 0, c); -} -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); +/***/ }), -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} +/***/ 22179: +/***/ ((module) => { -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } + if (anum && bnum) { + a = +a + b = +b + } - return r; + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 } -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } +module.exports = { + compareIdentifiers, + rcompareIdentifiers, } -module.exports = __nccwpck_require__(6243)(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; - /***/ }), -/***/ 6243: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 85185: +/***/ ((module) => { +// parse out just the options we care about +const looseOption = Object.freeze({ loose: true }) +const emptyOpts = Object.freeze({ }) +const parseOptions = options => { + if (!options) { + return emptyOpts + } -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ + if (typeof options !== 'object') { + return looseOption + } -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __nccwpck_require__(900); - createDebug.destroy = destroy; + return options +} +module.exports = parseOptions - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - /** - * The currently active debug mode names, and names to skip. - */ +/***/ }), - createDebug.names = []; - createDebug.skips = []; +/***/ 3682: +/***/ ((module, exports, __nccwpck_require__) => { - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; +const { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH, +} = __nccwpck_require__(97344) +const debug = __nccwpck_require__(22935) +exports = module.exports = {} - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; +// The actual regexps go on exports.re +const re = exports.re = [] +const safeRe = exports.safeRe = [] +const src = exports.src = [] +const t = exports.t = {} +let R = 0 - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } +const LETTERDASHNUMBER = '[a-zA-Z0-9-]' - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +const safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; +const makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value + .split(`${token}*`).join(`${token}{0,${max}}`) + .split(`${token}+`).join(`${token}{1,${max}}`) + } + return value +} - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } +const createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value) + const index = R++ + debug(name, index, value) + t[name] = index + src[index] = value + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) + safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) +} - const self = debug; +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. - args[0] = createDebug.coerce(args[0]); +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '\\d+') - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); +createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); +// ## Main Version +// Three dot-separated numeric identifiers. - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) + +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] +}|${src[t.NONNUMERICIDENTIFIER]})`) - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] +}|${src[t.NONNUMERICIDENTIFIER]})`) - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - return debug; - } +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; +createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) - createDebug.names = []; - createDebug.skips = []; +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. - namespaces = split[i].replace(/\*/g, '.*?'); +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } +createToken('FULL', `^${src[t.FULLPLAIN]}$`) - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) - let i; - let len; +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } +createToken('GTLT', '((?:<|>)?=?)') - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - return false; - } +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCE', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) - createDebug.enable(createDebug.load()); +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') - return createDebug; -} +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' -module.exports = setup; +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') -/***/ }), +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' -/***/ 8237: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __nccwpck_require__(8222); -} else { - module.exports = __nccwpck_require__(4874); -} +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) -/***/ }), +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) -/***/ 4874: -/***/ ((module, exports, __nccwpck_require__) => { +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') -/** - * Module dependencies. - */ -const tty = __nccwpck_require__(6224); -const util = __nccwpck_require__(3837); +/***/ }), -/** - * This is the Node.js implementation of `debug()`. - */ +/***/ 98360: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); +// Determine if version is greater than all the versions possible in the range. +const outside = __nccwpck_require__(8629) +const gtr = (version, range, options) => outside(version, range, '>', options) +module.exports = gtr -/** - * Colors. - */ -exports.colors = [6, 2, 3, 4, 5, 1]; +/***/ }), -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __nccwpck_require__(9318); +/***/ 1373: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. +const Range = __nccwpck_require__(34502) +const intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2, options) } +module.exports = intersects -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } +/***/ }), - obj[prop] = val; - return obj; -}, {}); +/***/ 53270: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ +const outside = __nccwpck_require__(8629) +// Determine if version is less than all the versions possible in the range +const ltr = (version, range, options) => outside(version, range, '<', options) +module.exports = ltr -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ +/***/ }), -function formatArgs(args) { - const {namespace: name, useColors} = this; +/***/ 5471: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; +const SemVer = __nccwpck_require__(93402) +const Range = __nccwpck_require__(34502) - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } +const maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max } +module.exports = maxSatisfying -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ +/***/ }), -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} +/***/ 65356: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } +const SemVer = __nccwpck_require__(93402) +const Range = __nccwpck_require__(34502) +const minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min } +module.exports = minSatisfying -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - return process.env.DEBUG; -} +/***/ }), -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ +/***/ 7825: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function init(debug) { - debug.inspectOpts = {}; +const SemVer = __nccwpck_require__(93402) +const Range = __nccwpck_require__(34502) +const gt = __nccwpck_require__(47040) - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} +const minVersion = (range, loose) => { + range = new Range(range, loose) -module.exports = __nccwpck_require__(6243)(exports); + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } -const {formatters} = module.exports; + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } -/** - * Map %o to `util.inspect()`, all on a single line. - */ + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; + let setMin = null + comparators.forEach((comparator) => { + // Clone to avoid manipulating the comparator's semver object. + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) { + minver = setMin + } + } -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ + if (minver && range.test(minver)) { + return minver + } -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; + return null +} +module.exports = minVersion /***/ }), -/***/ 8611: +/***/ 8629: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var Stream = (__nccwpck_require__(2781).Stream); -var util = __nccwpck_require__(3837); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); +const SemVer = __nccwpck_require__(93402) +const Comparator = __nccwpck_require__(24644) +const { ANY } = Comparator +const Range = __nccwpck_require__(34502) +const satisfies = __nccwpck_require__(45056) +const gt = __nccwpck_require__(47040) +const lt = __nccwpck_require__(16054) +const lte = __nccwpck_require__(79387) +const gte = __nccwpck_require__(97445) -DelayedStream.create = function(source, options) { - var delayedStream = new this(); +const outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') } - delayedStream.source = source; + // If it satisfies the range it is not outside + if (satisfies(version, range, options)) { + return false + } - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] - return delayedStream; -}; + let high = null + let low = null -Object.defineProperty(DelayedStream.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } } + return true +} - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; +module.exports = outside -DelayedStream.prototype.release = function() { - this._released = true; - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; +/***/ }), -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; +/***/ 94336: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; +// given a set of versions and a range, create a "simplified" range +// that includes the same versions that the original range does +// If the original range is shorter than the simplified one, return that. +const satisfies = __nccwpck_require__(45056) +const compare = __nccwpck_require__(24343) +module.exports = (versions, range, options) => { + const set = [] + let first = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!first) { + first = version + } + } else { + if (prev) { + set.push([first, prev]) + } + prev = null + first = null + } + } + if (first) { + set.push([first, null]) } - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); + const ranges = [] + for (const [min, max] of set) { + if (min === max) { + ranges.push(min) + } else if (!max && min === v[0]) { + ranges.push('*') + } else if (!max) { + ranges.push(`>=${min}`) + } else if (min === v[0]) { + ranges.push(`<=${max}`) + } else { + ranges.push(`${min} - ${max}`) + } } + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range +} - this._bufferedEvents.push(args); -}; -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } +/***/ }), - if (this.dataSize <= this.maxDataSize) { - return; - } +/***/ 54979: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; +const Range = __nccwpck_require__(34502) +const Comparator = __nccwpck_require__(24644) +const { ANY } = Comparator +const satisfies = __nccwpck_require__(45056) +const compare = __nccwpck_require__(24343) +// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` +// +// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: +// - If c is only the ANY comparator +// - If C is only the ANY comparator, return true +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` +// - Let EQ be the set of = comparators in c +// - If EQ is more than one, return true (null set) +// - Let GT be the highest > or >= comparator in c +// - Let LT be the lowest < or <= comparator in c +// - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false +// - If EQ +// - If GT, and EQ does not satisfy GT, return true (null set) +// - If LT, and EQ does not satisfy LT, return true (null set) +// - If EQ satisfies every C, return true +// - Else return false +// - If GT +// - If GT.semver is lower than any > or >= comp in C, return false +// - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false +// - If LT +// - If LT.semver is greater than any < or <= comp in C, return false +// - If LT is <=, and LT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false +// - Else return true -/***/ }), +const subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true + } -/***/ 8932: -/***/ ((__unused_webpack_module, exports) => { + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false -"use strict"; + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) { + continue OUTER + } + } + // the null set is a subset of everything, but null simple ranges in + // a complex range should be ignored. so if we saw a non-null range, + // then we know this isn't a subset, but if EVERY simple range was null, + // then it is a subset. + if (sawNonNull) { + return false + } + } + return true +} +const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] +const minimumVersion = [new Comparator('>=0.0.0')] -Object.defineProperty(exports, "__esModule", ({ value: true })); +const simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true + } -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease + } else { + sub = minimumVersion + } + } - /* istanbul ignore next */ + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true + } else { + dom = minimumVersion + } + } - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); + const eqSet = new Set() + let gt, lt + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') { + gt = higherGT(gt, c, options) + } else if (c.operator === '<' || c.operator === '<=') { + lt = lowerLT(lt, c, options) + } else { + eqSet.add(c.semver) } + } - this.name = 'Deprecation'; + if (eqSet.size > 1) { + return null } -} + let gtltComp + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options) + if (gtltComp > 0) { + return null + } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { + return null + } + } -exports.Deprecation = Deprecation; + // will iterate one or zero times + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null + } + if (lt && !satisfies(eq, String(lt), options)) { + return null + } -/***/ }), + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false + } + } -/***/ 1728: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return true + } -"use strict"; + let higher, lower + let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) { + return false + } + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { + return false + } + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt, c, options) + if (lower === c && lower !== lt) { + return false + } + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { + return false + } + } + if (!c.operator && (lt || gt) && gtltComp !== 0) { + return false + } + } -var Buffer = (__nccwpck_require__(1867).Buffer); + // if there was a < or >, and nothing in the dom, then must be false + // UNLESS it was limited by another range in the other direction. + // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 + if (gt && hasDomLT && !lt && gtltComp !== 0) { + return false + } -var getParamBytesForAlg = __nccwpck_require__(528); + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false + } -var MAX_OCTET = 0x80, - CLASS_UNIVERSAL = 0, - PRIMITIVE_BIT = 0x20, - TAG_SEQ = 0x10, - TAG_INT = 0x02, - ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6), - ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6); + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) { + return false + } -function base64Url(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); + return true } -function signatureAsBuffer(signature) { - if (Buffer.isBuffer(signature)) { - return signature; - } else if ('string' === typeof signature) { - return Buffer.from(signature, 'base64'); - } - - throw new TypeError('ECDSA signature must be a Base64 string or a Buffer'); +// >=1.2.3 is lower than >1.2.3 +const higherGT = (a, b, options) => { + if (!a) { + return b + } + const comp = compare(a.semver, b.semver, options) + return comp > 0 ? a + : comp < 0 ? b + : b.operator === '>' && a.operator === '>=' ? b + : a } -function derToJose(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); +// <=1.2.3 is higher than <1.2.3 +const lowerLT = (a, b, options) => { + if (!a) { + return b + } + const comp = compare(a.semver, b.semver, options) + return comp < 0 ? a + : comp > 0 ? b + : b.operator === '<' && a.operator === '<=' ? b + : a +} - // the DER encoded param should at most be the param size, plus a padding - // zero, since due to being a signed integer - var maxEncodedParamLength = paramBytes + 1; +module.exports = subset - var inputLength = signature.length; - var offset = 0; - if (signature[offset++] !== ENCODED_TAG_SEQ) { - throw new Error('Could not find expected "seq"'); - } +/***/ }), - var seqLength = signature[offset++]; - if (seqLength === (MAX_OCTET | 1)) { - seqLength = signature[offset++]; - } +/***/ 54676: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (inputLength - offset < seqLength) { - throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); - } +const Range = __nccwpck_require__(34502) - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "r"'); - } +// Mostly just for testing and legacy API reasons +const toComparators = (range, options) => + new Range(range, options).set + .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - var rLength = signature[offset++]; +module.exports = toComparators - if (inputLength - offset - 2 < rLength) { - throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); - } - if (maxEncodedParamLength < rLength) { - throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } +/***/ }), - var rOffset = offset; - offset += rLength; +/***/ 66895: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "s"'); - } +const Range = __nccwpck_require__(34502) +const validRange = (range, options) => { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} +module.exports = validRange - var sLength = signature[offset++]; - if (inputLength - offset !== sLength) { - throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); - } +/***/ }), - if (maxEncodedParamLength < sLength) { - throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } +/***/ 30829: +/***/ ((module) => { - var sOffset = offset; - offset += sLength; +"use strict"; - if (offset !== inputLength) { - throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); - } +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} - var rPadding = paramBytes - rLength, - sPadding = paramBytes - sLength; - var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength); +/***/ }), - for (offset = 0; offset < rPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); +/***/ 69885: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - offset = paramBytes; +"use strict"; - for (var o = offset; offset < o + sPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); +module.exports = Yallist - dst = dst.toString('base64'); - dst = base64Url(dst); +Yallist.Node = Node +Yallist.create = Yallist - return dst; -} +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } -function countPadding(buf, start, stop) { - var padding = 0; - while (start + padding < stop && buf[start + padding] === 0) { - ++padding; - } + self.tail = null + self.head = null + self.length = 0 - var needsSign = buf[start + padding] >= MAX_OCTET; - if (needsSign) { - --padding; - } + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } - return padding; + return self } -function joseToDer(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); - - var signatureBytes = signature.length; - if (signatureBytes !== paramBytes * 2) { - throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); - } +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } - var rPadding = countPadding(signature, 0, paramBytes); - var sPadding = countPadding(signature, paramBytes, signature.length); - var rLength = paramBytes - rPadding; - var sLength = paramBytes - sPadding; + var next = node.next + var prev = node.prev - var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; + if (next) { + next.prev = prev + } - var shortLength = rsBytes < MAX_OCTET; + if (prev) { + prev.next = next + } - var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes); + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } - var offset = 0; - dst[offset++] = ENCODED_TAG_SEQ; - if (shortLength) { - // Bit 8 has value "0" - // bits 7-1 give the length. - dst[offset++] = rsBytes; - } else { - // Bit 8 of first octet has value "1" - // bits 7-1 give the number of additional length octets. - dst[offset++] = MAX_OCTET | 1; - // length, base 256 - dst[offset++] = rsBytes & 0xff; - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = rLength; - if (rPadding < 0) { - dst[offset++] = 0; - offset += signature.copy(dst, offset, 0, paramBytes); - } else { - offset += signature.copy(dst, offset, rPadding, paramBytes); - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = sLength; - if (sPadding < 0) { - dst[offset++] = 0; - signature.copy(dst, offset, paramBytes); - } else { - signature.copy(dst, offset, paramBytes + sPadding); - } + node.list.length-- + node.next = null + node.prev = null + node.list = null - return dst; + return next } -module.exports = { - derToJose: derToJose, - joseToDer: joseToDer -}; +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + if (node.list) { + node.list.removeNode(node) + } -/***/ }), + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } -/***/ 528: -/***/ ((module) => { + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} -"use strict"; +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + if (node.list) { + node.list.removeNode(node) + } -function getParamSize(keySize) { - var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1); - return result; -} + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } -var paramBytesForAlg = { - ES256: getParamSize(256), - ES384: getParamSize(384), - ES512: getParamSize(521) -}; + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} -function getParamBytesForAlg(alg) { - var paramBytes = paramBytesForAlg[alg]; - if (paramBytes) { - return paramBytes; - } +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} - throw new Error('Unknown algorithm "' + alg + '"'); +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length } -module.exports = getParamBytesForAlg; +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} -/***/ }), +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } -/***/ 1133: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} -var debug; +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} -module.exports = function () { - if (!debug) { - try { - /* eslint global-require: off */ - debug = __nccwpck_require__(8237)("follow-redirects"); - } - catch (error) { /* */ } - if (typeof debug !== "function") { - debug = function () { /* */ }; - } +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev } - debug.apply(null, arguments); -}; +} +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} -/***/ }), +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} -/***/ 7707: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} -var url = __nccwpck_require__(7310); -var URL = url.URL; -var http = __nccwpck_require__(3685); -var https = __nccwpck_require__(5687); -var Writable = (__nccwpck_require__(2781).Writable); -var assert = __nccwpck_require__(9491); -var debug = __nccwpck_require__(1133); +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} -// Create handlers that pass events from native requests -var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; -var eventHandlers = Object.create(null); -events.forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } -var InvalidUrlError = createErrorType( - "ERR_INVALID_URL", - "Invalid URL", - TypeError -); -// Error types with codes -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded" -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; + return acc +} - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') } - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - self._processResponse(response); - }; + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } - // Perform the first request - this._performRequest(); + return acc } -RedirectableRequest.prototype = Object.create(Writable.prototype); -RedirectableRequest.prototype.abort = function () { - abortRequest(this._currentRequest); - this.emit("abort"); -}; +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev } + return arr +} - // Validate input and shift parameters if necessary - if (!isString(data) && !isBuffer(data)) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length } - if (isFunction(encoding)) { - callback = encoding; - encoding = null; + from = from || 0 + if (from < 0) { + from += this.length } - - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; + var ret = new Yallist() + if (to < from || to < 0) { + return ret } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); + if (from < 0) { + from = 0 } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); + if (to > this.length) { + to = this.length } -}; - -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (isFunction(data)) { - callback = data; - data = encoding = null; + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next } - else if (isFunction(encoding)) { - callback = encoding; - encoding = null; + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) } + return ret +} - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; + from = from || 0 + if (from < 0) { + from += this.length } -}; - -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; - -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; - -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - var self = this; - - // Destroys the socket on timeout - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) } + return ret +} - // Sets up a timer to trigger a timeout event - function startTimer(socket) { - if (self._timeout) { - clearTimeout(self._timeout); - } - self._timeout = setTimeout(function () { - self.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; } - // Stops a timeout from triggering - function clearTimer() { - // Clear the timeout - if (self._timeout) { - clearTimeout(self._timeout); - self._timeout = null; - } + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } - // Clean up all attached listeners - self.removeListener("abort", clearTimer); - self.removeListener("error", clearTimer); - self.removeListener("response", clearTimer); - if (callback) { - self.removeListener("timeout", callback); - } - if (!self.socket) { - self._currentRequest.removeListener("socket", startTimer); - } + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail } - // Attach callback if passed - if (callback) { - this.on("timeout", callback); + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev } - // Start the timer if or when the socket is opened - if (this.socket) { - startTimer(this.socket); + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) } - else { - this._currentRequest.once("socket", startTimer); + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p } + this.head = tail + this.tail = head + return this +} - // Clean up on events - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) - return this; -}; + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } -// Proxy all other public ClientRequest methods -[ - "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); + self.length++ -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); + return inserted +} -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail } + self.length++ +} - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head } + self.length++ +} - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); - } +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) } -}; + this.list = list + this.value = value -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - this.emit("error", new TypeError("Unsupported protocol " + protocol)); - return; + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null } - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; + if (next) { + next.prev = this + this.next = next + } else { + this.next = null } +} - // Create the native request and set up its event handlers - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - request._redirectable = this; - for (var event of events) { - request.on(event, eventHandlers[event]); - } +try { + // add if support for Symbol.iterator is present + __nccwpck_require__(30829)(Yallist) +} catch (er) {} - // RFC7230§5.3.1: When making a request directly to an origin server, […] - // a client MUST send only the absolute path […] as the request-target. - this._currentUrl = /^\//.test(this._options.path) ? - url.format(this._options) : - // When making a request to a proxy, […] - // a client MUST send the target URI in absolute-form […]. - this._options.path; - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - /* istanbul ignore else */ - if (request === self._currentRequest) { - // Report any write errors - /* istanbul ignore if */ - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - /* istanbul ignore else */ - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); +/***/ }), + +/***/ 82022: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const timespan = __nccwpck_require__(46098); +const PS_SUPPORTED = __nccwpck_require__(59085); +const validateAsymmetricKey = __nccwpck_require__(47596); +const jws = __nccwpck_require__(4636); +const {includes, isBoolean, isInteger, isNumber, isPlainObject, isString, once} = __nccwpck_require__(90250) +const { KeyObject, createSecretKey, createPrivateKey } = __nccwpck_require__(6113) + +const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none']; +if (PS_SUPPORTED) { + SUPPORTED_ALGS.splice(3, 0, 'PS256', 'PS384', 'PS512'); +} + +const sign_options_schema = { + expiresIn: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"expiresIn" should be a number of seconds or string representing a timespan' }, + notBefore: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"notBefore" should be a number of seconds or string representing a timespan' }, + audience: { isValid: function(value) { return isString(value) || Array.isArray(value); }, message: '"audience" must be a string or array' }, + algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' }, + header: { isValid: isPlainObject, message: '"header" must be an object' }, + encoding: { isValid: isString, message: '"encoding" must be a string' }, + issuer: { isValid: isString, message: '"issuer" must be a string' }, + subject: { isValid: isString, message: '"subject" must be a string' }, + jwtid: { isValid: isString, message: '"jwtid" must be a string' }, + noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' }, + keyid: { isValid: isString, message: '"keyid" must be a string' }, + mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' }, + allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean'}, + allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean'} +}; + +const registered_claims_schema = { + iat: { isValid: isNumber, message: '"iat" should be a number of seconds' }, + exp: { isValid: isNumber, message: '"exp" should be a number of seconds' }, + nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' } +}; + +function validate(schema, allowUnknown, object, parameterName) { + if (!isPlainObject(object)) { + throw new Error('Expected "' + parameterName + '" to be a plain object.'); + } + Object.keys(object) + .forEach(function(key) { + const validator = schema[key]; + if (!validator) { + if (!allowUnknown) { + throw new Error('"' + key + '" is not allowed in "' + parameterName + '"'); } + return; } - }()); - } + if (!validator.isValid(object[key])) { + throw new Error(validator.message); + } + }); +} + +function validateOptions(options) { + return validate(sign_options_schema, false, options, 'options'); +} + +function validatePayload(payload) { + return validate(registered_claims_schema, true, payload, 'payload'); +} + +const options_to_payload = { + 'audience': 'aud', + 'issuer': 'iss', + 'subject': 'sub', + 'jwtid': 'jti' }; -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); +const options_for_objects = [ + 'expiresIn', + 'notBefore', + 'noTimestamp', + 'audience', + 'issuer', + 'subject', + 'jwtid', +]; + +module.exports = function (payload, secretOrPrivateKey, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } else { + options = options || {}; } - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. + const isObjectPayload = typeof payload === 'object' && + !Buffer.isBuffer(payload); - // If the response is not a redirect; return it as-is - var location = response.headers.location; - if (!location || this._options.followRedirects === false || - statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); + const header = Object.assign({ + alg: options.algorithm || 'HS256', + typ: isObjectPayload ? 'JWT' : undefined, + kid: options.keyid + }, options.header); - // Clean up - this._requestBodyBuffers = []; - return; + function failure(err) { + if (callback) { + return callback(err); + } + throw err; } - // The response is a redirect, so abort the current request - abortRequest(this._currentRequest); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); + if (!secretOrPrivateKey && options.algorithm !== 'none') { + return failure(new Error('secretOrPrivateKey must have a value')); + } - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - this.emit("error", new TooManyRedirectsError()); - return; + if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) { + try { + secretOrPrivateKey = createPrivateKey(secretOrPrivateKey) + } catch (_) { + try { + secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === 'string' ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey) + } catch (_) { + return failure(new Error('secretOrPrivateKey is not valid key material')); + } + } } - // Store the request headers if applicable - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host"), - }, this._options.headers); + if (header.alg.startsWith('HS') && secretOrPrivateKey.type !== 'secret') { + return failure(new Error((`secretOrPrivateKey must be a symmetric key when using ${header.alg}`))) + } else if (/^(?:RS|PS|ES)/.test(header.alg)) { + if (secretOrPrivateKey.type !== 'private') { + return failure(new Error((`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`))) + } + if (!options.allowInsecureKeySizes && + !header.alg.startsWith('ES') && + secretOrPrivateKey.asymmetricKeyDetails !== undefined && //KeyObject.asymmetricKeyDetails is supported in Node 15+ + secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) { + return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + } } - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); + if (typeof payload === 'undefined') { + return failure(new Error('payload is required')); + } else if (isObjectPayload) { + try { + validatePayload(payload); + } + catch (error) { + return failure(error); + } + if (!options.mutatePayload) { + payload = Object.assign({},payload); + } + } else { + const invalid_options = options_for_objects.filter(function (opt) { + return typeof options[opt] !== 'undefined'; + }); + + if (invalid_options.length > 0) { + return failure(new Error('invalid ' + invalid_options.join(',') + ' option for ' + (typeof payload ) + ' payload')); + } } - // Drop the Host header, as the redirect might lead to a different host - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + if (typeof payload.exp !== 'undefined' && typeof options.expiresIn !== 'undefined') { + return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.')); + } - // If the redirect is relative, carry over the host of the last request - var currentUrlParts = url.parse(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : - url.format(Object.assign(currentUrlParts, { host: currentHost })); + if (typeof payload.nbf !== 'undefined' && typeof options.notBefore !== 'undefined') { + return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.')); + } - // Determine the URL of the redirection - var redirectUrl; try { - redirectUrl = url.resolve(currentUrl, location); + validateOptions(options); } - catch (cause) { - this.emit("error", new RedirectionError({ cause: cause })); - return; + catch (error) { + return failure(error); } - // Create the redirected request - debug("redirecting to", redirectUrl); - this._isRedirect = true; - var redirectUrlParts = url.parse(redirectUrl); - Object.assign(this._options, redirectUrlParts); + if (!options.allowInvalidAsymmetricKeyTypes) { + try { + validateAsymmetricKey(header.alg, secretOrPrivateKey); + } catch (error) { + return failure(error); + } + } - // Drop confidential headers when redirecting to a less secure protocol - // or to a different domain that is not a superdomain - if (redirectUrlParts.protocol !== currentUrlParts.protocol && - redirectUrlParts.protocol !== "https:" || - redirectUrlParts.host !== currentHost && - !isSubdomain(redirectUrlParts.host, currentHost)) { - removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); + const timestamp = payload.iat || Math.floor(Date.now() / 1000); + + if (options.noTimestamp) { + delete payload.iat; + } else if (isObjectPayload) { + payload.iat = timestamp; } - // Evaluate the beforeRedirect callback - if (isFunction(beforeRedirect)) { - var responseDetails = { - headers: response.headers, - statusCode: statusCode, - }; - var requestDetails = { - url: currentUrl, - method: method, - headers: requestHeaders, - }; + if (typeof options.notBefore !== 'undefined') { try { - beforeRedirect(this._options, responseDetails, requestDetails); + payload.nbf = timespan(options.notBefore, timestamp); } catch (err) { - this.emit("error", err); - return; + return failure(err); + } + if (typeof payload.nbf === 'undefined') { + return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); } - this._sanitizeOptions(this._options); } - // Perform the redirected request - try { - this._performRequest(); - } - catch (cause) { - this.emit("error", new RedirectionError({ cause: cause })); + if (typeof options.expiresIn !== 'undefined' && typeof payload === 'object') { + try { + payload.exp = timespan(options.expiresIn, timestamp); + } + catch (err) { + return failure(err); + } + if (typeof payload.exp === 'undefined') { + return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } } -}; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters - if (isString(input)) { - var parsed; - try { - parsed = urlToOptions(new URL(input)); - } - catch (err) { - /* istanbul ignore next */ - parsed = url.parse(input); - } - if (!isString(parsed.protocol)) { - throw new InvalidUrlError({ input }); - } - input = parsed; - } - else if (URL && (input instanceof URL)) { - input = urlToOptions(input); - } - else { - callback = options; - options = input; - input = { protocol: protocol }; - } - if (isFunction(options)) { - callback = options; - options = null; - } - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - if (!isString(options.host) && !isString(options.hostname)) { - options.hostname = "::1"; + Object.keys(options_to_payload).forEach(function (key) { + const claim = options_to_payload[key]; + if (typeof options[key] !== 'undefined') { + if (typeof payload[claim] !== 'undefined') { + return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.')); } - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - } - - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; + payload[claim] = options[key]; } - - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); }); - return exports; -} -/* istanbul ignore next */ -function noop() { /* empty */ } + const encoding = options.encoding || 'utf8'; -// from https://github.com/nodejs/node/blob/master/lib/internal/url.js -function urlToOptions(urlObject) { - var options = { - protocol: urlObject.protocol, - hostname: urlObject.hostname.startsWith("[") ? - /* istanbul ignore next */ - urlObject.hostname.slice(1, -1) : - urlObject.hostname, - hash: urlObject.hash, - search: urlObject.search, - pathname: urlObject.pathname, - path: urlObject.pathname + urlObject.search, - href: urlObject.href, - }; - if (urlObject.port !== "") { - options.port = Number(urlObject.port); - } - return options; -} + if (typeof callback === 'function') { + callback = callback && once(callback); -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; + jws.createSign({ + header: header, + privateKey: secretOrPrivateKey, + payload: payload, + encoding: encoding + }).once('error', callback) + .once('done', function (signature) { + // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version + if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { + return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)) + } + callback(null, signature); + }); + } else { + let signature = jws.sign({header: header, payload: payload, secret: secretOrPrivateKey, encoding: encoding}); + // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version + if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { + throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`) } + return signature } - return (lastValue === null || typeof lastValue === "undefined") ? - undefined : String(lastValue).trim(); -} - -function createErrorType(code, message, baseClass) { - // Create constructor - function CustomError(properties) { - Error.captureStackTrace(this, this.constructor); - Object.assign(this, properties || {}); - this.code = code; - this.message = this.cause ? message + ": " + this.cause.message : message; - } +}; - // Attach constructor and set default properties - CustomError.prototype = new (baseClass || Error)(); - CustomError.prototype.constructor = CustomError; - CustomError.prototype.name = "Error [" + code + "]"; - return CustomError; -} -function abortRequest(request) { - for (var event of events) { - request.removeListener(event, eventHandlers[event]); - } - request.on("error", noop); - request.abort(); -} +/***/ }), -function isSubdomain(subdomain, domain) { - assert(isString(subdomain) && isString(domain)); - var dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); -} +/***/ 12327: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function isString(value) { - return typeof value === "string" || value instanceof String; -} +const JsonWebTokenError = __nccwpck_require__(405); +const NotBeforeError = __nccwpck_require__(4383); +const TokenExpiredError = __nccwpck_require__(46637); +const decode = __nccwpck_require__(53359); +const timespan = __nccwpck_require__(46098); +const validateAsymmetricKey = __nccwpck_require__(47596); +const PS_SUPPORTED = __nccwpck_require__(59085); +const jws = __nccwpck_require__(4636); +const {KeyObject, createSecretKey, createPublicKey} = __nccwpck_require__(6113); -function isFunction(value) { - return typeof value === "function"; -} +const PUB_KEY_ALGS = ['RS256', 'RS384', 'RS512']; +const EC_KEY_ALGS = ['ES256', 'ES384', 'ES512']; +const RSA_KEY_ALGS = ['RS256', 'RS384', 'RS512']; +const HS_ALGS = ['HS256', 'HS384', 'HS512']; -function isBuffer(value) { - return typeof value === "object" && ("length" in value); +if (PS_SUPPORTED) { + PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512'); + RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512'); } -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; - +module.exports = function (jwtString, secretOrPublicKey, options, callback) { + if ((typeof options === 'function') && !callback) { + callback = options; + options = {}; + } -/***/ }), + if (!options) { + options = {}; + } -/***/ 1826: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + //clone this object since we are going to mutate it. + options = Object.assign({}, options); -var CombinedStream = __nccwpck_require__(5443); -var util = __nccwpck_require__(3837); -var path = __nccwpck_require__(1017); -var http = __nccwpck_require__(3685); -var https = __nccwpck_require__(5687); -var parseUrl = (__nccwpck_require__(7310).parse); -var fs = __nccwpck_require__(7147); -var Stream = (__nccwpck_require__(2781).Stream); -var mime = __nccwpck_require__(3583); -var asynckit = __nccwpck_require__(4812); -var populate = __nccwpck_require__(7142); + let done; -// Public API -module.exports = FormData; + if (callback) { + done = callback; + } else { + done = function(err, data) { + if (err) throw err; + return data; + }; + } -// make it a Stream -util.inherits(FormData, CombinedStream); + if (options.clockTimestamp && typeof options.clockTimestamp !== 'number') { + return done(new JsonWebTokenError('clockTimestamp must be a number')); + } -/** - * Create readable "multipart/form-data" streams. - * Can be used to submit forms - * and file uploads to other web applications. - * - * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream - */ -function FormData(options) { - if (!(this instanceof FormData)) { - return new FormData(options); + if (options.nonce !== undefined && (typeof options.nonce !== 'string' || options.nonce.trim() === '')) { + return done(new JsonWebTokenError('nonce must be a non-empty string')); } - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; + if (options.allowInvalidAsymmetricKeyTypes !== undefined && typeof options.allowInvalidAsymmetricKeyTypes !== 'boolean') { + return done(new JsonWebTokenError('allowInvalidAsymmetricKeyTypes must be a boolean')); + } - CombinedStream.call(this); + const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1000); - options = options || {}; - for (var option in options) { - this[option] = options[option]; + if (!jwtString){ + return done(new JsonWebTokenError('jwt must be provided')); } -} -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; - -FormData.prototype.append = function(field, value, options) { + if (typeof jwtString !== 'string') { + return done(new JsonWebTokenError('jwt must be a string')); + } - options = options || {}; + const parts = jwtString.split('.'); - // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; + if (parts.length !== 3){ + return done(new JsonWebTokenError('jwt malformed')); } - var append = CombinedStream.prototype.append.bind(this); + let decodedToken; - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; + try { + decodedToken = decode(jwtString, { complete: true }); + } catch(err) { + return done(err); } - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; + if (!decodedToken) { + return done(new JsonWebTokenError('invalid token')); } - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); + const header = decodedToken.header; + let getSecret; - append(header); - append(value); - append(footer); + if(typeof secretOrPublicKey === 'function') { + if(!callback) { + return done(new JsonWebTokenError('verify must be called asynchronous if secret or public key is provided as a callback')); + } - // pass along options.knownLength - this._trackLength(header, value, options); -}; + getSecret = secretOrPublicKey; + } + else { + getSecret = function(header, secretCallback) { + return secretCallback(null, secretOrPublicKey); + }; + } -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; + return getSecret(header, function(err, secretOrPublicKey) { + if(err) { + return done(new JsonWebTokenError('error in secret or public key callback: ' + err.message)); + } - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } + const hasSignature = parts[2].trim() !== ''; - this._valueLength += valueLength; + if (!hasSignature && secretOrPublicKey){ + return done(new JsonWebTokenError('jwt signature is required')); + } - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; + if (hasSignature && !secretOrPublicKey) { + return done(new JsonWebTokenError('secret or public key must be provided')); + } - // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { - return; - } + if (!hasSignature && !options.algorithms) { + return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens')); + } - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; + if (secretOrPublicKey != null && !(secretOrPublicKey instanceof KeyObject)) { + try { + secretOrPublicKey = createPublicKey(secretOrPublicKey); + } catch (_) { + try { + secretOrPublicKey = createSecretKey(typeof secretOrPublicKey === 'string' ? Buffer.from(secretOrPublicKey) : secretOrPublicKey); + } catch (_) { + return done(new JsonWebTokenError('secretOrPublicKey is not valid key material')) + } + } + } -FormData.prototype._lengthRetriever = function(value, callback) { + if (!options.algorithms) { + if (secretOrPublicKey.type === 'secret') { + options.algorithms = HS_ALGS; + } else if (['rsa', 'rsa-pss'].includes(secretOrPublicKey.asymmetricKeyType)) { + options.algorithms = RSA_KEY_ALGS + } else if (secretOrPublicKey.asymmetricKeyType === 'ec') { + options.algorithms = EC_KEY_ALGS + } else { + options.algorithms = PUB_KEY_ALGS + } + } - if (value.hasOwnProperty('fd')) { + if (options.algorithms.indexOf(decodedToken.header.alg) === -1) { + return done(new JsonWebTokenError('invalid algorithm')); + } - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { + if (header.alg.startsWith('HS') && secretOrPublicKey.type !== 'secret') { + return done(new JsonWebTokenError((`secretOrPublicKey must be a symmetric key when using ${header.alg}`))) + } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey.type !== 'public') { + return done(new JsonWebTokenError((`secretOrPublicKey must be an asymmetric key when using ${header.alg}`))) + } - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); + if (!options.allowInvalidAsymmetricKeyTypes) { + try { + validateAsymmetricKey(header.alg, secretOrPublicKey); + } catch (e) { + return done(e); + } + } - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { + let valid; - var fileSize; + try { + valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey); + } catch (e) { + return done(e); + } - if (err) { - callback(err); - return; - } + if (!valid) { + return done(new JsonWebTokenError('invalid signature')); + } - // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); + const payload = decodedToken.payload; + + if (typeof payload.nbf !== 'undefined' && !options.ignoreNotBefore) { + if (typeof payload.nbf !== 'number') { + return done(new JsonWebTokenError('invalid nbf value')); + } + if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) { + return done(new NotBeforeError('jwt not active', new Date(payload.nbf * 1000))); + } } - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); + if (typeof payload.exp !== 'undefined' && !options.ignoreExpiration) { + if (typeof payload.exp !== 'number') { + return done(new JsonWebTokenError('invalid exp value')); + } + if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) { + return done(new TokenExpiredError('jwt expired', new Date(payload.exp * 1000))); + } + } - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - callback(null, +response.headers['content-length']); - }); - value.resume(); + if (options.audience) { + const audiences = Array.isArray(options.audience) ? options.audience : [options.audience]; + const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; - // something else - } else { - callback('Unknown stream'); - } -}; + const match = target.some(function (targetAudience) { + return audiences.some(function (audience) { + return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience; + }); + }); -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { - return options.header; - } + if (!match) { + return done(new JsonWebTokenError('jwt audience invalid. expected: ' + audiences.join(' or '))); + } + } - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); + if (options.issuer) { + const invalid_issuer = + (typeof options.issuer === 'string' && payload.iss !== options.issuer) || + (Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1); - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; + if (invalid_issuer) { + return done(new JsonWebTokenError('jwt issuer invalid. expected: ' + options.issuer)); + } + } - // allow custom headers. - if (typeof options.header == 'object') { - populate(headers, options.header); - } + if (options.subject) { + if (payload.sub !== options.subject) { + return done(new JsonWebTokenError('jwt subject invalid. expected: ' + options.subject)); + } + } - var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; + if (options.jwtid) { + if (payload.jti !== options.jwtid) { + return done(new JsonWebTokenError('jwt jwtid invalid. expected: ' + options.jwtid)); + } + } - // skip nullish headers. - if (header == null) { - continue; + if (options.nonce) { + if (payload.nonce !== options.nonce) { + return done(new JsonWebTokenError('jwt nonce invalid. expected: ' + options.nonce)); + } } - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; + if (options.maxAge) { + if (typeof payload.iat !== 'number') { + return done(new JsonWebTokenError('iat required when maxAge is specified')); + } + + const maxAgeTimestamp = timespan(options.maxAge, payload.iat); + if (typeof maxAgeTimestamp === 'undefined') { + return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) { + return done(new TokenExpiredError('maxAge exceeded', new Date(maxAgeTimestamp * 1000))); + } } - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + if (options.complete === true) { + const signature = decodedToken.signature; + + return done(null, { + header: header, + payload: payload, + signature: signature + }); } - } - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; + return done(null, payload); + }); }; -FormData.prototype._getContentDisposition = function(value, options) { - var filename - , contentDisposition - ; +/***/ }), - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path || ''); - } +/***/ 96010: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (filename) { - contentDisposition = 'filename="' + filename + '"'; - } +var bufferEqual = __nccwpck_require__(9239); +var Buffer = (__nccwpck_require__(21867).Buffer); +var crypto = __nccwpck_require__(6113); +var formatEcdsa = __nccwpck_require__(11728); +var util = __nccwpck_require__(73837); - return contentDisposition; -}; +var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".' +var MSG_INVALID_SECRET = 'secret must be a string or buffer'; +var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer'; +var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object'; -FormData.prototype._getContentType = function(value, options) { +var supportsKeyObjects = typeof crypto.createPublicKey === 'function'; +if (supportsKeyObjects) { + MSG_INVALID_VERIFIER_KEY += ' or a KeyObject'; + MSG_INVALID_SECRET += 'or a KeyObject'; +} - // use custom content-type above all - var contentType = options.contentType; +function checkIsPublicKey(key) { + if (Buffer.isBuffer(key)) { + return; + } - // or try `name` from formidable, browser - if (!contentType && value.name) { - contentType = mime.lookup(value.name); + if (typeof key === 'string') { + return; } - // or try `path` from fs-, request- streams - if (!contentType && value.path) { - contentType = mime.lookup(value.path); + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_VERIFIER_KEY); } - // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { - contentType = value.headers['content-type']; + if (typeof key !== 'object') { + throw typeError(MSG_INVALID_VERIFIER_KEY); } - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); + if (typeof key.type !== 'string') { + throw typeError(MSG_INVALID_VERIFIER_KEY); } - // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; + if (typeof key.asymmetricKeyType !== 'string') { + throw typeError(MSG_INVALID_VERIFIER_KEY); } - return contentType; + if (typeof key.export !== 'function') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } }; -FormData.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData.LINE_BREAK; +function checkIsPrivateKey(key) { + if (Buffer.isBuffer(key)) { + return; + } - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } + if (typeof key === 'string') { + return; + } - next(footer); - }.bind(this); -}; + if (typeof key === 'object') { + return; + } -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; + throw typeError(MSG_INVALID_SIGNER_KEY); }; -FormData.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } +function checkIsSecretKey(key) { + if (Buffer.isBuffer(key)) { + return; } - return formHeaders; -}; + if (typeof key === 'string') { + return key; + } -FormData.prototype.setBoundary = function(boundary) { - this._boundary = boundary; -}; + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_SECRET); + } -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); + if (typeof key !== 'object') { + throw typeError(MSG_INVALID_SECRET); } - return this._boundary; -}; + if (key.type !== 'secret') { + throw typeError(MSG_INVALID_SECRET); + } -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc( 0 ); - var boundary = this.getBoundary(); + if (typeof key.export !== 'function') { + throw typeError(MSG_INVALID_SECRET); + } +} - // Create the form content. Add Line breaks to the end of data. - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== 'function') { +function fromBase64(base64) { + return base64 + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); +} - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); - } +function toBase64(base64url) { + base64url = base64url.toString(); - // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); - } + var padding = 4 - base64url.length % 4; + if (padding !== 4) { + for (var i = 0; i < padding; ++i) { + base64url += '='; } } - // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); -}; + return base64url + .replace(/\-/g, '+') + .replace(/_/g, '/'); +} -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } +function typeError(template) { + var args = [].slice.call(arguments, 1); + var errMsg = util.format.bind(util, template).apply(null, args); + return new TypeError(errMsg); +} - this._boundary = boundary; -}; +function bufferOrString(obj) { + return Buffer.isBuffer(obj) || typeof obj === 'string'; +} -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; +function normalizeInput(thing) { + if (!bufferOrString(thing)) + thing = JSON.stringify(thing); + return thing; +} - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; +function createHmacSigner(bits) { + return function sign(thing, secret) { + checkIsSecretKey(secret); + thing = normalizeInput(thing); + var hmac = crypto.createHmac('sha' + bits, secret); + var sig = (hmac.update(thing), hmac.digest('base64')) + return fromBase64(sig); } +} - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); +function createHmacVerifier(bits) { + return function verify(thing, signature, secret) { + var computedSig = createHmacSigner(bits)(thing, secret); + return bufferEqual(Buffer.from(signature), Buffer.from(computedSig)); } +} - return knownLength; -}; - -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { - var hasKnownLength = true; - - if (this._valuesToMeasure.length) { - hasKnownLength = false; +function createKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + // Even though we are specifying "RSA" here, this works with ECDSA + // keys as well. + var signer = crypto.createSign('RSA-SHA' + bits); + var sig = (signer.update(thing), signer.sign(privateKey, 'base64')); + return fromBase64(sig); } +} - return hasKnownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; +function createKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto.createVerify('RSA-SHA' + bits); + verifier.update(thing); + return verifier.verify(publicKey, signature, 'base64'); } +} - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; +function createPSSKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto.createSign('RSA-SHA' + bits); + var sig = (signer.update(thing), signer.sign({ + key: privateKey, + padding: crypto.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST + }, 'base64')); + return fromBase64(sig); } +} - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { +function createPSSKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto.createVerify('RSA-SHA' + bits); + verifier.update(thing); + return verifier.verify({ + key: publicKey, + padding: crypto.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST + }, signature, 'base64'); + } +} - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); +function createECDSASigner(bits) { + var inner = createKeySigner(bits); + return function sign() { + var signature = inner.apply(null, arguments); + signature = formatEcdsa.derToJose(signature, 'ES' + bits); + return signature; + }; +} - // use custom params - } else { +function createECDSAVerifer(bits) { + var inner = createKeyVerifier(bits); + return function verify(thing, signature, publicKey) { + signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64'); + var result = inner(thing, signature, publicKey); + return result; + }; +} - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } +function createNoneSigner() { + return function sign() { + return ''; } +} - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); - - // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); +function createNoneVerifier() { + return function verify(thing, signature) { + return signature === ''; } +} - // get content length and fire away - this.getLength(function(err, length) { - if (err && err !== 'Unknown stream') { - this._error(err); - return; - } - - // add content length - if (length) { - request.setHeader('Content-Length', length); - } +module.exports = function jwa(algorithm) { + var signerFactories = { + hs: createHmacSigner, + rs: createKeySigner, + ps: createPSSKeySigner, + es: createECDSASigner, + none: createNoneSigner, + } + var verifierFactories = { + hs: createHmacVerifier, + rs: createKeyVerifier, + ps: createPSSKeyVerifier, + es: createECDSAVerifer, + none: createNoneVerifier, + } + var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i); + if (!match) + throw typeError(MSG_INVALID_ALGORITHM, algorithm); + var algo = (match[1] || match[3]).toLowerCase(); + var bits = match[2]; - this.pipe(request); - if (cb) { - var onResponse; + return { + sign: signerFactories[algo](bits), + verify: verifierFactories[algo](bits), + } +}; - var callback = function (error, responce) { - request.removeListener('error', callback); - request.removeListener('response', onResponse); - return cb.call(this, error, responce); - }; +/***/ }), - onResponse = callback.bind(this, null); +/***/ 4636: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - request.on('error', callback); - request.on('response', onResponse); - } - }.bind(this)); +/*global exports*/ +var SignStream = __nccwpck_require__(73334); +var VerifyStream = __nccwpck_require__(5522); - return request; -}; +var ALGORITHMS = [ + 'HS256', 'HS384', 'HS512', + 'RS256', 'RS384', 'RS512', + 'PS256', 'PS384', 'PS512', + 'ES256', 'ES384', 'ES512' +]; -FormData.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); - } +exports.ALGORITHMS = ALGORITHMS; +exports.sign = SignStream.sign; +exports.verify = VerifyStream.verify; +exports.decode = VerifyStream.decode; +exports.isValid = VerifyStream.isValid; +exports.createSign = function createSign(opts) { + return new SignStream(opts); }; - -FormData.prototype.toString = function () { - return '[object FormData]'; +exports.createVerify = function createVerify(opts) { + return new VerifyStream(opts); }; /***/ }), -/***/ 7142: -/***/ ((module) => { - -// populates missing values -module.exports = function(dst, src) { +/***/ 61868: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; - }); +/*global module, process*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var Stream = __nccwpck_require__(12781); +var util = __nccwpck_require__(73837); - return dst; -}; +function DataStream(data) { + this.buffer = null; + this.writable = true; + this.readable = true; + // No input + if (!data) { + this.buffer = Buffer.alloc(0); + return this; + } -/***/ }), + // Stream + if (typeof data.pipe === 'function') { + this.buffer = Buffer.alloc(0); + data.pipe(this); + return this; + } -/***/ 6522: -/***/ ((module) => { + // Buffer or String + // or Object (assumedly a passworded key) + if (data.length || typeof data === 'object') { + this.buffer = data; + this.writable = false; + process.nextTick(function () { + this.emit('end', data); + this.readable = false; + this.emit('close'); + }.bind(this)); + return this; + } -/*! fromentries. MIT License. Feross Aboukhadijeh */ -module.exports = function fromEntries (iterable) { - return [...iterable].reduce((obj, [key, val]) => { - obj[key] = val - return obj - }, {}) + throw new TypeError('Unexpected data type ('+ typeof data + ')'); } +util.inherits(DataStream, Stream); + +DataStream.prototype.write = function write(data) { + this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); + this.emit('data', data); +}; + +DataStream.prototype.end = function end(data) { + if (data) + this.write(data); + this.emit('end', data); + this.emit('close'); + this.writable = false; + this.readable = false; +}; + +module.exports = DataStream; /***/ }), -/***/ 6863: +/***/ 73334: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch +/*global module*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var DataStream = __nccwpck_require__(61868); +var jwa = __nccwpck_require__(96010); +var Stream = __nccwpck_require__(12781); +var toString = __nccwpck_require__(65292); +var util = __nccwpck_require__(73837); -var fs = __nccwpck_require__(7147) -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync +function base64url(string, encoding) { + return Buffer + .from(string, encoding) + .toString('base64') + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); +} -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = __nccwpck_require__(1734) +function jwsSecuredInput(header, payload, encoding) { + encoding = encoding || 'utf8'; + var encodedHeader = base64url(toString(header), 'binary'); + var encodedPayload = base64url(toString(payload), encoding); + return util.format('%s.%s', encodedHeader, encodedPayload); +} -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) +function jwsSign(opts) { + var header = opts.header; + var payload = opts.payload; + var secretOrKey = opts.secret || opts.privateKey; + var encoding = opts.encoding; + var algo = jwa(header.alg); + var securedInput = jwsSecuredInput(header, payload, encoding); + var signature = algo.sign(securedInput, secretOrKey); + return util.format('%s.%s', securedInput, signature); } -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } +function SignStream(opts) { + var secret = opts.secret||opts.privateKey||opts.key; + var secretStream = new DataStream(secret); + this.readable = true; + this.header = opts.header; + this.encoding = opts.encoding; + this.secret = this.privateKey = this.key = secretStream; + this.payload = new DataStream(opts.payload); + this.secret.once('close', function () { + if (!this.payload.writable && this.readable) + this.sign(); + }.bind(this)); - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) + this.payload.once('close', function () { + if (!this.secret.writable && this.readable) + this.sign(); + }.bind(this)); } +util.inherits(SignStream, Stream); -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - +SignStream.prototype.sign = function sign() { try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } + var signature = jwsSign({ + header: this.header, + payload: this.payload.buffer, + secret: this.secret.buffer, + encoding: this.encoding + }); + this.emit('done', signature); + this.emit('data', signature); + this.emit('end'); + this.readable = false; + return signature; + } catch (e) { + this.readable = false; + this.emit('error', e); + this.emit('close'); } -} +}; -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} +SignStream.sign = jwsSign; -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} +module.exports = SignStream; /***/ }), -/***/ 1734: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 65292: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. +/*global module*/ +var Buffer = (__nccwpck_require__(14300).Buffer); -var pathModule = __nccwpck_require__(1017); -var isWindows = process.platform === 'win32'; -var fs = __nccwpck_require__(7147); +module.exports = function toString(obj) { + if (typeof obj === 'string') + return obj; + if (typeof obj === 'number' || Buffer.isBuffer(obj)) + return obj.toString(); + return JSON.stringify(obj); +}; -// JavaScript implementation of realpath, ported from node pre-v6 -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); +/***/ }), -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; +/***/ 5522: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return callback; +/*global module*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var DataStream = __nccwpck_require__(61868); +var jwa = __nccwpck_require__(96010); +var Stream = __nccwpck_require__(12781); +var toString = __nccwpck_require__(65292); +var util = __nccwpck_require__(73837); +var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } +function isObject(thing) { + return Object.prototype.toString.call(thing) === '[object Object]'; +} - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } +function safeJsonParse(thing) { + if (isObject(thing)) + return thing; + try { return JSON.parse(thing); } + catch (e) { return undefined; } } -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); +function headerFromJWS(jwsSig) { + var encodedHeader = jwsSig.split('.', 1)[0]; + return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); } -var normalize = pathModule.normalize; +function securedInputFromJWS(jwsSig) { + return jwsSig.split('.', 2).join('.'); +} -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; +function signatureFromJWS(jwsSig) { + return jwsSig.split('.')[2]; } -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; +function payloadFromJWS(jwsSig, encoding) { + encoding = encoding || 'utf8'; + var payload = jwsSig.split('.')[1]; + return Buffer.from(payload, 'base64').toString(encoding); } -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); +function isValidJws(string) { + return JWS_REGEX.test(string) && !!headerFromJWS(string); +} - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; +function jwsVerify(jwsSig, algorithm, secretOrKey) { + if (!algorithm) { + var err = new Error("Missing algorithm parameter for jws.verify"); + err.code = "MISSING_ALGORITHM"; + throw err; } + jwsSig = toString(jwsSig); + var signature = signatureFromJWS(jwsSig); + var securedInput = securedInputFromJWS(jwsSig); + var algo = jwa(algorithm); + return algo.verify(securedInput, signature, secretOrKey); +} - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); +function jwsDecode(jwsSig, opts) { + opts = opts || {}; + jwsSig = toString(jwsSig); - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; + if (!isValidJws(jwsSig)) + return null; - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } + var header = headerFromJWS(jwsSig); - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; + if (!header) + return null; - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } + var payload = payloadFromJWS(jwsSig); + if (header.typ === 'JWT' || opts.json) + payload = JSON.parse(payload, opts.encoding); - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } + return { + header: header, + payload: payload, + signature: signatureFromJWS(jwsSig) + }; +} - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } +function VerifyStream(opts) { + opts = opts || {}; + var secretOrKey = opts.secret||opts.publicKey||opts.key; + var secretStream = new DataStream(secretOrKey); + this.readable = true; + this.algorithm = opts.algorithm; + this.encoding = opts.encoding; + this.secret = this.publicKey = this.key = secretStream; + this.signature = new DataStream(opts.signature); + this.secret.once('close', function () { + if (!this.signature.writable && this.readable) + this.verify(); + }.bind(this)); - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); + this.signature.once('close', function () { + if (!this.secret.writable && this.readable) + this.verify(); + }.bind(this)); +} +util.inherits(VerifyStream, Stream); +VerifyStream.prototype.verify = function verify() { + try { + var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); + var obj = jwsDecode(this.signature.buffer, this.encoding); + this.emit('done', valid, obj); + this.emit('data', valid); + this.emit('end'); + this.readable = false; + return valid; + } catch (e) { + this.readable = false; + this.emit('error', e); + this.emit('close'); } +}; - if (cache) cache[original] = p; +VerifyStream.decode = jwsDecode; +VerifyStream.isValid = isValidJws; +VerifyStream.verify = jwsVerify; - return p; -}; +module.exports = VerifyStream; -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } +/***/ }), - // make p is absolute - p = pathModule.resolve(p); +/***/ 90250: +/***/ (function(module, exports, __nccwpck_require__) { - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } +/* module decorator */ module = __nccwpck_require__.nmd(module); +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { - var original = p, - seenLinks = {}, - knownHard = {}; + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; + /** Used as the semantic version number. */ + var VERSION = '4.17.21'; - start(); + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function', + INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; - return fs.lstat(base, gotStat); - } + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; - function gotStat(err, stat) { - if (err) return cb(err); + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; - function gotTarget(err, target, base) { - if (err) return cb(err); + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; -/***/ }), + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; -/***/ 9320: -/***/ ((module) => { + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); -"use strict"; + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; -/* eslint no-invalid-this: 1 */ + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; + /** Used to match leading whitespace. */ + var reTrimStart = /^\s+/; -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); + /** Used to match a single whitespace character. */ + var reWhitespace = /\s/; - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + /** + * Used to validate the `validate` option in `_.template` variable. + * + * Forbids characters which could potentially change the meaning of the function argument definition: + * - "()," (modification of function parameters) + * - "=" (default value) + * - "[]{}" (destructuring of function parameters) + * - "/" (beginning of a comment) + * - whitespace + */ + var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; - return bound; -}; + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; -/***/ }), + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; -/***/ 8334: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; -"use strict"; + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; -var implementation = __nccwpck_require__(9320); + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; -module.exports = Function.prototype.bind || implementation; + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; -/***/ }), + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; -/***/ 4538: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; -"use strict"; + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; -var undefined; + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); -var $SyntaxError = SyntaxError; -var $Function = Function; -var $TypeError = TypeError; + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); -var $gOPD = Object.getOwnPropertyDescriptor; -if ($gOPD) { - try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; // this is IE 8, which has a broken gOPD - } -} + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); -var hasSymbols = __nccwpck_require__(587)(); -var hasProto = __nccwpck_require__(5894)(); + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; -var getProto = Object.getPrototypeOf || ( - hasProto - ? function (x) { return x.__proto__; } // eslint-disable-line no-proto - : null -); + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; -var needsEval = {}; + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; -var INTRINSICS = { - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': Object, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': RangeError, - '%ReferenceError%': ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet -}; + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; -if (getProto) { - try { - null.error; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; - INTRINSICS[name] = value; + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; - return value; -}; + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; -var LEGACY_ALIASES = { - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; -var bind = __nccwpck_require__(8334); -var hasOwn = __nccwpck_require__(6339); -var $concat = bind.call(Function.call, Array.prototype.concat); -var $spliceApply = bind.call(Function.apply, Array.prototype.splice); -var $replace = bind.call(Function.call, String.prototype.replace); -var $strSlice = bind.call(Function.call, String.prototype.slice); -var $exec = bind.call(Function.call, RegExp.prototype.exec); + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } + /** Detect free variable `exports`. */ + var freeExports = true && exports && !exports.nodeType && exports; - return { - alias: alias, - name: intrinsicName, - value: value - }; - } + /** Detect free variable `module`. */ + var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; + if (types) { + return types; + } - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; + /*--------------------------------------------------------------------------*/ - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; -/***/ }), + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } -/***/ 1621: -/***/ ((module) => { + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; -"use strict"; + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } -/***/ }), + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; -/***/ 5894: -/***/ ((module) => { + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } -"use strict"; + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; -var test = { - foo: {} -}; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } -var $Object = Object; + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); -module.exports = function hasProto() { - return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); -}; + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; -/***/ }), + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } -/***/ 587: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; -"use strict"; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __nccwpck_require__(7747); + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } - return hasSymbolSham(); -}; + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } -/***/ }), + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } -/***/ 7747: -/***/ ((module) => { + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } -"use strict"; + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } - return true; -}; + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } -/***/ }), + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); -/***/ 6339: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } -"use strict"; + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + /** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ + function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; + } -var bind = __nccwpck_require__(8334); + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } -/***/ }), + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; -/***/ 8043: -/***/ ((module) => { + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } -"use strict"; + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } -module.exports = (string, count = 1, options) => { - options = { - indent: ' ', - includeEmptyLines: false, - ...options - }; + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; - if (typeof string !== 'string') { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } - if (typeof count !== 'number') { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); - if (typeof options.indent !== 'string') { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); - if (count === 0) { - return string; - } + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } - return string.replace(regex, options.indent.repeat(count)); -}; + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } -/***/ }), + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; -/***/ 2492: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } -var wrappy = __nccwpck_require__(2940) -var reqs = Object.create(null) -var once = __nccwpck_require__(1223) + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); -module.exports = wrappy(inflight) + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; } -} -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; } } - }) -} - -function slice (args) { - var length = args.length - var array = [] + return result; + } - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } -/***/ }), + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); -/***/ 4124: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } -try { - var util = __nccwpck_require__(3837); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = __nccwpck_require__(8544); -} + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } -/***/ }), + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } -/***/ 8544: -/***/ ((module) => { + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); } -} + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedEndIndex(string) { + var index = string.length; -/***/ }), + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; + } -/***/ 3287: -/***/ ((__unused_webpack_module, exports) => { + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); -"use strict"; + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } -Object.defineProperty(exports, "__esModule", ({ value: true })); + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ + /*--------------------------------------------------------------------------*/ -function isObject(o) { - return Object.prototype.toString.call(o) === '[object Object]'; -} + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); -function isPlainObject(o) { - var ctor,prot; + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; - if (isObject(o) === false) return false; + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; - // If has modified constructor - ctor = o.constructor; - if (ctor === undefined) return true; + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; - // If has modified prototype - prot = ctor.prototype; - if (isObject(prot) === false) return false; + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - // Most likely a plain Object - return true; -} + /** Used to generate unique IDs. */ + var idCounter = 0; -exports.isPlainObject = isPlainObject; + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; -/***/ }), + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); -/***/ 3359: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; -var jws = __nccwpck_require__(4636); + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); -module.exports = function (jwt, options) { - options = options || {}; - var decoded = jws.decode(jwt, options); - if (!decoded) { return null; } - var payload = decoded.payload; + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; - //try parse the payload - if(typeof payload === 'string') { - try { - var obj = JSON.parse(payload); - if(obj !== null && typeof obj === 'object') { - payload = obj; - } - } catch (e) { } - } + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); - //return header if `complete` option is enabled. header includes claims - //such as `kid` and `alg` used to select the key within a JWKS needed to - //verify the signature - if (options.complete === true) { - return { - header: decoded.header, - payload: payload, - signature: decoded.signature - }; - } - return payload; -}; + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; -/***/ }), + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); -/***/ 7486: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; -module.exports = { - verify: __nccwpck_require__(2327), - sign: __nccwpck_require__(2022), - JsonWebTokenError: __nccwpck_require__(405), - NotBeforeError: __nccwpck_require__(4383), - TokenExpiredError: __nccwpck_require__(6637), -}; + /** Used to lookup unminified function names. */ + var realNames = {}; -Object.defineProperty(module.exports, "decode", ({ - enumerable: false, - value: __nccwpck_require__(3359), -})); + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; -/***/ }), + /*------------------------------------------------------------------------*/ -/***/ 405: -/***/ ((module) => { + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } -var JsonWebTokenError = function (message, error) { - Error.call(this, message); - if(Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = 'JsonWebTokenError'; - this.message = message; - if (error) this.inner = error; -}; + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); -JsonWebTokenError.prototype = Object.create(Error.prototype); -JsonWebTokenError.prototype.constructor = JsonWebTokenError; + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } -module.exports = JsonWebTokenError; + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { -/***/ }), + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, -/***/ 4383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, -var JsonWebTokenError = __nccwpck_require__(405); + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, -var NotBeforeError = function (message, date) { - JsonWebTokenError.call(this, message); - this.name = 'NotBeforeError'; - this.date = date; -}; + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', -NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype); + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { -NotBeforeError.prototype.constructor = NotBeforeError; + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; -module.exports = NotBeforeError; + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; -/***/ }), + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; -/***/ 6637: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /*------------------------------------------------------------------------*/ -var JsonWebTokenError = __nccwpck_require__(405); + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } -var TokenExpiredError = function (message, expiredAt) { - JsonWebTokenError.call(this, message); - this.name = 'TokenExpiredError'; - this.expiredAt = expiredAt; -}; + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } -TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype); + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } -TokenExpiredError.prototype.constructor = TokenExpiredError; + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); -module.exports = TokenExpiredError; + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; -/***/ }), + outer: + while (length-- && resIndex < takeCount) { + index += dir; -/***/ 7622: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + var iterIndex = -1, + value = array[index]; -const semver = __nccwpck_require__(3998); + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); -module.exports = semver.satisfies(process.version, '>=15.7.0'); + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; -/***/ }), + /*------------------------------------------------------------------------*/ -/***/ 1122: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; -var semver = __nccwpck_require__(3998); + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } -module.exports = semver.satisfies(process.version, '^6.12.0 || >=8.0.0'); + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } -/***/ }), + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } -/***/ 5170: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } -const semver = __nccwpck_require__(3998); + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } -module.exports = semver.satisfies(process.version, '>=16.9.0'); + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + /*------------------------------------------------------------------------*/ -/***/ }), + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; -/***/ 6098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } -var ms = __nccwpck_require__(900); + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } -module.exports = function (time, iat) { - var timestamp = iat || Math.floor(Date.now() / 1000); + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - if (typeof time === 'string') { - var milliseconds = ms(time); - if (typeof milliseconds === 'undefined') { - return; + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; } - return Math.floor(timestamp + milliseconds / 1000); - } else if (typeof time === 'number') { - return timestamp + time; - } else { - return; - } - -}; -/***/ }), + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); -/***/ 7596: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return index < 0 ? undefined : data[index][1]; + } -const ASYMMETRIC_KEY_DETAILS_SUPPORTED = __nccwpck_require__(7622); -const RSA_PSS_KEY_DETAILS_SUPPORTED = __nccwpck_require__(5170); + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } -const allowedAlgorithmsForKeys = { - 'ec': ['ES256', 'ES384', 'ES512'], - 'rsa': ['RS256', 'PS256', 'RS384', 'PS384', 'RS512', 'PS512'], - 'rsa-pss': ['PS256', 'PS384', 'PS512'] -}; + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); -const allowedCurves = { - ES256: 'prime256v1', - ES384: 'secp384r1', - ES512: 'secp521r1', -}; + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } -module.exports = function(algorithm, key) { - if (!algorithm || !key) return; + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; - const keyType = key.asymmetricKeyType; - if (!keyType) return; + /*------------------------------------------------------------------------*/ - const allowedAlgorithms = allowedAlgorithmsForKeys[keyType]; + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; - if (!allowedAlgorithms) { - throw new Error(`Unknown key type "${keyType}".`); - } + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } - if (!allowedAlgorithms.includes(algorithm)) { - throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(', ')}.`) - } + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } - /* - * Ignore the next block from test coverage because it gets executed - * conditionally depending on the Node version. Not ignoring it would - * prevent us from reaching the target % of coverage for versions of - * Node under 15.7.0. - */ - /* istanbul ignore next */ - if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) { - switch (keyType) { - case 'ec': - const keyCurve = key.asymmetricKeyDetails.namedCurve; - const allowedCurve = allowedCurves[algorithm]; + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } - if (keyCurve !== allowedCurve) { - throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`); - } - break; + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } - case 'rsa-pss': - if (RSA_PSS_KEY_DETAILS_SUPPORTED) { - const length = parseInt(algorithm.slice(-3), 10); - const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } - if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) { - throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`); - } + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; - if (saltLength !== undefined && saltLength > length >> 3) { - throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`) - } - } - break; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; } - } -} + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; -/***/ }), + /*------------------------------------------------------------------------*/ -/***/ 3269: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; -"use strict"; + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } -// A linked list to keep track of recently-used-ness -const Yallist = __nccwpck_require__(9885) + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; -const naiveLength = () => 1 + /*------------------------------------------------------------------------*/ -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } - if (!options) - options = {} + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() - } + this.size = data.size; + return result; + } - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] - } + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] - } + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } + /*------------------------------------------------------------------------*/ - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length - }) + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; } - trim(this) - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; } - } - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); } - } - - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } - - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); } - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } - dumpLru () { - return this[LRU_LIST] - } + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; } + } - const node = this[CACHE].get(key) - const item = node.value + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); } - - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true + return result; } - const hit = new Entry(key, value, len, now, maxAge) - - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value) - - return false + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; } - this[LENGTH] += hit.length - this[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true - } + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) - } + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; - get (key) { - return get(this, key, true) - } + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); - peek (key) { - return get(this, key, false) - } + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); - del(this, node) - return node.value - } + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } - del (key) { - del(this, this[CACHE].get(key)) - } + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } - load (arr) { - // reset the cache - this.reset() + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const expiresAt = hit.e || 0 - if (expiresAt === 0) - // the item was created without expiration in a non aged cache - this.set(hit.k, hit.v) - else { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; } } + return true; } - } - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) - } -} - -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } + return setTimeout(function() { func.apply(undefined, args); }, wait); } - return hit.value - } -} -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -} + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; } - } -} - -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) - - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) - } -} - -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 - } -} -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined - } - if (hit) - fn.call(thisp, hit.value, hit.key, self) -} + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); -module.exports = LRUCache + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } -/***/ }), + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; -/***/ 4644: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + while (++index < length) { + var value = array[index], + current = iteratee(value); -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } - constructor (comp, options) { - options = parseOptions(options) + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; } + return array; } - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; } - debug('comp', this) - } + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) + predicate || (predicate = isFlattenable); + result || (result = []); - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; } - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); } - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); } - } - toString () { - return this.value - } + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } - test (version) { - debug('Comparator.test', version, this.options.loose) + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); - if (this.semver === ANY || version === ANY) { - return true - } + var index = 0, + length = path.length; - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false + while (object != null && index < length) { + object = object[toKey(path[index++])]; } + return (index && index == length) ? object : undefined; } - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; } - return new Range(this.value, options).test(comp.semver) + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); } - options = parseOptions(options) - - // Special cases where nothing can possibly be lower - if (options.includePrerelease && - (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { - return false - } - if (!options.includePrerelease && - (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { - return false + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; } - // Same direction increasing (> or >=) - if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { - return true - } - // Same direction decreasing (< or <=) - if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { - return true - } - // same SemVer and both sides are inclusive (<= or >=) - if ( - (this.semver.version === comp.semver.version) && - this.operator.includes('=') && comp.operator.includes('=')) { - return true - } - // opposite directions less than - if (cmp(this.semver, '<', comp.semver, options) && - this.operator.startsWith('>') && comp.operator.startsWith('<')) { - return true - } - // opposite directions greater than - if (cmp(this.semver, '>', comp.semver, options) && - this.operator.startsWith('<') && comp.operator.startsWith('>')) { - return true + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); } - return false - } -} - -module.exports = Comparator - -const parseOptions = __nccwpck_require__(5185) -const { safeRe: re, t } = __nccwpck_require__(6091) -const cmp = __nccwpck_require__(3621) -const debug = __nccwpck_require__(2935) -const SemVer = __nccwpck_require__(3402) -const Range = __nccwpck_require__(4502) - - -/***/ }), - -/***/ 4502: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); } - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.format() - return this + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); } - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range - .trim() - .split(/\s+/) - .join(' ') + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; - // First, split on || - this.set = this.raw - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) + var index = -1, + seen = caches[0]; - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`) - } + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); } + result.push(value); } } + return result; } - this.format() - } - - format () { - this.range = this.set - .map((comps) => comps.join(' ').trim()) - .join('||') - .trim() - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = - (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | - (this.options.loose && FLAG_LOOSE) - const memoKey = memoOpts + ':' + range - const cached = cache.get(memoKey) - if (cached) { - return cached + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; } - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - debug('tilde trim', range) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - debug('caret trim', range) - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) - }) + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); } - debug('range list', rangeList) - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; } - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; } - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; } - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } - return false - } -} - -module.exports = Range - -const LRU = __nccwpck_require__(3269) -const cache = new LRU({ max: 1000 }) -const parseOptions = __nccwpck_require__(5185) -const Comparator = __nccwpck_require__(4644) -const debug = __nccwpck_require__(2935) -const SemVer = __nccwpck_require__(3402) -const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = __nccwpck_require__(6091) -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(7344) + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - testComparator = remainingComparators.pop() - } + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; - return result -} + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -// ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') -} + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); } - debug('tilde return', ret) - return ret - }) -} + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -// ^0.0.1 --> >=0.0.1 <0.0.2-0 -// ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') -} + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` + if (value == null) { + return identity; } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` } + return result; } - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') -} + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } - if (gtlt === '=' && anyX) { - gtlt = '' + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; } - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); } - p = 0 + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); } - } + }, keysIn); + } - if (gtlt === '<') { - pr = '-0' + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } + var isCommon = newValue === undefined; - debug('xRange return', ret) + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); - return ret - }) -} + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp - .trim() - .replace(re[t.STAR], '') -} + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp - .trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); - return `${from} ${to}`.trim() -} + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); } - } - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); } } + return result; } - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } -/***/ }), + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; -/***/ 3402: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; -const debug = __nccwpck_require__(2935) -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(7344) -const { safeRe: re, t } = __nccwpck_require__(6091) + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } -const parseOptions = __nccwpck_require__(5185) -const { compareIdentifiers } = __nccwpck_require__(2179) -class SemVer { - constructor (version, options) { - options = parseOptions(options) + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) + return array; } - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); } - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; } - this.raw = version + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] + return result; + } - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); } - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); } } - return id - }) + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; } - this.build = m[5] ? m[5].split('.') : [] - this.format() - } + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); } - return this.version - } - toString () { - return this.version - } + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 + if (start < 0) { + start = -start > length ? 0 : (length + start); } - other = new SemVer(other, this.options) - } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; - if (other.version === this.version) { - return 0 + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; } - return this.compareMain(other) || this.comparePre(other) - } + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; } - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) + return baseSortedIndexBy(array, value, identity, retHighest); } - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + var low = 0, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; } - } while (++i) - } - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier, identifierBase) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier, identifierBase) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier, identifierBase) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier, identifierBase) - this.inc('pre', identifier, identifierBase) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase) - } - this.inc('pre', identifier, identifierBase) - break + value = iteratee(value); + var valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ + if (setLow) { + low = mid + 1; + } else { + high = mid; } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': { - const base = Number(identifierBase) ? 1 : 0 + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; - if (this.prerelease.length === 0) { - this.prerelease = [base] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; } } - if (i === -1) { - // didn't increment anything - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base) + if (iteratee) { + seen.push(computed); } + result.push(value); } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - let prerelease = [identifier, base] - if (identifierBase === false) { - prerelease = [identifier] - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease - } - } else { - this.prerelease = prerelease + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); } + result.push(value); } - break } - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` + return result; } - return this - } -} - -module.exports = SemVer - -/***/ }), - -/***/ 8751: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const parse = __nccwpck_require__(3371) -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } -/***/ }), + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; -/***/ 3621: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} -const eq = __nccwpck_require__(9792) -const neq = __nccwpck_require__(658) -const gt = __nccwpck_require__(7040) -const gte = __nccwpck_require__(7445) -const lt = __nccwpck_require__(6054) -const lte = __nccwpck_require__(9387) + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); } - return a === b + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; } - return a !== b + var index = -1, + result = Array(length); - case '': - case '=': - case '==': - return eq(a, b, loose) + while (++index < length) { + var array = arrays[index], + othIndex = -1; - case '!=': - return neq(a, b, loose) + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } - case '>': - return gt(a, b, loose) + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; - case '>=': - return gte(a, b, loose) + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } - case '<': - return lt(a, b, loose) + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } - case '<=': - return lte(a, b, loose) + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; -/***/ }), + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } -/***/ 5766: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; -const SemVer = __nccwpck_require__(3402) -const parse = __nccwpck_require__(3371) -const { safeRe: re, t } = __nccwpck_require__(6091) + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } + buffer.copy(result); + return result; + } - if (typeof version === 'number') { - version = String(version) - } + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } - if (typeof version !== 'string') { - return null - } + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } - options = options || {} + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } - let match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - let next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } - if (match === null) { - return null - } + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } - return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) -} -module.exports = coerce + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); -/***/ }), + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } -/***/ 1036: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; -const SemVer = __nccwpck_require__(3402) -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; -/***/ }), + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } -/***/ 4626: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; -const compare = __nccwpck_require__(4343) -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; -/***/ }), + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } -/***/ 4343: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); -const SemVer = __nccwpck_require__(3402) -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) + var index = -1, + length = props.length; -module.exports = compare + while (++index < length) { + var key = props[index]; + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; -/***/ }), + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } -/***/ 4836: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } -const parse = __nccwpck_require__(3371) + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } -const diff = (version1, version2) => { - const v1 = parse(version1, null, true) - const v2 = parse(version2, null, true) - const comparison = v1.compare(v2) + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; - if (comparison === 0) { - return null - } + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } - const v1Higher = comparison > 0 - const highVersion = v1Higher ? v1 : v2 - const lowVersion = v1Higher ? v2 : v1 - const highHasPre = !!highVersion.prerelease.length - const lowHasPre = !!lowVersion.prerelease.length + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; - if (lowHasPre && !highHasPre) { - // Going from prerelease -> no prerelease requires some special casing + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; - // If the low version has only a major, then it will always be a major - // Some examples: - // 1.0.0-1 -> 1.0.0 - // 1.0.0-1 -> 1.1.1 - // 1.0.0-1 -> 2.0.0 - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); } - // Otherwise it can be determined by checking the high version + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); - if (highVersion.patch) { - // anything higher than a patch bump would result in the wrong version - return 'patch' + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; } - if (highVersion.minor) { - // anything higher than a minor bump would result in the wrong version - return 'minor' + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; } - // bumping major/minor/patch all have same result - return 'major' - } + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); - // add the `pre` prefix if we are going to a prerelease version - const prefix = highHasPre ? 'pre' : '' + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } - if (v1.major !== v2.major) { - return prefix + 'major' - } + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); - if (v1.minor !== v2.minor) { - return prefix + 'minor' - } + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; - if (v1.patch !== v2.patch) { - return prefix + 'patch' - } + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); - // high and low are preleases - return 'prerelease' -} + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); -module.exports = diff + return chr[methodName]() + trailing; + }; + } + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } -/***/ }), + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); -/***/ 9792: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } -const compare = __nccwpck_require__(4343) -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); -/***/ }), + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); -/***/ 7040: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } -const compare = __nccwpck_require__(4343) -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; -/***/ }), + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; -/***/ 7445: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; -const compare = __nccwpck_require__(4343) -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; -/***/ }), + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } -/***/ 8877: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); -const SemVer = __nccwpck_require__(3402) + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; -const inc = (version, release, options, identifier, identifierBase) => { - if (typeof (options) === 'string') { - identifierBase = identifier - identifier = options - options = undefined - } + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version - } catch (er) { - return null - } -} -module.exports = inc + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } -/***/ }), + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } -/***/ 6054: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } -const compare = __nccwpck_require__(4343) -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } -/***/ }), + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); -/***/ 9387: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; -const compare = __nccwpck_require__(4343) -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } -/***/ }), + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } -/***/ 7269: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; -const SemVer = __nccwpck_require__(3402) -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; -/***/ }), + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } -/***/ 9725: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); -const SemVer = __nccwpck_require__(3402) -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; -/***/ }), + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } -/***/ 658: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; -const compare = __nccwpck_require__(4343) -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); -/***/ }), + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; -/***/ 3371: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); -const SemVer = __nccwpck_require__(3402) -const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); } - throw er - } -} -module.exports = parse + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } -/***/ }), + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } -/***/ 8691: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; -const SemVer = __nccwpck_require__(3402) -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + stack.set(array, other); + stack.set(other, array); -/***/ }), + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; -/***/ 7892: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } -const parse = __nccwpck_require__(3371) -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; -/***/ }), + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); -/***/ 8227: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + case errorTag: + return object.name == other.name && object.message == other.message; -const compare = __nccwpck_require__(4343) -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + case mapTag: + var convert = mapToArray; -/***/ }), + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); -/***/ 4590: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; -const compareBuild = __nccwpck_require__(1036) -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } -/***/ }), + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; -/***/ 5056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); -const Range = __nccwpck_require__(4502) -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; -/***/ }), + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } -/***/ 2340: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } -const compareBuild = __nccwpck_require__(1036) -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } -/***/ }), + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; -/***/ 5715: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; -const parse = __nccwpck_require__(3371) -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } -/***/ }), + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } -/***/ 3998: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } -// just pre-load all the stuff that index.js lazily exports -const internalRe = __nccwpck_require__(6091) -const constants = __nccwpck_require__(7344) -const SemVer = __nccwpck_require__(3402) -const identifiers = __nccwpck_require__(2179) -const parse = __nccwpck_require__(3371) -const valid = __nccwpck_require__(5715) -const clean = __nccwpck_require__(8751) -const inc = __nccwpck_require__(8877) -const diff = __nccwpck_require__(4836) -const major = __nccwpck_require__(7269) -const minor = __nccwpck_require__(9725) -const patch = __nccwpck_require__(8691) -const prerelease = __nccwpck_require__(7892) -const compare = __nccwpck_require__(4343) -const rcompare = __nccwpck_require__(8227) -const compareLoose = __nccwpck_require__(4626) -const compareBuild = __nccwpck_require__(1036) -const sort = __nccwpck_require__(2340) -const rsort = __nccwpck_require__(4590) -const gt = __nccwpck_require__(7040) -const lt = __nccwpck_require__(6054) -const eq = __nccwpck_require__(9792) -const neq = __nccwpck_require__(658) -const gte = __nccwpck_require__(7445) -const lte = __nccwpck_require__(9387) -const cmp = __nccwpck_require__(3621) -const coerce = __nccwpck_require__(5766) -const Comparator = __nccwpck_require__(4644) -const Range = __nccwpck_require__(4502) -const satisfies = __nccwpck_require__(5056) -const toComparators = __nccwpck_require__(4676) -const maxSatisfying = __nccwpck_require__(5471) -const minSatisfying = __nccwpck_require__(5356) -const minVersion = __nccwpck_require__(7825) -const validRange = __nccwpck_require__(6895) -const outside = __nccwpck_require__(8629) -const gtr = __nccwpck_require__(8360) -const ltr = __nccwpck_require__(3270) -const intersects = __nccwpck_require__(1373) -const simplifyRange = __nccwpck_require__(4336) -const subset = __nccwpck_require__(4979) -module.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, -} + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + while (length--) { + var key = result[length], + value = object[key]; -/***/ }), + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } -/***/ 7344: -/***/ ((module) => { + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } -// Max safe length for a build identifier. The max length minus 6 characters for -// the shortest version with a build 0.0.0+BUILD. -const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; -const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', -] + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; -module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, -} + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; -/***/ }), + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } -/***/ 2935: -/***/ ((module) => { + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} + while (++index < length) { + var data = transforms[index], + size = data.size; -module.exports = debug + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } -/***/ }), + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); -/***/ 2179: -/***/ ((module) => { + var index = -1, + length = path.length, + result = false; -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } - if (anum && bnum) { - a = +a - b = +b - } + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } -module.exports = { - compareIdentifiers, - rcompareIdentifiers, -} + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + case boolTag: + case dateTag: + return new Ctor(+object); -/***/ }), + case dataViewTag: + return cloneDataView(object, isDeep); -/***/ 5185: -/***/ ((module) => { + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); -// parse out just the options we care about -const looseOption = Object.freeze({ loose: true }) -const emptyOpts = Object.freeze({ }) -const parseOptions = options => { - if (!options) { - return emptyOpts - } + case mapTag: + return new Ctor; - if (typeof options !== 'object') { - return looseOption - } + case numberTag: + case stringTag: + return new Ctor(object); - return options -} -module.exports = parseOptions + case regexpTag: + return cloneRegExp(object); + case setTag: + return new Ctor; -/***/ }), + case symbolTag: + return cloneSymbol(object); + } + } -/***/ 6091: -/***/ ((module, exports, __nccwpck_require__) => { + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = __nccwpck_require__(7344) -const debug = __nccwpck_require__(2935) -exports = module.exports = {} + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } -// The actual regexps go on exports.re -const re = exports.re = [] -const safeRe = exports.safeRe = [] -const src = exports.src = [] -const t = exports.t = {} -let R = 0 + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; -const LETTERDASHNUMBER = '[a-zA-Z0-9-]' + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -const safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } -const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value - .split(`${token}*`).join(`${token}{0,${max}}`) - .split(`${token}+`).join(`${token}{1,${max}}`) - } - return value -} + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } -const createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value) - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) - safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) -} + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '\\d+') + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; -createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; -// ## Main Version -// Three dot-separated numeric identifiers. + return value === proto; + } -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) + var cache = result.cache; + return result; + } -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + return data; + } -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } -createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } -createToken('FULL', `^${src[t.FULLPLAIN]}$`) + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) + if (key == '__proto__') { + return; + } -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + return object[key]; + } -createToken('GTLT', '((?:<|>)?=?)') + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCE', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) + /*------------------------------------------------------------------------*/ -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } -/***/ }), + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; -/***/ 8360: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; -// Determine if version is greater than all the versions possible in the range. -const outside = __nccwpck_require__(8629) -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); -/***/ }), + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); -/***/ 1373: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); -const Range = __nccwpck_require__(4502) -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } -/***/ }), + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } -/***/ 3270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } -const outside = __nccwpck_require__(8629) -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } -/***/ }), + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } -/***/ 5471: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } -const SemVer = __nccwpck_require__(3402) -const Range = __nccwpck_require__(4502) + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); } - }) - return max -} -module.exports = maxSatisfying + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; -/***/ }), + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } -/***/ 5356: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } -const SemVer = __nccwpck_require__(3402) -const Range = __nccwpck_require__(4502) -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } + return baseIndexOf(array, value, index); } - }) - return min -} -module.exports = minSatisfying + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } -/***/ }), + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); -/***/ 7825: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); -const SemVer = __nccwpck_require__(3402) -const Range = __nccwpck_require__(4502) -const gt = __nccwpck_require__(7040) + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); -const minVersion = (range, loose) => { - range = new Range(range, loose) + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); } - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion - - -/***/ }), -/***/ 8629: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } -const SemVer = __nccwpck_require__(3402) -const Comparator = __nccwpck_require__(4644) -const { ANY } = Comparator -const Range = __nccwpck_require__(4502) -const satisfies = __nccwpck_require__(5056) -const gt = __nccwpck_require__(7040) -const lt = __nccwpck_require__(6054) -const lte = __nccwpck_require__(9387) -const gte = __nccwpck_require__(7445) + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); - let high = null - let low = null + return result; + }); - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; } - }) + var index = -1, + indexes = [], + length = array.length; - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; } - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); } - } - return true -} - -module.exports = outside - - -/***/ }), - -/***/ 4336: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = __nccwpck_require__(5056) -const compare = __nccwpck_require__(4343) -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - } else { - if (prev) { - set.push([first, prev]) + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; } - prev = null - first = null + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); } - } - if (first) { - set.push([first, null]) - } - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); } - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} - - -/***/ }), - -/***/ 4979: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(4502) -const Comparator = __nccwpck_require__(4644) -const { ANY } = Comparator -const satisfies = __nccwpck_require__(5056) -const compare = __nccwpck_require__(4343) - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } } + return -1; } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true -} - -const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] -const minimumVersion = [new Comparator('>=0.0.0')] - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true - } - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease - } else { - sub = minimumVersion + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); } - } - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); } - } - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; } - } - - if (eqSet.size > 1) { - return null - } - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; } - } - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; } - if (lt && !satisfies(eq, String(lt), options)) { - return null + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; } - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); } - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false - } - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } - - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false - } - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset - - -/***/ }), - -/***/ 4676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(4502) - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators - - -/***/ }), - -/***/ 6895: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(4502) -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange - - -/***/ }), - -/***/ 829: -/***/ ((module) => { - -"use strict"; - -module.exports = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value - } - } -} - - -/***/ }), - -/***/ 9885: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = Yallist - -Yallist.Node = Node -Yallist.create = Yallist - -function Yallist (list) { - var self = this - if (!(self instanceof Yallist)) { - self = new Yallist() - } - - self.tail = null - self.head = null - self.length = 0 - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item) - }) - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]) + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; } - } - - return self -} - -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') - } - - var next = node.next - var prev = node.prev - - if (next) { - next.prev = prev - } - - if (prev) { - prev.next = next - } - - if (node === this.head) { - this.head = next - } - if (node === this.tail) { - this.tail = prev - } - - node.list.length-- - node.next = null - node.prev = null - node.list = null - - return next -} - -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var head = this.head - node.list = this - node.next = head - if (head) { - head.prev = node - } - - this.head = node - if (!this.tail) { - this.tail = node - } - this.length++ -} - -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var tail = this.tail - node.list = this - node.prev = tail - if (tail) { - tail.next = node - } - - this.tail = node - if (!this.head) { - this.head = node - } - this.length++ -} - -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } - - var res = this.tail.value - this.tail = this.tail.prev - if (this.tail) { - this.tail.next = null - } else { - this.head = null - } - this.length-- - return res -} - -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } - - var res = this.head.value - this.head = this.head.next - if (this.head) { - this.head.prev = null - } else { - this.tail = null - } - this.length-- - return res -} - -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this) - walker = walker.next - } -} - -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this) - walker = walker.prev - } -} - -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.next - } - return res -} - -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.prev - } - return res -} - -Yallist.prototype.reduce = function (fn, initial) { - var acc - var walker = this.head - if (arguments.length > 1) { - acc = initial - } else if (this.head) { - walker = this.head.next - acc = this.head.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i) - walker = walker.next - } - - return acc -} - -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc - var walker = this.tail - if (arguments.length > 1) { - acc = initial - } else if (this.tail) { - walker = this.tail.prev - acc = this.tail.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i) - walker = walker.prev - } + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } - return acc -} + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); -Yallist.prototype.toArray = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value - walker = walker.next - } - return arr -} + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value - walker = walker.prev - } - return arr -} + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); -Yallist.prototype.slice = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value) - } - return ret -} + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value) - } - return ret -} + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } -Yallist.prototype.splice = function (start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1 - } - if (start < 0) { - start = this.length + start; - } + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next - } + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } - var ret = [] - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value) - walker = this.removeNode(walker) - } - if (walker === null) { - walker = this.tail - } + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev - } + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); - for (var i = 0; i < nodes.length; i++) { - walker = insert(this, walker, nodes[i]) - } - return ret; -} + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); -Yallist.prototype.reverse = function () { - var head = this.head - var tail = this.tail - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev - walker.prev = walker.next - walker.next = p - } - this.head = tail - this.tail = head - return this -} + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); -function insert (self, node, value) { - var inserted = node === self.head ? - new Node(value, null, node, self) : - new Node(value, node, node.next, self) + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); - if (inserted.next === null) { - self.tail = inserted - } - if (inserted.prev === null) { - self.head = inserted - } + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); - self.length++ + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } - return inserted -} + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } -function push (self, item) { - self.tail = new Node(item, self.tail, null, self) - if (!self.head) { - self.head = self.tail - } - self.length++ -} + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; -function unshift (self, item) { - self.head = new Node(item, null, self.head, self) - if (!self.tail) { - self.tail = self.head - } - self.length++ -} + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) - } + /*------------------------------------------------------------------------*/ - this.list = list - this.value = value + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } - if (prev) { - prev.next = this - this.prev = prev - } else { - this.prev = null - } + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } - if (next) { - next.prev = this - this.next = next - } else { - this.next = null - } -} + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } -try { - // add if support for Symbol.iterator is present - __nccwpck_require__(829)(Yallist) -} catch (er) {} + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); -/***/ }), + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } -/***/ 2022: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } -const timespan = __nccwpck_require__(6098); -const PS_SUPPORTED = __nccwpck_require__(1122); -const validateAsymmetricKey = __nccwpck_require__(7596); -const jws = __nccwpck_require__(4636); -const {includes, isBoolean, isInteger, isNumber, isPlainObject, isString, once} = __nccwpck_require__(250) -const { KeyObject, createSecretKey, createPrivateKey } = __nccwpck_require__(6113) + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; -const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none']; -if (PS_SUPPORTED) { - SUPPORTED_ALGS.splice(3, 0, 'PS256', 'PS384', 'PS512'); -} + return { 'done': done, 'value': value }; + } -const sign_options_schema = { - expiresIn: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"expiresIn" should be a number of seconds or string representing a timespan' }, - notBefore: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"notBefore" should be a number of seconds or string representing a timespan' }, - audience: { isValid: function(value) { return isString(value) || Array.isArray(value); }, message: '"audience" must be a string or array' }, - algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' }, - header: { isValid: isPlainObject, message: '"header" must be an object' }, - encoding: { isValid: isString, message: '"encoding" must be a string' }, - issuer: { isValid: isString, message: '"issuer" must be a string' }, - subject: { isValid: isString, message: '"subject" must be a string' }, - jwtid: { isValid: isString, message: '"jwtid" must be a string' }, - noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' }, - keyid: { isValid: isString, message: '"keyid" must be a string' }, - mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' }, - allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean'}, - allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean'} -}; + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } -const registered_claims_schema = { - iat: { isValid: isNumber, message: '"iat" should be a number of seconds' }, - exp: { isValid: isNumber, message: '"exp" should be a number of seconds' }, - nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' } -}; + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; -function validate(schema, allowUnknown, object, parameterName) { - if (!isPlainObject(object)) { - throw new Error('Expected "' + parameterName + '" to be a plain object.'); - } - Object.keys(object) - .forEach(function(key) { - const validator = schema[key]; - if (!validator) { - if (!allowUnknown) { - throw new Error('"' + key + '" is not allowed in "' + parameterName + '"'); + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; } - return; + var previous = clone; + parent = parent.__wrapped__; } - if (!validator.isValid(object[key])) { - throw new Error(validator.message); + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); } - }); -} + return this.thru(reverse); + } -function validateOptions(options) { - return validate(sign_options_schema, false, options, 'options'); -} + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } -function validatePayload(payload) { - return validate(registered_claims_schema, true, payload, 'payload'); -} + /*------------------------------------------------------------------------*/ -const options_to_payload = { - 'audience': 'aud', - 'issuer': 'iss', - 'subject': 'sub', - 'jwtid': 'jti' -}; + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); -const options_for_objects = [ - 'expiresIn', - 'notBefore', - 'noTimestamp', - 'audience', - 'issuer', - 'subject', - 'jwtid', -]; + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } -module.exports = function (payload, secretOrPrivateKey, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } else { - options = options || {}; - } + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } - const isObjectPayload = typeof payload === 'object' && - !Buffer.isBuffer(payload); + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); - const header = Object.assign({ - alg: options.algorithm || 'HS256', - typ: isObjectPayload ? 'JWT' : undefined, - kid: options.keyid - }, options.header); + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); - function failure(err) { - if (callback) { - return callback(err); + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); } - throw err; - } - - if (!secretOrPrivateKey && options.algorithm !== 'none') { - return failure(new Error('secretOrPrivateKey must have a value')); - } - if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) { - try { - secretOrPrivateKey = createPrivateKey(secretOrPrivateKey) - } catch (_) { - try { - secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === 'string' ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey) - } catch (_) { - return failure(new Error('secretOrPrivateKey is not valid key material')); - } + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); } - } - if (header.alg.startsWith('HS') && secretOrPrivateKey.type !== 'secret') { - return failure(new Error((`secretOrPrivateKey must be a symmetric key when using ${header.alg}`))) - } else if (/^(?:RS|PS|ES)/.test(header.alg)) { - if (secretOrPrivateKey.type !== 'private') { - return failure(new Error((`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`))) - } - if (!options.allowInsecureKeySizes && - !header.alg.startsWith('ES') && - secretOrPrivateKey.asymmetricKeyDetails !== undefined && //KeyObject.asymmetricKeyDetails is supported in Node 15+ - secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) { - return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); } - } - if (typeof payload === 'undefined') { - return failure(new Error('payload is required')); - } else if (isObjectPayload) { - try { - validatePayload(payload); - } - catch (error) { - return failure(error); - } - if (!options.mutatePayload) { - payload = Object.assign({},payload); + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); } - } else { - const invalid_options = options_for_objects.filter(function (opt) { - return typeof options[opt] !== 'undefined'; - }); - if (invalid_options.length > 0) { - return failure(new Error('invalid ' + invalid_options.join(',') + ' option for ' + (typeof payload ) + ' payload')); + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); } - } - - if (typeof payload.exp !== 'undefined' && typeof options.expiresIn !== 'undefined') { - return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.')); - } - if (typeof payload.nbf !== 'undefined' && typeof options.notBefore !== 'undefined') { - return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.')); - } + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); - try { - validateOptions(options); - } - catch (error) { - return failure(error); - } + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - if (!options.allowInvalidAsymmetricKeyTypes) { - try { - validateAsymmetricKey(header.alg, secretOrPrivateKey); - } catch (error) { - return failure(error); + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } - } - const timestamp = payload.iat || Math.floor(Date.now() / 1000); + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; - if (options.noTimestamp) { - delete payload.iat; - } else if (isObjectPayload) { - payload.iat = timestamp; - } + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); - if (typeof options.notBefore !== 'undefined') { - try { - payload.nbf = timespan(options.notBefore, timestamp); - } - catch (err) { - return failure(err); - } - if (typeof payload.nbf === 'undefined') { - return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - } + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); - if (typeof options.expiresIn !== 'undefined' && typeof payload === 'object') { - try { - payload.exp = timespan(options.expiresIn, timestamp); - } - catch (err) { - return failure(err); - } - if (typeof payload.exp === 'undefined') { - return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); } - } - Object.keys(options_to_payload).forEach(function (key) { - const claim = options_to_payload[key]; - if (typeof options[key] !== 'undefined') { - if (typeof payload[claim] !== 'undefined') { - return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.')); + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; } - payload[claim] = options[key]; + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); } - }); - const encoding = options.encoding || 'utf8'; + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); - if (typeof callback === 'function') { - callback = callback && once(callback); + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; - jws.createSign({ - header: header, - privateKey: secretOrPrivateKey, - payload: payload, - encoding: encoding - }).once('error', callback) - .once('done', function (signature) { - // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version - if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { - return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)) - } - callback(null, signature); - }); - } else { - let signature = jws.sign({header: header, payload: payload, secret: secretOrPrivateKey, encoding: encoding}); - // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version - if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { - throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`) + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); } - return signature - } -}; - - -/***/ }), - -/***/ 2327: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const JsonWebTokenError = __nccwpck_require__(405); -const NotBeforeError = __nccwpck_require__(4383); -const TokenExpiredError = __nccwpck_require__(6637); -const decode = __nccwpck_require__(3359); -const timespan = __nccwpck_require__(6098); -const validateAsymmetricKey = __nccwpck_require__(7596); -const PS_SUPPORTED = __nccwpck_require__(1122); -const jws = __nccwpck_require__(4636); -const {KeyObject, createSecretKey, createPublicKey} = __nccwpck_require__(6113); - -const PUB_KEY_ALGS = ['RS256', 'RS384', 'RS512']; -const EC_KEY_ALGS = ['ES256', 'ES384', 'ES512']; -const RSA_KEY_ALGS = ['RS256', 'RS384', 'RS512']; -const HS_ALGS = ['HS256', 'HS384', 'HS512']; - -if (PS_SUPPORTED) { - PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512'); - RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512'); -} - -module.exports = function (jwtString, secretOrPublicKey, options, callback) { - if ((typeof options === 'function') && !callback) { - callback = options; - options = {}; - } - if (!options) { - options = {}; - } - - //clone this object since we are going to mutate it. - options = Object.assign({}, options); - - let done; - - if (callback) { - done = callback; - } else { - done = function(err, data) { - if (err) throw err; - return data; - }; - } - - if (options.clockTimestamp && typeof options.clockTimestamp !== 'number') { - return done(new JsonWebTokenError('clockTimestamp must be a number')); - } - - if (options.nonce !== undefined && (typeof options.nonce !== 'string' || options.nonce.trim() === '')) { - return done(new JsonWebTokenError('nonce must be a non-empty string')); - } - - if (options.allowInvalidAsymmetricKeyTypes !== undefined && typeof options.allowInvalidAsymmetricKeyTypes !== 'boolean') { - return done(new JsonWebTokenError('allowInvalidAsymmetricKeyTypes must be a boolean')); - } - - const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1000); - - if (!jwtString){ - return done(new JsonWebTokenError('jwt must be provided')); - } - - if (typeof jwtString !== 'string') { - return done(new JsonWebTokenError('jwt must be a string')); - } - - const parts = jwtString.split('.'); - - if (parts.length !== 3){ - return done(new JsonWebTokenError('jwt malformed')); - } - - let decodedToken; - - try { - decodedToken = decode(jwtString, { complete: true }); - } catch(err) { - return done(err); - } + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; - if (!decodedToken) { - return done(new JsonWebTokenError('invalid token')); - } + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } - const header = decodedToken.header; - let getSecret; + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } - if(typeof secretOrPublicKey === 'function') { - if(!callback) { - return done(new JsonWebTokenError('verify must be called asynchronous if secret or public key is provided as a callback')); + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); } - getSecret = secretOrPublicKey; - } - else { - getSecret = function(header, secretCallback) { - return secretCallback(null, secretOrPublicKey); - }; - } + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } - return getSecret(header, function(err, secretOrPublicKey) { - if(err) { - return done(new JsonWebTokenError('error in secret or public key callback: ' + err.message)); + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); } - const hasSignature = parts[2].trim() !== ''; + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } - if (!hasSignature && secretOrPublicKey){ - return done(new JsonWebTokenError('jwt signature is required')); + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); } - if (hasSignature && !secretOrPublicKey) { - return done(new JsonWebTokenError('secret or public key must be provided')); - } + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ - if (!hasSignature && !options.algorithms) { - return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens')); - } + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; - if (secretOrPublicKey != null && !(secretOrPublicKey instanceof KeyObject)) { - try { - secretOrPublicKey = createPublicKey(secretOrPublicKey); - } catch (_) { - try { - secretOrPublicKey = createSecretKey(typeof secretOrPublicKey === 'string' ? Buffer.from(secretOrPublicKey) : secretOrPublicKey); - } catch (_) { - return done(new JsonWebTokenError('secretOrPublicKey is not valid key material')) - } - } - } + /*------------------------------------------------------------------------*/ - if (!options.algorithms) { - if (secretOrPublicKey.type === 'secret') { - options.algorithms = HS_ALGS; - } else if (['rsa', 'rsa-pss'].includes(secretOrPublicKey.asymmetricKeyType)) { - options.algorithms = RSA_KEY_ALGS - } else if (secretOrPublicKey.asymmetricKeyType === 'ec') { - options.algorithms = EC_KEY_ALGS - } else { - options.algorithms = PUB_KEY_ALGS + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; } - if (options.algorithms.indexOf(decodedToken.header.alg) === -1) { - return done(new JsonWebTokenError('invalid algorithm')); + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); } - if (header.alg.startsWith('HS') && secretOrPublicKey.type !== 'secret') { - return done(new JsonWebTokenError((`secretOrPublicKey must be a symmetric key when using ${header.alg}`))) - } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey.type !== 'public') { - return done(new JsonWebTokenError((`secretOrPublicKey must be an asymmetric key when using ${header.alg}`))) + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; } - if (!options.allowInvalidAsymmetricKeyTypes) { - try { - validateAsymmetricKey(header.alg, secretOrPublicKey); - } catch (e) { - return done(e); + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; } - } + return createWrap(func, bitmask, thisArg, partials, holders); + }); - let valid; + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); - try { - valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey); - } catch (e) { - return done(e); + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; } - if (!valid) { - return done(new JsonWebTokenError('invalid signature')); + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; } - const payload = decodedToken.payload; + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; - if (typeof payload.nbf !== 'undefined' && !options.ignoreNotBefore) { - if (typeof payload.nbf !== 'number') { - return done(new JsonWebTokenError('invalid nbf value')); + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } - if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) { - return done(new NotBeforeError('jwt not active', new Date(payload.nbf * 1000))); + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; } - } - if (typeof payload.exp !== 'undefined' && !options.ignoreExpiration) { - if (typeof payload.exp !== 'number') { - return done(new JsonWebTokenError('invalid exp value')); - } - if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) { - return done(new TokenExpiredError('jwt expired', new Date(payload.exp * 1000))); + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; } - } - if (options.audience) { - const audiences = Array.isArray(options.audience) ? options.audience : [options.audience]; - const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } - const match = target.some(function (targetAudience) { - return audiences.some(function (audience) { - return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience; - }); - }); + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; - if (!match) { - return done(new JsonWebTokenError('jwt audience invalid. expected: ' + audiences.join(' or '))); + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; } - } - if (options.issuer) { - const invalid_issuer = - (typeof options.issuer === 'string' && payload.iss !== options.issuer) || - (Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1); + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; - if (invalid_issuer) { - return done(new JsonWebTokenError('jwt issuer invalid. expected: ' + options.issuer)); + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } - } - if (options.subject) { - if (payload.sub !== options.subject) { - return done(new JsonWebTokenError('jwt subject invalid. expected: ' + options.subject)); + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); } - } - if (options.jwtid) { - if (payload.jti !== options.jwtid) { - return done(new JsonWebTokenError('jwt jwtid invalid. expected: ' + options.jwtid)); - } - } + function trailingEdge(time) { + timerId = undefined; - if (options.nonce) { - if (payload.nonce !== options.nonce) { - return done(new JsonWebTokenError('jwt nonce invalid. expected: ' + options.nonce)); + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; } - } - if (options.maxAge) { - if (typeof payload.iat !== 'number') { - return done(new JsonWebTokenError('iat required when maxAge is specified')); + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; } - const maxAgeTimestamp = timespan(options.maxAge, payload.iat); - if (typeof maxAgeTimestamp === 'undefined') { - return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) { - return done(new TokenExpiredError('maxAge exceeded', new Date(maxAgeTimestamp * 1000))); + function flush() { + return timerId === undefined ? result : trailingEdge(now()); } - } - - if (options.complete === true) { - const signature = decodedToken.signature; - - return done(null, { - header: header, - payload: payload, - signature: signature - }); - } - - return done(null, payload); - }); -}; - - -/***/ }), - -/***/ 6010: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var bufferEqual = __nccwpck_require__(9239); -var Buffer = (__nccwpck_require__(1867).Buffer); -var crypto = __nccwpck_require__(6113); -var formatEcdsa = __nccwpck_require__(1728); -var util = __nccwpck_require__(3837); - -var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".' -var MSG_INVALID_SECRET = 'secret must be a string or buffer'; -var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer'; -var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object'; - -var supportsKeyObjects = typeof crypto.createPublicKey === 'function'; -if (supportsKeyObjects) { - MSG_INVALID_VERIFIER_KEY += ' or a KeyObject'; - MSG_INVALID_SECRET += 'or a KeyObject'; -} - -function checkIsPublicKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return; - } - - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.type !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.asymmetricKeyType !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } -}; - -function checkIsPrivateKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return; - } - - if (typeof key === 'object') { - return; - } - - throw typeError(MSG_INVALID_SIGNER_KEY); -}; - -function checkIsSecretKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return key; - } - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_SECRET); - } - - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_SECRET); - } - - if (key.type !== 'secret') { - throw typeError(MSG_INVALID_SECRET); - } - - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_SECRET); - } -} - -function fromBase64(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); -function toBase64(base64url) { - base64url = base64url.toString(); + lastArgs = arguments; + lastThis = this; + lastCallTime = time; - var padding = 4 - base64url.length % 4; - if (padding !== 4) { - for (var i = 0; i < padding; ++i) { - base64url += '='; + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; } - } - - return base64url - .replace(/\-/g, '+') - .replace(/_/g, '/'); -} - -function typeError(template) { - var args = [].slice.call(arguments, 1); - var errMsg = util.format.bind(util, template).apply(null, args); - return new TypeError(errMsg); -} - -function bufferOrString(obj) { - return Buffer.isBuffer(obj) || typeof obj === 'string'; -} - -function normalizeInput(thing) { - if (!bufferOrString(thing)) - thing = JSON.stringify(thing); - return thing; -} - -function createHmacSigner(bits) { - return function sign(thing, secret) { - checkIsSecretKey(secret); - thing = normalizeInput(thing); - var hmac = crypto.createHmac('sha' + bits, secret); - var sig = (hmac.update(thing), hmac.digest('base64')) - return fromBase64(sig); - } -} - -function createHmacVerifier(bits) { - return function verify(thing, signature, secret) { - var computedSig = createHmacSigner(bits)(thing, secret); - return bufferEqual(Buffer.from(signature), Buffer.from(computedSig)); - } -} - -function createKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - // Even though we are specifying "RSA" here, this works with ECDSA - // keys as well. - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign(privateKey, 'base64')); - return fromBase64(sig); - } -} - -function createKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify(publicKey, signature, 'base64'); - } -} - -function createPSSKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign({ - key: privateKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, 'base64')); - return fromBase64(sig); - } -} - -function createPSSKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify({ - key: publicKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, signature, 'base64'); - } -} - -function createECDSASigner(bits) { - var inner = createKeySigner(bits); - return function sign() { - var signature = inner.apply(null, arguments); - signature = formatEcdsa.derToJose(signature, 'ES' + bits); - return signature; - }; -} - -function createECDSAVerifer(bits) { - var inner = createKeyVerifier(bits); - return function verify(thing, signature, publicKey) { - signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64'); - var result = inner(thing, signature, publicKey); - return result; - }; -} - -function createNoneSigner() { - return function sign() { - return ''; - } -} - -function createNoneVerifier() { - return function verify(thing, signature) { - return signature === ''; - } -} - -module.exports = function jwa(algorithm) { - var signerFactories = { - hs: createHmacSigner, - rs: createKeySigner, - ps: createPSSKeySigner, - es: createECDSASigner, - none: createNoneSigner, - } - var verifierFactories = { - hs: createHmacVerifier, - rs: createKeyVerifier, - ps: createPSSKeyVerifier, - es: createECDSAVerifer, - none: createNoneVerifier, - } - var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i); - if (!match) - throw typeError(MSG_INVALID_ALGORITHM, algorithm); - var algo = (match[1] || match[3]).toLowerCase(); - var bits = match[2]; - - return { - sign: signerFactories[algo](bits), - verify: verifierFactories[algo](bits), - } -}; - - -/***/ }), - -/***/ 4636: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/*global exports*/ -var SignStream = __nccwpck_require__(3334); -var VerifyStream = __nccwpck_require__(5522); - -var ALGORITHMS = [ - 'HS256', 'HS384', 'HS512', - 'RS256', 'RS384', 'RS512', - 'PS256', 'PS384', 'PS512', - 'ES256', 'ES384', 'ES512' -]; - -exports.ALGORITHMS = ALGORITHMS; -exports.sign = SignStream.sign; -exports.verify = VerifyStream.verify; -exports.decode = VerifyStream.decode; -exports.isValid = VerifyStream.isValid; -exports.createSign = function createSign(opts) { - return new SignStream(opts); -}; -exports.createVerify = function createVerify(opts) { - return new VerifyStream(opts); -}; - - -/***/ }), - -/***/ 1868: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*global module, process*/ -var Buffer = (__nccwpck_require__(1867).Buffer); -var Stream = __nccwpck_require__(2781); -var util = __nccwpck_require__(3837); - -function DataStream(data) { - this.buffer = null; - this.writable = true; - this.readable = true; - - // No input - if (!data) { - this.buffer = Buffer.alloc(0); - return this; - } - - // Stream - if (typeof data.pipe === 'function') { - this.buffer = Buffer.alloc(0); - data.pipe(this); - return this; - } - - // Buffer or String - // or Object (assumedly a passworded key) - if (data.length || typeof data === 'object') { - this.buffer = data; - this.writable = false; - process.nextTick(function () { - this.emit('end', data); - this.readable = false; - this.emit('close'); - }.bind(this)); - return this; - } - - throw new TypeError('Unexpected data type ('+ typeof data + ')'); -} -util.inherits(DataStream, Stream); -DataStream.prototype.write = function write(data) { - this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); - this.emit('data', data); -}; - -DataStream.prototype.end = function end(data) { - if (data) - this.write(data); - this.emit('end', data); - this.emit('close'); - this.writable = false; - this.readable = false; -}; - -module.exports = DataStream; + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); -/***/ }), + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } -/***/ 3334: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; -/*global module*/ -var Buffer = (__nccwpck_require__(1867).Buffer); -var DataStream = __nccwpck_require__(1868); -var jwa = __nccwpck_require__(6010); -var Stream = __nccwpck_require__(2781); -var toString = __nccwpck_require__(5292); -var util = __nccwpck_require__(3837); + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } -function base64url(string, encoding) { - return Buffer - .from(string, encoding) - .toString('base64') - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} + // Expose `MapCache`. + memoize.Cache = MapCache; -function jwsSecuredInput(header, payload, encoding) { - encoding = encoding || 'utf8'; - var encodedHeader = base64url(toString(header), 'binary'); - var encodedPayload = base64url(toString(payload), encoding); - return util.format('%s.%s', encodedHeader, encodedPayload); -} + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } -function jwsSign(opts) { - var header = opts.header; - var payload = opts.payload; - var secretOrKey = opts.secret || opts.privateKey; - var encoding = opts.encoding; - var algo = jwa(header.alg); - var securedInput = jwsSecuredInput(header, payload, encoding); - var signature = algo.sign(securedInput, secretOrKey); - return util.format('%s.%s', securedInput, signature); -} + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } -function SignStream(opts) { - var secret = opts.secret||opts.privateKey||opts.key; - var secretStream = new DataStream(secret); - this.readable = true; - this.header = opts.header; - this.encoding = opts.encoding; - this.secret = this.privateKey = this.key = secretStream; - this.payload = new DataStream(opts.payload); - this.secret.once('close', function () { - if (!this.payload.writable && this.readable) - this.sign(); - }.bind(this)); + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); - this.payload.once('close', function () { - if (!this.secret.writable && this.readable) - this.sign(); - }.bind(this)); -} -util.inherits(SignStream, Stream); + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); -SignStream.prototype.sign = function sign() { - try { - var signature = jwsSign({ - header: this.header, - payload: this.payload.buffer, - secret: this.secret.buffer, - encoding: this.encoding + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); }); - this.emit('done', signature); - this.emit('data', signature); - this.emit('end'); - this.readable = false; - return signature; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; - -SignStream.sign = jwsSign; -module.exports = SignStream; + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); -/***/ }), + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); -/***/ 5292: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } -/*global module*/ -var Buffer = (__nccwpck_require__(4300).Buffer); + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); -module.exports = function toString(obj) { - if (typeof obj === 'string') - return obj; - if (typeof obj === 'number' || Buffer.isBuffer(obj)) - return obj.toString(); - return JSON.stringify(obj); -}; + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; -/***/ }), + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } -/***/ 5522: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } -/*global module*/ -var Buffer = (__nccwpck_require__(1867).Buffer); -var DataStream = __nccwpck_require__(1868); -var jwa = __nccwpck_require__(6010); -var Stream = __nccwpck_require__(2781); -var toString = __nccwpck_require__(5292); -var util = __nccwpck_require__(3837); -var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } -function isObject(thing) { - return Object.prototype.toString.call(thing) === '[object Object]'; -} + /*------------------------------------------------------------------------*/ -function safeJsonParse(thing) { - if (isObject(thing)) - return thing; - try { return JSON.parse(thing); } - catch (e) { return undefined; } -} + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } -function headerFromJWS(jwsSig) { - var encodedHeader = jwsSig.split('.', 1)[0]; - return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); -} + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } -function securedInputFromJWS(jwsSig) { - return jwsSig.split('.', 2).join('.'); -} + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } -function signatureFromJWS(jwsSig) { - return jwsSig.split('.')[2]; -} + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } -function payloadFromJWS(jwsSig, encoding) { - encoding = encoding || 'utf8'; - var payload = jwsSig.split('.')[1]; - return Buffer.from(payload, 'base64').toString(encoding); -} + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } -function isValidJws(string) { - return JWS_REGEX.test(string) && !!headerFromJWS(string); -} + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } -function jwsVerify(jwsSig, algorithm, secretOrKey) { - if (!algorithm) { - var err = new Error("Missing algorithm parameter for jws.verify"); - err.code = "MISSING_ALGORITHM"; - throw err; - } - jwsSig = toString(jwsSig); - var signature = signatureFromJWS(jwsSig); - var securedInput = securedInputFromJWS(jwsSig); - var algo = jwa(algorithm); - return algo.verify(securedInput, signature, secretOrKey); -} + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } -function jwsDecode(jwsSig, opts) { - opts = opts || {}; - jwsSig = toString(jwsSig); + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); - if (!isValidJws(jwsSig)) - return null; + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); - var header = headerFromJWS(jwsSig); + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; - if (!header) - return null; + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; - var payload = payloadFromJWS(jwsSig); - if (header.typ === 'JWT' || opts.json) - payload = JSON.parse(payload, opts.encoding); + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; - return { - header: header, - payload: payload, - signature: signatureFromJWS(jwsSig) - }; -} + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } -function VerifyStream(opts) { - opts = opts || {}; - var secretOrKey = opts.secret||opts.publicKey||opts.key; - var secretStream = new DataStream(secretOrKey); - this.readable = true; - this.algorithm = opts.algorithm; - this.encoding = opts.encoding; - this.secret = this.publicKey = this.key = secretStream; - this.signature = new DataStream(opts.signature); - this.secret.once('close', function () { - if (!this.signature.writable && this.readable) - this.verify(); - }.bind(this)); + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } - this.signature.once('close', function () { - if (!this.secret.writable && this.readable) - this.verify(); - }.bind(this)); -} -util.inherits(VerifyStream, Stream); -VerifyStream.prototype.verify = function verify() { - try { - var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); - var obj = jwsDecode(this.signature.buffer, this.encoding); - this.emit('done', valid, obj); - this.emit('data', valid); - this.emit('end'); - this.readable = false; - return valid; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } -VerifyStream.decode = jwsDecode; -VerifyStream.isValid = isValidJws; -VerifyStream.verify = jwsVerify; + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; -module.exports = VerifyStream; + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } -/***/ }), + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } -/***/ 250: -/***/ (function(module, exports, __nccwpck_require__) { + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } -/* module decorator */ module = __nccwpck_require__.nmd(module); -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -;(function() { + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } - /** Used as the semantic version number. */ - var VERSION = '4.17.21'; + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } - /** Error message constants. */ - var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', - FUNC_ERROR_TEXT = 'Expected a function', - INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } - /** Used as the maximum memoize cache size. */ - var MAX_MEMOIZE_SIZE = 500; + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } - /** Used to compose bitmasks for cloning. */ - var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } - /** Used as default options for `_.truncate`. */ - var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } - /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 800, - HOT_SPAN = 16; + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } - /** Used to indicate the type of lazy iteratees. */ - var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2, - LAZY_WHILE_FLAG = 3; + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } - /** Used as references for the maximum length and index of an array. */ - var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } - /** Used to associate wrap methods with their bit flags. */ - var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] - ]; + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - domExcTag = '[object DOMException]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]', - weakSetTag = '[object WeakSet]'; + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } - /** Used to match empty string literals in compiled template source. */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, - reUnescapedHtml = /[&<>"']/g, - reHasEscapedHtml = RegExp(reEscapedHtml.source), - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } - /** Used to match template delimiters. */ - var reEscape = /<%-([\s\S]+?)%>/g, - reEvaluate = /<%([\s\S]+?)%>/g, - reInterpolate = /<%=([\s\S]+?)%>/g; + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } - /** Used to match leading whitespace. */ - var reTrimStart = /^\s+/; + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } - /** Used to match a single whitespace character. */ - var reWhitespace = /\s/; + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } - /** Used to match wrap detail comments. */ - var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, - reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); - /** Used to match words composed of alphanumeric characters. */ - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); - /** - * Used to validate the `validate` option in `_.template` variable. - * - * Forbids characters which could potentially change the meaning of the function argument definition: - * - "()," (modification of function parameters) - * - "=" (default value) - * - "[]{}" (destructuring of function parameters) - * - "/" (beginning of a comment) - * - whitespace - */ - var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; + return func(value); + } - /** - * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). - */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; - /** Used to detect bad signed hexadecimal string values. */ - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + return result === result ? (remainder ? result - remainder : result) : 0; + } - /** Used to detect binary string values. */ - var reIsBinary = /^0b[01]+$/i; + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } - /** Used to detect octal string values. */ - var reIsOctal = /^0o[0-7]+$/i; + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } - /** Used to match Latin Unicode letters (excluding mathematical operators). */ - var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } - /** Used to ensure capturing order of template delimiters. */ - var reNoMatch = /($^)/; + /*------------------------------------------------------------------------*/ - /** Used to match unescaped characters in compiled string literals. */ - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); - /** Used to compose unicode character classes. */ - var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); - /** Used to compose unicode capture groups. */ - var rsApos = "['\u2019]", - rsAstral = '[' + rsAstralRange + ']', - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); - /** Used to compose unicode regexes. */ - var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', - rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); - /** Used to match apostrophes. */ - var reApos = RegExp(rsApos, 'g'); + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); - /** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ - var reComboMark = RegExp(rsCombo, 'g'); + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } - /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); - /** Used to match complex or compound words. */ - var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji - ].join('|'), 'g'); + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; - /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } - /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; - /** Used to assign default `context` object properties. */ - var contextProps = [ - 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', - 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', - 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', - 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', - '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' - ]; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; - /** Used to make template sourceURLs easier to identify. */ - var templateCounter = -1; + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } - /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = - typedArrayTags[errorTag] = typedArrayTags[funcTag] = - typedArrayTags[mapTag] = typedArrayTags[numberTag] = - typedArrayTags[objectTag] = typedArrayTags[regexpTag] = - typedArrayTags[setTag] = typedArrayTags[stringTag] = - typedArrayTags[weakMapTag] = false; + return object; + }); - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = - cloneableTags[boolTag] = cloneableTags[dateTag] = - cloneableTags[float32Tag] = cloneableTags[float64Tag] = - cloneableTags[int8Tag] = cloneableTags[int16Tag] = - cloneableTags[int32Tag] = cloneableTags[mapTag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[setTag] = - cloneableTags[stringTag] = cloneableTags[symbolTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[weakMapTag] = false; + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); - /** Used to map Latin Unicode letters to basic Latin letters. */ - var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 's' - }; + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } - /** Used to map HTML entities to characters. */ - var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" - }; + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } - /** Used to escape characters for inclusion in compiled string literals. */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } - /** Built-in method references without a dependency on `root`. */ - var freeParseFloat = parseFloat, - freeParseInt = parseInt; + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } - /** Detect free variable `exports`. */ - var freeExports = true && exports && !exports.nodeType && exports; + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } - /** Detect free variable `module`. */ - var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } - /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } - /** Used to access faster Node.js helpers. */ - var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; + result[value] = key; + }, constant(identity)); - if (types) { - return types; + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); } - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} - }()); - - /* Node.js helper references. */ - var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, - nodeIsDate = nodeUtil && nodeUtil.isDate, - nodeIsMap = nodeUtil && nodeUtil.isMap, - nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, - nodeIsSet = nodeUtil && nodeUtil.isSet, - nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); - /*--------------------------------------------------------------------------*/ + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); - /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ - function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } - return func.apply(thisArg, args); - } - - /** - * A specialized version of `baseAggregator` for arrays. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ - function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, - length = array == null ? 0 : array.length; - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } - return accumulator; - } - /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; } - return array; - } - /** - * A specialized version of `_.forEachRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; } - return array; - } - /** - * A specialized version of `_.every` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ - function arrayEvery(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); } - return true; - } - /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); } - return result; - } - /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; - } + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); - /** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; + var index = -1, + length = path.length; - while (++index < length) { - if (comparator(value, array[index])) { - return true; + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; } + return object; } - return false; - } - - /** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - while (++index < length) { - result[index] = iteratee(array[index], index, array); + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); } - return result; - } - - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - while (++index < length) { - array[offset + index] = values[index]; + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); } - return array; - } - - /** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; - } + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); - /** - * A specialized version of `_.reduceRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the last element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; - } + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); - /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; } - return false; - } - - /** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ - var asciiSize = baseProperty('length'); - - /** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function asciiToArray(string) { - return string.split(''); - } - /** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function asciiWords(string) { - return string.match(reAsciiWord) || []; - } + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } - /** - * The base implementation of methods like `_.findKey` and `_.findLastKey`, - * without support for iteratee shorthands, which iterates over `collection` - * using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the found element or its key, else `undefined`. - */ - function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = key; - return false; - } - }); - return result; - } + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); } - return -1; - } - /** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); - } + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } - /** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; + /*------------------------------------------------------------------------*/ - while (++index < length) { - if (comparator(array[index], value)) { - return index; + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); } - return -1; - } - - /** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ - function baseIsNaN(value) { - return value !== value; - } - /** - * The base implementation of `_.mean` and `_.meanBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the mean. - */ - function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? (baseSum(array, iteratee) / length) : NAN; - } + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } + /*------------------------------------------------------------------------*/ - /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); }); - return accumulator; - } - /** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ - function baseSortBy(array, comparer) { - var length = array.length; + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } - array.sort(comparer); - while (length--) { - array[length] = array[length].value; + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } - return array; - } - /** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ - function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); - } + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; } - return result; - } - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } - while (++index < n) { - result[index] = iteratee(index); + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; } - return result; - } - /** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. - */ - function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); }); - } - - /** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ - function baseTrim(string) { - return string - ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; - } - - /** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ - function baseUnary(func) { - return function(value) { - return func(value); - }; - } - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); }); - } - - /** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function cacheHas(cache, key) { - return cache.has(key); - } - - /** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ - function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } - - /** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ - function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); - /** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ - function countHolders(array, placeholder) { - var length = array.length, - result = 0; + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); - while (length--) { - if (array[length] === placeholder) { - ++result; + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); } - return result; - } - /** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ - var deburrLetter = basePropertyOf(deburredLetters); + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - var escapeHtmlChar = basePropertyOf(htmlEscapes); + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } - /** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; - } + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; - } + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } - /** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ - function hasUnicode(string) { - return reHasUnicode.test(string); - } + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } - /** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. - */ - function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); - } + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } - /** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. - */ - function iteratorToArray(iterator) { - var data, - result = []; + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); - while (!(data = iterator.next()).done) { - result.push(data.value); + return args.length < 3 ? string : string.replace(args[1], args[2]); } - return result; - } - - /** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function(value, key) { - result[++index] = [key, value]; + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); }); - return result; - } - - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - - /** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ - function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } } + return string.split(separator, limit); } - return result; - } - - /** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; - } - - /** - * Converts `set` to its value-value pairs. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the value-value pairs. - */ - function setToPairs(set) { - var index = -1, - result = Array(set.size); - set.forEach(function(value) { - result[++index] = [value, value]; + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); }); - return result; - } - - /** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); - /** - * A specialized version of `_.lastIndexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; - } + target = baseToString(target); + return string.slice(position, position + target.length) == target; } - return index; - } - - /** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ - function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); - } - /** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); - } + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': '