From 0c7d6e1dcb7b83548dc2b2e9069d1167a10eed9a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 12:49:37 +0000 Subject: [PATCH] Automatic compilation --- .eslintignore | 4 - .eslintrc.json | 31 - .github/dependabot.yml | 18 - .github/pull_request_template.md | 1 - .github/workflows/codeql.yml | 41 - .github/workflows/compliance-workflow.yml | 11 - .github/workflows/release.yml | 9 - .github/workflows/test.yml | 29 - .gitignore | 107 - .husky/husky.sh | 36 - .prettierignore | 4 - .prettierrc.json | 10 - LinitingAndFormat.md | 26 - README.md | 75 - dist/index.js | 104437 +++++++++++++++ package-lock.json | 2887 - package.json | 51 - src/AccessToCode/AccessToCodeService.ts | 62 - .../AzureDevOpsBoardService.ts | 54 - .../PenetrationTestTicketService.ts | 125 - src/azuredevopsboard/PentestTickets.ts | 26 - .../ThreatModelingTicketService.ts | 125 - src/azuredevopsboard/ThreatModelingTickets.ts | 29 - .../BranchProtectionService.ts | 69 - src/codequalitytools/CodeQualityService.ts | 19 - src/cydigConfig.json | 29 - src/helpfunctions/AzureDevOpsConnection.ts | 31 - src/helpfunctions/JsonService.ts | 15 - src/index.ts | 54 - src/pentest/PentestService.ts | 19 - src/sasttools/CodeQLService.ts | 77 - src/sasttools/SastService.ts | 33 - src/scatools/DependabotService.ts | 74 - src/scatools/ScaService.ts | 33 - .../GithubSecretScanningService.ts | 62 - src/secretscanning/SecretScanningService.ts | 35 - src/threatmodeling/ThreatModelingService.ts | 18 - src/types/CyDigConfig.ts | 32 - src/types/DevOpsBoard.ts | 6 - src/types/GitHubTools.ts | 7 - src/types/GithubToolSeverityLevel.ts | 8 - src/types/OctokitResponses.ts | 13 - tests/BranchProtectionService.test.ts | 104 - tests/CodeQLService.test.ts | 115 - tests/DependabotService.test.ts | 115 - tests/SastService.test.ts | 38 - tests/ScaService.test.ts | 38 - tsconfig.json | 18 - 48 files changed, 104437 insertions(+), 4823 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.json delete mode 100644 .github/dependabot.yml delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/compliance-workflow.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .gitignore delete mode 100644 .husky/husky.sh delete mode 100644 .prettierignore delete mode 100644 .prettierrc.json delete mode 100644 LinitingAndFormat.md delete mode 100644 README.md create mode 100644 dist/index.js delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 src/AccessToCode/AccessToCodeService.ts delete mode 100644 src/azuredevopsboard/AzureDevOpsBoardService.ts delete mode 100644 src/azuredevopsboard/PenetrationTestTicketService.ts delete mode 100644 src/azuredevopsboard/PentestTickets.ts delete mode 100644 src/azuredevopsboard/ThreatModelingTicketService.ts delete mode 100644 src/azuredevopsboard/ThreatModelingTickets.ts delete mode 100644 src/branchprotection/BranchProtectionService.ts delete mode 100644 src/codequalitytools/CodeQualityService.ts delete mode 100644 src/cydigConfig.json delete mode 100644 src/helpfunctions/AzureDevOpsConnection.ts delete mode 100644 src/helpfunctions/JsonService.ts delete mode 100644 src/index.ts delete mode 100644 src/pentest/PentestService.ts delete mode 100644 src/sasttools/CodeQLService.ts delete mode 100644 src/sasttools/SastService.ts delete mode 100644 src/scatools/DependabotService.ts delete mode 100644 src/scatools/ScaService.ts delete mode 100644 src/secretscanning/GithubSecretScanningService.ts delete mode 100644 src/secretscanning/SecretScanningService.ts delete mode 100644 src/threatmodeling/ThreatModelingService.ts delete mode 100644 src/types/CyDigConfig.ts delete mode 100644 src/types/DevOpsBoard.ts delete mode 100644 src/types/GitHubTools.ts delete mode 100644 src/types/GithubToolSeverityLevel.ts delete mode 100644 src/types/OctokitResponses.ts delete mode 100644 tests/BranchProtectionService.test.ts delete mode 100644 tests/CodeQLService.test.ts delete mode 100644 tests/DependabotService.test.ts delete mode 100644 tests/SastService.test.ts delete mode 100644 tests/ScaService.test.ts delete mode 100644 tsconfig.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 9c3f2cfc..00000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -dist/ -node_modules/ -coverage/ -*.test.ts \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 60a4bdb0..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "ignorePatterns": ["node_modules", "test", "dist"], - "rules": { - "@typescript-eslint/explicit-function-return-type": "warn", - "@typescript-eslint/typedef": [ - "error", - { - "arrayDestructuring": true, - "arrowCallSignature": true, - "arrowParameter": true, - "callSignature": true, - "memberVariableDeclaration": true, - "parameter": true, - "propertyDeclaration": true, - "objectDestructuring": true, - "variableDeclaration": true, - "variableDeclarationIgnoreFunction": true - } - ], - "@typescript-eslint/no-inferrable-types": 0, - "@typescript-eslint/naming-convention": ["error", { "selector": "variableLike", "format": ["camelCase"] }] - } -} diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8af06965..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,18 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: 'npm' # See documentation for possible values - directory: '/' # Location of package manifests - schedule: - interval: 'daily' - - # Maintain dependencies for GitHub Actions - - package-ecosystem: 'github-actions' - # Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.) - directory: '/' - schedule: - interval: 'daily' diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index b6a68c93..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1 +0,0 @@ -!!! REMEMBER TO ADD A LABEL IN ORDER TO CREATE A RELEASE !!! (REMOVE THIS) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 8e13fe40..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: 'CodeQL' - -on: - push: - branches: ['main'] - pull_request: - branches: ['main'] - schedule: - - cron: '25 21 * * 1' - -jobs: - analyze: - name: Analyze (${{ matrix.language }}) - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} - permissions: - security-events: write - packages: read - actions: read - contents: read - - strategy: - fail-fast: false - matrix: - include: - - language: javascript-typescript - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: '/language:${{matrix.language}}' diff --git a/.github/workflows/compliance-workflow.yml b/.github/workflows/compliance-workflow.yml deleted file mode 100644 index d1f00928..00000000 --- a/.github/workflows/compliance-workflow.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: CyDig Compliance Workflow - -on: - workflow_dispatch: - schedule: - - cron: '0 1 * * 1-5' - -jobs: - CyDig-Compliance-Workflow: - uses: Omegapoint/cydig-reusable-workflows/.github/workflows/compliance-template.yml@main - secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 6890c89c..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: Creating release -run-name: ${{ github.actor }} creating a release -on: - pull_request: - types: [closed] - -jobs: - call-release-workflow: - uses: omegapoint/cydig-reusable-workflows/.github/workflows/release.yml@main diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 84710ce2..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: test action -run-name: ${{ github.actor }} is running tests -permissions: - contents: read - pages: read - id-token: write - -on: [push, workflow_dispatch] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup node - uses: actions/setup-node@v4 - - name: Install dependencies - run: npm ci - - name: Run lint and prettier - run: npm run lint && npm run format:check - - name: Build and run tests - run: npm run test - - name: Build Action - run: npm run build - - name: 'Run Compliance State Action' - uses: ./ - with: - cydigConfigPath: ${{ github.workspace }}/src/cydigConfig.json - PAT-token: ${{ secrets.MY_GITHUB_PAT}} - accessTokenAzureDevOps: ${{ secrets.DEVOPS_TOKEN_WORK_ITEMS }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4d77d1eb..00000000 --- a/.gitignore +++ /dev/null @@ -1,107 +0,0 @@ -# Dependency directory -node_modules -dist - -# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output -.nuxt - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# OS metadata -.DS_Store -Thumbs.db - -# Ignore built ts files -__tests__/runner/* - -# IDE files -.idea -.vscode -*.code-workspace - -#dist -ResultsFile.xml \ No newline at end of file diff --git a/.husky/husky.sh b/.husky/husky.sh deleted file mode 100644 index cec959a6..00000000 --- a/.husky/husky.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env sh -if [ -z "$husky_skip_init" ]; then - debug () { - if [ "$HUSKY_DEBUG" = "1" ]; then - echo "husky (debug) - $1" - fi - } - - readonly hook_name="$(basename -- "$0")" - debug "starting $hook_name..." - - if [ "$HUSKY" = "0" ]; then - debug "HUSKY env variable is set to 0, skipping hook" - exit 0 - fi - - if [ -f ~/.huskyrc ]; then - debug "sourcing ~/.huskyrc" - . ~/.huskyrc - fi - - readonly husky_skip_init=1 - export husky_skip_init - sh -e "$0" "$@" - exitCode="$?" - - if [ $exitCode != 0 ]; then - echo "husky - $hook_name hook exited with code $exitCode (error)" - fi - - if [ $exitCode = 127 ]; then - echo "husky - command not found in PATH=$PATH" - fi - - exit $exitCode -fi diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index edcb51e5..00000000 --- a/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -dist/ -node_modules/ -coverage/ -README.md \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 4f0dc510..00000000 --- a/.prettierrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "printWidth": 120, - "tabWidth": 2, - "useTabs": false, - "semi": true, - "singleQuote": true, - "bracketSpacing": true, - "arrowParens": "always", - "singleAttributePerLine": true -} diff --git a/LinitingAndFormat.md b/LinitingAndFormat.md deleted file mode 100644 index 240e729d..00000000 --- a/LinitingAndFormat.md +++ /dev/null @@ -1,26 +0,0 @@ -# How to install linting and format - -1. Run the following commands (be in the root, if you don't have a package.json there, run npm init first to create one): - -```yaml -npm install eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin husky prettier --save-dev -npm pkg set scripts.prepare="husky install" -npm run prepare -``` - -2. Copy files: .eslintrc.json, .prettierignore, .prettierrc and .husky/pre-commit - -3. Add following to script section in package.json: - -```json -"lint": "eslint . --ext .ts", -"lint:fix": "eslint . --fix --ext .ts", -"format:write": "npx prettier -w .", -"format:check": "npx prettier -c .", -``` - -4. Make a commit. You should see that your files are being checked for rule breaks. If it does not work and you are using a Mac, run following command and try a new commit: - -```yaml -chmod ug+x .husky/* -``` diff --git a/README.md b/README.md deleted file mode 100644 index 0e208add..00000000 --- a/README.md +++ /dev/null @@ -1,75 +0,0 @@ -[![OP Compliance Dashboard](https://img.shields.io/badge/OP%20Compliance%20Dashboard-click%20here-blue)](https://cydig.omegapoint.cloud/cydig)

-![Timestamp](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2Ftimestamp%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)

-![threatModelingDate](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FthreatModelingDate%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-![numberOfReviewers](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FnumberOfReviewers%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-![scaTool](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FscaTool%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-![sastTool](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FsastTool%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-[![secureScore](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FsecureScore%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)](https://portal.azure.com/#view/Microsoft_Azure_Security/RecommendationsBladeV2/subscriptionIds~/%5B%22***%22%5D/source/SecurityPosture_ViewRecommendation)
-[![allowedLocationPolicy](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FallowedLocationPolicy%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)](https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Compliance)
-![pentestDate](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FpentestDate%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-![numberOfDeployedVMs](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FnumberOfDeployedVMs%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-![numberOfExposedSecrets](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FnumberOfExposedSecrets%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-![codeQualityTool](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FcodeQualityTool%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-![usersInProduction](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FusersInProduction%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
-![userAccessToCode](https://img.shields.io/endpoint?url=https%3A%2F%2Ffunc-cydig-badge-service-prod.azurewebsites.net%2Fapi%2Fteams%2FCyDig%2Fsources%2FGitHub%2Fprojects%2Fnot-specified%2Frepositories%2Fcydig-compliance-action%2Fcontrols%2FentitiesInCode%3Fcode%3DxaEvCDsaK01y2Z6SBivwOKndN4o915lpOTt1VkmULgsxgsjkml7u1DOhgULzmAPX)
- -# CyDig Compliance Action - -This repository contains a action with compliance controls. - -## Compliance Controls - -The compliance controls that are currently available are listed below. - -* Number of reviewers on a pull request -* Number of exposed secrets -* Date of latest threat modeling -* Date of latest penetration test -* Implemented SCA tool -* Implemented SAST tool - -## Development on already existing or new control. - -1. To start development, create a branch named **feature/your-branch-name**. - -2. Run the command below from the root. - -```bash -npm install -``` - -By first running npm install in the root you get the linting and format dependencies downloaded. To enable so that every time you make a commit, a pre-hook will run to validate the rules read more [here](/LinitingAndFormat.md). To fix format warnings manually run the following command from the **root**: - -```bash -npm run format:write -``` - -3. If you are developing a new control, create a new folder for your control in the ```src``` folder. -4. Start developing. To compile your code, run the following command: - -```bash -npm run build -``` - -5. To run the tests, run the following command: - -```bash -npm run test -``` - -To generated test results in a XML-file, run the following command: - -```bash -npm run testScript -``` - -6. If necessary, add input parameter in ```action.yml```, if it is needed for the control. - -7. When pushing the code the repository the workflow will build and push your code to the repository. - -*For more information about developing in the CyDig project, please go to the [Wiki](https://dev.azure.com/CyDig/CyDig/_wiki/wikis/CyDig.wiki/5/Att-jobba-i-CyDig)* - -## Creating a release for the action -At cydig, we follow [Semantic Versioning](https://semver.org/) for our action releases. Practically, this means that when you're developing and creating a pull request (PR), you can assign one of three labels to the PR: Major, Minor, or Patch. These labels correspond to version numbers in the format vX.Y.Z, where X is the major version, Y is the minor version, and Z is the patch version.For example, if you add the "Patch" label to your PR, and it's approved and merged, a workflow will automatically run to create a release for the action. Here's an illustration of how the version number would change before and after the PR: -* Version before PR: v1.0.1 -* Version after PR: v1.0.2 diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 00000000..754da523 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,104437 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 7351: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.issue = exports.issueCommand = void 0; +const os = __importStar(__nccwpck_require__(2037)); +const utils_1 = __nccwpck_require__(5278); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 2186: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + 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) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +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 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); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + } + command_1.issueCommand('set-env', { name }, convertedVal); +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueFileCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + } + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __nccwpck_require__(1327); +Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); +/** + * @deprecated use core.summary + */ +var summary_2 = __nccwpck_require__(1327); +Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); +/** + * Path exports + */ +var path_utils_1 = __nccwpck_require__(2981); +Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); +Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); +Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 717: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// For internal use, subject to change. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +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 utils_1 = __nccwpck_require__(5278); +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueFileCommand = issueFileCommand; +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; +} +exports.prepareKeyValueMessage = prepareKeyValueMessage; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 8041: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + 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) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +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); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + +/***/ 2981: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(__nccwpck_require__(1017)); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map + +/***/ }), + +/***/ 1327: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + 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) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +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 { 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'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map + +/***/ }), + +/***/ 5278: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCommandProperties = exports.toCommandValue = void 0; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 4087: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Context = void 0; +const fs_1 = __nccwpck_require__(7147); +const os_1 = __nccwpck_require__(2037); +class Context { + /** + * Hydrate the context from the environment + */ + constructor() { + var _a, _b, _c; + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) { + if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); + } + else { + const path = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); + } + } + this.eventName = process.env.GITHUB_EVENT_NAME; + this.sha = process.env.GITHUB_SHA; + this.ref = process.env.GITHUB_REF; + this.workflow = process.env.GITHUB_WORKFLOW; + this.action = process.env.GITHUB_ACTION; + this.actor = process.env.GITHUB_ACTOR; + this.job = process.env.GITHUB_JOB; + this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); + this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); + this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; + this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; + this.graphqlUrl = + (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; + } + get issue() { + const payload = this.payload; + return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); + } + get repo() { + if (process.env.GITHUB_REPOSITORY) { + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); + return { owner, repo }; + } + if (this.payload.repository) { + return { + owner: this.payload.repository.owner.login, + repo: this.payload.repository.name + }; + } + throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + } +} +exports.Context = Context; +//# sourceMappingURL=context.js.map + +/***/ }), + +/***/ 5438: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getOctokit = exports.context = void 0; +const Context = __importStar(__nccwpck_require__(4087)); +const utils_1 = __nccwpck_require__(3030); +exports.context = new Context.Context(); +/** + * Returns a hydrated octokit ready to use for GitHub Actions + * + * @param token the repo PAT or GITHUB_TOKEN + * @param options other options to set + */ +function getOctokit(token, options, ...additionalPlugins) { + const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); + return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options)); +} +exports.getOctokit = getOctokit; +//# sourceMappingURL=github.js.map + +/***/ }), + +/***/ 7914: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + 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) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0; +const httpClient = __importStar(__nccwpck_require__(6255)); +const undici_1 = __nccwpck_require__(1773); +function getAuthString(token, options) { + if (!token && !options.auth) { + throw new Error('Parameter token or opts.auth is required'); + } + else if (token && options.auth) { + throw new Error('Parameters token and opts.auth may not both be specified'); + } + return typeof options.auth === 'string' ? options.auth : `token ${token}`; +} +exports.getAuthString = getAuthString; +function getProxyAgent(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgent(destinationUrl); +} +exports.getProxyAgent = getProxyAgent; +function getProxyAgentDispatcher(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgentDispatcher(destinationUrl); +} +exports.getProxyAgentDispatcher = getProxyAgentDispatcher; +function getProxyFetch(destinationUrl) { + const httpDispatcher = getProxyAgentDispatcher(destinationUrl); + const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + }); + return proxyFetch; +} +exports.getProxyFetch = getProxyFetch; +function getApiBaseUrl() { + return process.env['GITHUB_API_URL'] || 'https://api.github.com'; +} +exports.getApiBaseUrl = getApiBaseUrl; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 3030: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0; +const Context = __importStar(__nccwpck_require__(4087)); +const Utils = __importStar(__nccwpck_require__(7914)); +// octokit + plugins +const core_1 = __nccwpck_require__(6762); +const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044); +const plugin_paginate_rest_1 = __nccwpck_require__(4193); +exports.context = new Context.Context(); +const baseUrl = Utils.getApiBaseUrl(); +exports.defaults = { + baseUrl, + request: { + agent: Utils.getProxyAgent(baseUrl), + fetch: Utils.getProxyFetch(baseUrl) + } +}; +exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults); +/** + * Convience function to correctly format Octokit Options to pass into the constructor. + * + * @param token the repo PAT or GITHUB_TOKEN + * @param options other options to set + */ +function getOctokitOptions(token, options) { + const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller + // Auth + const auth = Utils.getAuthString(token, opts); + if (auth) { + opts.auth = auth; + } + return opts; +} +exports.getOctokitOptions = getOctokitOptions; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 5526: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + 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) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 6255: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + 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) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +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 undici_1 = __nccwpck_require__(1773); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (exports.HttpCodes = HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers || (exports.Headers = Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes || (exports.MediaTypes = MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + this.message.on('data', (chunk) => { + chunks.push(chunk); + }); + this.message.on('end', () => { + resolve(Buffer.concat(chunks)); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if tunneling agent isn't assigned create a new agent + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + // if agent is already assigned use that agent. + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { + token: `${proxyUrl.username}:${proxyUrl.password}` + }))); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 9835: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + try { + return new URL(proxyVar); + } + catch (_a) { + if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) + return new URL(`http://${proxyVar}`); + } + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperNoProxyItem === '*' || + upperReqHosts.some(x => x === upperNoProxyItem || + x.endsWith(`.${upperNoProxyItem}`) || + (upperNoProxyItem.startsWith('.') && + x.endsWith(`${upperNoProxyItem}`)))) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return (hostLower === 'localhost' || + hostLower.startsWith('127.') || + hostLower.startsWith('[::1]') || + hostLower.startsWith('[0:0:0:0:0:0:0:1]')); +} +//# sourceMappingURL=proxy.js.map + +/***/ }), + +/***/ 334: +/***/ ((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, { + createTokenAuth: () => createTokenAuth +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/auth.js +var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +var REGEX_IS_INSTALLATION = /^ghs_/; +var REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; +} + +// pkg/dist-src/with-authorization-prefix.js +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} + +// pkg/dist-src/hook.js +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +// pkg/dist-src/index.js +var createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 6762: +/***/ ((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, { + 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); + +// pkg/dist-src/version.js +var VERSION = "5.2.0"; + +// pkg/dist-src/index.js +var noop = () => { +}; +var consoleWarn = console.warn.bind(console); +var consoleError = console.error.bind(console); +var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var Octokit = class { + static { + this.VERSION = VERSION; + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super( + Object.assign( + {}, + defaults, + options, + options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null + ) + ); + } + }; + return OctokitWithDefaults; + } + static { + this.plugins = []; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + const currentPlugins = this.plugins; + const NewOctokit = class extends this { + static { + this.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + } + }; + return NewOctokit; + } + constructor(options = {}) { + const hook = new import_before_after_hook.Collection(); + const requestDefaults = { + baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = import_request.request.defaults(requestDefaults); + this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); + this.log = Object.assign( + { + debug: noop, + info: noop, + warn: consoleWarn, + error: consoleError + }, + options.log + ); + this.hook = hook; + if (!options.authStrategy) { + if (!options.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + const auth = (0, import_auth_token.createTokenAuth)(options.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options.auth + ) + ); + hook.wrap("request", auth.hook); + this.auth = auth; + } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options)); + } + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 9440: +/***/ ((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, { + endpoint: () => endpoint +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/defaults.js +var import_universal_user_agent = __nccwpck_require__(5030); + +// pkg/dist-src/version.js +var VERSION = "9.0.5"; + +// 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) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +// pkg/dist-src/util/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/util/merge-deep.js +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +// pkg/dist-src/util/remove-undefined-properties.js +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; + } + } + return obj; +} + +// pkg/dist-src/merge.js +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + 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/, "")); + } + return mergedOptions; +} + +// pkg/dist-src/util/add-query-parameters.js +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +// pkg/dist-src/util/extract-url-variable-names.js +var urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +// pkg/dist-src/util/omit.js +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; + } + } + return result; +} + +// pkg/dist-src/util/url-template.js +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } +} + +// pkg/dist-src/parse.js +function parse(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.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)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); +} + +// pkg/dist-src/endpoint-with-defaults.js +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} + +// pkg/dist-src/with-defaults.js +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse + }); +} + +// pkg/dist-src/index.js +var endpoint = withDefaults(null, DEFAULTS); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 8467: +/***/ ((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, { + GraphqlResponseError: () => GraphqlResponseError, + graphql: () => graphql2, + withCustomRequest: () => withCustomRequest +}); +module.exports = __toCommonJS(dist_src_exports); +var import_request3 = __nccwpck_require__(6234); +var import_universal_user_agent = __nccwpck_require__(5030); + +// pkg/dist-src/version.js +var VERSION = "7.1.0"; + +// pkg/dist-src/with-defaults.js +var import_request2 = __nccwpck_require__(6234); + +// pkg/dist-src/graphql.js +var import_request = __nccwpck_require__(6234); + +// pkg/dist-src/error.js +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); +} +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } +}; + +// pkg/dist-src/graphql.js +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" +]; +var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); + } + return response.data.data; + }); +} + +// pkg/dist-src/with-defaults.js +function withDefaults(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); +} + +// pkg/dist-src/index.js +var graphql2 = withDefaults(import_request3.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 4193: +/***/ ((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, { + composePaginateRest: () => composePaginateRest, + isPaginatingEndpoint: () => isPaginatingEndpoint, + paginateRest: () => paginateRest, + paginatingEndpoints: () => paginatingEndpoints +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/version.js +var VERSION = "9.2.1"; + +// pkg/dist-src/normalize-paginated-list-response.js +function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) + return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + return response; +} + +// pkg/dist-src/iterator.js +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) + return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url = ((normalizedResponse.headers.link || "").match( + /<([^>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } + } + }) + }; +} + +// pkg/dist-src/paginate.js +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; + } + return gather( + octokit, + [], + iterator(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); +} +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { + if (result.done) { + return results; + } + let earlyExit = false; + function done() { + earlyExit = true; + } + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator2, mapFn); + }); +} + +// pkg/dist-src/compose-paginate.js +var composePaginateRest = Object.assign(paginate, { + iterator +}); + +// pkg/dist-src/generated/paginating-endpoints.js +var paginatingEndpoints = [ + "GET /advisories", + "GET /app/hook/deliveries", + "GET /app/installation-requests", + "GET /app/installations", + "GET /assignments/{assignment_id}/accepted_assignments", + "GET /classrooms", + "GET /classrooms/{classroom_id}/assignments", + "GET /enterprises/{enterprise}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/actions/variables", + "GET /orgs/{org}/actions/variables/{name}/repositories", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/codespaces/secrets", + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", + "GET /orgs/{org}/copilot/billing/seats", + "GET /orgs/{org}/dependabot/alerts", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/members/{username}/codespaces", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/organization-roles/{role_id}/teams", + "GET /orgs/{org}/organization-roles/{role_id}/users", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/personal-access-token-requests", + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", + "GET /orgs/{org}/personal-access-tokens", + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/properties/values", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", + "GET /orgs/{org}/rulesets/rule-suites", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/organization-secrets", + "GET /repos/{owner}/{repo}/actions/organization-variables", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/variables", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/activity", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/alerts", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "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}/rulesets/rule-suites", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/security-advisories", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /repositories/{repository_id}/environments/{environment_name}/variables", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/social_accounts", + "GET /user/ssh_signing_keys", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/social_accounts", + "GET /users/{username}/ssh_signing_keys", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions" +]; + +// pkg/dist-src/paginating-endpoints.js +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } +} + +// pkg/dist-src/index.js +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +paginateRest.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 8883: +/***/ ((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, { + requestLog: () => requestLog +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/version.js +var VERSION = "4.0.1"; + +// pkg/dist-src/index.js +function requestLog(octokit) { + octokit.hook.wrap("request", (request, options) => { + octokit.log.debug("request", options); + const start = Date.now(); + const requestOptions = octokit.request.endpoint.parse(options); + const path = requestOptions.url.replace(options.baseUrl, ""); + return request(options).then((response) => { + octokit.log.info( + `${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms` + ); + return response; + }).catch((error) => { + octokit.log.info( + `${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms` + ); + throw error; + }); + }); +} +requestLog.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 3044: +/***/ ((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, { + legacyRestEndpointMethods: () => legacyRestEndpointMethods, + restEndpointMethods: () => restEndpointMethods +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/version.js +var VERSION = "10.4.1"; + +// 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}" + ], + 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"], + 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}" + ], + 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" + ], + forceCancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" + ], + 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}"], + getCustomOidcSubClaimForRepo: [ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + 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"], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], + 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" + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/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" + ], + 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}" + ], + 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" + ], + setCustomOidcSubClaimForRepo: [ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + 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" + ], + 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}" + ] + }, + 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"], + markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], + 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}"] + }, + 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}" + ], + checkPermissionsForDevcontainer: [ + "GET /repos/{owner}/{repo}/codespaces/permissions_check" + ], + 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" + ], + 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" + ], + 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}"] + }, + copilot: { + addCopilotSeatsForTeams: [ + "POST /orgs/{org}/copilot/billing/selected_teams" + ], + addCopilotSeatsForUsers: [ + "POST /orgs/{org}/copilot/billing/selected_users" + ], + cancelCopilotSeatAssignmentForTeams: [ + "DELETE /orgs/{org}/copilot/billing/selected_teams" + ], + cancelCopilotSeatAssignmentForUsers: [ + "DELETE /orgs/{org}/copilot/billing/selected_users" + ], + getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], + getCopilotSeatDetailsForUser: [ + "GET /orgs/{org}/members/{username}/copilot" + ], + listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] + }, + 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", + {}, + { + deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-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", + {}, + { + deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors" + } + ], + getImportStatus: [ + "GET /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status" + } + ], + getLargeFiles: [ + "GET /repos/{owner}/{repo}/import/large_files", + {}, + { + deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-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}", + {}, + { + deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author" + } + ], + setLfsPreference: [ + "PATCH /repos/{owner}/{repo}/import/lfs", + {}, + { + deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference" + } + ], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + startImport: [ + "PUT /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-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", + {}, + { + deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import" + } + ] + }, + oidc: { + getOidcCustomSubTemplateForOrg: [ + "GET /orgs/{org}/actions/oidc/customization/sub" + ], + updateOidcCustomSubTemplateForOrg: [ + "PUT /orgs/{org}/actions/oidc/customization/sub" + ] + }, + orgs: { + addSecurityManagerTeam: [ + "PUT /orgs/{org}/security-managers/teams/{team_slug}" + ], + assignTeamToOrgRole: [ + "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + assignUserToOrgRole: [ + "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], + 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}" + ], + createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"], + createInvitation: ["POST /orgs/{org}/invitations"], + createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"], + createOrUpdateCustomPropertiesValuesForRepos: [ + "PATCH /orgs/{org}/properties/values" + ], + createOrUpdateCustomProperty: [ + "PUT /orgs/{org}/properties/schema/{custom_property_name}" + ], + createWebhook: ["POST /orgs/{org}/hooks"], + delete: ["DELETE /orgs/{org}"], + deleteCustomOrganizationRole: [ + "DELETE /orgs/{org}/organization-roles/{role_id}" + ], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + enableOrDisableSecurityProductOnAllOrgRepos: [ + "POST /orgs/{org}/{security_product}/{enablement}" + ], + get: ["GET /orgs/{org}"], + getAllCustomProperties: ["GET /orgs/{org}/properties/schema"], + getCustomProperty: [ + "GET /orgs/{org}/properties/schema/{custom_property_name}" + ], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], + 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"], + listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"], + 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"], + listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], + listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], + listOrgRoles: ["GET /orgs/{org}/organization-roles"], + listOrganizationFineGrainedPermissions: [ + "GET /orgs/{org}/organization-fine-grained-permissions" + ], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPatGrantRepositories: [ + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" + ], + listPatGrantRequestRepositories: [ + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" + ], + listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], + listPatGrants: ["GET /orgs/{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"], + patchCustomOrganizationRole: [ + "PATCH /orgs/{org}/organization-roles/{role_id}" + ], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeCustomProperty: [ + "DELETE /orgs/{org}/properties/schema/{custom_property_name}" + ], + 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 /orgs/{org}/personal-access-token-requests/{pat_request_id}" + ], + reviewPatGrantRequestsInBulk: [ + "POST /orgs/{org}/personal-access-token-requests" + ], + revokeAllOrgRolesTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}" + ], + revokeAllOrgRolesUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}" + ], + revokeOrgRoleTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + revokeOrgRoleUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], + 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 /orgs/{org}/personal-access-tokens/{pat_id}"], + updatePatAccesses: ["POST /orgs/{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", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" + ] + } + ], + 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" } + ], + cancelPagesDeployment: [ + "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel" + ], + checkAutomatedSecurityFixes: [ + "GET /repos/{owner}/{repo}/automated-security-fixes" + ], + 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"], + createOrUpdateCustomPropertiesValues: [ + "PATCH /repos/{owner}/{repo}/properties/values" + ], + 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/deployments"], + 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}" + ], + disablePrivateVulnerabilityReporting: [ + "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + 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" + ], + enablePrivateVulnerabilityReporting: [ + "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + 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}" + ], + getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"], + 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"], + getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], + getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], + 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}"], + getPagesDeployment: [ + "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_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}"], + getRepoRuleSuite: [ + "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + ], + getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], + 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}" + ], + listActivities: ["GET /repos/{owner}/{repo}/activity"], + 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: { + createFork: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks" + ], + createPrivateVulnerabilityReport: [ + "POST /repos/{owner}/{repo}/security-advisories/reports" + ], + createRepositoryAdvisory: [ + "POST /repos/{owner}/{repo}/security-advisories" + ], + createRepositoryAdvisoryCveRequest: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" + ], + getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], + getRepositoryAdvisory: [ + "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ], + listGlobalAdvisories: ["GET /advisories"], + listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], + 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; + +// 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 = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; + } + const { endpointDefaults, decorations } = method; + 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); +} + +// 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); + + +/***/ }), + +/***/ 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); +var import_core = __nccwpck_require__(6762); + +// 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 = "6.0.1"; +function retry(octokit, octokitOptions) { + const state = Object.assign( + { + 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); + + +/***/ }), + +/***/ 537: +/***/ ((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__(8932); +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); + + +/***/ }), + +/***/ 6234: +/***/ ((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__(9440); +var import_universal_user_agent = __nccwpck_require__(5030); + +// pkg/dist-src/version.js +var VERSION = "8.4.0"; + +// pkg/dist-src/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/fetch-wrapper.js +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) { + var _a, _b, _c, _d; + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if (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( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + return fetch(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, + headers: requestOptions.headers, + signal: (_d = requestOptions.request) == null ? void 0 : _d.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; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + throw new import_request_error.RequestError(message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + let suffix; + if ("documentation_url" in data) { + suffix = ` - ${data.documentation_url}`; + } else { + suffix = ""; + } + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; + } + return `${data.message}${suffix}`; + } + 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); + + +/***/ }), + +/***/ 5375: +/***/ ((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, { + Octokit: () => Octokit +}); +module.exports = __toCommonJS(dist_src_exports); +var import_core = __nccwpck_require__(6762); +var import_plugin_request_log = __nccwpck_require__(8883); +var import_plugin_paginate_rest = __nccwpck_require__(4193); +var import_plugin_rest_endpoint_methods = __nccwpck_require__(3044); + +// pkg/dist-src/version.js +var VERSION = "20.1.0"; + +// pkg/dist-src/index.js +var Octokit = import_core.Octokit.plugin( + import_plugin_request_log.requestLog, + import_plugin_rest_endpoint_methods.legacyRestEndpointMethods, + import_plugin_paginate_rest.paginateRest +).defaults({ + userAgent: `octokit-rest.js/${VERSION}` +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 7770: +/***/ (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 AlertInterfaces = __nccwpck_require__(6228); +class AlertApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Alert-api', options); + } + /** + * Get an alert. + * + * @param {string} project - Project ID or project name + * @param {number} alertId - ID of alert to retrieve + * @param {string} repository - Name or id of a repository that alert is part of + * @param {string} ref + * @param {AlertInterfaces.ExpandOption} expand - Expand alert attributes. Possible options are {ValidationFingerprint, None} + */ + getAlert(project, alertId, repository, ref, 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, + alertId: alertId, + repository: repository + }; + let queryValues = { + ref: ref, + expand: expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Alert", "e21b4630-b7d2-4031-99e3-3ad328cc4a7f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, AlertInterfaces.TypeInfo.Alert, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get alerts for a repository + * + * @param {string} project - Project ID or project name + * @param {string} repository - The name or ID of the repository + * @param {number} top - The maximum number of alerts to return + * @param {string} orderBy - Must be "id" "firstSeen" "lastSeen" "fixedOn" or "severity" Defaults to "id" + * @param {AlertInterfaces.SearchCriteria} criteria - Options to limit the alerts returned + * @param {string} continuationToken - If there are more alerts than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of alerts + */ + getAlerts(project, repository, top, orderBy, criteria, 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, + repository: repository + }; + let queryValues = { + top: top, + orderBy: orderBy, + criteria: criteria, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Alert", "e21b4630-b7d2-4031-99e3-3ad328cc4a7f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, AlertInterfaces.TypeInfo.Alert, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an alert. + * + * @param {string} project - Project ID or project name + * @param {number} alertId - ID of alert to retrieve + * @param {string} repository - Name or id of a repository that alert is part of + * @param {string} ref + * @param {AlertInterfaces.ExpandOption} expand - Expand alert attributes. Possible options are {ValidationFingerprint, None} + */ + getAlertSarif(project, alertId, repository, ref, 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, + alertId: alertId, + repository: repository + }; + let queryValues = { + ref: ref, + expand: expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Alert", "e21b4630-b7d2-4031-99e3-3ad328cc4a7f", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } + /** + * Update the status of an alert + * + * @param {AlertInterfaces.AlertStateUpdate} stateUpdate - The new status of the alert + * @param {string} project - Project ID or project name + * @param {number} alertId - The ID of the alert + * @param {string} repository - The name or ID of the repository + */ + updateAlert(stateUpdate, project, alertId, 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, + alertId: alertId, + repository: repository + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Alert", "e21b4630-b7d2-4031-99e3-3ad328cc4a7f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, stateUpdate, options); + let ret = this.formatResponse(res.result, AlertInterfaces.TypeInfo.Alert, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get instances of an alert. + * + * @param {string} project - Project ID or project name + * @param {number} alertId - ID of alert to retrieve + * @param {string} repository - Name or id of a repository that alert is part of + * @param {string} ref + */ + getAlertInstances(project, alertId, repository, ref) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + alertId: alertId, + repository: repository + }; + let queryValues = { + ref: ref, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Alert", "f451ba96-0e95-458a-8dd5-3df894770a49", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, AlertInterfaces.TypeInfo.AlertAnalysisInstance, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update alert metadata associations. + * + * @param {AlertInterfaces.AlertMetadata[]} alertsMetadata - A list of metadata to associate with alerts. + * @param {string} project - Project ID or project name + * @param {string} repository - The name or ID of the repository. + */ + updateAlertsMetadata(alertsMetadata, project, 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, + repository: repository + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Alert", "65de4b84-7519-4ae8-8623-175f79b49b80", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, alertsMetadata, options); + let ret = this.formatResponse(res.result, AlertInterfaces.TypeInfo.AlertMetadataChange, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Upload a Sarif containing security alerts + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} project - Project ID or project name + * @param {string} repository - The name or ID of a repository + */ + uploadSarif(customHeaders, contentStream, project, 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, + repository: repository + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Alert", "2a141cae-a50d-4c22-b41b-13f77748d035", 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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} repository + * @param {AlertInterfaces.AlertType} alertType + */ + getUxFilters(project, repository, alertType) { + return __awaiter(this, void 0, void 0, function* () { + if (alertType == null) { + throw new TypeError('alertType can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repository: repository + }; + let queryValues = { + alertType: alertType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Alert", "8f90675b-f794-434d-8f2c-cfae0a11c02a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, AlertInterfaces.TypeInfo.UxFilters, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the status of the Sarif processing job + * + * @param {number} sarifId - Sarif ID returned when the Sarif was uploaded + */ + getSarif(sarifId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + sarifId: sarifId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "Alert", "a04689e7-0f81-48a2-8d18-40654c47494c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, AlertInterfaces.TypeInfo.SarifUploadStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.AlertApi = AlertApi; + + +/***/ }), + +/***/ 9893: +/***/ (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 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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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; + + +/***/ }), + +/***/ 463: +/***/ (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); +class CixApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Pipelines-api', options); + } + /** + * Gets a list of existing configuration files for the given repository. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryType - The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc. + * @param {string} repositoryId - The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos) + * @param {string} branch - The repository branch where to look for the configuration file. + * @param {string} serviceConnectionId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TfsGit (i.e. Azure Repos). + */ + getConfigurations(project, repositoryType, repositoryId, branch, serviceConnectionId) { + 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 = { + repositoryType: repositoryType, + repositoryId: repositoryId, + branch: branch, + serviceConnectionId: serviceConnectionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "8fc87684-9ebc-4c37-ab92-f4ac4a58cb3a", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } + /** + * Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created. + * + * @param {CIXInterfaces.CreatePipelineConnectionInputs} createConnectionInputs + * @param {string} project + */ + createProjectConnection(createConnectionInputs, project) { + return __awaiter(this, void 0, void 0, function* () { + if (project == null) { + throw new TypeError('project can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + project: project, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "00df4879-9216-45d5-b38d-4a487b626b2c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, createConnectionInputs, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of build frameworks that best match the given repository based on its contents. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryType - The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc. + * @param {string} repositoryId - The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos) + * @param {string} branch - The repository branch to detect build frameworks for. + * @param {CIXInterfaces.BuildFrameworkDetectionType} detectionType + * @param {string} serviceConnectionId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TfsGit (i.e. Azure Repos). + */ + getDetectedBuildFrameworks(project, repositoryType, repositoryId, branch, detectionType, serviceConnectionId) { + 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 = { + repositoryType: repositoryType, + repositoryId: repositoryId, + branch: branch, + detectionType: detectionType, + serviceConnectionId: serviceConnectionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "29a30bab-9efb-4652-bf1b-9269baca0980", routeValues, queryValues); + let url = verData.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 {{ [key: string] : CIXInterfaces.ResourceCreationParameter; }} creationParameters + * @param {string} project - Project ID or project name + */ + createResources(creationParameters, 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.2-preview.1", "pipelines", "43201899-7690-4870-9c79-ab69605f21ed", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, creationParameters, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.CixApi = CixApi; + + +/***/ }), + +/***/ 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; + + +/***/ }), + +/***/ 4020: +/***/ (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 CoreInterfaces = __nccwpck_require__(3931); +const OperationsInterfaces = __nccwpck_require__(3052); +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.2-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.2-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); + } + })); + }); + } + /** + * Gets list of user readable teams in a project and teams user is member of (excluded from readable list). + * + * @param {string} projectId - The name or ID (GUID) of the team project containing the teams to retrieve. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + * @param {number} top - Maximum number of teams to return. + * @param {number} skip - Number of teams to skip. + */ + getProjectTeamsByCategory(projectId, expandIdentity, 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 + }; + let queryValues = { + '$expandIdentity': expandIdentity, + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "core", "6f9619ff-8b86-d011-b42d-00c04fc964ff", routeValues, queryValues); + let url = verData.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 {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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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 {number} continuationToken - Pointer that shows how many projects already been fetched. + * @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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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; + + +/***/ }), + +/***/ 7539: +/***/ (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 DashboardInterfaces = __nccwpck_require__(6890); +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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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; + + +/***/ }), + +/***/ 4605: +/***/ (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 ExtensionManagementInterfaces = __nccwpck_require__(7357); +const GalleryInterfaces = __nccwpck_require__(8905); +class ExtensionManagementApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-ExtensionManagement-api', options); + } + /** + * This API is called by acquisition/install page to get possible user actions like Buy/Request + * + * @param {string} itemId - Fully qualified name of extension (.) + * @param {boolean} testCommerce - Parameter to test paid preview extension without making azure plans public + * @param {boolean} isFreeOrTrialInstall - Parameter represents install or trial workflow (required for legacy install flows) + * @param {boolean} isAccountOwner - Parameter represents whether user is owner or PCA of an account + * @param {boolean} isLinked - Parameter represents whether account is linked with a subscription + * @param {boolean} isConnectedServer - Parameter represents whether Buy operation should be evaluated + * @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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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; + + +/***/ }), + +/***/ 3193: +/***/ (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 FeatureManagementInterfaces = __nccwpck_require__(7278); +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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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; + + +/***/ }), + +/***/ 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 + */ + 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__(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. + */ + 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.2-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.2-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.2-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); + } + })); + }); + } + /** + * Gets the specified file container object in a format dependent upon the given parameters or HTTP Accept request header + * + * @param {number} containerId - The requested container Id + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param {string} itemPath - The path to the item of interest + * @param {boolean} metadata - If true, this overrides any specified format parameter or HTTP Accept request header to provide non-recursive information for the given itemPath + * @param {string} format - If specified, this overrides the HTTP Accept request header to return either 'json' or 'zip'. If $format is specified, then api-version should also be specified as a query parameter. + * @param {string} downloadFileName - If specified and returning other than JSON format, then this download name will be used (else defaults to itemPath) + * @param {boolean} includeDownloadTickets + * @param {boolean} isShallow - If true, returns only immediate children(files & folders) for the given itemPath. False will return all items recursively within itemPath. + * @param {boolean} ignoreRequestedMediaType - Set to true to ignore the HTTP Accept request header. Default is false. + * @param {boolean} includeBlobMetadata + * @param {boolean} saveAbsolutePath - Set to false to not save the absolute path to the specified directory of the artifact in the returned archive. Works only for artifact directories. Default is true. + * @param {boolean} preferRedirect - Set to true to get the redirect response which leads to the stream with content. Default is false. + */ + getItems(containerId, scope, itemPath, metadata, format, downloadFileName, includeDownloadTickets, isShallow, ignoreRequestedMediaType, includeBlobMetadata, saveAbsolutePath, preferRedirect) { + 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, + preferRedirect: preferRedirect, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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; + + +/***/ }), + +/***/ 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 + */ + 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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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); + } + })); + }); + } + /** + * Rest end point to validate if an Azure publisher owns an extension for 3rd party commerce scenario. Azure only supports POST operations and the above signature is not typical of the REST operations. http://sharepoint/sites/AzureUX/_layouts/15/WopiFrame2.aspx?sourcedoc={A793D31E-6DC6-4174-8FA3-DE3F82B51642}&file=Data%20Market%20Partner%20integration%20with%20Marketplace%20service.docx&action=default + * + * @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel - All the parameters are sent in the request body + */ + 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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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 {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionName + * @param {string} extensionType + * @param {string} reCaptchaToken + * @param {boolean} bypassScopeCheck + */ + publishExtensionWithPublisherSignature(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"] = "multipart/related"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0969", 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 + */ + 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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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; + + +/***/ }), + +/***/ 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); + } + })); + } + /** + * @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; + + +/***/ }), + +/***/ 4996: +/***/ (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 GitInterfaces = __nccwpck_require__(9803); +class GitApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Git-api', options); + } + /** + * DELETE Deletes Enablement status and BillableCommitters data from DB. Deleting the enablement data will effectively disable it for the repositories affected. + * + * @param {boolean} allProjects + * @param {boolean} includeBillableCommitters + * @param {string[]} projectIds + */ + deleteEnablementStatus(allProjects, includeBillableCommitters, projectIds) { + return __awaiter(this, void 0, void 0, function* () { + if (allProjects == null) { + throw new TypeError('allProjects can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$allProjects': allProjects, + '$includeBillableCommitters': includeBillableCommitters, + projectIds: projectIds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "b43dd56f-a1b4-47a5-a857-73fc1b6c700c", 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 Enablement status for project's repositories. + * + * @param {string[]} projectIds - Null defaults to all projects in the host, list of project's repos status to return + * @param {Date} billingDate - UTC expected, Null defaults to UtcNow(), can be provided for a point in time status + * @param {number} skip - Skip X rows of resultset to simulate paging. + * @param {number} take - Return Y rows of resultset to simulate paging. + */ + getEnablementStatus(projectIds, billingDate, skip, take) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + projectIds: projectIds, + '$billingDate': billingDate, + '$skip': skip, + '$take': take, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "b43dd56f-a1b4-47a5-a857-73fc1b6c700c", routeValues, queryValues); + let url = verData.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.AdvSecEnablementStatus, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {boolean} enableOnCreateHost + */ + getEnableOnCreateHost(enableOnCreateHost) { + return __awaiter(this, void 0, void 0, function* () { + if (enableOnCreateHost == null) { + throw new TypeError('enableOnCreateHost can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$enableOnCreateHost': enableOnCreateHost, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "b43dd56f-a1b4-47a5-a857-73fc1b6c700c", routeValues, queryValues); + let url = verData.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} enableOnCreateProjectId + */ + getEnableOnCreateProject(enableOnCreateProjectId) { + return __awaiter(this, void 0, void 0, function* () { + if (enableOnCreateProjectId == null) { + throw new TypeError('enableOnCreateProjectId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$enableOnCreateProjectId': enableOnCreateProjectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "b43dd56f-a1b4-47a5-a857-73fc1b6c700c", routeValues, queryValues); + let url = verData.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 {boolean} enableOnCreateHost + */ + setEnableOnCreateHost(enableOnCreateHost) { + return __awaiter(this, void 0, void 0, function* () { + if (enableOnCreateHost == null) { + throw new TypeError('enableOnCreateHost can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$enableOnCreateHost': enableOnCreateHost, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "b43dd56f-a1b4-47a5-a857-73fc1b6c700c", 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} enableOnCreateProjectId + * @param {boolean} enableOnStatus + */ + setEnableOnCreateProject(enableOnCreateProjectId, enableOnStatus) { + return __awaiter(this, void 0, void 0, function* () { + if (enableOnCreateProjectId == null) { + throw new TypeError('enableOnCreateProjectId can not be null or undefined'); + } + if (enableOnStatus == null) { + throw new TypeError('enableOnStatus can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$enableOnCreateProjectId': enableOnCreateProjectId, + '$enableOnStatus': enableOnStatus, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "b43dd56f-a1b4-47a5-a857-73fc1b6c700c", 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); + } + })); + }); + } + /** + * POST Enablement status for repositories. + * + * @param {GitInterfaces.AdvSecEnablementUpdate[]} enablementUpdates + */ + updateEnablementStatus(enablementUpdates) { + 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.2-preview.1", "git", "b43dd56f-a1b4-47a5-a857-73fc1b6c700c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, enablementUpdates, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get estimated billable pushers for an Organization for last 90 days. + * + */ + getEstimatedBillablePushersOrg() { + 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.2-preview.1", "git", "2277ffbe-28d4-40d6-9c26-40baf26d1408", routeValues); + let url = verData.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 estimated billable pushers for a project for last 90 days. + * + * @param {string} project - Project ID or project name + */ + getEstimatedBillablePushersProject(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.2-preview.1", "git", "1df7833e-1eed-447b-81a3-390c74923900", routeValues); + let url = verData.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 estimated billable committers for a repository for the last 90 days. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId + */ + getEstimatedBillableCommittersRepo(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.2-preview.1", "git", "5dcec07b-a844-4efb-9fc1-968fd1f149db", routeValues); + let url = verData.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 Advanced Security Permission status. + * + * @param {string} projectName + * @param {string} repositoryId - Repository user is trying to access + * @param {string} permission - Permission being requestd, must be "viewAlert" "dismissAlert" "manage" "viewEnablement" or "repoRead" + */ + getPermission(projectName, repositoryId, permission) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$projectName': projectName, + '$repositoryId': repositoryId, + '$permission': permission, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "61b21a05-a60f-4910-a733-ba5347c2142d", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } + /** + * 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.2-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.2-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); + } + })); + }); + } + /** + * Retrieve actual billable committers for Advanced Security service for a given date. + * + * @param {string} project - Project ID or project name + * @param {Date} billingDate - UTC expected. If not specified defaults to the previous billing day. + * @param {number} skip - Skip X rows of resultset to simulate paging. + * @param {number} take - Return Y rows of resultset to simulate paging. + */ + getBillableCommitters(project, billingDate, skip, take) { + 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 = { + '$billingDate': billingDate, + '$skip': skip, + '$take': take, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "5c5e3ebc-37b0-4547-a957-945912d44922", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } + /** + * Retrieve detailed actual billable committers for Advanced Security service for a given date. Detailed results intentionally does not filter out soft deleted projects and repositories to help diagnose billing issues. + * + * @param {string} project - Project ID or project name + * @param {string} includeDetails - Return all the details on the billable committers. + * @param {Date} billingDate - UTC expected. If not specified defaults to the previous billing day. + */ + getBillableCommittersDetail(project, includeDetails, billingDate) { + return __awaiter(this, void 0, void 0, function* () { + if (includeDetails == null) { + throw new TypeError('includeDetails can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + '$includeDetails': includeDetails, + '$billingDate': billingDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "5c5e3ebc-37b0-4547-a957-945912d44922", routeValues, queryValues); + let url = verData.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.BillableCommitterDetail, true); + 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.2-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.2-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.2-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.2-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.2-preview.2", "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.2-preview.2", "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); + } + })); + }); + } + /** + * Retrieve statistics for multiple commits + * + * @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria - Base Commit and List of Target Commits to compare. + * @param {string} repositoryId - The name or ID of the repository. + * @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.2-preview.2", "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.2-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.2-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.2-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.2-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.2-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.2-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.2-preview.2", "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.2-preview.2", "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.2-preview.2", "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.2-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.2-preview.2", "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.2-preview.2", "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.2-preview.2", "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. The value cannot exceed 3,000,000. + * @param {number} top - Maximum number of commits to return. The value cannot exceed 50,000. + * @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.2-preview.2", "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.2-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.2-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.2-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.2-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.2-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.2-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.2-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, + repositoryId: repositoryId, + importRequestId: importRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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 = { + includeAbandoned: includeAbandoned, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitImportRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} repositoryId - The name or ID of the repository. + * @param {number} importRequestId - The unique identifier for the import request to update. + */ + 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, + repositoryId: repositoryId, + importRequestId: importRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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 = { + 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.2-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, GitInterfaces.TypeInfo.GitItem, 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. + */ + 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, + 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.2-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.2-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, GitInterfaces.TypeInfo.GitItem, true); + 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. + */ + 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, + 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.2-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.2-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.2-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.create(url, requestData, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {string} otherCollectionId - The collection ID where otherCommitId lives. + * @param {string} otherRepositoryId - The repository ID where otherCommitId lives. + */ + 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, + repositoryNameOrId: repositoryNameOrId, + commitId: commitId + }; + let queryValues = { + otherCommitId: otherCommitId, + otherCollectionId: otherCollectionId, + otherRepositoryId: otherRepositoryId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {string} repositoryNameOrId - The name or ID of the repository. + * @param {boolean} includeLinks - True to include links + */ + 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, + repositoryNameOrId: repositoryNameOrId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.2-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, + pullRequestId: pullRequestId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.2-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.2-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.2-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, GitInterfaces.TypeInfo.Attachment, true); + 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 + */ + 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, + fileName: fileName, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.2-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, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.2-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 = { + top: top, + skip: skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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 = { + '$skip': skip, + '$top': top, + includeObsolete: includeObsolete, + excludeResolved: excludeResolved, + onlyResolved: onlyResolved, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitConflict, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.2-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 = { + '$top': top, + '$skip': skip, + '$compareTo': compareTo, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitPullRequestIterationChanges, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitPullRequestIteration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitPullRequestIteration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, status, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId, + statusId: statusId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId, + statusId: statusId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitPullRequestStatus, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + updatePullRequestIterationStatuses(customHeaders, patchDocument, 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a tag (if that does not exists yet) and add that as a label (tag) for a specified pull request. The only required field is the name of the new label (tag). + * + * @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 {string} projectId - Project ID or project name. + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, label, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a label (tag) from the set of those assigned to the pull request. The tag itself will not be deleted. + * + * @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. + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + labelIdOrName: labelIdOrName + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves a single label (tag) 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. + */ + getPullRequestLabel(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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + labelIdOrName: labelIdOrName + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all the labels (tags) 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. + */ + getPullRequestLabels(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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {string} project - Project ID or project name + */ + updatePullRequestProperties(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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, queries, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, reviewer, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, reviewers, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, reviewer, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + getPullRequestReviewer(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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + updatePullRequestReviewer(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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, reviewer, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, patchVotes, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a pull request. + * + * @param {number} pullRequestId - The ID of the pull request to retrieve. + * @param {string} project - Project ID or project name + */ + getPullRequestById(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, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 + }; + let queryValues = { + searchCriteria: searchCriteria, + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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, + repositoryId: repositoryId + }; + let queryValues = { + supportsIterations: supportsIterations, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.create(url, gitPullRequestToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + includeCommits: includeCommits, + includeWorkItemRefs: includeWorkItemRefs, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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, + repositoryId: repositoryId + }; + let queryValues = { + searchCriteria: searchCriteria, + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitPullRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues); + 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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "696f3a82-47c9-487f-9117-b9d00972ca84", routeValues); + let url = verData.requestUrl; + 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); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.create(url, status, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + statusId: statusId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + statusId: statusId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitPullRequestStatus, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). + * + * @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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, comment, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.Comment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, comment, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, commentThread, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {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. + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId + }; + let queryValues = { + '$iteration': iteration, + '$baseIteration': baseIteration, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} 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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitPullRequestCommentThread, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, commentThread, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "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.create(url, push, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves a particular push. + * + * @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. + */ + 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, + repositoryId: repositoryId, + pushId: pushId + }; + let queryValues = { + includeCommits: includeCommits, + includeRefUpdates: includeRefUpdates, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "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, GitInterfaces.TypeInfo.GitPush, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} 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. + */ + 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, + repositoryId: repositoryId + }; + let queryValues = { + '$skip': skip, + '$top': top, + searchCriteria: searchCriteria, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "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, GitInterfaces.TypeInfo.GitPush, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Destroy (hard delete) a soft-deleted Git repository. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The ID of the repository. + */ + 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, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve soft-deleted git repositories from the recycle bin. + * + * @param {string} project - Project ID or project name + */ + 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.2-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, GitInterfaces.TypeInfo.GitDeletedRepository, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, repositoryDetails, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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). + */ + 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, + 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.2-preview.2", "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, GitInterfaces.TypeInfo.GitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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, + repositoryId: repositoryId + }; + let queryValues = { + filter: filter, + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, newRefInfo, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRef, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. + */ + 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, + repositoryId: repositoryId + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.create(url, refUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefUpdateResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a ref favorite + * + * @param {GitInterfaces.GitRefFavorite} favorite - The ref favorite to create. + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, favorite, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the refs favorite specified + * + * @param {string} project - Project ID or project name + * @param {number} favoriteId - The Id of the ref favorite to delete. + */ + 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, + favoriteId: favoriteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the refs favorite for a favorite Id. + * + * @param {string} project - Project ID or project name + * @param {number} favoriteId - The Id of the requested ref favorite. + */ + 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, + favoriteId: favoriteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitRefFavorite, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the refs favorites for a repo and an identity. + * + * @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. + */ + 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 + }; + let queryValues = { + repositoryId: repositoryId, + identityId: identityId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} identityId + */ + getRefFavoritesForProject(project, 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 + }; + let queryValues = { + identityId: identityId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "4720896c-594c-4a6d-b94c-12eddd80b34a", routeValues, queryValues); + let url = verData.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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {string} sourceRef - [optional] Specify the source refs to use while creating a fork repo + */ + 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 + }; + let queryValues = { + sourceRef: sourceRef, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, gitRepositoryToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a git repository + * + * @param {string} repositoryId - The ID of the repository. + * @param {string} project - Project ID or project name + */ + 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, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve git repositories. + * + * @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. + */ + 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 + }; + let queryValues = { + includeLinks: includeLinks, + includeAllUrls: includeAllUrls, + includeHidden: includeHidden, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a git repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + */ + 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, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a git repository. + * + * @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 + */ + 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, + repositoryId: repositoryId + }; + let queryValues = { + includeParent: includeParent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, newRepositoryInfo, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + repositoryId: repositoryId, + revertId: revertId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all conflicts for a revert + * + * @param {string} repositoryId + * @param {number} revertId + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} top + * @param {boolean} excludeResolved + * @param {boolean} onlyResolved + * @param {boolean} includeObsolete + */ + 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, + repositoryId: repositoryId, + revertId: revertId + }; + let queryValues = { + continuationToken: continuationToken, + '$top': top, + excludeResolved: excludeResolved, + onlyResolved: onlyResolved, + includeObsolete: includeObsolete, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.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} revertId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + 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, + repositoryId: repositoryId, + revertId: revertId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.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} revertId + * @param {string} project - Project ID or project name + */ + 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, + repositoryId: repositoryId, + revertId: revertId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, conflictUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {GitInterfaces.GitAsyncRefOperationParameters} revertToCreate + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + */ + 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, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.create(url, revertToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a revert operation by revert Id. + * + * @param {string} project - Project ID or project name + * @param {number} revertId - ID of the revert operation. + * @param {string} repositoryId - ID of the repository. + */ + 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, + revertId: revertId, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitRevert, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a revert operation for a specific branch. + * + * @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. + */ + 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, + repositoryId: repositoryId + }; + let queryValues = { + refName: refName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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, + commitId: commitId, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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.create(url, gitCommitStatusToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} 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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "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, GitInterfaces.TypeInfo.GitStatus, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a pull request suggestion for a particular repository or team project. + * + * @param {string} repositoryId - ID of the git repository. + * @param {string} project - Project ID or project name + * @param {boolean} preferCompareBranch - If true, prefer the compare branch over the default branch as target branch for pull requests. + */ + getSuggestions(repositoryId, project, preferCompareBranch) { + 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 = { + preferCompareBranch: preferCompareBranch, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "9393b4fb-4445-4919-972b-9ad16f442d83", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } + /** + * 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. + */ + getTree(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, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + projectId: projectId, + recursive: recursive, + fileName: fileName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, GitInterfaces.TypeInfo.GitTreeRef, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + projectId: projectId, + recursive: recursive, + fileName: fileName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "git", "729f6437-6f92-44ec-8bee-273a7111063c", 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); + } + })); + }); + } +} +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() + * + * @param {VSSInterfaces.ConnectOptions} connectOptions + * @param {number} lastChangeId - Obsolete 32-bit LastChangeId + * @param {number} lastChangeId64 - Non-truncated 64-bit LastChangeId + */ + 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 = {}; + let queryValues = { + connectOptions: connectOptions, + lastChangeId: lastChangeId, + lastChangeId64: lastChangeId64, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ConnectionData, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} areaId + * @param {string} enterpriseName + * @param {string} organizationName + */ + 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 = { + areaId: areaId + }; + let queryValues = { + enterpriseName: enterpriseName, + organizationName: organizationName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} areaId + * @param {string} hostId + */ + 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 = { + areaId: areaId + }; + let queryValues = { + hostId: hostId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} enterpriseName + * @param {string} organizationName + */ + 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 = {}; + let queryValues = { + enterpriseName: enterpriseName, + organizationName: organizationName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} hostId + */ + 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 = {}; + let queryValues = { + hostId: hostId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} serviceType + * @param {string} identifier + */ + 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 = { + serviceType: serviceType, + identifier: identifier + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + serviceType: serviceType, + identifier: identifier + }; + let queryValues = { + allowFaultIn: allowFaultIn, + previewFaultIn: previewFaultIn, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} serviceType + */ + getServiceDefinitions(serviceType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + serviceType: serviceType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, LocationsInterfaces.TypeInfo.ServiceDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} serviceDefinitions + */ + updateServiceDefinitions(serviceDefinitions) { + 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.2-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, serviceDefinitions, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.LocationsApi = LocationsApi; + + +/***/ }), + +/***/ 2190: +/***/ (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 ManagementInterfaces = __nccwpck_require__(1012); +class ManagementApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Management-api', options); + } + /** + * Delete the billing info for an organization. + * + * @param {string} organizationId + */ + deleteBillingInfo(organizationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "Default", + organizationId: organizationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "de45fbc6-60fd-46e2-95ef-490ad08d656a", 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); + } + })); + }); + } + /** + * Delete the meter usage history from Primary SU for an organization. + * + * @param {string} organizationId + */ + deleteMeterUsageHistory(organizationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "MeterUsageHistory", + organizationId: organizationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "de45fbc6-60fd-46e2-95ef-490ad08d656a", 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 billing info for an organization. + * + * @param {string} organizationId - Organization ID to get billing info for. + */ + getBillingInfo(organizationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "Default", + organizationId: organizationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "de45fbc6-60fd-46e2-95ef-490ad08d656a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ManagementInterfaces.TypeInfo.BillingInfo, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Save the billing info for an organization. + * + * @param {ManagementInterfaces.BillingInfo} billingInfo + * @param {string} organizationId + */ + saveBillingInfo(billingInfo, organizationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "Default", + organizationId: organizationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "de45fbc6-60fd-46e2-95ef-490ad08d656a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, billingInfo, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB. + * + * @param {ManagementInterfaces.MeterUsage} meterUsage + */ + createBillingSnapshot(meterUsage) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "Default", + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "e58d8091-3d07-48b1-9527-7d6295fd4081", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, meterUsage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all billable committers details, including those not matched with a VSID. + * + * @param {Date} billingDate - The date to query, or if not provided, today + */ + getBillableCommitterDetails(billingDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "Details", + }; + let queryValues = { + billingDate: billingDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "e58d8091-3d07-48b1-9527-7d6295fd4081", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ManagementInterfaces.TypeInfo.BillableCommitterDetails, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getLastMeterUsage() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "Last", + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "e58d8091-3d07-48b1-9527-7d6295fd4081", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ManagementInterfaces.TypeInfo.MeterUsage, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get commiters used when calculating billing information. + * + * @param {Date} billingDate - The date to query, or if not provided, today + */ + getMeterUsage(billingDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "Default", + }; + let queryValues = { + billingDate: billingDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "e58d8091-3d07-48b1-9527-7d6295fd4081", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ManagementInterfaces.TypeInfo.MeterUsage, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the current status of Advanced Security for the organization + * + * @param {boolean} includeAllProperties - When true, also determine if pushes are blocked if they contain secrets + */ + getOrgEnablementStatus(includeAllProperties) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + includeAllProperties: includeAllProperties, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "d0c0450f-8882-46f4-a5a8-e48fea3095b0", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ManagementInterfaces.TypeInfo.AdvSecEnablementSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the status of Advanced Security for the organization + * + * @param {ManagementInterfaces.AdvSecEnablementSettingsUpdate} savedAdvSecEnablementStatus - The new status + */ + updateOrgEnablementStatus(savedAdvSecEnablementStatus) { + 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.2-preview.1", "Management", "d0c0450f-8882-46f4-a5a8-e48fea3095b0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, savedAdvSecEnablementStatus, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization. + * + */ + getEstimatedOrgBillablePushers() { + 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.2-preview.1", "Management", "10a9e9c3-89bf-4312-92ed-139ddbcd2e28", routeValues); + let url = verData.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 current status of Advanced Security for a project + * + * @param {string} project - Project ID or project name + * @param {boolean} includeAllProperties - When true, also determine if pushes are blocked if they contain secrets + */ + getProjectEnablementStatus(project, includeAllProperties) { + 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 = { + includeAllProperties: includeAllProperties, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "6b9a4b47-5f2d-40f3-8286-b0152079074d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ManagementInterfaces.TypeInfo.AdvSecEnablementSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the status of Advanced Security for the project + * + * @param {ManagementInterfaces.AdvSecEnablementSettingsUpdate} savedAdvSecEnablementStatus - The new status + * @param {string} project - Project ID or project name + */ + updateProjectEnablementStatus(savedAdvSecEnablementStatus, 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.2-preview.1", "Management", "6b9a4b47-5f2d-40f3-8286-b0152079074d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, savedAdvSecEnablementStatus, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project. + * + * @param {string} project - Project ID or project name + */ + getEstimatedProjectBillablePushers(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.2-preview.1", "Management", "bf09cb40-ecf4-4496-8cf7-9ec60c64fd3e", routeValues); + let url = verData.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); + } + })); + }); + } + /** + * Determine if Advanced Security is enabled for a repository + * + * @param {string} project - Project ID or project name + * @param {string} repository - The name or ID of the repository + * @param {boolean} includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected + */ + getRepoEnablementStatus(project, repository, includeAllProperties) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repository: repository + }; + let queryValues = { + includeAllProperties: includeAllProperties, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "d11a1c2b-b904-43dc-b970-bf42486262db", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ManagementInterfaces.TypeInfo.AdvSecEnablementStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the enablement of Advanced Security for a repository + * + * @param {ManagementInterfaces.AdvSecEnablementStatusUpdate} savedAdvSecEnablementStatus - new status + * @param {string} project - Project ID or project name + * @param {string} repository - Name or ID of the repository + */ + updateRepoAdvSecEnablementStatus(savedAdvSecEnablementStatus, project, 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, + repository: repository + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "d11a1c2b-b904-43dc-b970-bf42486262db", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, savedAdvSecEnablementStatus, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository. + * + * @param {string} project - Project ID or project name + * @param {string} repository - The name or ID of the repository + */ + getEstimatedRepoBillableCommitters(project, 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, + repository: repository + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Management", "b60f1ebf-ae77-4557-bd7f-ae3d5598dd1f", routeValues); + let url = verData.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.ManagementApi = ManagementApi; + + +/***/ }), + +/***/ 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__(269); +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 + */ + 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.2-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); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + source: source, + entryId: entryId + }; + let queryValues = { + startTime: startTime, + endTime: endTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, NotificationInterfaces.TypeInfo.INotificationDiagnosticLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the diagnostics settings for a subscription. + * + * @param {string} subscriptionId - The id of the notifications subscription. + */ + getSubscriptionDiagnostics(subscriptionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriptionId: subscriptionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the diagnostics settings for a subscription. + * + * @param {NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters} updateParameters + * @param {string} subscriptionId - The id of the notifications subscription. + */ + 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 = { + subscriptionId: subscriptionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Publish an event. This request must be directed to the service "extmgmt". + * + * @param {VSSInterfaces.VssNotificationEvent} notificationEvent + */ + publishEvent(notificationEvent) { + 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.2-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.create(url, notificationEvent, options); + let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Tranform a notification event. + * + * @param {NotificationInterfaces.EventTransformRequest} transformRequest - Object to be transformed. + */ + transformEvent(transformRequest) { + 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.2-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.create(url, transformRequest, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NotificationInterfaces.FieldValuesQuery} inputValuesQuery + * @param {string} eventType + */ + 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 = { + eventType: eventType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, inputValuesQuery, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventField, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific event type. + * + * @param {string} eventType - The ID of the event type. + */ + getEventType(eventType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + eventType: eventType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, NotificationInterfaces.TypeInfo.NotificationEventType, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List available event types for this service. Optionally filter by only event types for the specified publisher. + * + * @param {string} publisherId - Limit to event types for this publisher + */ + 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 = { + publisherId: publisherId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, NotificationInterfaces.TypeInfo.NotificationEventType, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} notificationId + */ + getNotificationReasons(notificationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + notificationId: notificationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} notificationIds + */ + listNotificationReasons(notificationIds) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getSettings() { + 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.2-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, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NotificationInterfaces.NotificationAdminSettingsUpdateParameters} updateParameters + */ + updateSettings(updateParameters) { + 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.2-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, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get delivery preferences of a notifications subscriber. + * + * @param {string} subscriberId - ID of the user or group. + */ + getSubscriber(subscriberId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriberId: subscriberId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, NotificationInterfaces.TypeInfo.NotificationSubscriber, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update delivery preferences of a notifications subscriber. + * + * @param {NotificationInterfaces.NotificationSubscriberUpdateParameters} updateParameters + * @param {string} subscriberId - ID of the user or group. + */ + 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 = { + subscriberId: subscriberId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + * + * @param {NotificationInterfaces.SubscriptionQuery} subscriptionQuery + */ + 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.2-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.create(url, subscriptionQuery, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new subscription. + * + * @param {NotificationInterfaces.NotificationSubscriptionCreateParameters} createParameters + */ + createSubscription(createParameters) { + 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.2-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.create(url, createParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a subscription. + * + * @param {string} subscriptionId + */ + deleteSubscription(subscriptionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriptionId: subscriptionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a notification subscription by its ID. + * + * @param {string} subscriptionId + * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags + */ + 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 = { + subscriptionId: subscriptionId + }; + let queryValues = { + queryFlags: queryFlags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = {}; + let queryValues = { + targetId: targetId, + ids: ids && ids.join(","), + queryFlags: queryFlags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, NotificationInterfaces.TypeInfo.NotificationSubscription, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + subscriptionId: subscriptionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get available subscription templates. + * + */ + getSubscriptionTemplates() { + 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.2-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, NotificationInterfaces.TypeInfo.NotificationSubscriptionTemplate, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Publish an event. This request is only for the Token service since it's a deploy only service. + * + * @param {VSSInterfaces.VssNotificationEvent} notificationEvent + */ + publishTokenEvent(notificationEvent) { + 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.2-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.create(url, notificationEvent, options); + let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + subscriptionId: subscriptionId, + userId: userId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, userSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.NotificationApi = NotificationApi; + + +/***/ }), + +/***/ 686: +/***/ (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 PipelinesInterfaces = __nccwpck_require__(5871); +class PipelinesApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Pipelines-api', options); + } + /** + * Get a specific artifact from a pipeline run + * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - ID of the pipeline. + * @param {number} runId - ID of the run of that pipeline. + * @param {string} artifactName - Name of the artifact. + * @param {PipelinesInterfaces.GetArtifactExpandOptions} expand - Expand options. Default is None. + */ + getArtifact(project, pipelineId, runId, artifactName, expand) { + 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, + pipelineId: pipelineId, + runId: runId + }; + let queryValues = { + artifactName: artifactName, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "85023071-bd5e-4438-89b0-2a5bf362a19d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.Artifact, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific log from a pipeline run + * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - ID of the pipeline. + * @param {number} runId - ID of the run of that pipeline. + * @param {number} logId - ID of the log. + * @param {PipelinesInterfaces.GetLogExpandOptions} expand - Expand options. Default is None. + */ + getLog(project, pipelineId, runId, logId, 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, + pipelineId: pipelineId, + runId: runId, + logId: logId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "fb1b6d27-3957-43d5-a14b-a2d70403e545", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.Log, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of logs from a pipeline run. + * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - ID of the pipeline. + * @param {number} runId - ID of the run of that pipeline. + * @param {PipelinesInterfaces.GetLogExpandOptions} expand - Expand options. Default is None. + */ + listLogs(project, pipelineId, runId, 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, + pipelineId: pipelineId, + runId: runId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "fb1b6d27-3957-43d5-a14b-a2d70403e545", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.LogCollection, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a pipeline. + * + * @param {PipelinesInterfaces.CreatePipelineParameters} inputParameters - Input parameters. + * @param {string} project - Project ID or project name + */ + createPipeline(inputParameters, 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.2-preview.1", "pipelines", "28e1305e-2afe-47bf-abaf-cbb0e6a91988", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, inputParameters, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.Pipeline, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a pipeline, optionally at the specified version + * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - The pipeline ID + * @param {number} pipelineVersion - The pipeline version + */ + getPipeline(project, pipelineId, pipelineVersion) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + pipelineId: pipelineId + }; + let queryValues = { + pipelineVersion: pipelineVersion, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "28e1305e-2afe-47bf-abaf-cbb0e6a91988", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.Pipeline, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of pipelines. + * + * @param {string} project - Project ID or project name + * @param {string} orderBy - A sort expression. Defaults to "name asc" + * @param {number} top - The maximum number of pipelines to return + * @param {string} continuationToken - A continuation token from a previous request, to retrieve the next page of results + */ + listPipelines(project, orderBy, top, 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 + }; + let queryValues = { + orderBy: orderBy, + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "28e1305e-2afe-47bf-abaf-cbb0e6a91988", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.Pipeline, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queues a dry run of the pipeline and returns an object containing the final yaml. + * + * @param {PipelinesInterfaces.RunPipelineParameters} runParameters - Optional additional parameters for this run. + * @param {string} project - Project ID or project name + * @param {number} pipelineId - The pipeline ID. + * @param {number} pipelineVersion - The pipeline version. + */ + preview(runParameters, project, pipelineId, pipelineVersion) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + pipelineId: pipelineId + }; + let queryValues = { + pipelineVersion: pipelineVersion, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "53df2d18-29ea-46a9-bee0-933540f80abf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, runParameters, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a run for a particular pipeline. + * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - The pipeline id + * @param {number} runId - The run id + */ + getRun(project, pipelineId, 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, + pipelineId: pipelineId, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "7859261e-d2e9-4a68-b820-a5d84cc5bb3d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.Run, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets top 10000 runs for a particular pipeline. + * + * @param {string} project - Project ID or project name + * @param {number} pipelineId - The pipeline id + */ + listRuns(project, pipelineId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + pipelineId: pipelineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "7859261e-d2e9-4a68-b820-a5d84cc5bb3d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.Run, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Runs a pipeline. + * + * @param {PipelinesInterfaces.RunPipelineParameters} runParameters - Optional additional parameters for this run. + * @param {string} project - Project ID or project name + * @param {number} pipelineId - The pipeline ID. + * @param {number} pipelineVersion - The pipeline version. + */ + runPipeline(runParameters, project, pipelineId, pipelineVersion) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + pipelineId: pipelineId + }; + let queryValues = { + pipelineVersion: pipelineVersion, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "pipelines", "7859261e-d2e9-4a68-b820-a5d84cc5bb3d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, runParameters, options); + let ret = this.formatResponse(res.result, PipelinesInterfaces.TypeInfo.Run, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.PipelinesApi = PipelinesApi; + + +/***/ }), + +/***/ 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. + * + * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to create. + * @param {string} project - Project ID or project name + */ + createPolicyConfiguration(configuration, 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.2-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, configuration, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + deletePolicyConfiguration(project, configurationId) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a policy configuration by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the policy configuration + */ + getPolicyConfiguration(project, configurationId) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of policy configurations in a project. + * + * @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 + */ + 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 routeValues = { + project: project + }; + let queryValues = { + scope: scope, + policyType: policyType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, PolicyInterfaces.TypeInfo.PolicyConfiguration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 routeValues = { + project: project, + configurationId: configurationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, configuration, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the present evaluation state of a policy. + * + * @param {string} project - Project ID or project name + * @param {string} evaluationId - ID of the policy evaluation to be retrieved. + */ + getPolicyEvaluation(project, evaluationId) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Requeue the policy evaluation. + * + * @param {string} project - Project ID or project name + * @param {string} evaluationId - ID of the policy evaluation to be retrieved. + */ + requeuePolicyEvaluation(project, evaluationId) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, null, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 routeValues = { + project: project + }; + let queryValues = { + artifactId: artifactId, + includeNotApplicable: includeNotApplicable, + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 routeValues = { + project: project, + configurationId: configurationId, + revisionId: revisionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 routeValues = { + project: project, + configurationId: configurationId + }; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a specific policy type by ID. + * + * @param {string} project - Project ID or project name + * @param {string} typeId - The policy ID. + */ + 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, + typeId: typeId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all available policy types. + * + * @param {string} project - Project ID or project name + */ + getPolicyTypes(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.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +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) { + 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, + }; + try { + 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); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + let queryValues = { + descriptor: descriptor, + }; + try { + 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, ProfileInterfaces.TypeInfo.ProfileAttribute, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + let queryValues = { + partition: partition, + modifiedSince: modifiedSince, + modifiedAfterRevision: modifiedAfterRevision, + withCoreAttributes: withCoreAttributes, + coreAttributes: coreAttributes, + }; + try { + 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, ProfileInterfaces.TypeInfo.ProfileAttribute, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + let queryValues = { + descriptor: descriptor, + }; + try { + 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.replace(url, container, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + try { + 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.update(url, attributesCollection, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + let queryValues = { + size: size, + format: format, + }; + try { + 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, ProfileInterfaces.TypeInfo.Avatar, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + let queryValues = { + size: size, + format: format, + displayName: displayName, + }; + try { + 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.create(url, container, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + try { + 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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + try { + 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.replace(url, container, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + ipaddress: ipaddress, + }; + try { + 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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + autoCreate: autoCreate, + }; + try { + 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.create(url, createProfileContext, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + let queryValues = { + details: details, + withAttributes: withAttributes, + partition: partition, + coreAttributes: coreAttributes, + forceRefresh: forceRefresh, + }; + try { + 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, ProfileInterfaces.TypeInfo.Profile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + id: id + }; + try { + 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.update(url, profile, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getRegions() { + 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("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.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getSupportedLcids() { + 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("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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {boolean} includeAvatar + */ + getUserDefaults(includeAvatar) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + includeAvatar: includeAvatar, + }; + try { + 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.get(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + id: id + }; + try { + 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.replace(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +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); + } + /** + * @param {string} project - Project ID or project name + */ + getProjectLanguageAnalytics(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.2-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.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectLanguageAnalytics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {Date} fromDate + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType + */ + 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 = { + project: project + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectActivityMetrics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} repositoryId + * @param {Date} fromDate + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType + */ + 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 = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +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 + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ReleaseInterfaces.TypeInfo.AgentArtifactDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of approvals + * + * @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'. + */ + 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 = { + project: project + }; + let queryValues = { + 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.2-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, ReleaseInterfaces.TypeInfo.ReleaseApproval, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get approval history. + * + * @param {string} project - Project ID or project name + * @param {number} approvalStepId - Id of the approval. + */ + 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 = { + project: project, + approvalStepId: approvalStepId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an approval. + * + * @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'. + */ + 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 = { + project: project, + approvalId: approvalId + }; + let queryValues = { + includeHistory: includeHistory, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update status of an approval + * + * @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. + */ + 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 = { + project: project, + approvalId: approvalId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, approval, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.ReleaseApproval[]} approvals + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, approvals, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a task attachment. + * + * @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) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Release", "c4071f6d-3697-46ca-858e-8b10ff09e52f", 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 release task attachment. + * + * @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. + */ + 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 = { + 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.2-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.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTaskAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the release 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} planId - Plan Id of the deploy phase. + * @param {string} type - Type of the attachment. + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + planId: planId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTaskAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} artifactType + * @param {string} sourceId + * @param {string} artifactVersionId + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + let queryValues = { + artifactType: artifactType, + sourceId: sourceId, + artifactVersionId: artifactVersionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Release", "c1a68497-69da-40fb-9423-cab19cfeeca9", routeValues, queryValues); + let url = verData.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); + resolve(ret); + } + catch (err) { + reject(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.2-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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param {string} artifactAlias + */ + 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 = { + project: project, + releaseId: releaseId + }; + let queryValues = { + baseReleaseId: baseReleaseId, + '$top': top, + artifactAlias: artifactAlias, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Change, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {string[]} propertyFilters + */ + getDefinitionEnvironments(project, taskGroupId, 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 + }; + let queryValues = { + taskGroupId: taskGroupId, + propertyFilters: propertyFilters && propertyFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a release definition + * + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - release definition object to create. + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, releaseDefinition, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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'. + */ + 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 = { + project: project, + definitionId: definitionId + }; + let queryValues = { + comment: comment, + forceDelete: forceDelete, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + definitionId: definitionId + }; + let queryValues = { + propertyFilters: propertyFilters && propertyFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.2-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, ReleaseInterfaces.TypeInfo.ReleaseDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, releaseDefinitionUndeleteParameter, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a release definition. + * + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - Release definition object to update. + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, releaseDefinition, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of deployments + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - List the deployments for a given definition id. + * @param {number} definitionEnvironmentId - List the deployments for a given definition environment id. + * @param {string} createdBy - List the deployments for which deployments are created as identity specified. + * @param {Date} minModifiedTime - List the deployments with LastModified time >= minModifiedTime. + * @param {Date} maxModifiedTime - List the deployments with LastModified time <= maxModifiedTime. + * @param {ReleaseInterfaces.DeploymentStatus} deploymentStatus - List the deployments with given deployment status. Defult is 'All'. + * @param {ReleaseInterfaces.DeploymentOperationStatus} operationStatus - List the deployments with given operation status. Default is 'All'. + * @param {boolean} latestAttemptsOnly - 'true' to include deployments with latest attempt only. Default is 'false'. + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - List the deployments with given query order. Default is 'Descending'. + * @param {number} top - List the deployments with given top. Default top is '50' and Max top is '100'. + * @param {number} continuationToken - List the deployments with deployment id >= continuationToken. + * @param {string} createdFor - List the deployments for which deployments are requested as identity specified. + * @param {Date} minStartedTime - List the deployments with StartedOn time >= minStartedTime. + * @param {Date} maxStartedTime - List the deployments with StartedOn time <= maxStartedTime. + * @param {string} sourceBranch - List the deployments that are deployed from given branch name. + */ + 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* () { + 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.2-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, ReleaseInterfaces.TypeInfo.Deployment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.DeploymentQueryParameters} queryParameters + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, queryParameters, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Deployment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.7", "Release", "a7e426b1-03dc-48af-9dfe-c98bac612dcb", routeValues, queryValues); + let url = verData.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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.7", "Release", "a7e426b1-03dc-48af-9dfe-c98bac612dcb", routeValues); + 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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a definition environment template + * + * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - Definition environment template to create + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", 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, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a definition environment template + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template + */ + deleteDefinitionEnvironmentTemplate(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 = { + project: project + }; + let queryValues = { + templateId: templateId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a definition environment template + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template + */ + 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 = { + project: project + }; + let queryValues = { + templateId: templateId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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' + */ + 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 = { + project: project + }; + let queryValues = { + isDeleted: isDeleted, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project + }; + let queryValues = { + templateId: templateId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, null, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.FavoriteItem[]} favoriteItems + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + */ + 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 = { + project: project, + scope: scope + }; + let queryValues = { + identityId: identityId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, favoriteItems, 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} scope + * @param {string} identityId + * @param {string} favoriteItemIds + */ + 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 = { + project: project, + scope: scope + }; + let queryValues = { + identityId: identityId, + favoriteItemIds: favoriteItemIds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + */ + 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 = { + project: project, + scope: scope + }; + let queryValues = { + identityId: identityId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} flightName + */ + getFlightAssignments(flightName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + flightName: flightName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Release", "409d301f-3046-46f3-beb9-4357fbce0a8c", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } + /** + * Creates a new folder. + * + * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder. + */ + 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 = { + project: project, + path: path + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, folder, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + path: path + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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'. + */ + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + path: path + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, folder, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + gateStepId: gateStepId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Release", "2666a539-2001-4f80-bcc7-0379956749d4", 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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Release", "23f461c8-629a-4144-a076-3054fa5f268a", routeValues); + let url = verData.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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {FormInputInterfaces.InputValuesQuery} query + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, query, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} sourceId + */ + 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 = { + project: project, + buildId: buildId + }; + let queryValues = { + sourceId: sourceId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Release", "cd42261a-f5c6-41c8-9259-f078989b9f25", routeValues, queryValues); + let url = verData.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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + gateId: gateId, + taskId: taskId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "Release", "dec7ca5a-7f7f-4797-8bf1-8efc0dc93b28", 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); + } + })); + }); + } + /** + * Get logs for a release Id. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + */ + getLogs(project, releaseId) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "Release", "c37fbab5-214b-48e4-a55b-cb6b4f6e4038", 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 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. + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + taskId: taskId + }; + let queryValues = { + attemptId: attemptId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "Release", "e71ba1ed-c0a4-4a28-a61f-2dd5f68cf3fd", 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 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} 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 + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId, + taskId: taskId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "Release", "2577e6c3-6999-4400-bc69-fe1d837755fe", 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 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 + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + releaseDeployPhaseId: releaseDeployPhaseId, + taskId: taskId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "Release", "17c91af7-09fd-4256-bff1-c24ee4f73bc0", 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 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. + */ + 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 = { + project: project, + releaseId: releaseId, + manualInterventionId: manualInterventionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List all manual interventions for a given release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + releaseId: releaseId, + manualInterventionId: manualInterventionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, manualInterventionUpdateMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {Date} minMetricsTime + */ + 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 = { + project: project + }; + let queryValues = { + minMetricsTime: minMetricsTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets Org pipeline release settings + * + */ + getOrgPipelineReleaseSettings() { + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates Org pipeline release settings + * + * @param {ReleaseInterfaces.OrgPipelineReleaseSettingsUpdateParameters} newSettings + */ + updateOrgPipelineReleaseSettings(newSettings) { + 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.2-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.update(url, newSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets pipeline release settings + * + * @param {string} project - Project ID or project name + */ + getPipelineReleaseSettings(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.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates pipeline release settings + * + * @param {ReleaseInterfaces.ProjectPipelineReleaseSettingsUpdateParameters} newSettings + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, newSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} artifactType + * @param {string} artifactSourceId + */ + 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 = {}; + let queryValues = { + artifactType: artifactType, + artifactSourceId: artifactSourceId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Release", "917ace4a-79d1-45a7-987c-7be4db4268fa", routeValues, queryValues); + let url = verData.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 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 + */ + 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* () { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a release. + * + * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - Metadata to create a release. + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, releaseStartMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + releaseId: releaseId + }; + let queryValues = { + comment: comment, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + releaseId: releaseId + }; + let queryValues = { + approvalFilters: approvalFilters, + propertyFilters: propertyFilters && propertyFilters.join(","), + '$expand': expand, + '$topGateRecords': topGateRecords, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project + }; + let queryValues = { + definitionId: definitionId, + releaseCount: releaseCount, + includeArtifact: includeArtifact, + definitionEnvironmentIdsFilter: definitionEnvironmentIdsFilter && definitionEnvironmentIdsFilter.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + releaseId: releaseId + }; + let queryValues = { + definitionSnapshotRevision: definitionSnapshotRevision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", 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); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + releaseId: releaseId + }; + let queryValues = { + comment: comment, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a complete release object. + * + * @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. + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, release, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update few properties of a release. + * + * @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. + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, releaseUpdateMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the release settings + * + * @param {string} project - Project ID or project name + */ + getReleaseSettings(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.2-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); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the release settings + * + * @param {ReleaseInterfaces.ReleaseSettings} releaseSettings + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, releaseSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + definitionId: definitionId, + revision: revision + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.4", "Release", "258b82e0-9d41-43f3-86d6-fef14ddd44bc", 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); + } + })); + }); + } + /** + * Get revision history for a release definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition. + */ + 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 = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.4", "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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionRevision, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.SummaryMailSection, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.MailMessage} mailMessage + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, mailMessage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + 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 = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a tag to a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param {string} tag + */ + 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 = { + project: project, + releaseDefinitionId: releaseDefinitionId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(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 + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + 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 = { + project: project, + releaseDefinitionId: releaseDefinitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, tags, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a tag from a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param {string} tag + */ + 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 = { + project: project, + releaseDefinitionId: releaseDefinitionId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.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} releaseDefinitionId + */ + 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 = { + project: project, + releaseDefinitionId: releaseDefinitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a tag to a releaseId + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} tag + */ + 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 = { + project: project, + releaseId: releaseId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds tag to a release + * + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, tags, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a tag from a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} tag + */ + 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 = { + project: project, + releaseId: releaseId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the tags for a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + 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 = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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.2-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.get(url, 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} releaseId + * @param {number} environmentId + * @param {number} releaseDeployPhaseId + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + releaseDeployPhaseId: releaseDeployPhaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + * @param {string} timelineId + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + */ + 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 = { + project: project, + releaseId: releaseId, + environmentId: environmentId + }; + let queryValues = { + attemptId: attemptId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + */ + getArtifactTypeDefinitions(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.2-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, ReleaseInterfaces.TypeInfo.ArtifactTypeDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + 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 = { + project: project + }; + let queryValues = { + releaseDefinitionId: releaseDefinitionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, ReleaseInterfaces.TypeInfo.ArtifactVersionQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.Artifact[]} artifacts + * @param {string} project - Project ID or project name + */ + 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 = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, artifacts, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactVersionQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param {string} artifactAlias + */ + 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 = { + project: project, + releaseId: releaseId + }; + let queryValues = { + baseReleaseId: baseReleaseId, + '$top': top, + artifactAlias: artifactAlias, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +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 + */ + 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 = { + scopeId: scopeId, + resourceId: resourceId + }; + try { + 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, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeId + * @param {string} resourceId + * @param {string} identityId + */ + 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 = { + scopeId: scopeId, + resourceId: resourceId, + identityId: identityId + }; + try { + 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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string[]} identityIds + * @param {string} scopeId + * @param {string} resourceId + */ + 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 = { + scopeId: scopeId, + resourceId: resourceId + }; + try { + 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, identityIds, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {SecurityRolesInterfaces.UserRoleAssignmentRef} roleAssignment + * @param {string} scopeId + * @param {string} resourceId + * @param {string} identityId + */ + 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 = { + scopeId: scopeId, + resourceId: resourceId, + identityId: identityId + }; + try { + 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.replace(url, roleAssignment, options); + let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {SecurityRolesInterfaces.UserRoleAssignmentRef[]} roleAssignments + * @param {string} scopeId + * @param {string} resourceId + */ + 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 = { + scopeId: scopeId, + resourceId: resourceId + }; + try { + 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.replace(url, roleAssignments, options); + let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeId + */ + getRoleDefinitions(scopeId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeId: scopeId + }; + try { + 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, 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 = {})); + + +/***/ }), + +/***/ 5899: +/***/ (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; + } + /** + * @param {string} taskId + * @param onResult callback function + */ + 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"); + } + else { + // use the fallback client + return fallbackClient.deleteTaskDefinition(taskId); + } + } + }); + return promise; + } + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting ArrayBuffer + */ + 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"); + } + else { + // use the fallback client + return fallbackClient.getTaskContentZip(taskId, versionString, visibility, scopeLocal); + } + } + }); + return promise; + } + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition + */ + 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"); + } + else { + // use the fallback client + return fallbackClient.getTaskDefinition(taskId, versionString, visibility, scopeLocal); + } + } + }); + return promise; + } + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] + */ + 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"); + } + else { + // use the fallback client + return fallbackClient.getTaskDefinitions(taskId, visibility, scopeLocal); + } + } + }); + return promise; + } + /** + * @param {NodeJS.ReadableStream} contentStream + * @param {string} taskId + * @param {boolean} overwrite + * @param onResult callback function + */ + 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* () { + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + 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.uploadStream("PUT", url, contentStream, options); + resolve(res.result); + } + 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; + } + _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 {TaskAgentInterfaces.TaskAgentCloud} agentCloud + */ + addAgentCloud(agentCloud) { + 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.2-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.create(url, agentCloud, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} agentCloudId + */ + deleteAgentCloud(agentCloudId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + agentCloudId: agentCloudId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} agentCloudId + */ + getAgentCloud(agentCloudId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + agentCloudId: agentCloudId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getAgentClouds() { + 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.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentCloud} updatedCloud + * @param {number} agentCloudId + */ + 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 = { + agentCloudId: agentCloudId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, updatedCloud, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get agent cloud types. + * + */ + getAgentCloudTypes() { + 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.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentCloudType, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} queueId + * @param {number} top + * @param {string} continuationToken + */ + 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, + queueId: queueId + }; + let queryValues = { + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {string} project - Project ID or project name + * @param {number} queueId + */ + 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, + queueId: queueId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + poolId: poolId, + agentId: agentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + poolId: poolId, + agentId: agentId + }; + let queryValues = { + includeCapabilities: includeCapabilities, + includeAssignedRequest: includeAssignedRequest, + includeLastCompletedRequest: includeLastCompletedRequest, + propertyFilters: propertyFilters && propertyFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + 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.2-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, TaskAgentInterfaces.TypeInfo.TaskAgent, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {TaskAgentInterfaces.TaskAgent} agent - Updated details about the replacing agent + * @param {number} poolId - The agent pool to use + * @param {number} agentId - The agent to replace + */ + replaceAgent(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 = { + poolId: poolId, + agentId: agentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + poolId: poolId, + agentId: agentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns list of azure subscriptions + * + */ + getAzureManagementGroups() { + 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.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns list of azure subscriptions + * + */ + getAzureSubscriptions() { + 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.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * GET a PAT token for managing (configuring, removing, tagging) deployment targets in a deployment group. + * + * @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) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a deployment group. + * + * @param {TaskAgentInterfaces.DeploymentGroupCreateParameter} deploymentGroup - Deployment group to create. + * @param {string} project - Project ID or project name + */ + 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.2-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, deploymentGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to be deleted. + */ + 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, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a deployment group by its ID. + * + * @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. + */ + 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, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + actionFilter: actionFilter, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 + }; + let queryValues = { + name: name, + actionFilter: actionFilter, + '$expand': expand, + continuationToken: continuationToken, + '$top': top, + ids: ids && ids.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.DeploymentGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, deploymentGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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**. + */ + 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 + }; + let queryValues = { + deploymentGroupName: deploymentGroupName, + continuationToken: continuationToken, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.DeploymentGroupMetrics, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + * @param {number} completedRequestCount + */ + 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, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + machineId: machineId, + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number[]} machineIds + * @param {number} completedRequestCount + */ + 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, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + machineIds: machineIds && machineIds.join(","), + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + 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, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * GET a PAT token for managing (configuring, removing, tagging) deployment agents in a deployment pool. + * + * @param {number} poolId - ID of the deployment pool in which deployment agents are managed. + */ + generateDeploymentPoolAccessToken(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.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of deployment pool summaries. + * + * @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. + */ + 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 = {}; + let queryValues = { + poolName: poolName, + expands: expands, + poolIds: poolIds && poolIds.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentPoolSummary, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get agent requests for a deployment target. + * + * @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** + */ + getAgentRequestsForDeploymentTarget(project, deploymentGroupId, targetId, completedRequestCount) { + return __awaiter(this, void 0, void 0, function* () { + 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, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + targetId: targetId, + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get agent requests for a list deployment targets. + * + * @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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Upgrade the deployment targets in a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + */ + 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, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. + */ + queryEndpoint(endpoint) { + 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.2-preview.1", "distributedtask", "f223b809-8c33-4b7d-b53f-07232569b5d6", routeValues); + let url = verData.requestUrl; + 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); + } + })); + }); + } + /** + * Get environment deployment execution history + * + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {string} continuationToken + * @param {number} top + */ + getEnvironmentDeploymentExecutionRecords(project, environmentId, 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, + environmentId: environmentId + }; + let queryValues = { + continuationToken: continuationToken, + top: top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "distributedtask", "51bb5d21-4305-4ea6-9dbb-b7488af73334", routeValues, queryValues); + let url = verData.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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create an environment. + * + * @param {TaskAgentInterfaces.EnvironmentCreateParameter} environmentCreateParameter - Environment to create. + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, environmentCreateParameter, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete the specified environment. + * + * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. + */ + deleteEnvironment(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, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an environment by its ID. + * + * @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. + */ + 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, + environmentId: environmentId + }; + let queryValues = { + expands: expands, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all environments. + * + * @param {string} project - Project ID or project name + * @param {string} name + * @param {string} continuationToken + * @param {number} top + */ + 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 + }; + let queryValues = { + name: name, + continuationToken: continuationToken, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the specified environment. + * + * @param {TaskAgentInterfaces.EnvironmentUpdateParameter} environmentUpdateParameter - Environment data to update. + * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. + */ + 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, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, environmentUpdateParameter, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} hubName + * @param {boolean} includeEnterpriseUsersCount + * @param {boolean} includeHostedAgentMinutesCount + */ + 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 = { + hubName: hubName + }; + let queryValues = { + includeEnterpriseUsersCount: includeEnterpriseUsersCount, + includeHostedAgentMinutesCount: includeHostedAgentMinutesCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskHubLicenseDetails} taskHubLicenseDetails + * @param {string} hubName + */ + 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 = { + hubName: hubName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "distributedtask", "f9f0f436-b8a1-4475-9041-1ccdbf8f0128", routeValues); + 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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.InputValidationRequest} inputValidationRequest + */ + validateInputs(inputValidationRequest) { + 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.2-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.create(url, inputValidationRequest, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param {TaskAgentInterfaces.TaskResult} result + * @param {boolean} agentShuttingDown + */ + 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 = { + poolId: poolId, + requestId: requestId + }; + let queryValues = { + lockToken: lockToken, + result: result, + agentShuttingDown: agentShuttingDown, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} requestId + * @param {boolean} includeStatus + */ + 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 = { + poolId: poolId, + requestId: requestId + }; + let queryValues = { + includeStatus: includeStatus, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} top + * @param {string} continuationToken + */ + 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 = { + poolId: poolId + }; + let queryValues = { + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} agentId + * @param {number} completedRequestCount + */ + 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 = { + poolId: poolId + }; + let queryValues = { + agentId: agentId, + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number[]} agentIds + * @param {number} completedRequestCount + */ + 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 = { + poolId: poolId + }; + let queryValues = { + agentIds: agentIds && agentIds.join(","), + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {string} planId + * @param {string} jobId + */ + 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 = { + poolId: poolId + }; + let queryValues = { + planId: planId, + jobId: jobId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + */ + 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 = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param {TaskAgentInterfaces.TaskAgentRequestUpdateOptions} updateOptions + */ + 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 = { + poolId: poolId, + requestId: requestId + }; + let queryValues = { + lockToken: lockToken, + updateOptions: updateOptions, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.KubernetesResourceCreateParameters} createParameters + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + 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, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, createParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.KubernetesResource, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + 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, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + 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, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.KubernetesResource, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + 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, + machineGroupId: machineGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, machineGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + 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, + machineGroupId: machineGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter + */ + 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, + machineGroupId: machineGroupId + }; + let queryValues = { + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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.2-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 + */ + 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, + machineGroupId: machineGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, machineGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {string[]} tagFilters + */ + 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, + machineGroupId: machineGroupId + }; + let queryValues = { + tagFilters: tagFilters && tagFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine[]} deploymentMachines + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + 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, + machineGroupId: machineGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "distributedtask", "966c3874-c347-4b18-a90c-d509116717fd", 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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + 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, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + 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, + deploymentGroupId: deploymentGroupId, + machineId: machineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand + */ + 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, + deploymentGroupId: deploymentGroupId, + machineId: machineId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {string[]} tags + * @param {string} name + * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand + */ + 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, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + tags: tags && tags.join(","), + name: name, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + 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, + deploymentGroupId: deploymentGroupId, + machineId: machineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + 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, + deploymentGroupId: deploymentGroupId, + machineId: machineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine[]} machines + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + 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, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition + * @param {number} poolId + */ + 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 = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, definition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} definitionId + */ + 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 = { + poolId: poolId, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} definitionId + */ + 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 = { + poolId: poolId, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + */ + getAgentPoolMaintenanceDefinitions(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.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition + * @param {number} poolId + * @param {number} definitionId + */ + 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 = { + poolId: poolId, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, definition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} jobId + */ + 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 = { + poolId: poolId, + jobId: jobId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} jobId + */ + 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 = { + poolId: poolId, + jobId: jobId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} jobId + */ + 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 = { + poolId: poolId, + jobId: jobId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", 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); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} definitionId + */ + 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 = { + poolId: poolId + }; + let queryValues = { + definitionId: definitionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job + * @param {number} poolId + */ + queueAgentPoolMaintenanceJob(job, 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.2-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); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job + * @param {number} poolId + * @param {number} jobId + */ + 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 = { + poolId: poolId, + jobId: jobId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} messageId + * @param {string} sessionId + */ + 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 = { + poolId: poolId, + messageId: messageId + }; + let queryValues = { + sessionId: sessionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + } + })); + }); + } + /** + * @param {number} poolId + * @param {string} sessionId + * @param {number} lastMessageId + */ + getMessage(poolId, sessionId, lastMessageId) { + 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 = { + poolId: poolId + }; + let queryValues = { + sessionId: sessionId, + lastMessageId: lastMessageId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} agentId + */ + 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 = { + poolId: poolId + }; + let queryValues = { + agentId: agentId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + */ + refreshAgents(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.2-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, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentMessage} message + * @param {number} poolId + * @param {number} requestId + */ + 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 = { + poolId: poolId + }; + let queryValues = { + requestId: requestId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, message, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} packageType + * @param {string} platform + * @param {string} version + */ + 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 = { + packageType: packageType, + platform: platform, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.PackageMetadata, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} packageType + * @param {string} platform + * @param {number} top + */ + 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 = { + packageType: packageType, + platform: platform + }; + let queryValues = { + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.PackageMetadata, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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.2-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 + */ + 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 = { + poolId: poolId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + } + })); + }); + } + /** + * Checks if current identity has passed permissions on a pool. + * + * @param {number} poolId - Id of the pool to check + * @param {number} permissions - Permissions to check. Multiple permissions might be merged into single value using bitwise OR operator (e.g. AgentPoolPermissions.Manage | AgentPoolPermissions.View) + */ + hasPoolPermissions(poolId, permissions) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + permissions: permissions + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "distributedtask", "162778f3-4b48-48f3-9d58-436fb9c407bc", routeValues); + let url = verData.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); + } + })); + }); + } + /** + * 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.2-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, pool, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete an agent pool. + * + * @param {number} poolId - ID of the agent pool to delete + */ + deleteAgentPool(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.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get information about an agent pool. + * + * @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 + */ + 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 = { + poolId: poolId + }; + let queryValues = { + properties: properties && properties.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent pools. + * + * @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 + */ + 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 = {}; + let queryValues = { + poolName: poolName, + properties: properties && properties.join(","), + poolType: poolType, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + } + })); + }); + } + /** + * Update properties on an agent pool + * + * @param {TaskAgentInterfaces.TaskAgentPool} pool - Updated agent pool details + * @param {number} poolId - The agent pool to update + */ + 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 = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, pool, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new agent queue to connect a project to an agent pool. + * + * @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 + */ + 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 + }; + let queryValues = { + authorizePipelines: authorizePipelines, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, queue, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new team project. + * + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes an agent queue from a project. + * + * @param {number} queueId - The agent queue to remove + * @param {string} project - Project ID or project name + */ + 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, + queueId: queueId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get information about an agent queue. + * + * @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 + */ + 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, + queueId: queueId + }; + let queryValues = { + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent queues. + * + * @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 + */ + 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 + }; + let queryValues = { + queueName: queueName, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent queues by their IDs + * + * @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 + */ + 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 + }; + let queryValues = { + queueIds: queueIds && queueIds.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent queues by their names + * + * @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 + */ + 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 + }; + let queryValues = { + queueNames: queueNames && queueNames.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + 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 + }; + let queryValues = { + poolIds: poolIds && poolIds.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} agentCloudId + */ + getAgentCloudRequests(agentCloudId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + agentCloudId: agentCloudId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} parallelismTag + * @param {boolean} poolIsHosted + * @param {boolean} includeRunningRequests + */ + 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 = {}; + let queryValues = { + parallelismTag: parallelismTag, + poolIsHosted: poolIsHosted, + includeRunningRequests: includeRunningRequests, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.ResourceUsage, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + */ + getTaskGroupHistory(project, taskGroupId) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroupRevision, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a secure file + * + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + */ + 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, + secureFileId: secureFileId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * Get a secure file + * + * @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 + */ + 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, + secureFileId: secureFileId + }; + let queryValues = { + includeDownloadTicket: includeDownloadTicket, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.SecureFile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get secure files + * + * @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. + */ + 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 + }; + let queryValues = { + namePattern: namePattern, + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get secure files + * + * @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 + */ + 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 = { + secureFileIds: secureFileIds && secureFileIds.join(","), + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get secure files + * + * @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 + */ + 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 = { + secureFileNames: secureFileNames && secureFileNames.join(","), + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Query secure files using a name pattern and a condition on file properties. + * + * @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. + */ + 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 + }; + let queryValues = { + namePattern: namePattern, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, condition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {string} secureFileId - The unique secure file Id + */ + 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, + secureFileId: secureFileId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, secureFile, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {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) { + 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.2-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.update(url, secureFiles, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Upload a secure file, include the file stream in the request body + * + * @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. + */ + uploadSecureFile(customHeaders, contentStream, project, name, authorizePipelines) { + 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 + }; + let queryValues = { + name: name, + authorizePipelines: authorizePipelines, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentSession} session + * @param {number} poolId + */ + 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 = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, session, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentSession, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {string} sessionId + */ + 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 = { + poolId: poolId, + sessionId: sessionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Register a deployment target to a deployment group. Generally this is called by agent configuration tool. + * + * @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. + */ + 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, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too. + * + * @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. + */ + 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, + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a deployment target by its ID in a deployment group + * + * @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. + */ + 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, + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of deployment targets in a deployment group. + * + * @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 + */ + 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, + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} deploymentGroupId - ID of the deployment group in which deployment target is replaced. + * @param {number} targetId - ID of the deployment target to replace. + */ + 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, + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {number} deploymentGroupId - ID of the deployment group in which deployment target is updated. + * @param {number} targetId - ID of the deployment target to update. + */ + updateDeploymentTarget(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, + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update tags of a list of deployment targets in a deployment group. + * + * @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. + */ + 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, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a task group. + * + * @param {TaskAgentInterfaces.TaskGroupCreateParameter} taskGroup - Task group object to create. + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a task group. + * + * @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. + */ + 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, + taskGroupId: taskGroupId + }; + let queryValues = { + comment: comment, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get task group. + * + * @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. + */ + 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, + taskGroupId: taskGroupId + }; + let queryValues = { + versionSpec: versionSpec, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {number} revision + */ + 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, + taskGroupId: taskGroupId + }; + let queryValues = { + revision: revision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", 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); + } + })); + }); + } + /** + * List task groups. + * + * @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'. + */ + 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 = { + project: project, + taskGroupId: taskGroupId + }; + let queryValues = { + expanded: expanded, + taskIdFilter: taskIdFilter, + deleted: deleted, + '$top': top, + continuationToken: continuationToken, + queryOrder: queryOrder, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.PublishTaskGroupMetadata} taskGroupMetadata + * @param {string} project - Project ID or project name + * @param {string} parentTaskGroupId + */ + 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 = { + project: project + }; + let queryValues = { + parentTaskGroupId: parentTaskGroupId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, taskGroupMetadata, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskGroup} taskGroup + * @param {string} project - Project ID or project name + */ + undeleteTaskGroup(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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + taskGroupId: taskGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskGroupUpdatePropertiesBase} taskGroupUpdateProperties + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {boolean} disablePriorVersions + */ + updateTaskGroupProperties(taskGroupUpdateProperties, project, taskGroupId, disablePriorVersions) { + 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 + }; + let queryValues = { + disablePriorVersions: disablePriorVersions, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, taskGroupUpdateProperties, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} taskId + */ + deleteTaskDefinition(taskId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + taskId: taskId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", 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} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + */ + 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 = { + taskId: taskId, + versionString: versionString + }; + let queryValues = { + visibility: visibility, + scopeLocal: scopeLocal, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + } + })); + }); + } + /** + * @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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param {boolean} allVersions + */ + 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 = { + taskId: taskId + }; + let queryValues = { + visibility: visibility, + scopeLocal: scopeLocal, + allVersions: allVersions, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} agentId + * @param {string} currentState + */ + 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 = { + poolId: poolId, + agentId: agentId + }; + let queryValues = { + currentState: currentState, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {{ [key: string] : string; }} userCapabilities + * @param {number} poolId + * @param {number} agentId + */ + 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 = { + poolId: poolId, + agentId: agentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, userCapabilities, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters + */ + addVariableGroup(variableGroupParameters) { + 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.2-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); + } + })); + }); + } + /** + * 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(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupProjectReference[]} variableGroupProjectReferences + * @param {number} variableGroupId + */ + 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.2-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.update(url, variableGroupProjectReferences, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters + * @param {number} groupId - Id of the variable group to update. + */ + 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 = { + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.replace(url, variableGroupParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a variable group. + * + * @param {string} project - Project ID or project name + * @param {number} groupId - Id of the variable group. + */ + 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 = { + project: project, + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get variable groups. + * + * @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) { + 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.2-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, TaskAgentInterfaces.TypeInfo.VariableGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get variable groups by ids. + * + * @param {string} project - Project ID or project name + * @param {number[]} groupIds - Comma separated list of Ids of variable groups. + * @param {boolean} loadSecrets + */ + getVariableGroupsById(project, groupIds, loadSecrets) { + 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(","), + loadSecrets: loadSecrets, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.VariableGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.VirtualMachineGroupCreateParameters} createParameters + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + 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 = { + project: project, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, createParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + 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 = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + 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 = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.VirtualMachineGroup} resource + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + 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 = { + project: project, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, resource, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + 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.2-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, TaskAgentInterfaces.TypeInfo.VirtualMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.VirtualMachine[]} machines + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + 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 = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} tenantId + * @param {string} redirectUri + * @param {TaskAgentInterfaces.AadLoginPromptOption} promptOption + * @param {string} completeCallbackPayload + * @param {boolean} completeCallbackByAuthCode + */ + 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.2-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, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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). + */ + getYamlSchema(validateTaskNames) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + 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.2-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.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + 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.2-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.replace(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", 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} 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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Append content to timeline record feed. + * + * @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. + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, lines, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + orchestrationId: orchestrationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskAgentJob, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {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. + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId + }; + let queryValues = { + serializedBlobId: serializedBlobId, + lineCount: lineCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a log and connect it to a pipeline run's execution plan. + * + * @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) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, log, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + getLogs(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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub. Common examples: "build", "rm", "checks" + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + createOidcToken(claims, scopeIdentifier, hubName, planId, jobId, serviceConnectionId) { + 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, + jobId: jobId + }; + let queryValues = { + serviceConnectionId: serviceConnectionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, claims, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName + }; + let queryValues = { + statusFilter: statusFilter, + count: count, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planGroup: planGroup + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlan, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId + }; + let queryValues = { + changeId: changeId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.TimelineRecord, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, records, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, timeline, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId + }; + let queryValues = { + changeId: changeId, + includeRecords: includeRecords, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TaskAgentInterfaces.TypeInfo.Timeline, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +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 + * + * @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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + iterationId: iterationId, + actionPath: actionPath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", 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 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", 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); + } + })); + }); + } + /** + * 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", 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 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", 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); + } + })); + }); + } + /** + * 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 = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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, + runId: runId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", 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 list of test run attachments reference. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run. + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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, + runId: runId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", 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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get code coverage data for a build. + * + * @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. + */ + 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.2-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, TestInterfaces.TypeInfo.BuildCoverage, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Code Coverage Summary for Build. + * + * @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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.CodeCoverageSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} buildId + */ + 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 + }; + let queryValues = { + buildId: buildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, coverageData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get code coverage data for a test run + * + * @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. + */ + 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, + runId: runId + }; + let queryValues = { + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, newFields, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CustomTestFieldDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {TestInterfaces.CustomTestFieldScope} scopeFilter + */ + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CustomTestFieldDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.ResultsFilter} filter + * @param {string} project - Project ID or project 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "234616f5-429c-4e7b-9192-affd76731dfd", 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.TestResultHistory, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get iteration for a result + * + * @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. + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId, + iterationId: iterationId + }; + let queryValues = { + includeActionResults: includeActionResults, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestIterationDetailsModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get iterations for a result + * + * @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. + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + includeActionResults: includeActionResults, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestIterationDetailsModel, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.LinkedWorkItemsQuery} workItemQuery + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, workItemQuery, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test run message logs + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. + */ + getTestRunLogs(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.2-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, TestInterfaces.TypeInfo.TestMessageLogDetails, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a test point. + * + * @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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestPoint, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test points. + * + * @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) { + 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 + }; + let queryValues = { + witFields: witFields, + configurationId: configurationId, + testCaseId: testCaseId, + testPointIds: testPointIds, + includePointDetails: includePointDetails, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestPoint, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update test points. + * + * @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) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, pointUpdateModel, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test points using query. + * + * @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. + */ + 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.2-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, query, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPointsQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestResultsDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestResultDocument} document + * @param {string} project - Project ID or project name + * @param {number} runId + */ + 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 = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "370ca04b-8eec-4ca8-8ba3-d24dca228791", routeValues); + let url = verData.requestUrl; + 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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string[]} fields + * @param {string} continuationToken + */ + 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 = { + buildId: buildId, + publishContext: publishContext, + fields: fields && fields.join(","), + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} publishContext + * @param {number} releaseEnvId + * @param {string[]} fields + * @param {string} continuationToken + */ + 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 + }; + let queryValues = { + releaseId: releaseId, + publishContext: publishContext, + releaseEnvId: releaseEnvId, + fields: fields && fields.join(","), + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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) { + 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.2-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.create(url, testReferenceIds, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test result retention settings + * + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.ResultRetentionSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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.2-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.update(url, retentionSettings, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.ResultRetentionSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} runId - Test run ID into which test results to add. + */ + 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.2-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.create(url, results, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a test result for a test run. + * + * @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. + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + detailsToInclude: detailsToInclude, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test results for a test run. + * + * @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. + */ + 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, + runId: runId + }; + let queryValues = { + detailsToInclude: detailsToInclude, + '$skip': skip, + '$top': top, + outcomes: outcomes && outcomes.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {number} runId - Test run ID whose test results to update. + */ + 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 = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, results, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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.2-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.create(url, query, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {TestInterfaces.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken + */ + 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 = { + buildId: buildId, + publishContext: publishContext, + outcomes: outcomes && outcomes.join(","), + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + 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.2-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.get(url, 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 + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.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.2-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.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.ReleaseReference} releaseToCompare + */ + 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 + }; + let queryValues = { + releaseId: releaseId, + releaseEnvId: releaseEnvId, + publishContext: publishContext, + includeFailureDetails: includeFailureDetails, + releaseToCompare: releaseToCompare, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.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.2-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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestResultsContext} resultsContext + * @param {string} project - Project ID or project name + * @param {number[]} workItemIds + */ + 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 = { + project: project + }; + let queryValues = { + workItemIds: workItemIds && workItemIds.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, resultsContext, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSummaryForWorkItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.AggregatedDataForResultTrend, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.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.2-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.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.AggregatedDataForResultTrend, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} runId - ID of the run to get. + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestRunStatistic, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create new test run. + * + * @param {TestInterfaces.RunCreateModel} testRun - Run details RunCreateModel + * @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.2-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.create(url, testRun, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a test run by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to delete. + */ + 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.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a test run by its ID. + * + * @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. + */ + 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, + runId: runId + }; + let queryValues = { + includeDetails: includeDetails, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TestInterfaces.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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.2-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, TestInterfaces.TypeInfo.TestRun, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 + }; + 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.2-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, TestInterfaces.TypeInfo.TestRun, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update test run by its ID. + * + * @param {TestInterfaces.RunUpdateModel} runUpdateModel - Run details RunUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to update. + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, runUpdateModel, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a test session + * + * @param {TestInterfaces.TestSession} testSession - Test session details for creation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + 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, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues); + 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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test sessions + * + * @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 + */ + 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, + team: team + }; + let queryValues = { + period: period, + allSessions: allSessions, + includeAllProperties: includeAllProperties, + source: source, + includeOnlyCompletedSessions: includeOnlyCompletedSessions, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues, queryValues); + let url = verData.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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a test session + * + * @param {TestInterfaces.TestSession} testSession - Test session details for update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + 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, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues); + 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); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} sharedParameterId + */ + 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, + sharedParameterId: sharedParameterId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "Test", "8300eeca-0f8c-4eff-a089-d2dda409c41f", 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} project - Project ID or project name + * @param {number} sharedStepId + */ + 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, + sharedStepId: sharedStepId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add test cases to suite. + * + * @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) { + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific test case in a test suite with test case id. + * + * @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. + */ + 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, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all test cases in a suite. + * + * @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. + */ + 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 = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the properties of the test case association in a suite. + * + * @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. + */ + 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 = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, suiteTestCaseUpdateModel, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a test case. + * + * @param {string} project - Project ID or project name + * @param {number} testCaseId - Id of test case to delete. + */ + 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, + testCaseId: testCaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get history of a test method using TestHistoryQuery + * + * @param {TestInterfaces.TestHistoryQuery} filter - TestHistoryQuery to get history + * @param {string} project - Project ID or project name + */ + 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.2-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.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestHistoryQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestSettings} testSettings + * @param {string} project - Project ID or project name + */ + createTestSettings(testSettings, 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.2-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, testSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + 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, + testSettingsId: testSettingsId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + 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, + testSettingsId: testSettingsId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.WorkItemToTestLinks} workItemToTestLinks + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, workItemToTestLinks, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.WorkItemToTestLinks, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} testName + * @param {number} workItemId + */ + 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 + }; + let queryValues = { + testName: testName, + workItemId: workItemId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} testName + */ + 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 + }; + let queryValues = { + testName: testName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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) { + 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.2-preview.1", "Test", "926ff5dc-137f-45f0-bd51-9412fa9810ce", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } +} +TestApi.RESOURCE_AREA_ID = "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e"; +exports.TestApi = TestApi; + + +/***/ }), + +/***/ 8737: +/***/ (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 TestPlanInterfaces = __nccwpck_require__(8969); +class TestPlanApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-TestPlan-api', options); + } + /** + * Create a test configuration. + * + * @param {TestPlanInterfaces.TestConfigurationCreateUpdateParameters} testConfigurationCreateUpdateParameters - TestConfigurationCreateUpdateParameters + * @param {string} project - Project ID or project name + */ + createTestConfiguration(testConfigurationCreateUpdateParameters, 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.2-preview.1", "testplan", "8369318e-38fa-4e84-9043-4b2a75d2c256", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testConfigurationCreateUpdateParameters, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a test configuration by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} testConfiguartionId - ID of the test configuration to delete. + */ + deleteTestConfguration(project, testConfiguartionId) { + return __awaiter(this, void 0, void 0, function* () { + if (testConfiguartionId == null) { + throw new TypeError('testConfiguartionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + testConfiguartionId: testConfiguartionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "8369318e-38fa-4e84-9043-4b2a75d2c256", 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 a test configuration + * + * @param {string} project - Project ID or project name + * @param {number} testConfigurationId - ID of the test configuration to get. + */ + getTestConfigurationById(project, testConfigurationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + testConfigurationId: testConfigurationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "8369318e-38fa-4e84-9043-4b2a75d2c256", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test configurations. + * + * @param {string} project - Project ID or project name + * @param {string} continuationToken - If the list of configurations returned is not complete, a continuation token to query next batch of configurations is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test configurations. + */ + getTestConfigurations(project, 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 + }; + let queryValues = { + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "8369318e-38fa-4e84-9043-4b2a75d2c256", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestConfiguration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a test configuration by its ID. + * + * @param {TestPlanInterfaces.TestConfigurationCreateUpdateParameters} testConfigurationCreateUpdateParameters - TestConfigurationCreateUpdateParameters + * @param {string} project - Project ID or project name + * @param {number} testConfiguartionId - ID of the test configuration to update. + */ + updateTestConfiguration(testConfigurationCreateUpdateParameters, project, testConfiguartionId) { + return __awaiter(this, void 0, void 0, function* () { + if (testConfiguartionId == null) { + throw new TypeError('testConfiguartionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + testConfiguartionId: testConfiguartionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "8369318e-38fa-4e84-9043-4b2a75d2c256", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testConfigurationCreateUpdateParameters, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {string} states + * @param {TestPlanInterfaces.UserFriendlyTestOutcome} outcome + * @param {string} configurations + * @param {string} testers + * @param {string} assignedTo + * @param {TestPlanInterfaces.TestEntityTypes} entity + */ + getTestEntityCountByPlanId(project, planId, states, outcome, configurations, testers, assignedTo, entity) { + 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 + }; + let queryValues = { + states: states, + outcome: outcome, + configurations: configurations, + testers: testers, + assignedTo: assignedTo, + entity: entity, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "300578da-7b40-4c1e-9542-7aed6029e504", routeValues, queryValues); + let url = verData.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 test plan. + * + * @param {TestPlanInterfaces.TestPlanCreateParams} testPlanCreateParams - A testPlanCreateParams object.TestPlanCreateParams + * @param {string} project - Project ID or project name + */ + createTestPlan(testPlanCreateParams, 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.2-preview.1", "testplan", "0e292477-a0c2-47f3-a9b6-34f153d627f4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testPlanCreateParams, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestPlan, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a test plan. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan to be deleted. + */ + deleteTestPlan(project, 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, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "0e292477-a0c2-47f3-a9b6-34f153d627f4", 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 test plan by Id. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan to get. + */ + getTestPlanById(project, 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, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "0e292477-a0c2-47f3-a9b6-34f153d627f4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestPlan, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test plans + * + * @param {string} project - Project ID or project name + * @param {string} owner - Filter for test plan by owner ID or name + * @param {string} continuationToken - If the list of plans returned is not complete, a continuation token to query next batch of plans is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test plans. + * @param {boolean} includePlanDetails - Get all properties of the test plan + * @param {boolean} filterActivePlans - Get just the active plans + */ + getTestPlans(project, owner, continuationToken, includePlanDetails, filterActivePlans) { + 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 = { + owner: owner, + continuationToken: continuationToken, + includePlanDetails: includePlanDetails, + filterActivePlans: filterActivePlans, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "0e292477-a0c2-47f3-a9b6-34f153d627f4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestPlan, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a test plan. + * + * @param {TestPlanInterfaces.TestPlanUpdateParams} testPlanUpdateParams - A testPlanUpdateParams object.TestPlanUpdateParams + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan to be updated. + */ + updateTestPlan(testPlanUpdateParams, project, 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, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "0e292477-a0c2-47f3-a9b6-34f153d627f4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testPlanUpdateParams, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestPlan, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test suite entries in the test suite. + * + * @param {string} project - Project ID or project name + * @param {number} suiteId - Id of the parent suite. + * @param {TestPlanInterfaces.SuiteEntryTypes} suiteEntryType + */ + getSuiteEntries(project, suiteId, suiteEntryType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + suiteId: suiteId + }; + let queryValues = { + suiteEntryType: suiteEntryType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "d6733edf-72f1-4252-925b-c560dfe9b75a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.SuiteEntry, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Reorder test suite entries in the test suite. + * + * @param {TestPlanInterfaces.SuiteEntryUpdateParams[]} suiteEntries - List of SuiteEntry to reorder. + * @param {string} project - Project ID or project name + * @param {number} suiteId - Id of the parent test suite. + */ + reorderSuiteEntries(suiteEntries, project, 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, + suiteId: suiteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "d6733edf-72f1-4252-925b-c560dfe9b75a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, suiteEntries, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.SuiteEntry, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create bulk requirement based test suites. + * + * @param {TestPlanInterfaces.TestSuiteCreateParams[]} testSuiteCreateParams - Parameters for suite creation + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan where requirement based suites need to be created. + * @param {number} parentSuiteId - ID of the parent suite under which requirement based suites will be created + */ + createBulkTestSuites(testSuiteCreateParams, project, planId, parentSuiteId) { + 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, + parentSuiteId: parentSuiteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "1e58fbe6-1761-43ce-97f6-5492ec9d438e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testSuiteCreateParams, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestSuite, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create test suite. + * + * @param {TestPlanInterfaces.TestSuiteCreateParams} testSuiteCreateParams - Parameters for suite creation + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suites. + */ + createTestSuite(testSuiteCreateParams, project, 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, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "1046d5d3-ab61-4ca7-a65a-36118a978256", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testSuiteCreateParams, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestSuite, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete test suite. + * + * @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 delete. + */ + deleteTestSuite(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, + planId: planId, + suiteId: suiteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "1046d5d3-ab61-4ca7-a65a-36118a978256", 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 test suite by suite id. + * + * @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 {TestPlanInterfaces.SuiteExpand} expand - Include the children suites and testers details + */ + getTestSuiteById(project, planId, suiteId, 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, + planId: planId, + suiteId: suiteId + }; + let queryValues = { + expand: expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "1046d5d3-ab61-4ca7-a65a-36118a978256", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestSuite, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test suites for plan. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan for which suites are requested. + * @param {TestPlanInterfaces.SuiteExpand} expand - Include the children suites and testers details. + * @param {string} continuationToken - If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites. + * @param {boolean} asTreeView - If the suites returned should be in a tree structure. + */ + getTestSuitesForPlan(project, planId, expand, continuationToken, asTreeView) { + 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 + }; + let queryValues = { + expand: expand, + continuationToken: continuationToken, + asTreeView: asTreeView, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "1046d5d3-ab61-4ca7-a65a-36118a978256", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestSuite, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update test suite. + * + * @param {TestPlanInterfaces.TestSuiteUpdateParams} testSuiteUpdateParams - Parameters for suite updation + * @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 parent suite. + */ + updateTestSuite(testSuiteUpdateParams, 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, + planId: planId, + suiteId: suiteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "1046d5d3-ab61-4ca7-a65a-36118a978256", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testSuiteUpdateParams, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestSuite, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Find the list of all test suites in which a given test case is present. This is helpful if you need to find out which test suites are using a test case, when you need to make changes to a test case. + * + * @param {number} testCaseId - ID of the test case for which suites need to be fetched. + */ + getSuitesByTestCaseId(testCaseId) { + return __awaiter(this, void 0, void 0, function* () { + if (testCaseId == null) { + throw new TypeError('testCaseId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + testCaseId: testCaseId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "a4080e84-f17b-4fad-84f1-7960b6525bf2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestSuite, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add test cases to a suite with specified configurations + * + * @param {TestPlanInterfaces.SuiteTestCaseCreateUpdateParameters[]} suiteTestCaseCreateUpdateParameters - SuiteTestCaseCreateUpdateParameters object. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan to which test cases are to be added. + * @param {number} suiteId - ID of the test suite to which test cases are to be added. + */ + addTestCasesToSuite(suiteTestCaseCreateUpdateParameters, 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, + planId: planId, + suiteId: suiteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "testplan", "a9bd61ac-45cf-4d13-9441-43dcd01edf8d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, suiteTestCaseCreateUpdateParameters, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestCase, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a particular Test Case from a Suite. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan for which test cases are requested. + * @param {number} suiteId - ID of the test suite for which test cases are requested. + * @param {string} testCaseId - Test Case Id to be fetched. + * @param {string} witFields - Get the list of witFields. + * @param {boolean} returnIdentityRef - If set to true, returns all identity fields, like AssignedTo, ActivatedBy etc., as IdentityRef objects. If set to false, these fields are returned as unique names in string format. This is false by default. + */ + getTestCase(project, planId, suiteId, testCaseId, witFields, returnIdentityRef) { + 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, + testCaseId: testCaseId + }; + let queryValues = { + witFields: witFields, + returnIdentityRef: returnIdentityRef, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "testplan", "a9bd61ac-45cf-4d13-9441-43dcd01edf8d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestCase, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Test Case List return those test cases which have all the configuration Ids as mentioned in the optional parameter. If configuration Ids is null, it return all the test cases + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan for which test cases are requested. + * @param {number} suiteId - ID of the test suite for which test cases are requested. + * @param {string} testIds - Test Case Ids to be fetched. + * @param {string} configurationIds - Fetch Test Cases which contains all the configuration Ids specified. + * @param {string} witFields - Get the list of witFields. + * @param {string} continuationToken - If the list of test cases returned is not complete, a continuation token to query next batch of test cases is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test cases. + * @param {boolean} returnIdentityRef - If set to true, returns all identity fields, like AssignedTo, ActivatedBy etc., as IdentityRef objects. If set to false, these fields are returned as unique names in string format. This is false by default. + * @param {boolean} expand - If set to false, will get a smaller payload containing only basic details about the suite test case object + * @param {TestPlanInterfaces.ExcludeFlags} excludeFlags - Flag to exclude various values from payload. For example to remove point assignments pass exclude = 1. To remove extra information (links, test plan , test suite) pass exclude = 2. To remove both extra information and point assignments pass exclude = 3 (1 + 2). + * @param {boolean} isRecursive + */ + getTestCaseList(project, planId, suiteId, testIds, configurationIds, witFields, continuationToken, returnIdentityRef, expand, excludeFlags, isRecursive) { + 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 + }; + let queryValues = { + testIds: testIds, + configurationIds: configurationIds, + witFields: witFields, + continuationToken: continuationToken, + returnIdentityRef: returnIdentityRef, + expand: expand, + excludeFlags: excludeFlags, + isRecursive: isRecursive, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "testplan", "a9bd61ac-45cf-4d13-9441-43dcd01edf8d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestCase, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes test cases from a suite based on the list of test case Ids provided. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan from which test cases are to be removed. + * @param {number} suiteId - ID of the test suite from which test cases are to be removed. + * @param {string} testCaseIds - Test Case Ids to be removed. + */ + removeTestCasesFromSuite(project, planId, suiteId, testCaseIds) { + return __awaiter(this, void 0, void 0, function* () { + if (testCaseIds == null) { + throw new TypeError('testCaseIds 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 + }; + let queryValues = { + testCaseIds: testCaseIds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "testplan", "a9bd61ac-45cf-4d13-9441-43dcd01edf8d", 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); + } + })); + }); + } + /** + * Removes test cases from a suite based on the list of test case Ids provided. This API can be used to remove a larger number of test cases. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan from which test cases are to be removed. + * @param {number} suiteId - ID of the test suite from which test cases are to be removed. + * @param {string} testIds - Comma separated string of Test Case Ids to be removed. + */ + removeTestCasesListFromSuite(project, planId, suiteId, testIds) { + return __awaiter(this, void 0, void 0, function* () { + if (testIds == null) { + throw new TypeError('testIds 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 + }; + let queryValues = { + testIds: testIds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "testplan", "a9bd61ac-45cf-4d13-9441-43dcd01edf8d", 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); + } + })); + }); + } + /** + * Update the configurations for test cases + * + * @param {TestPlanInterfaces.SuiteTestCaseCreateUpdateParameters[]} suiteTestCaseCreateUpdateParameters - A SuiteTestCaseCreateUpdateParameters object. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan to which test cases are to be updated. + * @param {number} suiteId - ID of the test suite to which test cases are to be updated. + */ + updateSuiteTestCases(suiteTestCaseCreateUpdateParameters, 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, + planId: planId, + suiteId: suiteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.3", "testplan", "a9bd61ac-45cf-4d13-9441-43dcd01edf8d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, suiteTestCaseCreateUpdateParameters, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestCase, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestPlanInterfaces.CloneTestCaseParams} cloneRequestBody + * @param {string} project - Project ID or project name + */ + cloneTestCase(cloneRequestBody, 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.2-preview.2", "testplan", "529b2b8d-82f4-4893-b1e4-1e74ea534673", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, cloneRequestBody, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.CloneTestCaseOperationInformation, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get clone information. + * + * @param {string} project - Project ID or project name + * @param {number} cloneOperationId - Operation ID returned when we queue a clone operation + */ + getTestCaseCloneInformation(project, cloneOperationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + cloneOperationId: cloneOperationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "testplan", "529b2b8d-82f4-4893-b1e4-1e74ea534673", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.CloneTestCaseOperationInformation, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Exports a set of test cases from a suite to a file. Currently supported formats: xlsx + * + * @param {TestPlanInterfaces.ExportTestCaseParams} exportTestCaseRequestBody - A ExportTestCaseParams object.ExportTestCaseParams + * @param {string} project - Project ID or project name + */ + exportTestCases(exportTestCaseRequestBody, 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.2-preview.1", "testplan", "3b9d1c87-6b1a-4e7d-9e7d-1a8e543112bb", 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); + } + })); + }); + } + /** + * Delete a test case. + * + * @param {string} project - Project ID or project name + * @param {number} testCaseId - Id of test case to be deleted. + */ + 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, + testCaseId: testCaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "29006fb5-816b-4ff7-a329-599943569229", 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); + } + })); + }); + } + /** + * Clone test plan + * + * @param {TestPlanInterfaces.CloneTestPlanParams} cloneRequestBody - Plan Clone Request Body detail TestPlanCloneRequest + * @param {string} project - Project ID or project name + * @param {boolean} deepClone - Clones all the associated test cases as well + */ + cloneTestPlan(cloneRequestBody, project, deepClone) { + 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 = { + deepClone: deepClone, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "testplan", "e65df662-d8a3-46c7-ae1c-14e2d4df57e1", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, cloneRequestBody, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.CloneTestPlanOperationInformation, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get clone information. + * + * @param {string} project - Project ID or project name + * @param {number} cloneOperationId - Operation ID returned when we queue a clone operation + */ + getCloneInformation(project, cloneOperationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + cloneOperationId: cloneOperationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "testplan", "e65df662-d8a3-46c7-ae1c-14e2d4df57e1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.CloneTestPlanOperationInformation, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a particular Test Point from a suite. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan for which test points are requested. + * @param {number} suiteId - ID of the test suite for which test points are requested. + * @param {string} pointId - ID of test point to be fetched. + * @param {boolean} returnIdentityRef - If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object. + * @param {boolean} includePointDetails - If set to false, will get a smaller payload containing only basic details about the test point object + */ + getPoints(project, planId, suiteId, pointId, returnIdentityRef, includePointDetails) { + return __awaiter(this, void 0, void 0, function* () { + if (pointId == null) { + throw new TypeError('pointId 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 + }; + let queryValues = { + pointId: pointId, + returnIdentityRef: returnIdentityRef, + includePointDetails: includePointDetails, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "testplan", "52df686e-bae4-4334-b0ee-b6cf4e6f6b73", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestPoint, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all the points inside a suite based on some filters + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan for which test points are requested. + * @param {number} suiteId - ID of the test suite for which test points are requested + * @param {string} testPointIds - ID of test points to fetch. + * @param {string} testCaseId - Get Test Points for specific test case Ids. + * @param {string} continuationToken - If the list of test point returned is not complete, a continuation token to query next batch of test points is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test points. + * @param {boolean} returnIdentityRef - If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object. + * @param {boolean} includePointDetails - If set to false, will get a smaller payload containing only basic details about the test point object + * @param {boolean} isRecursive - If set to true, will also fetch test points belonging to child suites recursively. + */ + getPointsList(project, planId, suiteId, testPointIds, testCaseId, continuationToken, returnIdentityRef, includePointDetails, isRecursive) { + 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 + }; + let queryValues = { + testPointIds: testPointIds, + testCaseId: testCaseId, + continuationToken: continuationToken, + returnIdentityRef: returnIdentityRef, + includePointDetails: includePointDetails, + isRecursive: isRecursive, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "testplan", "52df686e-bae4-4334-b0ee-b6cf4e6f6b73", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestPoint, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update Test Points. This is used to Reset test point to active, update the outcome of a test point or update the tester of a test point + * + * @param {TestPlanInterfaces.TestPointUpdateParams[]} testPointUpdateParams - A TestPointUpdateParams Object. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan for which test points are requested. + * @param {number} suiteId - ID of the test suite for which test points are requested. + * @param {boolean} includePointDetails - If set to false, will get a smaller payload containing only basic details about the test point object + * @param {boolean} returnIdentityRef - If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object. + */ + updateTestPoints(testPointUpdateParams, project, planId, suiteId, includePointDetails, returnIdentityRef) { + 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 + }; + let queryValues = { + includePointDetails: includePointDetails, + returnIdentityRef: returnIdentityRef, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "testplan", "52df686e-bae4-4334-b0ee-b6cf4e6f6b73", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testPointUpdateParams, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestPoint, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Clone test suite + * + * @param {TestPlanInterfaces.CloneTestSuiteParams} cloneRequestBody - Suite Clone Request Body detail TestSuiteCloneRequest + * @param {string} project - Project ID or project name + * @param {boolean} deepClone - Clones all the associated test cases as well + */ + cloneTestSuite(cloneRequestBody, project, deepClone) { + 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 = { + deepClone: deepClone, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "testplan", "181d4c97-0e98-4ee2-ad6a-4cada675e555", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, cloneRequestBody, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.CloneTestSuiteOperationInformation, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get clone information. + * + * @param {string} project - Project ID or project name + * @param {number} cloneOperationId - Operation ID returned when we queue a clone operation + */ + getSuiteCloneInformation(project, cloneOperationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + cloneOperationId: cloneOperationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.2", "testplan", "181d4c97-0e98-4ee2-ad6a-4cada675e555", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.CloneTestSuiteOperationInformation, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a test variable. + * + * @param {TestPlanInterfaces.TestVariableCreateUpdateParameters} testVariableCreateUpdateParameters - TestVariableCreateUpdateParameters + * @param {string} project - Project ID or project name + */ + createTestVariable(testVariableCreateUpdateParameters, 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.2-preview.1", "testplan", "2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testVariableCreateUpdateParameters, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestVariable, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a test variable by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} testVariableId - ID of the test variable to delete. + */ + deleteTestVariable(project, testVariableId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + testVariableId: testVariableId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c", 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 test variable by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} testVariableId - ID of the test variable to get. + */ + getTestVariableById(project, testVariableId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + testVariableId: testVariableId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestVariable, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test variables. + * + * @param {string} project - Project ID or project name + * @param {string} continuationToken - If the list of variables returned is not complete, a continuation token to query next batch of variables is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test variables. + */ + getTestVariables(project, 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 + }; + let queryValues = { + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestVariable, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a test variable by its ID. + * + * @param {TestPlanInterfaces.TestVariableCreateUpdateParameters} testVariableCreateUpdateParameters - TestVariableCreateUpdateParameters + * @param {string} project - Project ID or project name + * @param {number} testVariableId - ID of the test variable to update. + */ + updateTestVariable(testVariableCreateUpdateParameters, project, testVariableId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + testVariableId: testVariableId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testplan", "2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testVariableCreateUpdateParameters, options); + let ret = this.formatResponse(res.result, TestPlanInterfaces.TypeInfo.TestVariable, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.TestPlanApi = TestPlanApi; + + +/***/ }), + +/***/ 1819: +/***/ (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 Contracts = __nccwpck_require__(3047); +class TestResultsApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-testResults-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 + */ + 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 = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + iterationId: iterationId, + actionPath: actionPath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} testSubResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a test iteration attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param {number} iterationId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + iterationId: iterationId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", 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); + } + })); + }); + } + /** + * Returns a test iteration attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param {number} iterationId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + iterationId: iterationId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", 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); + } + })); + }); + } + /** + * Returns a test result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", 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} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a test result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", 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); + } + })); + }); + } + /** + * Returns a test sub result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param {number} testSubResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", 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); + } + })); + }); + } + /** + * Returns attachment references for test sub result. + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} testSubResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a test sub result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param {number} testSubResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "2a632e97-e014-4275-978f-8e5c4906d4b3", 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); + } + })); + }); + } + /** + * @param {Contracts.TestAttachmentRequestModel} attachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} attachmentId + */ + 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, + runId: runId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a test run attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} attachmentId + */ + 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, + runId: runId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", 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} project - Project ID or project name + * @param {number} runId + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a test run attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} attachmentId + */ + 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, + runId: runId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "b5731898-8206-477a-a51d-3fdf116fc6bf", 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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "d8dbf98f-eb34-4f8d-8365-47972af34f29", routeValues); + let url = verData.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} project - Project ID or project name + * @param {number} buildId + */ + fetchSourceCodeCoverageReport(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 = { + buildId: buildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "a459e10b-d703-4193-b3c1-60f2287918b3", routeValues, queryValues); + let url = verData.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.SourceViewBuildCoverage, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} flags + */ + 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.2-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, Contracts.TypeInfo.BuildCoverage, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10&deltaBuildId=9 Request: build id and delta build id (optional) + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} deltaBuildId + */ + 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 = { + buildId: buildId, + deltaBuildId: deltaBuildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.CodeCoverageSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} buildId + * @param {Contracts.CodeCoverageData} coverageData + */ + 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 + }; + let queryValues = { + buildId: buildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, coverageData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} flags + */ + 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, + runId: runId + }; + let queryValues = { + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.CustomTestFieldDefinition[]} newFields + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "b67d46d8-b70e-4dcc-a98c-7f74b52ba82f", 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, Contracts.TypeInfo.CustomTestFieldDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {Contracts.CustomTestFieldScope} scopeFilter + */ + 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.2-preview.1", "testresults", "b67d46d8-b70e-4dcc-a98c-7f74b52ba82f", routeValues, queryValues); + let url = verData.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.CustomTestFieldDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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.2-preview.1", "testresults", "4a6d0c46-51ca-45aa-9163-249cee3289b7", 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 {string} project - Project ID or project name + * @param {number} buildDefinitionId + * @param {Date} minBuildCreatedDate + */ + getFlakyTestResultsByBuildDefinitionId(project, buildDefinitionId, minBuildCreatedDate) { + return __awaiter(this, void 0, void 0, function* () { + if (buildDefinitionId == null) { + throw new TypeError('buildDefinitionId can not be null or undefined'); + } + if (minBuildCreatedDate == null) { + throw new TypeError('minBuildCreatedDate can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildDefinitionId: buildDefinitionId, + minBuildCreatedDate: minBuildCreatedDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "8ed3cf63-7153-4722-a107-c49dae996143", routeValues, queryValues); + let url = verData.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 {string} project - Project ID or project name + * @param {number} runId + */ + getFlakyTestResultsByTestRun(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.2-preview.1", "testresults", "31cc4b31-416f-45cd-9b45-39534279e10c", routeValues); + let url = verData.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 {Contracts.ResultsFilter} filter + * @param {string} project - Project ID or project 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, filter, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultHistory, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test run message logs + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestMessageLogDetails, true); + 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 {Contracts.Metrics[]} metricNames + * @param {boolean} groupByNode - Group summary for each node of the pipleine heirarchy + */ + 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 + }; + let queryValues = { + pipelineId: pipelineId, + stageName: stageName, + phaseName: phaseName, + jobName: jobName, + metricNames: metricNames && metricNames.join(","), + groupByNode: groupByNode, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.PipelineTestMetrics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestResultsDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestResultDocument} document + * @param {string} project - Project ID or project name + * @param {number} runId + */ + 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 = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string[]} fields + * @param {string} continuationToken + */ + 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 = { + buildId: buildId, + publishContext: publishContext, + fields: fields && fields.join(","), + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, 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} releaseId + * @param {string} publishContext + * @param {number} releaseEnvId + * @param {string[]} fields + * @param {string} continuationToken + */ + 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 + }; + let queryValues = { + releaseId: releaseId, + publishContext: publishContext, + releaseEnvId: releaseEnvId, + fields: fields && fields.join(","), + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project + }; + let queryValues = { + detailsToInclude: detailsToInclude, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, testCaseReferenceIds, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestResultsQuery} query + * @param {string} project - Project ID or project name + */ + 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.2-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); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.QueryModel} queryModel + * @param {string} project - Project ID or project name + * @param {boolean} includeResultDetails + * @param {boolean} includeIterationDetails + * @param {number} skip + * @param {number} top + */ + 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.2-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); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestCaseResult[]} results + * @param {string} project - Project ID or project name + * @param {number} runId + */ + 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.2-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); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testResultId + * @param {Contracts.ResultDetails} detailsToInclude + */ + getTestResultById(project, runId, testResultId, 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, + runId: runId, + testResultId: testResultId + }; + let queryValues = { + detailsToInclude: detailsToInclude, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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.2-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 {Contracts.TestCaseResult[]} results + * @param {string} project - Project ID or project name + * @param {number} runId + */ + 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 = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, results, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {Contracts.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken + */ + 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 = { + buildId: buildId, + publishContext: publishContext, + outcomes: outcomes && outcomes.join(","), + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + 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.2-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, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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 = { + 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.2-preview.1", "testresults", "3994b949-77e5-495d-8034-edf80d95b84e", routeValues, queryValues); + let url = verData.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 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. + */ + 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 = { + project: project + }; + let queryValues = { + pipelineId: pipelineId, + stageName: stageName, + phaseName: phaseName, + jobName: jobName, + shouldIncludeFailedAndAbortedResults: shouldIncludeFailedAndAbortedResults, + queryGroupSummaryForInProgress: queryGroupSummaryForInProgress, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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.2-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 + */ + 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 = { + project: project + }; + let queryValues = { + pipelineId: pipelineId, + stageName: stageName, + phaseName: phaseName, + jobName: jobName, + includeFailureDetails: includeFailureDetails, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestResultSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {Contracts.ReleaseReference} releaseToCompare + */ + 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 + }; + let queryValues = { + releaseId: releaseId, + releaseEnvId: releaseEnvId, + publishContext: publishContext, + includeFailureDetails: includeFailureDetails, + releaseToCompare: releaseToCompare, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestResultSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.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.2-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, releases, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultSummary, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestResultsContext} resultsContext + * @param {string} project - Project ID or project name + * @param {number[]} workItemIds + */ + 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 = { + project: project + }; + let queryValues = { + workItemIds: workItemIds && workItemIds.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, resultsContext, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestSummaryForWorkItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.2-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.2-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.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {boolean} includeDetails + * @param {boolean} includeTags + */ + 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 = { + project: project, + runId: runId + }; + let queryValues = { + includeDetails: includeDetails, + includeTags: includeTags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + 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.2-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, Contracts.TypeInfo.TestRun, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {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. + */ + 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 + }; + 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.2-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, Contracts.TypeInfo.TestRun, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.RunUpdateModel} runUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, runUpdateModel, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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. + */ + 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 = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestRunStatistic, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get TestResultsSettings data + * + * @param {string} project - Project ID or project name + * @param {Contracts.TestResultsSettingsType} settingsType + */ + 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 = { + project: project + }; + let queryValues = { + settingsType: settingsType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestResultsSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update project settings of test results + * + * @param {Contracts.TestResultsUpdateSettings} testResultsUpdateSettings + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.update(url, testResultsUpdateSettings, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestResultsSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the list of results whose failure matches with the provided one. + * + * @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 + */ + 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, + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} runId - ID of the run to get. + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestRunStatistic, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + *

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 {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. + */ + 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, + definition: definition + }; + let queryValues = { + branchName: branchName, + label: label, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all the tags in a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - Build ID + */ + 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 = { + buildId: buildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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); + } + })); + }); + } + /** + * Get all the tags in a release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Release ID + * @param {number} releaseEnvId - Release environment ID + */ + 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.2-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); + } + })); + }); + } + /** + * Update tags of a run, Tags can be Added and Deleted + * + * @param {Contracts.TestTagsUpdateModel} testTagsUpdateModel - TestTagsUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId - RunId of the run + */ + 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.2-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); + } + })); + }); + } + /** + * Get all the tags in a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - Build ID + */ + 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 + }; + let queryValues = { + buildId: buildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all the tags in a release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Release ID + * @param {number} releaseEnvId - Release environment ID + */ + 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 = { + releaseId: releaseId, + releaseEnvId: releaseEnvId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} buildId - BuildId + */ + createBuildAttachmentInLogStore(attachmentRequestModel, 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.2-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.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} runId - Test RunId + */ + 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, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the attachment with the specified filename for the specified runId from the LogStore. + * + * @param {string} project - Project ID or project name + * @param {number} runId - Test RunId + * @param {string} filename - Attachment FileName + */ + 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, + runId: runId + }; + let queryValues = { + filename: filename, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the attachment with the specified filename for the specified runId from the LogStore. + * + * @param {string} project - Project ID or project name + * @param {number} runId - Test RunId + * @param {string} filename - Attachment FileName + */ + 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 = { + project: project, + runId: runId + }; + let queryValues = { + filename: filename, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", 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); + } + })); + }); + } + /** + * Returns a list of attachments for the specified runId from the LogStore. + * + * @param {string} project - Project ID or project name + * @param {number} runId - Test RunId + */ + 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 = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestLogStoreAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the attachment with the specified filename for the specified runId from the LogStore. + * + * @param {string} project - Project ID or project name + * @param {number} runId - Test RunId + * @param {string} filename - Attachment FileName + */ + getTestRunLogStoreAttachmentZip(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, + runId: runId + }; + let queryValues = { + filename: filename, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "1026d5de-4b0b-46ae-a31f-7c59b6af51ef", 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); + } + })); + }); + } + /** + * Creates a new test failure type + * + * @param {Contracts.TestResultFailureTypeRequestModel} testResultFailureType + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, testResultFailureType, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a test failure type with specified failureTypeId + * + * @param {string} project - Project ID or project name + * @param {number} failureTypeId + */ + 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, + failureTypeId: failureTypeId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the list of test failure types. + * + * @param {string} project - Project ID or project name + */ + getFailureTypes(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.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get history of a test method using TestHistoryQuery + * + * @param {Contracts.TestHistoryQuery} filter - TestHistoryQuery to get history + * @param {string} project - Project ID or project name + */ + 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.2-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.create(url, filter, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestHistoryQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get list of build attachments reference + * + * @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 + */ + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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} 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 + */ + 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, + 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.2-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, Contracts.TypeInfo.TestLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get list of test subresult attachments reference + * + * @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 + */ + 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, + runId: runId, + resultId: resultId + }; + let queryValues = { + 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.2-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, Contracts.TypeInfo.TestLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get list of test run attachments reference + * + * @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 + */ + 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, + runId: runId + }; + 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.2-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, Contracts.TypeInfo.TestLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get SAS Uri of a build attachment + * + * @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 + */ + 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 + }; + let queryValues = { + build: build, + type: type, + filePath: filePath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project + }; + let queryValues = { + buildId: buildId, + testLogStoreOperationType: testLogStoreOperationType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project, + runId: runId, + resultId: resultId + }; + let queryValues = { + type: type, + filePath: filePath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project, + runId: runId, + resultId: resultId + }; + let queryValues = { + subResultId: subResultId, + type: type, + filePath: filePath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + testLogStoreEndpointDetailsForResult(project, runId, resultId, subResultId, filePath, type) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + project: project, + runId: runId + }; + let queryValues = { + type: type, + filePath: filePath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + testLogStoreEndpointDetailsForRun(project, runId, testLogStoreOperationType, filePath, type) { + 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, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, null, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.TestLogStoreEndpointDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves Test runs associated to a session + * + * @param {string} project - Project ID or project name + * @param {number} sessionId - Id of TestResults session to obtain Test Runs for. + */ + getTestRunsBySessionId(project, 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, + sessionId: sessionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "6efc2c12-d4bf-4e86-ae37-b502e57a84c7", routeValues); + let url = verData.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); + } + })); + }); + } + /** + * Creates TestResultsSession object in TCM data store + * + * @param {Contracts.TestResultsSession} session - Received session object. + * @param {string} project - Project ID or project name + */ + createTestSession(session, 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.2-preview.1", "testresults", "531e61ce-580d-4962-8591-0b2942b6bf78", 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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves TestResultsSession metadata object in TCM data store + * + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + getTestSession(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 = { + buildId: buildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "531e61ce-580d-4962-8591-0b2942b6bf78", routeValues, queryValues); + let url = verData.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.TestResultsSession, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves TestResultsSession Layout object in TCM data store + * + * @param {string} project - Project ID or project name + * @param {string} sessionId + */ + getTestSessionLayout(project, 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 + }; + let queryValues = { + sessionId: sessionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "531e61ce-580d-4962-8591-0b2942b6bf78", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } + /** + * Creates Environment object in TCM data store + * + * @param {Contracts.TestSessionEnvironment[]} environments - Received Environment object. + * @param {string} project - Project ID or project name + */ + createEnvironment(environments, 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.2-preview.1", "testresults", "f9c2e9e4-9c9a-4c1d-9a7d-2b4c8a6f0d5f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, environments, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates Notification object in TCM data store for a given session + * + * @param {Contracts.TestSessionNotification[]} notifications - Notification(s) to add for the specified sessionId + * @param {string} project - Project ID or project name + * @param {number} sessionId - ID of Session to add Notification + */ + createNotification(notifications, project, 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, + sessionId: sessionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "ebff1c56-2188-4082-9d0e-1838a396f0c8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, notifications, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves TestResultsSession Notification objects in TCM data store + * + * @param {string} project - Project ID or project name + * @param {number} sessionId - Id of TestResults session to obtain Notifications for. + */ + getSessionNotifications(project, 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, + sessionId: sessionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-preview.1", "testresults", "ebff1c56-2188-4082-9d0e-1838a396f0c8", routeValues); + let url = verData.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); + } + })); + }); + } + /** + * Add Test Results to test run session + * + * @param {Contracts.TestCaseResult[]} results + * @param {string} project - Project ID or project name + * @param {number} runId - RunId of test run + */ + addTestResultsToTestRunSession(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.2-preview.1", "testresults", "ee6d95bf-7506-4c47-8100-9fed82cdc2f7", 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); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @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 + */ + getTestSessionResults(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.2-preview.1", "testresults", "ee6d95bf-7506-4c47-8100-9fed82cdc2f7", routeValues, queryValues); + let url = verData.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); + } + })); + }); + } + /** + * Creates TestResultsMRX objects in TCM data store for existing test results + * + * @param {Contracts.TestCaseResult[]} results - Results object with only test results MRX properties and existing testResultId + * @param {string} project - Project ID or project name + * @param {number} runId - RunId of test run + */ + updateTestResultsToTestRunSession(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.2-preview.1", "testresults", "ee6d95bf-7506-4c47-8100-9fed82cdc2f7", 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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.TestSettings} testSettings + * @param {string} project - Project ID or project name + */ + createTestSettings(testSettings, 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.2-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.create(url, testSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + 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 = { + project: project + }; + let queryValues = { + testSettingsId: testSettingsId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + getTestSettingsById(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 = { + project: project + }; + let queryValues = { + testSettingsId: testSettingsId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {Contracts.WorkItemToTestLinks} workItemToTestLinks + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, workItemToTestLinks, options); + let ret = this.formatResponse(res.result, Contracts.TypeInfo.WorkItemToTestLinks, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} testName + * @param {number} workItemId + */ + 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 + }; + let queryValues = { + testName: testName, + workItemId: workItemId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} testName + */ + 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 + }; + let queryValues = { + testName: testName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + 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, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Query Test Result WorkItems based on filter + * + * @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 + */ + 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 + }; + let queryValues = { + workItemCategory: workItemCategory, + automatedTestName: automatedTestName, + testCaseId: testCaseId, + maxCompleteDate: maxCompleteDate, + days: days, + '$workItemCount': workItemCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +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. + * + * @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 + */ + 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 + }; + let queryValues = { + path: path, + includeParent: includeParent, + includeChildren: includeChildren, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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.2-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.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 {boolean} includeDeleted - Return deleted branches. Default: False + * @param {boolean} includeLinks - Return links. Default: False + */ + 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 + }; + let queryValues = { + scopePath: scopePath, + includeDeleted: includeDeleted, + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranchRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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 = { + id: id + }; + let queryValues = { + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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, TfvcInterfaces.TypeInfo.TfvcChange, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new changeset. + * + * @param {TfvcInterfaces.TfvcChangeset} changeset + * @param {string} project - Project ID or project name + */ + 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 + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.2-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.create(url, changeset, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a Tfvc Changeset + * + * @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 + */ + 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, + 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.2-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.TfvcChangeset, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Returns changesets for a given list of changeset Ids. + * + * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - List of changeset IDs. + */ + 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.2-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); + } + })); + }); + } + /** + * Retrieves the work items associated with a particular changeset. + * + * @param {number} id - ID of the changeset. + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Get a single deep shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Get work items associated with a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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; + } + /** + * Gets the route template for a resource based on its location ID and negotiates the api version + */ + 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) => { + if (!res.result) { + return {}; + } + 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; + + +/***/ }), + +/***/ 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 alertm = __nccwpck_require__(7770); +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 managementm = __nccwpck_require__(2190); +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__(5899); +const taskm = __nccwpck_require__(2354); +const testm = __nccwpck_require__(5742); +const testplanm = __nccwpck_require__(8737); +const testresultsm = __nccwpck_require__(1819); +const tfvcm = __nccwpck_require__(5417); +const wikim = __nccwpck_require__(6391); +const workm = __nccwpck_require__(8186); +const pipelinesm = __nccwpck_require__(686); +const cixm = __nccwpck_require__(463); +const workitemtrackingm = __nccwpck_require__(8409); +const workitemtrackingprocessm = __nccwpck_require__(1178); +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; + } + } + } + // 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* () { + 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 + */ + getAlertApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "0f2ca920-f269-4545-b1f4-5b4173aa784e"); + handlers = handlers || [this.authHandler]; + return new alertm.AlertApi(serverUrl, handlers, this.options); + }); + } + 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); + }); + } + getManagementApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "f101720c-9790-45a6-9fb3-494a09fddeeb"); + handlers = handlers || [this.authHandler]; + return new managementm.ManagementApi(serverUrl, handlers, this.options); + }); + } + 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); + }); + } + getTestPlanApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "e4c27205-9d23-4c98-b958-d798bc3f9cd4"); + handlers = handlers || [this.authHandler]; + return new testplanm.TestPlanApi(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); + }); + } + getPipelinesApi(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 pipelinesm.PipelinesApi(serverUrl, handlers, this.options); + }); + } + getCixApi(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 cixm.CixApi(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"); + } + // 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; + + +/***/ }), + +/***/ 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()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const basem = __nccwpck_require__(273); +const Comments_Contracts = __nccwpck_require__(4743); +const WikiInterfaces = __nccwpck_require__(5787); +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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } +} +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); + } + /** + * Creates/updates an automation rules settings + * + * @param {WorkInterfaces.TeamAutomationRulesSettingsRequestModel} ruleRequestModel - Required parameters to create/update an automation rules settings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateAutomationRule(ruleRequestModel, 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.2-preview.2", "work", "2882c15d-0cb3-43b5-8fb7-db62e09a79db", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, ruleRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Delete a team's iteration by iterationId + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - ID of the iteration + */ + 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.2-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); + } + })); + }); + } + /** + * Get team's iteration by iterationId + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - ID of the iteration + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * Add an iteration to the team + * + * @param {WorkInterfaces.TeamSettingsIteration} iteration - Iteration to add + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + 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.2-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); + } + })); + }); + } + /** + * Add a new plan for the team + * + * @param {WorkInterfaces.CreatePlan} postedPlan - Plan definition + * @param {string} project - Project ID or project name + */ + 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.2-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); + } + })); + }); + } + /** + * Delete the specified plan + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier of the plan + */ + 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.2-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); + } + })); + }); + } + /** + * Get the information for the specified plan + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier of the plan + */ + 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.2-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); + } + })); + }); + } + /** + * Get the information for all the plans configured for the given team + * + * @param {string} project - Project ID or project name + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Get process configuration + * + * @param {string} project - Project ID or project name + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + 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.2-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); + } + })); + }); + } + /** + * @param {WorkInterfaces.UpdateTaskboardColumn[]} updateColumns + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + 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.2-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); + } + })); + }); + } + /** + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId + */ + 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.2-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); + } + })); + }); + } + /** + * @param {WorkInterfaces.UpdateTaskboardWorkItemColumn} updateColumn + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId + * @param {number} workItemId + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Get a collection of team field values + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + 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.2-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); + } + })); + }); + } + /** + * Update team field values + * + * @param {WorkInterfaces.TeamFieldValuesPatch} patch + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } +} +WorkApi.RESOURCE_AREA_ID = "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"; +exports.WorkApi = WorkApi; + + +/***/ }), + +/***/ 8409: +/***/ (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 WorkItemTrackingInterfaces = __nccwpck_require__(6938); +class WorkItemTrackingApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-WorkItemTracking-api', options); + } + /** + * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details. + * + * @param {WorkItemTrackingInterfaces.QueryOption} queryOption + */ + 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); + } + })); + }); + } + /** + * Gets recent work item activities + * + */ + 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); + } + })); + }); + } + /** + * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. + * + */ + 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); + } + })); + }); + } + /** + * Get the list of work item tracking outbound artifact link types. + * + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * Gets root classification nodes under the project. + * + * @param {string} project - Project ID or project name + * @param {number} depth - Depth of children to fetch. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * Gets reactions of a comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + */ + 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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} workItemId + * @param {number} commentId + * @param {number} version + */ + 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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} workItemId + * @param {number} commentId + */ + 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); + } + })); + }); + } + /** + * Create a new field. + * + * @param {WorkItemTrackingInterfaces.WorkItemField} workItemField - New field definition + * @param {string} project - Project ID or project name + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * Gets information on a specific field. + * + * @param {string} fieldNameOrRefName - Field simple name or reference name + * @param {string} project - Project ID or project name + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * Gets a list of queries by ids (Maximum 1000) + * + * @param {WorkItemTrackingInterfaces.QueryBatchGetRequest} queryGetRequest + * @param {string} project - Project ID or project name + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * RESTful method to send mail for selected/queried work items. + * + * @param {WorkItemTrackingInterfaces.SendMailBody} body + * @param {string} project - Project ID or project name + */ + 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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} tagIdOrName + */ + 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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} tagIdOrName + */ + 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); + } + })); + }); + } + /** + * @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); + } + })); + }); + } + /** + * @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); + } + })); + }); + } + /** + * Creates a template + * + * @param {WorkItemTrackingInterfaces.WorkItemTemplate} template - Template contents + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * Deletes the template with given id + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template id + */ + 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); + } + })); + }); + } + /** + * Gets the template with specified id + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template Id + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * Returns a single update for a work item + * + * @param {number} id + * @param {number} updateNumber + * @param {string} project - Project ID or project name + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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) + */ + 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); + } + })); + }); + } + /** + * Get a list of all work item icons. + * + */ + 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); + } + })); + }); + } + /** + * 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) + */ + 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); + } + })); + }); + } + /** + * 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) + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * Gets the work item relation type definition. + * + * @param {string} relation - The relation name + */ + 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); + } + })); + }); + } + /** + * Gets the work item relation types. + * + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} maxPageSize + */ + 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); + } + })); + }); + } + /** + * 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 }. + */ + 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); + } + })); + }); + } + /** + * 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 }. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * 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 }. + */ + 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); + } + })); + }); + } + /** + * Gets work items for a list of work item ids (Maximum 200) + * + * @param {WorkItemTrackingInterfaces.WorkItemBatchGetRequest} workItemGetRequest + * @param {string} project - Project ID or project name + */ + 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); + } + })); + }); + } + /** + * INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects + * + * @param {string[]} projectNames + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * Get all work item type categories. + * + * @param {string} project - Project ID or project name + */ + 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); + } + })); + }); + } + /** + * Get specific work item type category by name. + * + * @param {string} project - Project ID or project name + * @param {string} category - The category name + */ + 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); + } + })); + }); + } + /** + * INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects + * + * @param {string[]} projectNames + */ + 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); + } + })); + }); + } + /** + * INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects + * + * @param {string[]} projectNames + */ + 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); + } + })); + }); + } + /** + * Returns a work item type definition. + * + * @param {string} project - Project ID or project name + * @param {string} type - Work item type name + */ + 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); + } + })); + }); + } + /** + * Returns the list of work item types + * + * @param {string} project - Project ID or project name + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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. + */ + 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); + } + })); + }); + } + /** + * 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 + */ + 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); + } + })); + }); + } + /** + * Export work item type + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {boolean} exportGlobalLists + */ + 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); + } + })); + }); + } + /** + * Add/updates a work item type + * + * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel + * @param {string} project - Project ID or project name + */ + 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; + + +/***/ }), + +/***/ 1178: +/***/ (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); + } + /** + * Creates a single behavior in the given process. + * + * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest} behavior + * @param {string} processId - The ID of the process + */ + 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.2-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); + } + })); + }); + } + /** + * Removes a behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Returns a list of all behaviors in the process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * Gets the form layout. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + 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.2-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); + } + })); + }); + } + /** + * Creates a picklist. + * + * @param {WorkItemTrackingProcessInterfaces.PickList} picklist - Picklist + */ + 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.2-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); + } + })); + }); + } + /** + * Removes a picklist. + * + * @param {string} listId - The ID of the list + */ + 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.2-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); + } + })); + }); + } + /** + * Returns a picklist. + * + * @param {string} listId - The ID of the list + */ + 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.2-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); + } + })); + }); + } + /** + * Returns meta data of the picklist. + * + */ + 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.2-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); + } + })); + }); + } + /** + * Updates a list. + * + * @param {WorkItemTrackingProcessInterfaces.PickList} picklist + * @param {string} listId - The ID of the list + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Creates a process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessModel} createRequest - CreateProcessModel. + */ + 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.2-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); + } + })); + }); + } + /** + * Removes a process of a specific ID. + * + * @param {string} processTypeId + */ + 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.2-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); + } + })); + }); + } + /** + * Edit a process of a specific ID. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessModel} updateRequest + * @param {string} processTypeId + */ + 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.2-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); + } + })); + }); + } + /** + * Get list of all processes including system and inherited. + * + * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand + */ + 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.2-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); + } + })); + }); + } + /** + * Get a single process of a specified ID. + * + * @param {string} processTypeId + * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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. + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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 + * --------------------------------------------------------- + */ +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); + } + /** + * Creates a single behavior in the given process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel} behavior + * @param {string} processId - The ID of the process + */ + 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.2-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); + } + })); + }); + } + /** + * Removes a behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior + */ + 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.2-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); + } + })); + }); + } + /** + * Returns a single behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior + */ + 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.2-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); + } + })); + }); + } + /** + * Returns a list of all behaviors in the process. + * + * @param {string} processId - The ID of the process + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Creates a single field in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldModel} field + * @param {string} processId - The ID of the process + */ + 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.2-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); + } + })); + }); + } + /** + * Updates a given field in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate} field + * @param {string} processId - The ID of the process + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * Gets the form layout + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + 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.2-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); + } + })); + }); + } + /** + * Returns meta data of the picklist. + * + */ + 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.2-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); + } + })); + }); + } + /** + * Creates a picklist. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist + */ + 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.2-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); + } + })); + }); + } + /** + * Removes a picklist. + * + * @param {string} listId - The ID of the list + */ + 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.2-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); + } + })); + }); + } + /** + * Returns a picklist. + * + * @param {string} listId - The ID of the list + */ + 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.2-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); + } + })); + }); + } + /** + * Updates a list. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist + * @param {string} listId - The ID of the list + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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 + */ + 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } + /** + * 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.2-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); + } + })); + }); + } +} +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.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.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.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.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + + +/***/ }), + +/***/ 6228: +/***/ ((__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 AlertType; +(function (AlertType) { + /** + * The code has an unspecified vulnerability type + */ + AlertType[AlertType["Unknown"] = 0] = "Unknown"; + /** + * The code uses a dependency with a known vulnerability. + */ + AlertType[AlertType["Dependency"] = 1] = "Dependency"; + /** + * The code contains a secret that has now been compromised and must be revoked. + */ + AlertType[AlertType["Secret"] = 2] = "Secret"; + /** + * The code contains a weakness determined by static analysis. + */ + AlertType[AlertType["Code"] = 3] = "Code"; +})(AlertType = exports.AlertType || (exports.AlertType = {})); +var AnalysisConfigurationType; +(function (AnalysisConfigurationType) { + /** + * Default analysis configuration that is not attached to any other configuration data + */ + AnalysisConfigurationType[AnalysisConfigurationType["Default"] = 0] = "Default"; + /** + * Ado Pipeline, contains branch, pipeline, phase, and ADOPipelineId + */ + AnalysisConfigurationType[AnalysisConfigurationType["AdoPipeline"] = 1] = "AdoPipeline"; +})(AnalysisConfigurationType = exports.AnalysisConfigurationType || (exports.AnalysisConfigurationType = {})); +/** + * This enum defines the dependency components. + */ +var ComponentType; +(function (ComponentType) { + ComponentType[ComponentType["Unknown"] = 0] = "Unknown"; + ComponentType[ComponentType["NuGet"] = 1] = "NuGet"; + /** + * Indicates the component is an Npm package. + */ + ComponentType[ComponentType["Npm"] = 2] = "Npm"; + /** + * Indicates the component is a Maven artifact. + */ + ComponentType[ComponentType["Maven"] = 3] = "Maven"; + /** + * Indicates the component is a Git repository. + */ + ComponentType[ComponentType["Git"] = 4] = "Git"; + /** + * Indicates the component is not any of the supported component types by Governance. + */ + ComponentType[ComponentType["Other"] = 5] = "Other"; + /** + * Indicates the component is a Ruby gem. + */ + ComponentType[ComponentType["RubyGems"] = 6] = "RubyGems"; + /** + * Indicates the component is a Cargo package. + */ + ComponentType[ComponentType["Cargo"] = 7] = "Cargo"; + /** + * Indicates the component is a Pip package. + */ + ComponentType[ComponentType["Pip"] = 8] = "Pip"; + /** + * Indicates the component is a loose file. Not a package as understood by different package managers. + */ + ComponentType[ComponentType["File"] = 9] = "File"; + /** + * Indicates the component is a Go package. + */ + ComponentType[ComponentType["Go"] = 10] = "Go"; + /** + * Indicates the component is a Docker Image + */ + ComponentType[ComponentType["DockerImage"] = 11] = "DockerImage"; + /** + * Indicates the component is a CocoaPods pod. + */ + ComponentType[ComponentType["Pod"] = 12] = "Pod"; + /** + * Indicates the component is found in a linux environment. A package understood by linux based package managers like apt and rpm. + */ + ComponentType[ComponentType["Linux"] = 13] = "Linux"; + /** + * Indicates the component is a Conda package. + */ + ComponentType[ComponentType["Conda"] = 14] = "Conda"; + /** + * Indicates the component is a Docker Reference. + */ + ComponentType[ComponentType["DockerReference"] = 15] = "DockerReference"; + /** + * Indicates the component is a Vcpkg Package. + */ + ComponentType[ComponentType["Vcpkg"] = 16] = "Vcpkg"; +})(ComponentType = exports.ComponentType || (exports.ComponentType = {})); +var Confidence; +(function (Confidence) { + /** + * High confidence level for alert + */ + Confidence[Confidence["High"] = 0] = "High"; + /** + * Other confidence level for alert + */ + Confidence[Confidence["Other"] = 1] = "Other"; +})(Confidence = exports.Confidence || (exports.Confidence = {})); +var DismissalType; +(function (DismissalType) { + /** + * Dismissal type unknown + */ + DismissalType[DismissalType["Unknown"] = 0] = "Unknown"; + /** + * Dismissal indicating alert has been fixed + */ + DismissalType[DismissalType["Fixed"] = 1] = "Fixed"; + /** + * Dismissal indicating user is accepting a risk for the alert + */ + DismissalType[DismissalType["AcceptedRisk"] = 2] = "AcceptedRisk"; + /** + * Dismissal indicating alert is a false positive and will likely not be fixed. + */ + DismissalType[DismissalType["FalsePositive"] = 3] = "FalsePositive"; +})(DismissalType = exports.DismissalType || (exports.DismissalType = {})); +var ExpandOption; +(function (ExpandOption) { + /** + * No Expands. + */ + ExpandOption[ExpandOption["None"] = 0] = "None"; + /** + * Return validationFingerprints in Alert. + */ + ExpandOption[ExpandOption["ValidationFingerprint"] = 1] = "ValidationFingerprint"; +})(ExpandOption = exports.ExpandOption || (exports.ExpandOption = {})); +/** + * The type of change that occurred to the metadata. + */ +var MetadataChangeType; +(function (MetadataChangeType) { + MetadataChangeType[MetadataChangeType["None"] = 0] = "None"; + MetadataChangeType[MetadataChangeType["Created"] = 1] = "Created"; + MetadataChangeType[MetadataChangeType["Updated"] = 2] = "Updated"; + MetadataChangeType[MetadataChangeType["Deleted"] = 3] = "Deleted"; +})(MetadataChangeType = exports.MetadataChangeType || (exports.MetadataChangeType = {})); +/** + * The operation to be performed on the metadata. + */ +var MetadataOperation; +(function (MetadataOperation) { + MetadataOperation[MetadataOperation["Add"] = 0] = "Add"; + MetadataOperation[MetadataOperation["Remove"] = 1] = "Remove"; +})(MetadataOperation = exports.MetadataOperation || (exports.MetadataOperation = {})); +/** + * This enum defines the different result types. + */ +var ResultType; +(function (ResultType) { + /** + * The result was found from an unspecified analysis type + */ + ResultType[ResultType["Unknown"] = 0] = "Unknown"; + /** + * The result was found from dependency analysis + */ + ResultType[ResultType["Dependency"] = 1] = "Dependency"; + /** + * The result was found from static code analysis + */ + ResultType[ResultType["VersionControl"] = 2] = "VersionControl"; +})(ResultType = exports.ResultType || (exports.ResultType = {})); +var SarifJobStatus; +(function (SarifJobStatus) { + /** + * The job type when it is new + */ + SarifJobStatus[SarifJobStatus["New"] = 0] = "New"; + /** + * The job type when it is queued + */ + SarifJobStatus[SarifJobStatus["Queued"] = 1] = "Queued"; + /** + * The job type when it is completed + */ + SarifJobStatus[SarifJobStatus["Completed"] = 2] = "Completed"; + /** + * The job type when it fails + */ + SarifJobStatus[SarifJobStatus["Failed"] = 3] = "Failed"; +})(SarifJobStatus = exports.SarifJobStatus || (exports.SarifJobStatus = {})); +var Severity; +(function (Severity) { + Severity[Severity["Low"] = 0] = "Low"; + Severity[Severity["Medium"] = 1] = "Medium"; + Severity[Severity["High"] = 2] = "High"; + Severity[Severity["Critical"] = 3] = "Critical"; + Severity[Severity["Note"] = 4] = "Note"; + Severity[Severity["Warning"] = 5] = "Warning"; + Severity[Severity["Error"] = 6] = "Error"; +})(Severity = exports.Severity || (exports.Severity = {})); +var State; +(function (State) { + /** + * Alert is in an indeterminate state + */ + State[State["Unknown"] = 0] = "Unknown"; + /** + * Alert has been detected in the code + */ + State[State["Active"] = 1] = "Active"; + /** + * Alert was dismissed by a user + */ + State[State["Dismissed"] = 2] = "Dismissed"; + /** + * The issue is no longer detected in the code + */ + State[State["Fixed"] = 4] = "Fixed"; + /** + * The tool has determined that the issue is no longer a risk + */ + State[State["AutoDismissed"] = 8] = "AutoDismissed"; +})(State = exports.State || (exports.State = {})); +exports.TypeInfo = { + Alert: {}, + AlertAnalysisInstance: {}, + AlertMetadata: {}, + AlertMetadataChange: {}, + AlertStateUpdate: {}, + AlertType: { + enumValues: { + "unknown": 0, + "dependency": 1, + "secret": 2, + "code": 3 + } + }, + AnalysisConfiguration: {}, + AnalysisConfigurationType: { + enumValues: { + "default": 0, + "adoPipeline": 1 + } + }, + AnalysisInstance: {}, + AnalysisResult: {}, + Branch: {}, + ComponentType: { + enumValues: { + "unknown": 0, + "nuGet": 1, + "npm": 2, + "maven": 3, + "git": 4, + "other": 5, + "rubyGems": 6, + "cargo": 7, + "pip": 8, + "file": 9, + "go": 10, + "dockerImage": 11, + "pod": 12, + "linux": 13, + "conda": 14, + "dockerReference": 15, + "vcpkg": 16 + } + }, + Confidence: { + enumValues: { + "high": 0, + "other": 1 + } + }, + Dependency: {}, + DependencyResult: {}, + Dismissal: {}, + DismissalType: { + enumValues: { + "unknown": 0, + "fixed": 1, + "acceptedRisk": 2, + "falsePositive": 3 + } + }, + ExpandOption: { + enumValues: { + "none": 0, + "validationFingerprint": 1 + } + }, + Metadata: {}, + MetadataChange: {}, + MetadataChangeType: { + enumValues: { + "none": 0, + "created": 1, + "updated": 2, + "deleted": 3 + } + }, + MetadataOperation: { + enumValues: { + "add": 0, + "remove": 1 + } + }, + Result: {}, + ResultType: { + enumValues: { + "unknown": 0, + "dependency": 1, + "versionControl": 2 + } + }, + SarifJobStatus: { + enumValues: { + "new": 0, + "queued": 1, + "completed": 2, + "failed": 3 + } + }, + SarifUploadStatus: {}, + SearchCriteria: {}, + Severity: { + enumValues: { + "low": 0, + "medium": 1, + "high": 2, + "critical": 3, + "note": 4, + "warning": 5, + "error": 6 + } + }, + State: { + enumValues: { + "unknown": 0, + "active": 1, + "dismissed": 2, + "fixed": 4, + "autoDismissed": 8 + } + }, + UxFilters: {}, +}; +exports.TypeInfo.Alert.fields = { + alertType: { + enumType: exports.TypeInfo.AlertType + }, + confidence: { + enumType: exports.TypeInfo.Confidence + }, + dismissal: { + typeInfo: exports.TypeInfo.Dismissal + }, + firstSeenDate: { + isDate: true, + }, + fixedDate: { + isDate: true, + }, + introducedDate: { + isDate: true, + }, + lastSeenDate: { + isDate: true, + }, + severity: { + enumType: exports.TypeInfo.Severity + }, + state: { + enumType: exports.TypeInfo.State + } +}; +exports.TypeInfo.AlertAnalysisInstance.fields = { + analysisConfiguration: { + typeInfo: exports.TypeInfo.AnalysisConfiguration + }, + firstSeen: { + typeInfo: exports.TypeInfo.AnalysisInstance + }, + fixedIn: { + typeInfo: exports.TypeInfo.AnalysisInstance + }, + lastSeen: { + typeInfo: exports.TypeInfo.AnalysisInstance + }, + recentAnalysisInstance: { + typeInfo: exports.TypeInfo.AnalysisInstance + }, + state: { + enumType: exports.TypeInfo.State + } +}; +exports.TypeInfo.AlertMetadata.fields = { + metadata: { + isArray: true, + typeInfo: exports.TypeInfo.Metadata + } +}; +exports.TypeInfo.AlertMetadataChange.fields = { + metadataChange: { + typeInfo: exports.TypeInfo.MetadataChange + } +}; +exports.TypeInfo.AlertStateUpdate.fields = { + dismissedReason: { + enumType: exports.TypeInfo.DismissalType + }, + state: { + enumType: exports.TypeInfo.State + } +}; +exports.TypeInfo.AnalysisConfiguration.fields = { + analysisConfigurationType: { + enumType: exports.TypeInfo.AnalysisConfigurationType + } +}; +exports.TypeInfo.AnalysisInstance.fields = { + configuration: { + typeInfo: exports.TypeInfo.AnalysisConfiguration + }, + createdDate: { + isDate: true, + }, + results: { + isArray: true, + typeInfo: exports.TypeInfo.AnalysisResult + } +}; +exports.TypeInfo.AnalysisResult.fields = { + result: { + typeInfo: exports.TypeInfo.Result + }, + state: { + enumType: exports.TypeInfo.State + } +}; +exports.TypeInfo.Branch.fields = { + deletedDate: { + isDate: true, + } +}; +exports.TypeInfo.Dependency.fields = { + componentType: { + enumType: exports.TypeInfo.ComponentType + } +}; +exports.TypeInfo.DependencyResult.fields = { + dependency: { + typeInfo: exports.TypeInfo.Dependency + } +}; +exports.TypeInfo.Dismissal.fields = { + dismissalType: { + enumType: exports.TypeInfo.DismissalType + }, + requestedOn: { + isDate: true, + } +}; +exports.TypeInfo.Metadata.fields = { + op: { + enumType: exports.TypeInfo.MetadataOperation + } +}; +exports.TypeInfo.MetadataChange.fields = { + changeType: { + enumType: exports.TypeInfo.MetadataChangeType + } +}; +exports.TypeInfo.Result.fields = { + dependencyResult: { + typeInfo: exports.TypeInfo.DependencyResult + }, + resultType: { + enumType: exports.TypeInfo.ResultType + }, + severity: { + enumType: exports.TypeInfo.Severity + } +}; +exports.TypeInfo.SarifUploadStatus.fields = { + processingStatus: { + enumType: exports.TypeInfo.SarifJobStatus + } +}; +exports.TypeInfo.SearchCriteria.fields = { + alertType: { + enumType: exports.TypeInfo.AlertType + }, + confidenceLevels: { + isArray: true, + enumType: exports.TypeInfo.Confidence + }, + fromDate: { + isDate: true, + }, + modifiedSince: { + isDate: true, + }, + severities: { + isArray: true, + enumType: exports.TypeInfo.Severity + }, + states: { + isArray: true, + enumType: exports.TypeInfo.State + }, + toDate: { + isDate: true, + } +}; +exports.TypeInfo.UxFilters.fields = { + branches: { + isArray: true, + typeInfo: exports.TypeInfo.Branch + }, + confidenceLevels: { + isArray: true, + enumType: exports.TypeInfo.Confidence + }, + packages: { + isArray: true, + typeInfo: exports.TypeInfo.Dependency + }, + severities: { + isArray: true, + enumType: exports.TypeInfo.Severity + }, + states: { + isArray: true, + enumType: exports.TypeInfo.State + } +}; + + +/***/ }), + +/***/ 2167: +/***/ ((__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__(3047); +const TfsCoreInterfaces = __nccwpck_require__(3931); +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) { + /** + * Run git clean -fdx && git reset --hard or Tf /scorch on $(build.sourcesDirectory) + */ + RepositoryCleanOptions[RepositoryCleanOptions["Source"] = 0] = "Source"; + /** + * Run git clean -fdx && git reset --hard or Tf /scorch on $(build.sourcesDirectory), also re-create $(build.binariesDirectory) + */ + 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) { + /** + * Include all repositories + */ + ResultSet[ResultSet["All"] = 0] = "All"; + /** + * Include most relevant repositories for user + */ + ResultSet[ResultSet["Top"] = 1] = "Top"; +})(ResultSet = exports.ResultSet || (exports.ResultSet = {})); +var ScheduleDays; +(function (ScheduleDays) { + /** + * Do not run. + */ + ScheduleDays[ScheduleDays["None"] = 0] = "None"; + /** + * Run on Monday. + */ + ScheduleDays[ScheduleDays["Monday"] = 1] = "Monday"; + /** + * Run on Tuesday. + */ + ScheduleDays[ScheduleDays["Tuesday"] = 2] = "Tuesday"; + /** + * Run on Wednesday. + */ + ScheduleDays[ScheduleDays["Wednesday"] = 4] = "Wednesday"; + /** + * Run on Thursday. + */ + ScheduleDays[ScheduleDays["Thursday"] = 8] = "Thursday"; + /** + * Run on Friday. + */ + ScheduleDays[ScheduleDays["Friday"] = 16] = "Friday"; + /** + * Run on Saturday. + */ + ScheduleDays[ScheduleDays["Saturday"] = 32] = "Saturday"; + /** + * Run on Sunday. + */ + ScheduleDays[ScheduleDays["Sunday"] = 64] = "Sunday"; + /** + * Run on all days of the week. + */ + ScheduleDays[ScheduleDays["All"] = 127] = "All"; +})(ScheduleDays = exports.ScheduleDays || (exports.ScheduleDays = {})); +var ServiceHostStatus; +(function (ServiceHostStatus) { + /** + * The service host is currently connected and accepting commands. + */ + ServiceHostStatus[ServiceHostStatus["Online"] = 1] = "Online"; + /** + * The service host is currently disconnected and not accepting commands. + */ + ServiceHostStatus[ServiceHostStatus["Offline"] = 2] = "Offline"; +})(ServiceHostStatus = exports.ServiceHostStatus || (exports.ServiceHostStatus = {})); +var SourceProviderAvailability; +(function (SourceProviderAvailability) { + /** + * The source provider is available in the hosted environment. + */ + SourceProviderAvailability[SourceProviderAvailability["Hosted"] = 1] = "Hosted"; + /** + * The source provider is available in the on-premises environment. + */ + SourceProviderAvailability[SourceProviderAvailability["OnPremises"] = 2] = "OnPremises"; + /** + * The source provider is available in all environments. + */ + 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) { + /** + * The functionality is not supported. + */ + SupportLevel[SupportLevel["Unsupported"] = 0] = "Unsupported"; + /** + * The functionality is supported. + */ + SupportLevel[SupportLevel["Supported"] = 1] = "Supported"; + /** + * The functionality is required. + */ + 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) { + /** + * The path is mapped in the workspace. + */ + WorkspaceMappingType[WorkspaceMappingType["Map"] = 0] = "Map"; + /** + * The path is cloaked in the workspace. + */ + WorkspaceMappingType[WorkspaceMappingType["Cloak"] = 1] = "Cloak"; +})(WorkspaceMappingType = exports.WorkspaceMappingType || (exports.WorkspaceMappingType = {})); +exports.TypeInfo = { + AgentStatus: { + enumValues: { + "unavailable": 0, + "available": 1, + "offline": 2 + } + }, + AuditAction: { + enumValues: { + "add": 1, + "update": 2, + "delete": 3 + } + }, + 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 + } + }, + QueueOptions: { + enumValues: { + "none": 0, + "doNotRun": 1 + } + }, + QueuePriority: { + enumValues: { + "low": 5, + "belowNormal": 4, + "normal": 3, + "aboveNormal": 2, + "high": 1 + } + }, + RepositoryCleanOptions: { + enumValues: { + "source": 0, + "sourceAndOutputDir": 1, + "sourceDir": 2, + "allBuildDir": 3 + } + }, + RepositoryWebhook: {}, + ResultSet: { + enumValues: { + "all": 0, + "top": 1 + } + }, + RetentionLease: {}, + Schedule: {}, + ScheduleDays: { + enumValues: { + "none": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 4, + "thursday": 8, + "friday": 16, + "saturday": 32, + "sunday": 64, + "all": 127 + } + }, + ScheduleTrigger: {}, + ServiceHostStatus: { + enumValues: { + "online": 1, + "offline": 2 + } + }, + SourceProviderAttributes: {}, + SourceProviderAvailability: { + enumValues: { + "hosted": 1, + "onPremises": 2, + "all": 3 + } + }, + StageUpdateType: { + enumValues: { + "cancel": 0, + "retry": 1 + } + }, + SupportedTrigger: {}, + SupportLevel: { + enumValues: { + "unsupported": 0, + "supported": 1, + "required": 2 + } + }, + TaskResult: { + enumValues: { + "succeeded": 0, + "succeededWithIssues": 1, + "failed": 2, + "canceled": 3, + "skipped": 4, + "abandoned": 5 + } + }, + Timeline: {}, + TimelineRecord: {}, + TimelineRecordState: { + enumValues: { + "pending": 0, + "inProgress": 1, + "completed": 2 + } + }, + TimelineRecordsUpdatedEvent: {}, + UpdateStageParameters: {}, + ValidationResult: { + enumValues: { + "ok": 0, + "warning": 1, + "error": 2 + } + }, + WorkspaceMapping: {}, + WorkspaceMappingType: { + enumValues: { + "map": 0, + "cloak": 1 + } + }, + WorkspaceTemplate: {}, + XamlBuildDefinition: {}, +}; +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 + } +}; +exports.TypeInfo.BuildAgent.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.AgentStatus + }, + updatedDate: { + isDate: true, + } +}; +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 + } +}; +exports.TypeInfo.BuildCompletionTrigger.fields = { + definition: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.BuildController.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ControllerStatus + }, + updatedDate: { + isDate: true, + } +}; +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 + } +}; +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 + } +}; +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 + } +}; +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 + } +}; +exports.TypeInfo.BuildDefinitionRevision.fields = { + changedDate: { + isDate: true, + }, + changeType: { + enumType: exports.TypeInfo.AuditAction + } +}; +exports.TypeInfo.BuildDefinitionSourceProvider.fields = { + lastModified: { + isDate: true, + }, + 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, + }, + 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 + }, + templateType: { + enumType: exports.TypeInfo.ProcessTemplateType + } +}; +exports.TypeInfo.BuildQueuedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build + } +}; +exports.TypeInfo.BuildReference.fields = { + finishTime: { + isDate: true, + }, + queueTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.BuildResult + }, + startTime: { + isDate: true, + }, + 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: { + isDate: true, + } +}; +exports.TypeInfo.BuildServer.fields = { + status: { + enumType: exports.TypeInfo.ServiceHostStatus + }, + statusChangedDate: { + isDate: true, + } +}; +exports.TypeInfo.BuildSummary.fields = { + finishTime: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.BuildReason + }, + startTime: { + isDate: true, + }, + 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: { + isDate: true, + } +}; +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, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + type: { + enumType: exports.TypeInfo.DefinitionType + } +}; +exports.TypeInfo.DesignerProcess.fields = { + phases: { + isArray: true, + typeInfo: exports.TypeInfo.Phase + } +}; +exports.TypeInfo.Folder.fields = { + createdOn: { + isDate: true, + }, + lastChangedDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GatedCheckInTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.InformationNode.fields = { + lastModifiedDate: { + 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, + }, + validUntil: { + isDate: true, + } +}; +exports.TypeInfo.Schedule.fields = { + daysToBuild: { + enumType: exports.TypeInfo.ScheduleDays + } +}; +exports.TypeInfo.ScheduleTrigger.fields = { + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.Schedule + }, + 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 + }, + type: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +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.TimelineRecordsUpdatedEvent.fields = { + timelineRecords: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord + } +}; +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 + } +}; + + +/***/ }), + +/***/ 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"; + /** + * 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"; + /** + * 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 + } + }, + 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 + } +}; + + +/***/ }), + +/***/ 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 + } + }, + 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 + } +}; + + +/***/ }), + +/***/ 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 = {})); +/** + * None - Team member cannot edit dashboard Edit - Team member can add, configure and delete widgets Manage - Team member can add, reorder, delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations. + */ +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 = {})); +/** + * Read - User can see dashboards Create - User can create dashboards Edit - User can add, configure and delete widgets, and edit dashboard settings. Delete - User can delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations. + */ +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 + }, + lastAccessedDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + }, + 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 + }, + lastAccessedDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.DashboardGroupEntryResponse.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + lastAccessedDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.DashboardResponse.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + lastAccessedDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.Widget.fields = { + dashboard: { + typeInfo: exports.TypeInfo.Dashboard + } +}; +exports.TypeInfo.WidgetMetadata.fields = { + supportedScopes: { + isArray: true, + enumType: exports.TypeInfo.WidgetScope + } +}; +exports.TypeInfo.WidgetMetadataResponse.fields = { + widgetMetadata: { + typeInfo: exports.TypeInfo.WidgetMetadata + } +}; +exports.TypeInfo.WidgetResponse.fields = { + dashboard: { + typeInfo: exports.TypeInfo.Dashboard + } +}; +exports.TypeInfo.WidgetsVersionedList.fields = { + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.WidgetTypesResponse.fields = { + widgetTypes: { + isArray: true, + typeInfo: exports.TypeInfo.WidgetMetadata + } +}; + + +/***/ }), + +/***/ 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 + } + }, + 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 + } +}; + + +/***/ }), + +/***/ 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 + } + }, + 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) { + /** + * 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 = {})); +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 + } +}; +exports.TypeInfo.FileContainer.fields = { + dateCreated: { + isDate: true, + }, + options: { + enumType: exports.TypeInfo.ContainerOptions + } +}; +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 + } +}; + + +/***/ }), + +/***/ 8905: +/***/ ((__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"; + /** + * 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. + */ +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"; + /** + * This gives the bearer the rights to create new Publishers at the root of the namespace. + */ + PublisherPermissions[PublisherPermissions["CreatePublisher"] = 4] = "CreatePublisher"; + /** + * This gives the bearer the rights to create new Extensions within a publisher. + */ + PublisherPermissions[PublisherPermissions["PublishExtension"] = 8] = "PublishExtension"; + /** + * Admin gives the bearer the rights to manage restricted attributes of Publishers and Extensions. + */ + PublisherPermissions[PublisherPermissions["Admin"] = 16] = "Admin"; + /** + * TrustedPartner gives the bearer the rights to publish a extensions with restricted capabilities. + */ + PublisherPermissions[PublisherPermissions["TrustedPartner"] = 32] = "TrustedPartner"; + /** + * PrivateRead is another form of read designed to allow higher privilege accessors the ability to read private extensions. + */ + PublisherPermissions[PublisherPermissions["PrivateRead"] = 64] = "PrivateRead"; + /** + * This gives the bearer the rights to delete any extension. + */ + PublisherPermissions[PublisherPermissions["DeleteExtension"] = 128] = "DeleteExtension"; + /** + * This gives the bearer the rights edit the publisher settings. + */ + PublisherPermissions[PublisherPermissions["EditSettings"] = 256] = "EditSettings"; + /** + * This gives the bearer the rights to see all permissions on the publisher. + */ + PublisherPermissions[PublisherPermissions["ViewPermissions"] = 512] = "ViewPermissions"; + /** + * This gives the bearer the rights to assign permissions on the publisher. + */ + PublisherPermissions[PublisherPermissions["ManagePermissions"] = 1024] = "ManagePermissions"; + /** + * This gives the bearer the rights to delete the publisher. + */ + 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) { + /** + * None is used to retrieve only the basic publisher details. + */ + PublisherQueryFlags[PublisherQueryFlags["None"] = 0] = "None"; + /** + * Is used to include a list of basic extension details for all extensions published by the requested publisher. + */ + 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 PublisherRoleAccess; +(function (PublisherRoleAccess) { + /** + * Access has been explicitly set. + */ + PublisherRoleAccess[PublisherRoleAccess["Assigned"] = 1] = "Assigned"; + /** + * Access has been inherited from a higher scope. + */ + PublisherRoleAccess[PublisherRoleAccess["Inherited"] = 2] = "Inherited"; +})(PublisherRoleAccess = exports.PublisherRoleAccess || (exports.PublisherRoleAccess = {})); +var PublisherState; +(function (PublisherState) { + /** + * No state exists for this publisher. + */ + PublisherState[PublisherState["None"] = 0] = "None"; + /** + * 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. + */ + PublisherState[PublisherState["VerificationPending"] = 1] = "VerificationPending"; + /** + * 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. + */ + PublisherState[PublisherState["CertificationPending"] = 2] = "CertificationPending"; + /** + * 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. + */ + PublisherState[PublisherState["CertificationRejected"] = 4] = "CertificationRejected"; + /** + * 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. + */ + 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"; + /** + * The UserEditable flag indicates whether the item is editable by the logged in user. + */ + QnAItemStatus[QnAItemStatus["UserEditable"] = 1] = "UserEditable"; + /** + * The PublisherCreated flag indicates whether the item has been created by extension publisher. + */ + QnAItemStatus[QnAItemStatus["PublisherCreated"] = 2] = "PublisherCreated"; +})(QnAItemStatus = exports.QnAItemStatus || (exports.QnAItemStatus = {})); +/** + * The status of a REST Api response status. + */ +var RestApiResponseStatus; +(function (RestApiResponseStatus) { + /** + * The operation is completed. + */ + RestApiResponseStatus[RestApiResponseStatus["Completed"] = 0] = "Completed"; + /** + * The operation is failed. + */ + RestApiResponseStatus[RestApiResponseStatus["Failed"] = 1] = "Failed"; + /** + * The operation is in progress. + */ + RestApiResponseStatus[RestApiResponseStatus["Inprogress"] = 2] = "Inprogress"; + /** + * The operation is in skipped. + */ + 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) { + /** + * No filtering, all reviews are returned (default option) + */ + ReviewFilterOptions[ReviewFilterOptions["None"] = 0] = "None"; + /** + * Filter out review items with empty review text + */ + ReviewFilterOptions[ReviewFilterOptions["FilterEmptyReviews"] = 1] = "FilterEmptyReviews"; + /** + * Filter out review items with empty usernames + */ + ReviewFilterOptions[ReviewFilterOptions["FilterEmptyUserNames"] = 2] = "FilterEmptyUserNames"; +})(ReviewFilterOptions = exports.ReviewFilterOptions || (exports.ReviewFilterOptions = {})); +/** + * Denotes the patch operation type + */ +var ReviewPatchOperation; +(function (ReviewPatchOperation) { + /** + * Flag a review + */ + 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"; + /** + * Delete Publisher Reply + */ + 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) { + /** + * The results will be sorted by relevance in case search query is given, if no search query resutls will be provided as is + */ + SortByType[SortByType["Relevance"] = 0] = "Relevance"; + /** + * The results will be sorted as per Last Updated date of the extensions with recently updated at the top + */ + SortByType[SortByType["LastUpdatedDate"] = 1] = "LastUpdatedDate"; + /** + * Results will be sorted Alphabetically as per the title of the extension + */ + SortByType[SortByType["Title"] = 2] = "Title"; + /** + * Results will be sorted Alphabetically as per Publisher title + */ + SortByType[SortByType["Publisher"] = 3] = "Publisher"; + /** + * Results will be sorted by Install Count + */ + SortByType[SortByType["InstallCount"] = 4] = "InstallCount"; + /** + * The results will be sorted as per Published date of the extensions + */ + SortByType[SortByType["PublishedDate"] = 5] = "PublishedDate"; + /** + * The results will be sorted as per Average ratings of the extensions + */ + SortByType[SortByType["AverageRating"] = 6] = "AverageRating"; + /** + * The results will be sorted as per Trending Daily Score of the extensions + */ + SortByType[SortByType["TrendingDaily"] = 7] = "TrendingDaily"; + /** + * The results will be sorted as per Trending weekly Score of the extensions + */ + SortByType[SortByType["TrendingWeekly"] = 8] = "TrendingWeekly"; + /** + * The results will be sorted as per Trending monthly Score of the extensions + */ + SortByType[SortByType["TrendingMonthly"] = 9] = "TrendingMonthly"; + /** + * The results will be sorted as per ReleaseDate of the extensions (date on which the extension first went public) + */ + SortByType[SortByType["ReleaseDate"] = 10] = "ReleaseDate"; + /** + * 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 + */ + SortByType[SortByType["Author"] = 11] = "Author"; + /** + * The results will be sorted as per Weighted Rating of the extension. + */ + 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) { + /** + * 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. + */ + SortOrderType[SortOrderType["Default"] = 0] = "Default"; + /** + * The results will be sorted in Ascending order + */ + 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 + } +}; +exports.TypeInfo.PublisherFacts.fields = { + flags: { + enumType: exports.TypeInfo.PublisherFlags + } +}; +exports.TypeInfo.PublisherFilterResult.fields = { + publishers: { + isArray: true, + typeInfo: exports.TypeInfo.Publisher + } +}; +exports.TypeInfo.PublisherQuery.fields = { + filters: { + isArray: true, + typeInfo: exports.TypeInfo.QueryFilter + }, + flags: { + enumType: exports.TypeInfo.PublisherQueryFlags + } +}; +exports.TypeInfo.PublisherQueryResult.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.PublisherFilterResult + } +}; +exports.TypeInfo.PublisherRoleAssignment.fields = { + access: { + enumType: exports.TypeInfo.PublisherRoleAccess + } +}; +exports.TypeInfo.QnAItem.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.QueryFilter.fields = { + direction: { + enumType: exports.TypeInfo.PagingDirection + } +}; +exports.TypeInfo.Question.fields = { + createdDate: { + isDate: true, + }, + responses: { + isArray: true, + typeInfo: exports.TypeInfo.Response + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.QuestionsResult.fields = { + questions: { + isArray: true, + typeInfo: exports.TypeInfo.Question + } +}; +exports.TypeInfo.Response.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.RestApiResponseStatusModel.fields = { + status: { + enumType: exports.TypeInfo.RestApiResponseStatus + } +}; +exports.TypeInfo.Review.fields = { + adminReply: { + typeInfo: exports.TypeInfo.ReviewReply + }, + reply: { + typeInfo: exports.TypeInfo.ReviewReply + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.ReviewEventProperties.fields = { + eventOperation: { + enumType: exports.TypeInfo.ReviewEventOperation + }, + replyDate: { + isDate: true, + }, + resourceType: { + enumType: exports.TypeInfo.ReviewResourceType + }, + reviewDate: { + isDate: true, + } +}; +exports.TypeInfo.ReviewPatch.fields = { + operation: { + enumType: exports.TypeInfo.ReviewPatchOperation + }, + reportedConcern: { + typeInfo: exports.TypeInfo.UserReportedConcern + }, + reviewItem: { + typeInfo: exports.TypeInfo.Review + } +}; +exports.TypeInfo.ReviewReply.fields = { + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.ReviewsResult.fields = { + reviews: { + isArray: true, + typeInfo: exports.TypeInfo.Review + } +}; +exports.TypeInfo.UserExtensionPolicy.fields = { + permissions: { + typeInfo: exports.TypeInfo.ExtensionPolicy + } +}; +exports.TypeInfo.UserReportedConcern.fields = { + category: { + enumType: exports.TypeInfo.ConcernCategory + }, + submittedDate: { + isDate: true, + } +}; + + +/***/ }), + +/***/ 9803: +/***/ ((__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 PolicyInterfaces = __nccwpck_require__(8555); +const TfsCoreInterfaces = __nccwpck_require__(3931); +/** + * The status of a comment thread. + */ +var CommentThreadStatus; +(function (CommentThreadStatus) { + /** + * The thread status is unknown. + */ + CommentThreadStatus[CommentThreadStatus["Unknown"] = 0] = "Unknown"; + /** + * The thread status is active. + */ + CommentThreadStatus[CommentThreadStatus["Active"] = 1] = "Active"; + /** + * The thread status is resolved as fixed. + */ + CommentThreadStatus[CommentThreadStatus["Fixed"] = 2] = "Fixed"; + /** + * The thread status is resolved as won't fix. + */ + CommentThreadStatus[CommentThreadStatus["WontFix"] = 3] = "WontFix"; + /** + * The thread status is closed. + */ + CommentThreadStatus[CommentThreadStatus["Closed"] = 4] = "Closed"; + /** + * The thread status is resolved as by design. + */ + CommentThreadStatus[CommentThreadStatus["ByDesign"] = 5] = "ByDesign"; + /** + * The thread status is pending. + */ + CommentThreadStatus[CommentThreadStatus["Pending"] = 6] = "Pending"; +})(CommentThreadStatus = exports.CommentThreadStatus || (exports.CommentThreadStatus = {})); +/** + * The type of a comment. + */ +var CommentType; +(function (CommentType) { + /** + * The comment type is not known. + */ + 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 = {})); +/** + * Current status of the asynchronous operation. + */ +var GitAsyncOperationStatus; +(function (GitAsyncOperationStatus) { + /** + * The operation is waiting in a queue and has not yet started. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["Queued"] = 1] = "Queued"; + /** + * The operation is currently in progress. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["InProgress"] = 2] = "InProgress"; + /** + * The operation has completed. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["Completed"] = 3] = "Completed"; + /** + * The operation has failed. Check for an error message. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["Failed"] = 4] = "Failed"; + /** + * The operation has been abandoned. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["Abandoned"] = 5] = "Abandoned"; +})(GitAsyncOperationStatus = exports.GitAsyncOperationStatus || (exports.GitAsyncOperationStatus = {})); +var GitAsyncRefOperationFailureStatus; +(function (GitAsyncRefOperationFailureStatus) { + /** + * No status + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["None"] = 0] = "None"; + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["InvalidRefName"] = 1] = "InvalidRefName"; + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["RefNameConflict"] = 2] = "RefNameConflict"; + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["CreateBranchPermissionRequired"] = 3] = "CreateBranchPermissionRequired"; + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["WritePermissionRequired"] = 4] = "WritePermissionRequired"; + /** + * Target branch was deleted after Git async operation started + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["TargetBranchDeleted"] = 5] = "TargetBranchDeleted"; + /** + * Git object is too large to materialize into memory + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["GitObjectTooLarge"] = 6] = "GitObjectTooLarge"; + /** + * Identity who authorized the operation was not found + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["OperationIndentityNotFound"] = 7] = "OperationIndentityNotFound"; + /** + * Async operation was not found + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["AsyncOperationNotFound"] = 8] = "AsyncOperationNotFound"; + /** + * Unexpected failure + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["Other"] = 9] = "Other"; + /** + * Initiator of async operation has signature with empty name or email + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["EmptyCommitterSignature"] = 10] = "EmptyCommitterSignature"; +})(GitAsyncRefOperationFailureStatus = exports.GitAsyncRefOperationFailureStatus || (exports.GitAsyncRefOperationFailureStatus = {})); +/** + * The type of a merge conflict. + */ +var GitConflictType; +(function (GitConflictType) { + /** + * No conflict + */ + GitConflictType[GitConflictType["None"] = 0] = "None"; + /** + * Added on source and target; content differs + */ + GitConflictType[GitConflictType["AddAdd"] = 1] = "AddAdd"; + /** + * Added on source and rename destination on target + */ + GitConflictType[GitConflictType["AddRename"] = 2] = "AddRename"; + /** + * Deleted on source and edited on target + */ + 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 = {})); +/** + * Represents the possible outcomes from a request to update a pull request conflict + */ +var GitConflictUpdateStatus; +(function (GitConflictUpdateStatus) { + /** + * Indicates that pull request conflict update request was completed successfully + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["Succeeded"] = 0] = "Succeeded"; + /** + * Indicates that the update request did not fit the expected data contract + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["BadRequest"] = 1] = "BadRequest"; + /** + * Indicates that the requested resolution was not valid + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["InvalidResolution"] = 2] = "InvalidResolution"; + /** + * Indicates that the conflict in the update request was not a supported conflict type + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["UnsupportedConflictType"] = 3] = "UnsupportedConflictType"; + /** + * Indicates that the conflict could not be found + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["NotFound"] = 4] = "NotFound"; +})(GitConflictUpdateStatus = exports.GitConflictUpdateStatus || (exports.GitConflictUpdateStatus = {})); +/** + * Accepted types of version + */ +var GitHistoryMode; +(function (GitHistoryMode) { + /** + * The history mode used by `git log`. This is the default. + */ + GitHistoryMode[GitHistoryMode["SimplifiedHistory"] = 0] = "SimplifiedHistory"; + /** + * The history mode used by `git log --first-parent` + */ + GitHistoryMode[GitHistoryMode["FirstParent"] = 1] = "FirstParent"; + /** + * The history mode used by `git log --full-history` + */ + GitHistoryMode[GitHistoryMode["FullHistory"] = 2] = "FullHistory"; + /** + * The history mode used by `git log --full-history --simplify-merges` + */ + 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) { + /** + * A two-parent, no-fast-forward merge. The source branch is unchanged. This is the default behavior. + */ + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["NoFastForward"] = 1] = "NoFastForward"; + /** + * Put all changes from the pull request into a single-parent commit. + */ + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["Squash"] = 2] = "Squash"; + /** + * 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. + */ + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["Rebase"] = 3] = "Rebase"; + /** + * 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. + */ + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["RebaseMerge"] = 4] = "RebaseMerge"; +})(GitPullRequestMergeStrategy = exports.GitPullRequestMergeStrategy || (exports.GitPullRequestMergeStrategy = {})); +/** + * Accepted types of pull request queries. + */ +var GitPullRequestQueryType; +(function (GitPullRequestQueryType) { + /** + * No query type set. + */ + GitPullRequestQueryType[GitPullRequestQueryType["NotSet"] = 0] = "NotSet"; + /** + * Search for pull requests that created the supplied merge commits. + */ + 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 = {})); +/** + * 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) { + /** + * 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. + */ + GitRefUpdateMode[GitRefUpdateMode["BestEffort"] = 0] = "BestEffort"; + /** + * 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. + */ + 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) { + /** + * Indicates that the ref update request was completed successfully. + */ + GitRefUpdateStatus[GitRefUpdateStatus["Succeeded"] = 0] = "Succeeded"; + /** + * 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. + */ + GitRefUpdateStatus[GitRefUpdateStatus["ForcePushRequired"] = 1] = "ForcePushRequired"; + /** + * 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. + */ + GitRefUpdateStatus[GitRefUpdateStatus["StaleOldObjectId"] = 2] = "StaleOldObjectId"; + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + GitRefUpdateStatus[GitRefUpdateStatus["InvalidRefName"] = 3] = "InvalidRefName"; + /** + * The request was not processed + */ + GitRefUpdateStatus[GitRefUpdateStatus["Unprocessed"] = 4] = "Unprocessed"; + /** + * 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) + */ + GitRefUpdateStatus[GitRefUpdateStatus["UnresolvableToCommit"] = 5] = "UnresolvableToCommit"; + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + GitRefUpdateStatus[GitRefUpdateStatus["WritePermissionRequired"] = 6] = "WritePermissionRequired"; + /** + * The ref update request could not be completed because the user lacks note creation permissions required to write this note + */ + GitRefUpdateStatus[GitRefUpdateStatus["ManageNotePermissionRequired"] = 7] = "ManageNotePermissionRequired"; + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + 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) { + /** + * No error + */ + GitResolutionError[GitResolutionError["None"] = 0] = "None"; + /** + * User set a blob id for resolving a content merge, but blob was not found in repo during application + */ + GitResolutionError[GitResolutionError["MergeContentNotFound"] = 1] = "MergeContentNotFound"; + /** + * Attempted to resolve a conflict by moving a file to another path, but path was already in use + */ + GitResolutionError[GitResolutionError["PathInUse"] = 2] = "PathInUse"; + /** + * No error + */ + GitResolutionError[GitResolutionError["InvalidPath"] = 3] = "InvalidPath"; + /** + * GitResolutionAction was set to an unrecognized value + */ + GitResolutionError[GitResolutionError["UnknownAction"] = 4] = "UnknownAction"; + /** + * GitResolutionMergeType was set to an unrecognized value + */ + GitResolutionError[GitResolutionError["UnknownMergeType"] = 5] = "UnknownMergeType"; + /** + * Any error for which a more specific code doesn't apply + */ + 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) { + /** + * Status state not set. Default state. + */ + GitStatusState[GitStatusState["NotSet"] = 0] = "NotSet"; + /** + * Status pending. + */ + GitStatusState[GitStatusState["Pending"] = 1] = "Pending"; + /** + * Status succeeded. + */ + GitStatusState[GitStatusState["Succeeded"] = 2] = "Succeeded"; + /** + * Status failed. + */ + GitStatusState[GitStatusState["Failed"] = 3] = "Failed"; + /** + * Status with an error. + */ + GitStatusState[GitStatusState["Error"] = 4] = "Error"; + /** + * Status is not applicable to the target object. + */ + GitStatusState[GitStatusState["NotApplicable"] = 5] = "NotApplicable"; + /** + * Status Partially Succeeded, build finished with warnings. + */ + GitStatusState[GitStatusState["PartiallySucceeded"] = 6] = "PartiallySucceeded"; +})(GitStatusState = exports.GitStatusState || (exports.GitStatusState = {})); +/** + * Accepted types of version options + */ +var GitVersionOptions; +(function (GitVersionOptions) { + /** + * Not specified + */ + GitVersionOptions[GitVersionOptions["None"] = 0] = "None"; + /** + * Commit that changed item prior to the current version + */ + GitVersionOptions[GitVersionOptions["PreviousChange"] = 1] = "PreviousChange"; + /** + * First parent of commit (HEAD^) + */ + GitVersionOptions[GitVersionOptions["FirstParent"] = 2] = "FirstParent"; +})(GitVersionOptions = exports.GitVersionOptions || (exports.GitVersionOptions = {})); +/** + * Accepted types of version + */ +var GitVersionType; +(function (GitVersionType) { + /** + * Interpret the version as a branch name + */ + GitVersionType[GitVersionType["Branch"] = 0] = "Branch"; + /** + * Interpret the version as a tag name + */ + GitVersionType[GitVersionType["Tag"] = 1] = "Tag"; + /** + * Interpret the version as a commit ID (SHA1) + */ + 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) { + /** + * No change - both the blocks are identical + */ + LineDiffBlockChangeType[LineDiffBlockChangeType["None"] = 0] = "None"; + /** + * Lines were added to the block in the modified file + */ + LineDiffBlockChangeType[LineDiffBlockChangeType["Add"] = 1] = "Add"; + /** + * Lines were deleted from the block in the original file + */ + LineDiffBlockChangeType[LineDiffBlockChangeType["Delete"] = 2] = "Delete"; + /** + * Lines were modified + */ + LineDiffBlockChangeType[LineDiffBlockChangeType["Edit"] = 3] = "Edit"; +})(LineDiffBlockChangeType = exports.LineDiffBlockChangeType || (exports.LineDiffBlockChangeType = {})); +/** + * The status of a pull request merge. + */ +var PullRequestAsyncStatus; +(function (PullRequestAsyncStatus) { + /** + * Status is not set. Default state. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["NotSet"] = 0] = "NotSet"; + /** + * Pull request merge is queued. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["Queued"] = 1] = "Queued"; + /** + * Pull request merge failed due to conflicts. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["Conflicts"] = 2] = "Conflicts"; + /** + * Pull request merge succeeded. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["Succeeded"] = 3] = "Succeeded"; + /** + * Pull request merge rejected by policy. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["RejectedByPolicy"] = 4] = "RejectedByPolicy"; + /** + * Pull request merge failed. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["Failure"] = 5] = "Failure"; +})(PullRequestAsyncStatus = exports.PullRequestAsyncStatus || (exports.PullRequestAsyncStatus = {})); +/** + * The specific type of a pull request merge failure. + */ +var PullRequestMergeFailureType; +(function (PullRequestMergeFailureType) { + /** + * Type is not set. Default type. + */ + PullRequestMergeFailureType[PullRequestMergeFailureType["None"] = 0] = "None"; + /** + * Pull request merge failure type unknown. + */ + PullRequestMergeFailureType[PullRequestMergeFailureType["Unknown"] = 1] = "Unknown"; + /** + * Pull request merge failed due to case mismatch. + */ + PullRequestMergeFailureType[PullRequestMergeFailureType["CaseSensitive"] = 2] = "CaseSensitive"; + /** + * Pull request merge failed due to an object being too large. + */ + PullRequestMergeFailureType[PullRequestMergeFailureType["ObjectTooLarge"] = 3] = "ObjectTooLarge"; +})(PullRequestMergeFailureType = exports.PullRequestMergeFailureType || (exports.PullRequestMergeFailureType = {})); +/** + * Status of a pull request. + */ +var PullRequestStatus; +(function (PullRequestStatus) { + /** + * Status not set. Default state. + */ + PullRequestStatus[PullRequestStatus["NotSet"] = 0] = "NotSet"; + /** + * Pull request is active. + */ + PullRequestStatus[PullRequestStatus["Active"] = 1] = "Active"; + /** + * Pull request is abandoned. + */ + PullRequestStatus[PullRequestStatus["Abandoned"] = 2] = "Abandoned"; + /** + * Pull request is completed. + */ + PullRequestStatus[PullRequestStatus["Completed"] = 3] = "Completed"; + /** + * Used in pull request search criteria to include all statuses. + */ + PullRequestStatus[PullRequestStatus["All"] = 4] = "All"; +})(PullRequestStatus = exports.PullRequestStatus || (exports.PullRequestStatus = {})); +/** + * Specifies the desired type of time range for pull requests queries. + */ +var PullRequestTimeRangeType; +(function (PullRequestTimeRangeType) { + /** + * The date when the pull request was created. + */ + PullRequestTimeRangeType[PullRequestTimeRangeType["Created"] = 1] = "Created"; + /** + * The date when the pull request was closed (completed, abandoned, or merged externally). + */ + PullRequestTimeRangeType[PullRequestTimeRangeType["Closed"] = 2] = "Closed"; +})(PullRequestTimeRangeType = exports.PullRequestTimeRangeType || (exports.PullRequestTimeRangeType = {})); +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) { + /** + * 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 = { + AdvSecEnablementStatus: {}, + Attachment: {}, + BillableCommitterDetail: {}, + Change: {}, + ChangeList: {}, + Comment: {}, + CommentThread: {}, + CommentThreadStatus: { + enumValues: { + "unknown": 0, + "active": 1, + "fixed": 2, + "wontFix": 3, + "closed": 4, + "byDesign": 5, + "pending": 6 + } + }, + CommentType: { + enumValues: { + "unknown": 0, + "text": 1, + "codeChange": 2, + "system": 3 + } + }, + FileDiff: {}, + GitAnnotatedTag: {}, + GitAsyncOperationStatus: { + enumValues: { + "queued": 1, + "inProgress": 2, + "completed": 3, + "failed": 4, + "abandoned": 5 + } + }, + GitAsyncRefOperation: {}, + GitAsyncRefOperationDetail: {}, + GitAsyncRefOperationFailureStatus: { + enumValues: { + "none": 0, + "invalidRefName": 1, + "refNameConflict": 2, + "createBranchPermissionRequired": 3, + "writePermissionRequired": 4, + "targetBranchDeleted": 5, + "gitObjectTooLarge": 6, + "operationIndentityNotFound": 7, + "asyncOperationNotFound": 8, + "other": 9, + "emptyCommitterSignature": 10 + } + }, + 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: { + "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 + } + }, + GitConflictUpdateResult: {}, + GitConflictUpdateStatus: { + enumValues: { + "succeeded": 0, + "badRequest": 1, + "invalidResolution": 2, + "unsupportedConflictType": 3, + "notFound": 4 + } + }, + GitDeletedRepository: {}, + GitForkRef: {}, + GitForkSyncRequest: {}, + GitForkTeamProjectReference: {}, + GitHistoryMode: { + enumValues: { + "simplifiedHistory": 0, + "firstParent": 1, + "fullHistory": 2, + "fullHistorySimplifyMerges": 3 + } + }, + GitImportFailedEvent: {}, + GitImportRequest: {}, + GitImportSucceededEvent: {}, + GitItem: {}, + GitItemDescriptor: {}, + GitItemRequestData: {}, + GitLastChangeTreeItems: {}, + GitMerge: {}, + GitObject: {}, + GitObjectType: { + enumValues: { + "bad": 0, + "commit": 1, + "tree": 2, + "blob": 3, + "tag": 4, + "ext2": 5, + "ofsDelta": 6, + "refDelta": 7 + } + }, + GitPathAction: {}, + GitPathActions: { + enumValues: { + "none": 0, + "edit": 1, + "delete": 2, + "add": 3, + "rename": 4 + } + }, + GitPathToItemsCollection: {}, + GitPolicyConfigurationResponse: {}, + GitPullRequest: {}, + GitPullRequestChange: {}, + GitPullRequestCommentThread: {}, + GitPullRequestCompletionOptions: {}, + GitPullRequestIteration: {}, + GitPullRequestIterationChanges: {}, + GitPullRequestMergeStrategy: { + enumValues: { + "noFastForward": 1, + "squash": 2, + "rebase": 3, + "rebaseMerge": 4 + } + }, + GitPullRequestQuery: {}, + GitPullRequestQueryInput: {}, + GitPullRequestQueryType: { + enumValues: { + "notSet": 0, + "lastMergeCommit": 1, + "commit": 2 + } + }, + GitPullRequestReviewFileType: { + enumValues: { + "changeEntry": 0, + "attachment": 1 + } + }, + GitPullRequestSearchCriteria: {}, + GitPullRequestStatus: {}, + GitPush: {}, + GitPushEventData: {}, + GitPushRef: {}, + GitPushSearchCriteria: {}, + GitQueryBranchStatsCriteria: {}, + GitQueryCommitsCriteria: {}, + GitQueryRefsCriteria: {}, + GitRef: {}, + GitRefFavorite: {}, + GitRefSearchType: { + enumValues: { + "exact": 0, + "startsWith": 1, + "contains": 2 + } + }, + GitRefUpdateMode: { + enumValues: { + "bestEffort": 0, + "allOrNone": 1 + } + }, + GitRefUpdateResult: {}, + GitRefUpdateStatus: { + 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 + } + }, + GitRepository: {}, + GitRepositoryCreateOptions: {}, + GitRepositoryRef: {}, + GitResolutionError: { + enumValues: { + "none": 0, + "mergeContentNotFound": 1, + "pathInUse": 2, + "invalidPath": 3, + "unknownAction": 4, + "unknownMergeType": 5, + "otherError": 255 + } + }, + GitResolutionMergeContent: {}, + GitResolutionMergeType: { + enumValues: { + "undecided": 0, + "takeSourceContent": 1, + "takeTargetContent": 2, + "autoMerged": 3, + "userMerged": 4 + } + }, + GitResolutionPathConflict: {}, + GitResolutionPathConflictAction: { + enumValues: { + "undecided": 0, + "keepSourceRenameTarget": 1, + "keepSourceDeleteTarget": 2, + "keepTargetRenameSource": 3, + "keepTargetDeleteSource": 4 + } + }, + GitResolutionPickOneAction: {}, + GitResolutionRename1to2: {}, + GitResolutionRename1to2Action: { + enumValues: { + "undecided": 0, + "keepSourcePath": 1, + "keepTargetPath": 2, + "keepBothFiles": 3 + } + }, + GitResolutionStatus: { + enumValues: { + "unresolved": 0, + "partiallyResolved": 1, + "resolved": 2 + } + }, + GitResolutionWhichAction: { + enumValues: { + "undecided": 0, + "pickSourceAction": 1, + "pickTargetAction": 2 + } + }, + GitRevert: {}, + GitStatus: {}, + GitStatusState: { + enumValues: { + "notSet": 0, + "pending": 1, + "succeeded": 2, + "failed": 3, + "error": 4, + "notApplicable": 5, + "partiallySucceeded": 6 + } + }, + GitTargetVersionDescriptor: {}, + GitTreeDiff: {}, + GitTreeDiffEntry: {}, + GitTreeDiffResponse: {}, + GitTreeEntryRef: {}, + GitTreeRef: {}, + GitUserDate: {}, + GitVersionDescriptor: {}, + GitVersionOptions: { + enumValues: { + "none": 0, + "previousChange": 1, + "firstParent": 2 + } + }, + GitVersionType: { + enumValues: { + "branch": 0, + "tag": 1, + "commit": 2 + } + }, + HistoryEntry: {}, + IncludedGitCommit: {}, + ItemContent: {}, + ItemContentType: { + enumValues: { + "rawText": 0, + "base64Encoded": 1 + } + }, + ItemDetailsOptions: {}, + IterationReason: { + enumValues: { + "push": 0, + "forcePush": 1, + "create": 2, + "rebase": 4, + "unknown": 8, + "retarget": 16, + "resolveConflicts": 32 + } + }, + LineDiffBlock: {}, + LineDiffBlockChangeType: { + enumValues: { + "none": 0, + "add": 1, + "delete": 2, + "edit": 3 + } + }, + PullRequestAsyncStatus: { + enumValues: { + "notSet": 0, + "queued": 1, + "conflicts": 2, + "succeeded": 3, + "rejectedByPolicy": 4, + "failure": 5 + } + }, + PullRequestMergeFailureType: { + enumValues: { + "none": 0, + "unknown": 1, + "caseSensitive": 2, + "objectTooLarge": 3 + } + }, + PullRequestStatus: { + enumValues: { + "notSet": 0, + "active": 1, + "abandoned": 2, + "completed": 3, + "all": 4 + } + }, + PullRequestTimeRangeType: { + enumValues: { + "created": 1, + "closed": 2 + } + }, + RefFavoriteType: { + enumValues: { + "invalid": 0, + "folder": 1, + "ref": 2 + } + }, + SupportedIde: {}, + SupportedIdeType: { + 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 + } + }, + TfvcBranch: {}, + TfvcBranchRef: {}, + TfvcChange: {}, + TfvcChangeset: {}, + TfvcChangesetRef: {}, + TfvcCheckinEventData: {}, + TfvcHistoryEntry: {}, + TfvcItem: {}, + TfvcItemDescriptor: {}, + TfvcItemPreviousHash: {}, + 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 + } + }, + 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 + } + }, + VersionControlProjectInfo: {}, + VersionControlRecursionType: { + enumValues: { + "none": 0, + "oneLevel": 1, + "oneLevelPlusNestedEmptyFolders": 4, + "full": 120 + } + }, +}; +exports.TypeInfo.AdvSecEnablementStatus.fields = { + changedOnDate: { + isDate: true, + } +}; +exports.TypeInfo.Attachment.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.BillableCommitterDetail.fields = { + commitTime: { + isDate: true, + }, + pushedTime: { + isDate: true, + } +}; +exports.TypeInfo.Change.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.ChangeList.fields = { + changeCounts: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.VersionControlChangeType, + }, + creationDate: { + isDate: true, + }, + sortDate: { + isDate: true, + } +}; +exports.TypeInfo.Comment.fields = { + commentType: { + enumType: exports.TypeInfo.CommentType + }, + lastContentUpdatedDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + publishedDate: { + isDate: true, + } +}; +exports.TypeInfo.CommentThread.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment + }, + lastUpdatedDate: { + isDate: true, + }, + publishedDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.CommentThreadStatus + } +}; +exports.TypeInfo.FileDiff.fields = { + lineDiffBlocks: { + isArray: true, + typeInfo: exports.TypeInfo.LineDiffBlock + } +}; +exports.TypeInfo.GitAnnotatedTag.fields = { + taggedBy: { + typeInfo: exports.TypeInfo.GitUserDate + }, + taggedObject: { + typeInfo: exports.TypeInfo.GitObject + } +}; +exports.TypeInfo.GitAsyncRefOperation.fields = { + detailedStatus: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail + }, + parameters: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitAsyncRefOperationDetail.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncRefOperationFailureStatus + } +}; +exports.TypeInfo.GitAsyncRefOperationParameters.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository + }, + source: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationSource + } +}; +exports.TypeInfo.GitAsyncRefOperationSource.fields = { + commitList: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + } +}; +exports.TypeInfo.GitBaseVersionDescriptor.fields = { + baseVersionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + baseVersionType: { + enumType: exports.TypeInfo.GitVersionType + }, + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType + } +}; +exports.TypeInfo.GitBranchStats.fields = { + commit: { + typeInfo: exports.TypeInfo.GitCommitRef + } +}; +exports.TypeInfo.GitChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.GitCherryPick.fields = { + detailedStatus: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail + }, + parameters: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +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.GitCommitChanges.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.GitChange + } +}; +exports.TypeInfo.GitCommitDiffs.fields = { + changeCounts: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.VersionControlChangeType, + }, + changes: { + isArray: true, + typeInfo: exports.TypeInfo.GitChange + } +}; +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.GitCommitToCreate.fields = { + baseRef: { + typeInfo: exports.TypeInfo.GitRef + }, + pathActions: { + isArray: true, + typeInfo: exports.TypeInfo.GitPathAction + } +}; +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: { + 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 + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + 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 + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + 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 + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + 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: { + 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, + }, + sourceTree: { + typeInfo: exports.TypeInfo.GitTreeRef + } +}; +exports.TypeInfo.GitConflictEditDelete.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: { + isDate: true, + } +}; +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 + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictFileDirectory.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, + }, + targetTree: { + typeInfo: exports.TypeInfo.GitTreeRef + } +}; +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.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 + }, + resolvedDate: { + isDate: true, + } +}; +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 + }, + resolvedDate: { + isDate: true, + } +}; +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 + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictRenameRename.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 + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictUpdateResult.fields = { + updatedConflict: { + typeInfo: exports.TypeInfo.GitConflict + }, + updateStatus: { + enumType: exports.TypeInfo.GitConflictUpdateStatus + } +}; +exports.TypeInfo.GitDeletedRepository.fields = { + createdDate: { + isDate: true, + }, + deletedDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GitForkRef.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository + }, + statuses: { + isArray: true, + typeInfo: exports.TypeInfo.GitStatus + } +}; +exports.TypeInfo.GitForkSyncRequest.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitForkTeamProjectReference.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: TfsCoreInterfaces.TypeInfo.ProjectVisibility + } +}; +exports.TypeInfo.GitImportFailedEvent.fields = { + targetRepository: { + typeInfo: exports.TypeInfo.GitRepository + } +}; +exports.TypeInfo.GitImportRequest.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitImportSucceededEvent.fields = { + targetRepository: { + typeInfo: exports.TypeInfo.GitRepository + } +}; +exports.TypeInfo.GitItem.fields = { + gitObjectType: { + enumType: exports.TypeInfo.GitObjectType + }, + latestProcessedChange: { + typeInfo: exports.TypeInfo.GitCommitRef + } +}; +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.GitMerge.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitObject.fields = { + objectType: { + enumType: exports.TypeInfo.GitObjectType + } +}; +exports.TypeInfo.GitPathAction.fields = { + action: { + enumType: exports.TypeInfo.GitPathActions + } +}; +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, + }, + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + }, + completionOptions: { + typeInfo: exports.TypeInfo.GitPullRequestCompletionOptions + }, + completionQueueTime: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + 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.GitPullRequestChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.GitPullRequestCommentThread.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment + }, + lastUpdatedDate: { + isDate: true, + }, + publishedDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.CommentThreadStatus + } +}; +exports.TypeInfo.GitPullRequestCompletionOptions.fields = { + mergeStrategy: { + enumType: exports.TypeInfo.GitPullRequestMergeStrategy + } +}; +exports.TypeInfo.GitPullRequestIteration.fields = { + changeList: { + isArray: true, + typeInfo: exports.TypeInfo.GitPullRequestChange + }, + commits: { + isArray: true, + 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.GitPullRequestIterationChanges.fields = { + changeEntries: { + isArray: true, + typeInfo: exports.TypeInfo.GitPullRequestChange + } +}; +exports.TypeInfo.GitPullRequestQuery.fields = { + queries: { + isArray: true, + typeInfo: exports.TypeInfo.GitPullRequestQueryInput + }, +}; +exports.TypeInfo.GitPullRequestQueryInput.fields = { + type: { + enumType: exports.TypeInfo.GitPullRequestQueryType + } +}; +exports.TypeInfo.GitPullRequestSearchCriteria.fields = { + maxTime: { + isDate: true, + }, + minTime: { + isDate: true, + }, + queryTimeRangeType: { + enumType: exports.TypeInfo.PullRequestTimeRangeType + }, + status: { + enumType: exports.TypeInfo.PullRequestStatus + } +}; +exports.TypeInfo.GitPullRequestStatus.fields = { + creationDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.GitStatusState + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitPush.fields = { + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + }, + date: { + isDate: true, + }, + repository: { + typeInfo: exports.TypeInfo.GitRepository + } +}; +exports.TypeInfo.GitPushEventData.fields = { + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommit + }, + repository: { + typeInfo: exports.TypeInfo.GitRepository + } +}; +exports.TypeInfo.GitPushRef.fields = { + date: { + isDate: true, + } +}; +exports.TypeInfo.GitPushSearchCriteria.fields = { + fromDate: { + isDate: true, + }, + toDate: { + isDate: true, + } +}; +exports.TypeInfo.GitQueryBranchStatsCriteria.fields = { + baseCommit: { + typeInfo: exports.TypeInfo.GitVersionDescriptor + }, + targetCommits: { + isArray: true, + typeInfo: exports.TypeInfo.GitVersionDescriptor + } +}; +exports.TypeInfo.GitQueryCommitsCriteria.fields = { + compareVersion: { + typeInfo: exports.TypeInfo.GitVersionDescriptor + }, + historyMode: { + enumType: exports.TypeInfo.GitHistoryMode + }, + itemVersion: { + typeInfo: exports.TypeInfo.GitVersionDescriptor + } +}; +exports.TypeInfo.GitQueryRefsCriteria.fields = { + searchType: { + enumType: exports.TypeInfo.GitRefSearchType + } +}; +exports.TypeInfo.GitRef.fields = { + statuses: { + 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 + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GitRepositoryCreateOptions.fields = { + parentRepository: { + typeInfo: exports.TypeInfo.GitRepositoryRef + }, + 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 + } +}; +exports.TypeInfo.GitResolutionPickOneAction.fields = { + action: { + enumType: exports.TypeInfo.GitResolutionWhichAction + } +}; +exports.TypeInfo.GitResolutionRename1to2.fields = { + action: { + enumType: exports.TypeInfo.GitResolutionRename1to2Action + }, + mergeType: { + enumType: exports.TypeInfo.GitResolutionMergeType + } +}; +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, + }, + state: { + enumType: exports.TypeInfo.GitStatusState + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitTargetVersionDescriptor.fields = { + targetVersionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + targetVersionType: { + enumType: exports.TypeInfo.GitVersionType + }, + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType + } +}; +exports.TypeInfo.GitTreeDiff.fields = { + diffEntries: { + isArray: true, + typeInfo: exports.TypeInfo.GitTreeDiffEntry + } +}; +exports.TypeInfo.GitTreeDiffEntry.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + 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.GitTreeEntryRef + } +}; +exports.TypeInfo.GitUserDate.fields = { + date: { + 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: { + isDate: true, + } +}; +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.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.TfvcCheckinEventData.fields = { + changeset: { + typeInfo: exports.TypeInfo.TfvcChangeset + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +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 + }, + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption + }, + versionType: { + enumType: exports.TypeInfo.TfvcVersionType + } +}; +exports.TypeInfo.TfvcItemPreviousHash.fields = { + changeDate: { + isDate: true, + } +}; +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.UpdateRefsRequest.fields = { + updateMode: { + enumType: exports.TypeInfo.GitRefUpdateMode + } +}; +exports.TypeInfo.VersionControlProjectInfo.fields = { + defaultSourceControlType: { + enumType: TfsCoreInterfaces.TypeInfo.SourceControlTypes + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; + + +/***/ }), + +/***/ 3215: +/***/ ((__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 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 = {})); +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: { + enumValues: { + "assigned": 0, + "active": 1, + "moving": 2 + } + }, +}; +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 + }, + status: { + enumType: exports.TypeInfo.ServiceStatus + } +}; + + +/***/ }), + +/***/ 1012: +/***/ ((__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 BillingMode; +(function (BillingMode) { + /** + * None implies the organization is not billable because no Azure Subscription has been set. + */ + BillingMode[BillingMode["None"] = 0] = "None"; + /** + * When an organization is the only organization mapped to an Azure Subscription. + */ + BillingMode[BillingMode["SingleOrg"] = 1] = "SingleOrg"; + /** + * When an organization is mapped to an Azure Subscription to which at least one other org is mapped. + */ + BillingMode[BillingMode["MultiOrg"] = 2] = "MultiOrg"; +})(BillingMode = exports.BillingMode || (exports.BillingMode = {})); +exports.TypeInfo = { + AdvSecEnablementSettings: {}, + AdvSecEnablementStatus: {}, + BillableCommitterDetails: {}, + BillingInfo: {}, + BillingMode: { + enumValues: { + "none": 0, + "singleOrg": 1, + "multiOrg": 2 + } + }, + MeterUsage: {}, +}; +exports.TypeInfo.AdvSecEnablementSettings.fields = { + reposEnablementStatus: { + isArray: true, + typeInfo: exports.TypeInfo.AdvSecEnablementStatus + } +}; +exports.TypeInfo.AdvSecEnablementStatus.fields = { + advSecEnablementLastChangedDate: { + isDate: true, + } +}; +exports.TypeInfo.BillableCommitterDetails.fields = { + commitTime: { + isDate: true, + }, + pushedTime: { + isDate: true, + } +}; +exports.TypeInfo.BillingInfo.fields = { + advSecEnabledChangedOnDate: { + isDate: true, + }, + advSecEnabledFirstChangedOnDate: { + isDate: true, + }, + billingMode: { + enumType: exports.TypeInfo.BillingMode + } +}; +exports.TypeInfo.MeterUsage.fields = { + billingDate: { + isDate: true, + } +}; + + +/***/ }), + +/***/ 269: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Default delivery preference for group subscribers. Indicates how the subscriber should be notified. + */ +var DefaultGroupDeliveryPreference; +(function (DefaultGroupDeliveryPreference) { + /** + * Do not send notifications by default. Note: notifications can still be delivered to subscribers, for example via a custom subscription. + */ + DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["NoDelivery"] = -1] = "NoDelivery"; + /** + * Deliver notifications to each member of the group representing the subscriber. Only applicable when the subscriber is a group. + */ + 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"; + /** + * The operation was cancelled by the user. + */ + EvaluationOperationStatus[EvaluationOperationStatus["Cancelled"] = 3] = "Cancelled"; + /** + * The operation completed successfully. + */ + EvaluationOperationStatus[EvaluationOperationStatus["Succeeded"] = 4] = "Succeeded"; + /** + * The operation completed with a failure. + */ + EvaluationOperationStatus[EvaluationOperationStatus["Failed"] = 5] = "Failed"; + /** + * The operation timed out. + */ + EvaluationOperationStatus[EvaluationOperationStatus["TimedOut"] = 6] = "TimedOut"; + /** + * The operation could not be found. + */ + 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"; + /** + * Include event types from the remote services too + */ + 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"; + /** + * IncludeFields will include all fields and their types + */ + 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) { + /** + * Do not send notifications by default. Note: notifications can still be delivered to this subscriber, for example via a custom subscription. + */ + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["NoDelivery"] = -1] = "NoDelivery"; + /** + * Deliver notifications to the subscriber's preferred email address. + */ + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["PreferredEmailAddress"] = 1] = "PreferredEmailAddress"; + /** + * Deliver notifications to each member of the group representing the subscriber. Only applicable when the subscriber is a group. + */ + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["EachMember"] = 2] = "EachMember"; + /** + * Use default + */ + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["UseDefault"] = 3] = "UseDefault"; +})(NotificationSubscriberDeliveryPreference = exports.NotificationSubscriberDeliveryPreference || (exports.NotificationSubscriberDeliveryPreference = {})); +var SubscriberFlags; +(function (SubscriberFlags) { + SubscriberFlags[SubscriberFlags["None"] = 0] = "None"; + /** + * Subscriber's delivery preferences could be updated + */ + SubscriberFlags[SubscriberFlags["DeliveryPreferencesEditable"] = 2] = "DeliveryPreferencesEditable"; + /** + * Subscriber's delivery preferences supports email delivery + */ + SubscriberFlags[SubscriberFlags["SupportsPreferredEmailAddressDelivery"] = 4] = "SupportsPreferredEmailAddressDelivery"; + /** + * Subscriber's delivery preferences supports individual members delivery(group expansion) + */ + SubscriberFlags[SubscriberFlags["SupportsEachMemberDelivery"] = 8] = "SupportsEachMemberDelivery"; + /** + * Subscriber's delivery preferences supports no delivery + */ + SubscriberFlags[SubscriberFlags["SupportsNoDelivery"] = 16] = "SupportsNoDelivery"; + /** + * Subscriber is a user + */ + SubscriberFlags[SubscriberFlags["IsUser"] = 32] = "IsUser"; + /** + * Subscriber is a group + */ + 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 = {})); +/** + * Read-only indicators that further describe the subscription. + */ +var SubscriptionFlags; +(function (SubscriptionFlags) { + /** + * None + */ + SubscriptionFlags[SubscriptionFlags["None"] = 0] = "None"; + /** + * Subscription's subscriber is a group, not a user + */ + SubscriptionFlags[SubscriptionFlags["GroupSubscription"] = 1] = "GroupSubscription"; + /** + * Subscription is contributed and not persisted. This means certain fields of the subscription, like Filter, are read-only. + */ + SubscriptionFlags[SubscriptionFlags["ContributedSubscription"] = 2] = "ContributedSubscription"; + /** + * A user that is member of the subscription's subscriber group can opt in/out of the subscription. + */ + SubscriptionFlags[SubscriptionFlags["CanOptOut"] = 4] = "CanOptOut"; + /** + * If the subscriber is a group, is it a team. + */ + SubscriptionFlags[SubscriptionFlags["TeamSubscription"] = 8] = "TeamSubscription"; + /** + * For role based subscriptions, there is an expectation that there will always be at least one actor that matches + */ + SubscriptionFlags[SubscriptionFlags["OneActorMatches"] = 16] = "OneActorMatches"; +})(SubscriptionFlags = exports.SubscriptionFlags || (exports.SubscriptionFlags = {})); +/** + * The permissions that a user has to a certain subscription + */ +var SubscriptionPermissions; +(function (SubscriptionPermissions) { + /** + * None + */ + SubscriptionPermissions[SubscriptionPermissions["None"] = 0] = "None"; + /** + * full view of description, filters, etc. Not limited. + */ + SubscriptionPermissions[SubscriptionPermissions["View"] = 1] = "View"; + /** + * update subscription + */ + SubscriptionPermissions[SubscriptionPermissions["Edit"] = 2] = "Edit"; + /** + * delete subscription + */ + 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"; + /** + * Include subscriptions with invalid subscribers. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeInvalidSubscriptions"] = 2] = "IncludeInvalidSubscriptions"; + /** + * Include subscriptions marked for deletion. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeDeletedSubscriptions"] = 4] = "IncludeDeletedSubscriptions"; + /** + * Include the full filter details with each subscription. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeFilterDetails"] = 8] = "IncludeFilterDetails"; + /** + * For a subscription the caller does not have permission to view, return basic (non-confidential) information. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["AlwaysReturnBasicInformation"] = 16] = "AlwaysReturnBasicInformation"; + /** + * Include system subscriptions. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeSystemSubscriptions"] = 32] = "IncludeSystemSubscriptions"; +})(SubscriptionQueryFlags = exports.SubscriptionQueryFlags || (exports.SubscriptionQueryFlags = {})); +/** + * 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 SubscriptionStatus; +(function (SubscriptionStatus) { + /** + * Subscription is disabled because it generated a high volume of notifications. + */ + SubscriptionStatus[SubscriptionStatus["JailedByNotificationsVolume"] = -200] = "JailedByNotificationsVolume"; + /** + * Subscription is disabled and will be deleted. + */ + SubscriptionStatus[SubscriptionStatus["PendingDeletion"] = -100] = "PendingDeletion"; + /** + * Subscription is disabled because of an Argument Exception while processing the subscription + */ + SubscriptionStatus[SubscriptionStatus["DisabledArgumentException"] = -12] = "DisabledArgumentException"; + /** + * Subscription is disabled because the project is invalid + */ + SubscriptionStatus[SubscriptionStatus["DisabledProjectInvalid"] = -11] = "DisabledProjectInvalid"; + /** + * Subscription is disabled because the identity does not have the appropriate permissions + */ + SubscriptionStatus[SubscriptionStatus["DisabledMissingPermissions"] = -10] = "DisabledMissingPermissions"; + /** + * Subscription is disabled service due to failures. + */ + SubscriptionStatus[SubscriptionStatus["DisabledFromProbation"] = -9] = "DisabledFromProbation"; + /** + * Subscription is disabled because the identity is no longer active + */ + SubscriptionStatus[SubscriptionStatus["DisabledInactiveIdentity"] = -8] = "DisabledInactiveIdentity"; + /** + * Subscription is disabled because message queue is not supported. + */ + SubscriptionStatus[SubscriptionStatus["DisabledMessageQueueNotSupported"] = -7] = "DisabledMessageQueueNotSupported"; + /** + * Subscription is disabled because its subscriber is unknown. + */ + SubscriptionStatus[SubscriptionStatus["DisabledMissingIdentity"] = -6] = "DisabledMissingIdentity"; + /** + * Subscription is disabled because it has an invalid role expression. + */ + SubscriptionStatus[SubscriptionStatus["DisabledInvalidRoleExpression"] = -5] = "DisabledInvalidRoleExpression"; + /** + * Subscription is disabled because it has an invalid filter expression. + */ + SubscriptionStatus[SubscriptionStatus["DisabledInvalidPathClause"] = -4] = "DisabledInvalidPathClause"; + /** + * Subscription is disabled because it is a duplicate of a default subscription. + */ + SubscriptionStatus[SubscriptionStatus["DisabledAsDuplicateOfDefault"] = -3] = "DisabledAsDuplicateOfDefault"; + /** + * Subscription is disabled by an administrator, not the subscription's subscriber. + */ + 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 = {})); +/** + * Set of flags used to determine which set of templates is retrieved when querying for subscription templates + */ +var SubscriptionTemplateQueryFlags; +(function (SubscriptionTemplateQueryFlags) { + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["None"] = 0] = "None"; + /** + * Include user templates + */ + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUser"] = 1] = "IncludeUser"; + /** + * Include group templates + */ + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeGroup"] = 2] = "IncludeGroup"; + /** + * Include user and group templates + */ + 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 = { + ActorNotificationReason: {}, + BatchNotificationOperation: {}, + DefaultGroupDeliveryPreference: { + enumValues: { + "noDelivery": -1, + "eachMember": 2 + } + }, + EvaluationOperationStatus: { + enumValues: { + "notSet": 0, + "queued": 1, + "inProgress": 2, + "cancelled": 3, + "succeeded": 4, + "failed": 5, + "timedOut": 6, + "notFound": 7 + } + }, + EventBacklogStatus: {}, + EventProcessingLog: {}, + EventPublisherQueryFlags: { + enumValues: { + "none": 0, + "includeRemoteServices": 2 + } + }, + EventTypeQueryFlags: { + enumValues: { + "none": 0, + "includeFields": 1 + } + }, + INotificationDiagnosticLog: {}, + NotificationAdminSettings: {}, + NotificationAdminSettingsUpdateParameters: {}, + NotificationBacklogStatus: {}, + NotificationDeliveryLog: {}, + NotificationDiagnosticLog: {}, + NotificationEventBacklogStatus: {}, + NotificationEventField: {}, + NotificationEventFieldType: {}, + NotificationEventType: {}, + NotificationJobDiagnosticLog: {}, + NotificationOperation: { + enumValues: { + "none": 0, + "suspendUnprocessed": 1 + } + }, + NotificationReason: {}, + NotificationReasonType: { + 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 + } + }, + NotificationStatistic: {}, + NotificationStatisticsQuery: {}, + NotificationStatisticsQueryConditions: {}, + NotificationStatisticType: { + 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 + } + }, + NotificationSubscriber: {}, + NotificationSubscriberDeliveryPreference: { + enumValues: { + "noDelivery": -1, + "preferredEmailAddress": 1, + "eachMember": 2, + "useDefault": 3 + } + }, + NotificationSubscriberUpdateParameters: {}, + NotificationSubscription: {}, + NotificationSubscriptionTemplate: {}, + NotificationSubscriptionUpdateParameters: {}, + SubscriberFlags: { + enumValues: { + "none": 0, + "deliveryPreferencesEditable": 2, + "supportsPreferredEmailAddressDelivery": 4, + "supportsEachMemberDelivery": 8, + "supportsNoDelivery": 16, + "isUser": 32, + "isGroup": 64, + "isTeam": 128 + } + }, + SubscriptionDiagnostics: {}, + SubscriptionEvaluationRequest: {}, + SubscriptionEvaluationResult: {}, + SubscriptionFieldType: { + 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 + } + }, + SubscriptionFlags: { + enumValues: { + "none": 0, + "groupSubscription": 1, + "contributedSubscription": 2, + "canOptOut": 4, + "teamSubscription": 8, + "oneActorMatches": 16 + } + }, + SubscriptionPermissions: { + enumValues: { + "none": 0, + "view": 1, + "edit": 2, + "delete": 4 + } + }, + SubscriptionQuery: {}, + SubscriptionQueryCondition: {}, + SubscriptionQueryFlags: { + enumValues: { + "none": 0, + "includeInvalidSubscriptions": 2, + "includeDeletedSubscriptions": 4, + "includeFilterDetails": 8, + "alwaysReturnBasicInformation": 16, + "includeSystemSubscriptions": 32 + } + }, + SubscriptionStatus: { + 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 + } + }, + SubscriptionTemplateQueryFlags: { + enumValues: { + "none": 0, + "includeUser": 1, + "includeGroup": 2, + "includeUserAndGroup": 4, + "includeEventTypeInformation": 22 + } + }, + SubscriptionTemplateType: { + enumValues: { + "user": 0, + "team": 1, + "both": 2, + "none": 3 + } + }, + SubscriptionTraceDiagnosticLog: {}, + SubscriptionTraceEventProcessingLog: {}, + SubscriptionTraceNotificationDeliveryLog: {}, + SubscriptionTracing: {}, +}; +exports.TypeInfo.ActorNotificationReason.fields = { + notificationReasonType: { + enumType: exports.TypeInfo.NotificationReasonType + } +}; +exports.TypeInfo.BatchNotificationOperation.fields = { + notificationOperation: { + enumType: exports.TypeInfo.NotificationOperation + } +}; +exports.TypeInfo.EventBacklogStatus.fields = { + captureTime: { + isDate: true, + }, + lastEventBatchStartTime: { + isDate: true, + }, + lastEventProcessedTime: { + isDate: true, + }, + lastJobBatchStartTime: { + isDate: true, + }, + lastJobProcessedTime: { + isDate: true, + }, + oldestPendingEventTime: { + isDate: true, + } +}; +exports.TypeInfo.EventProcessingLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.INotificationDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationAdminSettings.fields = { + defaultGroupDeliveryPreference: { + enumType: exports.TypeInfo.DefaultGroupDeliveryPreference + } +}; +exports.TypeInfo.NotificationAdminSettingsUpdateParameters.fields = { + defaultGroupDeliveryPreference: { + enumType: exports.TypeInfo.DefaultGroupDeliveryPreference + } +}; +exports.TypeInfo.NotificationBacklogStatus.fields = { + captureTime: { + isDate: true, + }, + lastJobBatchStartTime: { + isDate: true, + }, + lastJobProcessedTime: { + isDate: true, + }, + lastNotificationBatchStartTime: { + isDate: true, + }, + lastNotificationProcessedTime: { + isDate: true, + }, + oldestPendingNotificationTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationDeliveryLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationEventBacklogStatus.fields = { + eventBacklogStatus: { + isArray: true, + typeInfo: exports.TypeInfo.EventBacklogStatus + }, + notificationBacklogStatus: { + isArray: true, + typeInfo: exports.TypeInfo.NotificationBacklogStatus + } +}; +exports.TypeInfo.NotificationEventField.fields = { + fieldType: { + typeInfo: exports.TypeInfo.NotificationEventFieldType + } +}; +exports.TypeInfo.NotificationEventFieldType.fields = { + subscriptionFieldType: { + enumType: exports.TypeInfo.SubscriptionFieldType + } +}; +exports.TypeInfo.NotificationEventType.fields = { + fields: { + isDictionary: true, + dictionaryValueTypeInfo: exports.TypeInfo.NotificationEventField + } +}; +exports.TypeInfo.NotificationJobDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationReason.fields = { + notificationReasonType: { + enumType: exports.TypeInfo.NotificationReasonType + } +}; +exports.TypeInfo.NotificationStatistic.fields = { + date: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.NotificationStatisticType + } +}; +exports.TypeInfo.NotificationStatisticsQuery.fields = { + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.NotificationStatisticsQueryConditions + } +}; +exports.TypeInfo.NotificationStatisticsQueryConditions.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.NotificationStatisticType + } +}; +exports.TypeInfo.NotificationSubscriber.fields = { + deliveryPreference: { + enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference + }, + flags: { + enumType: exports.TypeInfo.SubscriberFlags + } +}; +exports.TypeInfo.NotificationSubscriberUpdateParameters.fields = { + deliveryPreference: { + enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference + } +}; +exports.TypeInfo.NotificationSubscription.fields = { + diagnostics: { + typeInfo: exports.TypeInfo.SubscriptionDiagnostics + }, + flags: { + enumType: exports.TypeInfo.SubscriptionFlags + }, + modifiedDate: { + isDate: true, + }, + permissions: { + enumType: exports.TypeInfo.SubscriptionPermissions + }, + status: { + enumType: exports.TypeInfo.SubscriptionStatus + } +}; +exports.TypeInfo.NotificationSubscriptionTemplate.fields = { + notificationEventInformation: { + typeInfo: exports.TypeInfo.NotificationEventType + }, + type: { + enumType: exports.TypeInfo.SubscriptionTemplateType + } +}; +exports.TypeInfo.NotificationSubscriptionUpdateParameters.fields = { + status: { + enumType: exports.TypeInfo.SubscriptionStatus + } +}; +exports.TypeInfo.SubscriptionDiagnostics.fields = { + deliveryResults: { + typeInfo: exports.TypeInfo.SubscriptionTracing + }, + deliveryTracing: { + typeInfo: exports.TypeInfo.SubscriptionTracing + }, + evaluationTracing: { + typeInfo: exports.TypeInfo.SubscriptionTracing + } +}; +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.SubscriptionQueryCondition + }, + queryFlags: { + enumType: exports.TypeInfo.SubscriptionQueryFlags + } +}; +exports.TypeInfo.SubscriptionQueryCondition.fields = { + flags: { + enumType: exports.TypeInfo.SubscriptionFlags + } +}; +exports.TypeInfo.SubscriptionTraceDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.SubscriptionTraceEventProcessingLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.SubscriptionTraceNotificationDeliveryLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.SubscriptionTracing.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + } +}; + + +/***/ }), + +/***/ 5871: +/***/ ((__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 VSSInterfaces = __nccwpck_require__(4498); +var ConfigurationType; +(function (ConfigurationType) { + /** + * Unknown type. + */ + ConfigurationType[ConfigurationType["Unknown"] = 0] = "Unknown"; + /** + * YAML. + */ + ConfigurationType[ConfigurationType["Yaml"] = 1] = "Yaml"; + /** + * Designer JSON. + */ + ConfigurationType[ConfigurationType["DesignerJson"] = 2] = "DesignerJson"; + /** + * Just-in-time. + */ + ConfigurationType[ConfigurationType["JustInTime"] = 3] = "JustInTime"; + /** + * Designer-JSON. + */ + ConfigurationType[ConfigurationType["DesignerHyphenJson"] = 2] = "DesignerHyphenJson"; +})(ConfigurationType = exports.ConfigurationType || (exports.ConfigurationType = {})); +/** + * Expansion options for GetArtifact and ListArtifacts. + */ +var GetArtifactExpandOptions; +(function (GetArtifactExpandOptions) { + /** + * No expansion. + */ + GetArtifactExpandOptions[GetArtifactExpandOptions["None"] = 0] = "None"; + /** + * Include signed content. + */ + GetArtifactExpandOptions[GetArtifactExpandOptions["SignedContent"] = 1] = "SignedContent"; +})(GetArtifactExpandOptions = exports.GetArtifactExpandOptions || (exports.GetArtifactExpandOptions = {})); +/** + * $expand options for GetLog and ListLogs. + */ +var GetLogExpandOptions; +(function (GetLogExpandOptions) { + GetLogExpandOptions[GetLogExpandOptions["None"] = 0] = "None"; + GetLogExpandOptions[GetLogExpandOptions["SignedContent"] = 1] = "SignedContent"; +})(GetLogExpandOptions = exports.GetLogExpandOptions || (exports.GetLogExpandOptions = {})); +var RepositoryType; +(function (RepositoryType) { + RepositoryType[RepositoryType["Unknown"] = 0] = "Unknown"; + RepositoryType[RepositoryType["GitHub"] = 1] = "GitHub"; + RepositoryType[RepositoryType["AzureReposGit"] = 2] = "AzureReposGit"; + RepositoryType[RepositoryType["GitHubEnterprise"] = 3] = "GitHubEnterprise"; + RepositoryType[RepositoryType["AzureReposGitHyphenated"] = 2] = "AzureReposGitHyphenated"; +})(RepositoryType = exports.RepositoryType || (exports.RepositoryType = {})); +/** + * This is not a Flags enum because we don't want to set multiple results on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple results. + */ +var RunResult; +(function (RunResult) { + RunResult[RunResult["Unknown"] = 0] = "Unknown"; + RunResult[RunResult["Succeeded"] = 1] = "Succeeded"; + RunResult[RunResult["Failed"] = 2] = "Failed"; + RunResult[RunResult["Canceled"] = 4] = "Canceled"; +})(RunResult = exports.RunResult || (exports.RunResult = {})); +/** + * This is not a Flags enum because we don't want to set multiple states on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple states. + */ +var RunState; +(function (RunState) { + RunState[RunState["Unknown"] = 0] = "Unknown"; + RunState[RunState["InProgress"] = 1] = "InProgress"; + RunState[RunState["Canceling"] = 2] = "Canceling"; + RunState[RunState["Completed"] = 4] = "Completed"; +})(RunState = exports.RunState || (exports.RunState = {})); +exports.TypeInfo = { + Artifact: {}, + ConfigurationType: { + enumValues: { + "unknown": 0, + "yaml": 1, + "designerJson": 2, + "justInTime": 3, + "designerHyphenJson": 2 + } + }, + CreatePipelineConfigurationParameters: {}, + CreatePipelineParameters: {}, + GetArtifactExpandOptions: { + enumValues: { + "none": 0, + "signedContent": 1 + } + }, + GetLogExpandOptions: { + enumValues: { + "none": 0, + "signedContent": 1 + } + }, + Log: {}, + LogCollection: {}, + Pipeline: {}, + PipelineConfiguration: {}, + Repository: {}, + RepositoryResource: {}, + RepositoryType: { + enumValues: { + "unknown": 0, + "gitHub": 1, + "azureReposGit": 2, + "gitHubEnterprise": 3, + "azureReposGitHyphenated": 2 + } + }, + Run: {}, + RunResources: {}, + RunResult: { + enumValues: { + "unknown": 0, + "succeeded": 1, + "failed": 2, + "canceled": 4 + } + }, + RunState: { + enumValues: { + "unknown": 0, + "inProgress": 1, + "canceling": 2, + "completed": 4 + } + }, + SignalRConnection: {}, +}; +exports.TypeInfo.Artifact.fields = { + signedContent: { + typeInfo: VSSInterfaces.TypeInfo.SignedUrl + } +}; +exports.TypeInfo.CreatePipelineConfigurationParameters.fields = { + type: { + enumType: exports.TypeInfo.ConfigurationType + } +}; +exports.TypeInfo.CreatePipelineParameters.fields = { + configuration: { + typeInfo: exports.TypeInfo.CreatePipelineConfigurationParameters + } +}; +exports.TypeInfo.Log.fields = { + createdOn: { + isDate: true, + }, + lastChangedOn: { + isDate: true, + }, + signedContent: { + typeInfo: VSSInterfaces.TypeInfo.SignedUrl + } +}; +exports.TypeInfo.LogCollection.fields = { + logs: { + isArray: true, + typeInfo: exports.TypeInfo.Log + }, + signedContent: { + typeInfo: VSSInterfaces.TypeInfo.SignedUrl + } +}; +exports.TypeInfo.Pipeline.fields = { + configuration: { + typeInfo: exports.TypeInfo.PipelineConfiguration + } +}; +exports.TypeInfo.PipelineConfiguration.fields = { + type: { + enumType: exports.TypeInfo.ConfigurationType + } +}; +exports.TypeInfo.Repository.fields = { + type: { + enumType: exports.TypeInfo.RepositoryType + } +}; +exports.TypeInfo.RepositoryResource.fields = { + repository: { + typeInfo: exports.TypeInfo.Repository + } +}; +exports.TypeInfo.Run.fields = { + createdDate: { + isDate: true, + }, + finishedDate: { + isDate: true, + }, + resources: { + typeInfo: exports.TypeInfo.RunResources + }, + result: { + enumType: exports.TypeInfo.RunResult + }, + state: { + enumType: exports.TypeInfo.RunState + } +}; +exports.TypeInfo.RunResources.fields = { + repositories: { + isDictionary: true, + dictionaryValueTypeInfo: exports.TypeInfo.RepositoryResource + } +}; +exports.TypeInfo.SignalRConnection.fields = { + signedContent: { + typeInfo: VSSInterfaces.TypeInfo.SignedUrl + } +}; + + +/***/ }), + +/***/ 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.PolicyConfiguration.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.PolicyEvaluationRecord.fields = { + completedDate: { + isDate: true, + }, + configuration: { + typeInfo: exports.TypeInfo.PolicyConfiguration + }, + startedDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.PolicyEvaluationStatus + } +}; + + +/***/ }), + +/***/ 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 + }, + AttributesContainer: { + fields: null + }, + 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.CoreProfileAttribute.fields = { + descriptor: { + typeInfo: exports.TypeInfo.AttributeDescriptor + }, + timeStamp: { + isDate: true, + }, +}; +exports.TypeInfo.Country.fields = {}; +exports.TypeInfo.CreateProfileContext.fields = {}; +exports.TypeInfo.GeoRegion.fields = {}; +exports.TypeInfo.Profile.fields = { + applicationContainer: { + typeInfo: exports.TypeInfo.AttributesContainer + }, + coreAttributes: {}, + timeStamp: { + isDate: true, + }, +}; +exports.TypeInfo.ProfileAttribute.fields = { + descriptor: { + typeInfo: exports.TypeInfo.AttributeDescriptor + }, + timeStamp: { + isDate: true, + }, +}; +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 + }, +}; + + +/***/ }), + +/***/ 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 + } + }, + CodeChangeTrendItem: {}, + ProjectActivityMetrics: {}, + ProjectLanguageAnalytics: {}, + RepositoryActivityMetrics: {}, + RepositoryLanguageAnalytics: {}, + ResultPhase: { + enumValues: { + "preliminary": 0, + "full": 1 + } + }, +}; +exports.TypeInfo.CodeChangeTrendItem.fields = { + time: { + isDate: true, + } +}; +exports.TypeInfo.ProjectActivityMetrics.fields = { + codeChangesTrend: { + isArray: true, + typeInfo: exports.TypeInfo.CodeChangeTrendItem + } +}; +exports.TypeInfo.ProjectLanguageAnalytics.fields = { + repositoryLanguageAnalytics: { + isArray: true, + typeInfo: exports.TypeInfo.RepositoryLanguageAnalytics + }, + resultPhase: { + enumType: exports.TypeInfo.ResultPhase + } +}; +exports.TypeInfo.RepositoryActivityMetrics.fields = { + codeChangesTrend: { + isArray: true, + typeInfo: exports.TypeInfo.CodeChangeTrendItem + } +}; +exports.TypeInfo.RepositoryLanguageAnalytics.fields = { + resultPhase: { + enumType: exports.TypeInfo.ResultPhase + }, + updatedTime: { + isDate: true, + } +}; + + +/***/ }), + +/***/ 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"; + /** + * Indicates the approval is rejected. + */ + ApprovalStatus[ApprovalStatus["Rejected"] = 4] = "Rejected"; + /** + * Indicates the approval is reassigned. + */ + ApprovalStatus[ApprovalStatus["Reassigned"] = 6] = "Reassigned"; + /** + * Indicates the approval is canceled. + */ + ApprovalStatus[ApprovalStatus["Canceled"] = 7] = "Canceled"; + /** + * Indicates the approval is skipped. + */ + ApprovalStatus[ApprovalStatus["Skipped"] = 8] = "Skipped"; +})(ApprovalStatus = exports.ApprovalStatus || (exports.ApprovalStatus = {})); +var ApprovalType; +(function (ApprovalType) { + /** + * Indicates the approval type does not set. + */ + ApprovalType[ApprovalType["Undefined"] = 0] = "Undefined"; + /** + * Indicates the approvals which executed before deployment. + */ + ApprovalType[ApprovalType["PreDeploy"] = 1] = "PreDeploy"; + /** + * Indicates the approvals which executed after deployment. + */ + ApprovalType[ApprovalType["PostDeploy"] = 2] = "PostDeploy"; + /** + * Indicates all approvals. + */ + ApprovalType[ApprovalType["All"] = 3] = "All"; +})(ApprovalType = exports.ApprovalType || (exports.ApprovalType = {})); +var AuditAction; +(function (AuditAction) { + /** + * Indicates the audit add. + */ + AuditAction[AuditAction["Add"] = 1] = "Add"; + /** + * Indicates the audit update. + */ + AuditAction[AuditAction["Update"] = 2] = "Update"; + /** + * Indicates the audit delete. + */ + AuditAction[AuditAction["Delete"] = 3] = "Delete"; + /** + * Indicates the audit undelete. + */ + 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) { + /** + * The condition type is undefined. + */ + ConditionType[ConditionType["Undefined"] = 0] = "Undefined"; + /** + * The condition type is event. + */ + ConditionType[ConditionType["Event"] = 1] = "Event"; + /** + * The condition type is environment state. + */ + ConditionType[ConditionType["EnvironmentState"] = 2] = "EnvironmentState"; + /** + * The condition type is artifact. + */ + 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) { + /** + * The deployment operation status is undefined. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Undefined"] = 0] = "Undefined"; + /** + * The deployment operation status is queued. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Queued"] = 1] = "Queued"; + /** + * The deployment operation status is scheduled. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Scheduled"] = 2] = "Scheduled"; + /** + * The deployment operation status is pending. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Pending"] = 4] = "Pending"; + /** + * The deployment operation status is approved. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Approved"] = 8] = "Approved"; + /** + * The deployment operation status is rejected. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Rejected"] = 16] = "Rejected"; + /** + * The deployment operation status is deferred. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Deferred"] = 32] = "Deferred"; + /** + * The deployment operation status is queued for agent. + */ + DeploymentOperationStatus[DeploymentOperationStatus["QueuedForAgent"] = 64] = "QueuedForAgent"; + /** + * The deployment operation status is phase in progress. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhaseInProgress"] = 128] = "PhaseInProgress"; + /** + * The deployment operation status is phase succeeded. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhaseSucceeded"] = 256] = "PhaseSucceeded"; + /** + * The deployment operation status is phase partially succeeded. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhasePartiallySucceeded"] = 512] = "PhasePartiallySucceeded"; + /** + * The deployment operation status is phase failed. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhaseFailed"] = 1024] = "PhaseFailed"; + /** + * The deployment operation status is canceled. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Canceled"] = 2048] = "Canceled"; + /** + * The deployment operation status is phase canceled. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhaseCanceled"] = 4096] = "PhaseCanceled"; + /** + * The deployment operation status is manualintervention pending. + */ + DeploymentOperationStatus[DeploymentOperationStatus["ManualInterventionPending"] = 8192] = "ManualInterventionPending"; + /** + * The deployment operation status is queued for pipeline. + */ + DeploymentOperationStatus[DeploymentOperationStatus["QueuedForPipeline"] = 16384] = "QueuedForPipeline"; + /** + * The deployment operation status is cancelling. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Cancelling"] = 32768] = "Cancelling"; + /** + * The deployment operation status is EvaluatingGates. + */ + DeploymentOperationStatus[DeploymentOperationStatus["EvaluatingGates"] = 65536] = "EvaluatingGates"; + /** + * The deployment operation status is GateFailed. + */ + DeploymentOperationStatus[DeploymentOperationStatus["GateFailed"] = 131072] = "GateFailed"; + /** + * The deployment operation status is all. + */ + 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"; + /** + * Environment trigger type is Rollback. + */ + EnvironmentTriggerType[EnvironmentTriggerType["RollbackRedeploy"] = 2] = "RollbackRedeploy"; +})(EnvironmentTriggerType = exports.EnvironmentTriggerType || (exports.EnvironmentTriggerType = {})); +/** + * Specifies the desired ordering of folders. + */ +var FolderPathQueryOrder; +(function (FolderPathQueryOrder) { + /** + * No order. + */ + FolderPathQueryOrder[FolderPathQueryOrder["None"] = 0] = "None"; + /** + * Order by folder name and path ascending. + */ + FolderPathQueryOrder[FolderPathQueryOrder["Ascending"] = 1] = "Ascending"; + /** + * Order by folder name and path descending. + */ + FolderPathQueryOrder[FolderPathQueryOrder["Descending"] = 2] = "Descending"; +})(FolderPathQueryOrder = exports.FolderPathQueryOrder || (exports.FolderPathQueryOrder = {})); +var GateStatus; +(function (GateStatus) { + /** + * The gate does not have the status set. + */ + GateStatus[GateStatus["None"] = 0] = "None"; + /** + * The gate is in pending state. + */ + GateStatus[GateStatus["Pending"] = 1] = "Pending"; + /** + * The gate is currently in progress. + */ + GateStatus[GateStatus["InProgress"] = 2] = "InProgress"; + /** + * The gate completed successfully. + */ + GateStatus[GateStatus["Succeeded"] = 4] = "Succeeded"; + /** + * The gate execution failed. + */ + GateStatus[GateStatus["Failed"] = 8] = "Failed"; + /** + * The gate execution cancelled. + */ + 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 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"; + /** + * The manual intervention is approved. + */ + ManualInterventionStatus[ManualInterventionStatus["Approved"] = 4] = "Approved"; + /** + * The manual intervention is canceled. + */ + 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) { + /** + * Include in property selector. + */ + PropertySelectorType[PropertySelectorType["Inclusion"] = 0] = "Inclusion"; + /** + * Exclude in property selector. + */ + 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) { + /** + * Returns top level properties of object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["None"] = 0] = "None"; + /** + * Include environments in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Environments"] = 2] = "Environments"; + /** + * Include artifacts in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Artifacts"] = 4] = "Artifacts"; + /** + * Include triggers in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Triggers"] = 8] = "Triggers"; + /** + * Include variables in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Variables"] = 16] = "Variables"; + /** + * Include tags in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Tags"] = 32] = "Tags"; + /** + * Include last release in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["LastRelease"] = 64] = "LastRelease"; +})(ReleaseDefinitionExpands = exports.ReleaseDefinitionExpands || (exports.ReleaseDefinitionExpands = {})); +var ReleaseDefinitionQueryOrder; +(function (ReleaseDefinitionQueryOrder) { + /** + * Return results based on release definition Id ascending order. + */ + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["IdAscending"] = 0] = "IdAscending"; + /** + * Return results based on release definition Id descending order. + */ + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["IdDescending"] = 1] = "IdDescending"; + /** + * Return results based on release definition name ascending order. + */ + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["NameAscending"] = 2] = "NameAscending"; + /** + * Return results based on release definition name descending order. + */ + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["NameDescending"] = 3] = "NameDescending"; +})(ReleaseDefinitionQueryOrder = exports.ReleaseDefinitionQueryOrder || (exports.ReleaseDefinitionQueryOrder = {})); +var ReleaseDefinitionSource; +(function (ReleaseDefinitionSource) { + /** + * Indicates ReleaseDefinition source not defined. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["Undefined"] = 0] = "Undefined"; + /** + * Indicates ReleaseDefinition created using REST API. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["RestApi"] = 1] = "RestApi"; + /** + * Indicates ReleaseDefinition created using UI. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["UserInterface"] = 2] = "UserInterface"; + /** + * Indicates ReleaseDefinition created from Ibiza. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["Ibiza"] = 4] = "Ibiza"; + /** + * Indicates ReleaseDefinition created from PortalExtension API. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["PortalExtensionApi"] = 8] = "PortalExtensionApi"; +})(ReleaseDefinitionSource = exports.ReleaseDefinitionSource || (exports.ReleaseDefinitionSource = {})); +var ReleaseEnvironmentExpands; +(function (ReleaseEnvironmentExpands) { + /** + * Return top level properties of object. + */ + ReleaseEnvironmentExpands[ReleaseEnvironmentExpands["None"] = 0] = "None"; + /** + * Expand environment with tasks. + */ + 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) { + /** + * Return results in descending order. + */ + ReleaseQueryOrder[ReleaseQueryOrder["Descending"] = 0] = "Descending"; + /** + * Return results in ascending order. + */ + ReleaseQueryOrder[ReleaseQueryOrder["Ascending"] = 1] = "Ascending"; +})(ReleaseQueryOrder = exports.ReleaseQueryOrder || (exports.ReleaseQueryOrder = {})); +var ReleaseReason; +(function (ReleaseReason) { + /** + * Indicates the release triggered reason not set. + */ + ReleaseReason[ReleaseReason["None"] = 0] = "None"; + /** + * Indicates the release triggered manually. + */ + ReleaseReason[ReleaseReason["Manual"] = 1] = "Manual"; + /** + * Indicates the release triggered by continuous integration. + */ + ReleaseReason[ReleaseReason["ContinuousIntegration"] = 2] = "ContinuousIntegration"; + /** + * Indicates the release triggered by schedule. + */ + ReleaseReason[ReleaseReason["Schedule"] = 3] = "Schedule"; + /** + * Indicates the release triggered by PullRequest. + */ + ReleaseReason[ReleaseReason["PullRequest"] = 4] = "PullRequest"; +})(ReleaseReason = exports.ReleaseReason || (exports.ReleaseReason = {})); +var ReleaseStatus; +(function (ReleaseStatus) { + /** + * Release status not set. + */ + ReleaseStatus[ReleaseStatus["Undefined"] = 0] = "Undefined"; + /** + * Release is in draft state. + */ + ReleaseStatus[ReleaseStatus["Draft"] = 1] = "Draft"; + /** + * Release status is in active. + */ + ReleaseStatus[ReleaseStatus["Active"] = 2] = "Active"; + /** + * Release status is in abandoned. + */ + ReleaseStatus[ReleaseStatus["Abandoned"] = 4] = "Abandoned"; +})(ReleaseStatus = exports.ReleaseStatus || (exports.ReleaseStatus = {})); +var ReleaseTriggerType; +(function (ReleaseTriggerType) { + /** + * Release trigger type not set. + */ + ReleaseTriggerType[ReleaseTriggerType["Undefined"] = 0] = "Undefined"; + /** + * Artifact based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["ArtifactSource"] = 1] = "ArtifactSource"; + /** + * Schedule based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["Schedule"] = 2] = "Schedule"; + /** + * Source repository based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["SourceRepo"] = 3] = "SourceRepo"; + /** + * Container image based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["ContainerImage"] = 4] = "ContainerImage"; + /** + * Package based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["Package"] = 5] = "Package"; + /** + * Pull request based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["PullRequest"] = 6] = "PullRequest"; +})(ReleaseTriggerType = exports.ReleaseTriggerType || (exports.ReleaseTriggerType = {})); +var ScheduleDays; +(function (ScheduleDays) { + /** + * Scheduled day not set. + */ + ScheduleDays[ScheduleDays["None"] = 0] = "None"; + /** + * Scheduled on Monday. + */ + ScheduleDays[ScheduleDays["Monday"] = 1] = "Monday"; + /** + * Scheduled on Tuesday. + */ + ScheduleDays[ScheduleDays["Tuesday"] = 2] = "Tuesday"; + /** + * Scheduled on Wednesday. + */ + ScheduleDays[ScheduleDays["Wednesday"] = 4] = "Wednesday"; + /** + * Scheduled on Thursday. + */ + ScheduleDays[ScheduleDays["Thursday"] = 8] = "Thursday"; + /** + * Scheduled on Friday. + */ + ScheduleDays[ScheduleDays["Friday"] = 16] = "Friday"; + /** + * Scheduled on Saturday. + */ + ScheduleDays[ScheduleDays["Saturday"] = 32] = "Saturday"; + /** + * Scheduled on Sunday. + */ + ScheduleDays[ScheduleDays["Sunday"] = 64] = "Sunday"; + /** + * Scheduled on all the days in week. + */ + 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) { + /** + * Return top level properties of object. + */ + SingleReleaseExpands[SingleReleaseExpands["None"] = 0] = "None"; + /** + * Expand release with tasks. + */ + SingleReleaseExpands[SingleReleaseExpands["Tasks"] = 1] = "Tasks"; +})(SingleReleaseExpands = exports.SingleReleaseExpands || (exports.SingleReleaseExpands = {})); +var TaskStatus; +(function (TaskStatus) { + /** + * The task does not have the status set. + */ + TaskStatus[TaskStatus["Unknown"] = 0] = "Unknown"; + /** + * The task is in pending status. + */ + TaskStatus[TaskStatus["Pending"] = 1] = "Pending"; + /** + * The task is currently in progress. + */ + TaskStatus[TaskStatus["InProgress"] = 2] = "InProgress"; + /** + * The task completed successfully. + */ + TaskStatus[TaskStatus["Success"] = 3] = "Success"; + /** + * The task execution failed. + */ + TaskStatus[TaskStatus["Failure"] = 4] = "Failure"; + /** + * The task execution canceled. + */ + TaskStatus[TaskStatus["Canceled"] = 5] = "Canceled"; + /** + * The task execution skipped. + */ + 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 = { + AgentArtifactDefinition: {}, + AgentArtifactType: { + enumValues: { + "xamlBuild": 0, + "build": 1, + "jenkins": 2, + "fileShare": 3, + "nuget": 4, + "tfsOnPrem": 5, + "gitHub": 6, + "tfGit": 7, + "externalTfsBuild": 8, + "custom": 9, + "tfvc": 10 + } + }, + AgentBasedDeployPhase: {}, + AgentDeploymentInput: {}, + ApprovalExecutionOrder: { + enumValues: { + "beforeGates": 1, + "afterSuccessfulGates": 2, + "afterGatesAlways": 4 + } + }, + ApprovalFilters: { + enumValues: { + "none": 0, + "manualApprovals": 1, + "automatedApprovals": 2, + "approvalSnapshots": 4, + "all": 7 + } + }, + ApprovalOptions: {}, + ApprovalStatus: { + enumValues: { + "undefined": 0, + "pending": 1, + "approved": 2, + "rejected": 4, + "reassigned": 6, + "canceled": 7, + "skipped": 8 + } + }, + ApprovalType: { + enumValues: { + "undefined": 0, + "preDeploy": 1, + "postDeploy": 2, + "all": 3 + } + }, + ArtifactContributionDefinition: {}, + ArtifactMetadata: {}, + ArtifactSourceTrigger: {}, + ArtifactTypeDefinition: {}, + ArtifactVersion: {}, + ArtifactVersionQueryResult: {}, + AuditAction: { + enumValues: { + "add": 1, + "update": 2, + "delete": 3, + "undelete": 4 + } + }, + AuthorizationHeaderFor: { + enumValues: { + "revalidateApproverIdentity": 0, + "onBehalfOf": 1 + } + }, + AutoTriggerIssue: {}, + AzureKeyVaultVariableGroupProviderData: {}, + AzureKeyVaultVariableValue: {}, + BuildVersion: {}, + Change: {}, + CodeRepositoryReference: {}, + Condition: {}, + ConditionType: { + enumValues: { + "undefined": 0, + "event": 1, + "environmentState": 2, + "artifact": 4 + } + }, + 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, + "manual": 1, + "automated": 2, + "scheduled": 4, + "redeployTrigger": 8 + } + }, + DeploymentsQueryType: { + enumValues: { + "regular": 1, + "failingSince": 2 + } + }, + DeploymentStartedEvent: {}, + DeploymentStatus: { + enumValues: { + "undefined": 0, + "notDeployed": 1, + "inProgress": 2, + "succeeded": 4, + "partiallySucceeded": 8, + "failed": 16, + "all": 31 + } + }, + DeployPhase: {}, + DeployPhaseStatus: { + enumValues: { + "undefined": 0, + "notStarted": 1, + "inProgress": 2, + "partiallySucceeded": 4, + "succeeded": 8, + "failed": 16, + "canceled": 32, + "skipped": 64, + "cancelling": 128 + } + }, + DeployPhaseTypes: { + enumValues: { + "undefined": 0, + "agentBasedDeployment": 1, + "runOnServer": 2, + "machineGroupBasedDeployment": 4, + "deploymentGates": 8 + } + }, + EnvironmentStatus: { + enumValues: { + "undefined": 0, + "notStarted": 1, + "inProgress": 2, + "succeeded": 4, + "canceled": 8, + "rejected": 16, + "queued": 32, + "scheduled": 64, + "partiallySucceeded": 128 + } + }, + EnvironmentTrigger: {}, + EnvironmentTriggerType: { + enumValues: { + "undefined": 0, + "deploymentGroupRedeploy": 1, + "rollbackRedeploy": 2 + } + }, + ExecutionInput: {}, + Folder: {}, + FolderPathQueryOrder: { + enumValues: { + "none": 0, + "ascending": 1, + "descending": 2 + } + }, + GatesDeployPhase: {}, + GateStatus: { + enumValues: { + "none": 0, + "pending": 1, + "inProgress": 2, + "succeeded": 4, + "failed": 8, + "canceled": 16 + } + }, + IgnoredGate: {}, + IssueSource: { + enumValues: { + "none": 0, + "user": 1, + "system": 2 + } + }, + MachineGroupBasedDeployPhase: {}, + MailMessage: {}, + MailSectionType: { + enumValues: { + "details": 0, + "environments": 1, + "issues": 2, + "testResults": 3, + "workItems": 4, + "releaseInfo": 5 + } + }, + ManualIntervention: {}, + ManualInterventionStatus: { + enumValues: { + "unknown": 0, + "pending": 1, + "rejected": 2, + "approved": 4, + "canceled": 8 + } + }, + ManualInterventionUpdateMetadata: {}, + MultiConfigInput: {}, + MultiMachineInput: {}, + PackageTrigger: {}, + ParallelExecutionInputBase: {}, + ParallelExecutionTypes: { + enumValues: { + "none": 0, + "multiConfiguration": 1, + "multiMachine": 2 + } + }, + PipelineProcess: {}, + PipelineProcessTypes: { + enumValues: { + "designer": 1, + "yaml": 2 + } + }, + PropertySelector: {}, + PropertySelectorType: { + enumValues: { + "inclusion": 0, + "exclusion": 1 + } + }, + PullRequestConfiguration: {}, + PullRequestSystemType: { + enumValues: { + "none": 0, + "tfsGit": 1, + "gitHub": 2 + } + }, + PullRequestTrigger: {}, + Release: {}, + ReleaseAbandonedEvent: {}, + ReleaseApproval: {}, + ReleaseApprovalHistory: {}, + ReleaseApprovalPendingEvent: {}, + ReleaseCondition: {}, + ReleaseCreatedEvent: {}, + ReleaseDefinition: {}, + ReleaseDefinitionApprovals: {}, + ReleaseDefinitionEnvironment: {}, + ReleaseDefinitionEnvironmentTemplate: {}, + ReleaseDefinitionExpands: { + enumValues: { + "none": 0, + "environments": 2, + "artifacts": 4, + "triggers": 8, + "variables": 16, + "tags": 32, + "lastRelease": 64 + } + }, + ReleaseDefinitionQueryOrder: { + enumValues: { + "idAscending": 0, + "idDescending": 1, + "nameAscending": 2, + "nameDescending": 3 + } + }, + ReleaseDefinitionRevision: {}, + ReleaseDefinitionSource: { + enumValues: { + "undefined": 0, + "restApi": 1, + "userInterface": 2, + "ibiza": 4, + "portalExtensionApi": 8 + } + }, + ReleaseDefinitionSummary: {}, + ReleaseDeployPhase: {}, + ReleaseEnvironment: {}, + ReleaseEnvironmentCompletedEvent: {}, + ReleaseEnvironmentExpands: { + enumValues: { + "none": 0, + "tasks": 1 + } + }, + ReleaseEnvironmentStatusUpdatedEvent: {}, + ReleaseEnvironmentUpdateMetadata: {}, + ReleaseExpands: { + enumValues: { + "none": 0, + "environments": 2, + "artifacts": 4, + "approvals": 8, + "manualInterventions": 16, + "variables": 32, + "tags": 64 + } + }, + ReleaseGates: {}, + ReleaseGatesPhase: {}, + ReleaseNotCreatedEvent: {}, + ReleaseQueryOrder: { + enumValues: { + "descending": 0, + "ascending": 1 + } + }, + ReleaseReason: { + enumValues: { + "none": 0, + "manual": 1, + "continuousIntegration": 2, + "schedule": 3, + "pullRequest": 4 + } + }, + ReleaseReference: {}, + ReleaseRevision: {}, + ReleaseSchedule: {}, + ReleaseStartMetadata: {}, + ReleaseStatus: { + enumValues: { + "undefined": 0, + "draft": 1, + "active": 2, + "abandoned": 4 + } + }, + ReleaseTask: {}, + ReleaseTaskAttachment: {}, + ReleaseTasksUpdatedEvent: {}, + ReleaseTriggerBase: {}, + ReleaseTriggerType: { + enumValues: { + "undefined": 0, + "artifactSource": 1, + "schedule": 2, + "sourceRepo": 3, + "containerImage": 4, + "package": 5, + "pullRequest": 6 + } + }, + ReleaseUpdatedEvent: {}, + ReleaseUpdateMetadata: {}, + RunOnServerDeployPhase: {}, + ScheduleDays: { + enumValues: { + "none": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 4, + "thursday": 8, + "friday": 16, + "saturday": 32, + "sunday": 64, + "all": 127 + } + }, + ScheduledReleaseTrigger: {}, + SenderType: { + enumValues: { + "serviceAccount": 1, + "requestingUser": 2 + } + }, + ServerDeploymentInput: {}, + SingleReleaseExpands: { + enumValues: { + "none": 0, + "tasks": 1 + } + }, + 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, + "manage": 2, + "use": 16 + } + }, + YamlFileSource: {}, + YamlFileSourceTypes: { + enumValues: { + "none": 0, + "tfsGit": 1 + } + }, + YamlPipelineProcess: {}, +}; +exports.TypeInfo.AgentArtifactDefinition.fields = { + artifactType: { + enumType: exports.TypeInfo.AgentArtifactType + } +}; +exports.TypeInfo.AgentBasedDeployPhase.fields = { + deploymentInput: { + typeInfo: exports.TypeInfo.AgentDeploymentInput + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.AgentDeploymentInput.fields = { + parallelExecution: { + typeInfo: exports.TypeInfo.ExecutionInput + } +}; +exports.TypeInfo.ApprovalOptions.fields = { + executionOrder: { + enumType: exports.TypeInfo.ApprovalExecutionOrder + } +}; +exports.TypeInfo.ArtifactContributionDefinition.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.ArtifactMetadata.fields = { + instanceReference: { + typeInfo: exports.TypeInfo.BuildVersion + } +}; +exports.TypeInfo.ArtifactSourceTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ArtifactTypeDefinition.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.ArtifactVersion.fields = { + defaultVersion: { + typeInfo: exports.TypeInfo.BuildVersion + }, + versions: { + isArray: true, + typeInfo: exports.TypeInfo.BuildVersion + } +}; +exports.TypeInfo.ArtifactVersionQueryResult.fields = { + artifactVersions: { + isArray: true, + typeInfo: exports.TypeInfo.ArtifactVersion + } +}; +exports.TypeInfo.AutoTriggerIssue.fields = { + issueSource: { + enumType: exports.TypeInfo.IssueSource + }, + releaseTriggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.AzureKeyVaultVariableGroupProviderData.fields = { + lastRefreshedOn: { + isDate: true, + } +}; +exports.TypeInfo.AzureKeyVaultVariableValue.fields = { + expires: { + isDate: true, + } +}; +exports.TypeInfo.BuildVersion.fields = { + sourcePullRequestVersion: { + typeInfo: exports.TypeInfo.SourcePullRequestVersion + } +}; +exports.TypeInfo.Change.fields = { + timestamp: { + isDate: true, + } +}; +exports.TypeInfo.CodeRepositoryReference.fields = { + systemType: { + enumType: exports.TypeInfo.PullRequestSystemType + } +}; +exports.TypeInfo.Condition.fields = { + conditionType: { + enumType: exports.TypeInfo.ConditionType + } +}; +exports.TypeInfo.ContainerImageTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ContinuousDeploymentTriggerIssue.fields = { + issueSource: { + enumType: exports.TypeInfo.IssueSource + }, + releaseTriggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.Deployment.fields = { + completedOn: { + isDate: true, + }, + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.Condition + }, + deploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus + }, + lastModifiedOn: { + isDate: true, + }, + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + postDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + preDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + queuedOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.DeploymentReason + }, + release: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + scheduledDeploymentTime: { + isDate: true, + }, + startedOn: { + isDate: true, + } +}; +exports.TypeInfo.DeploymentApprovalCompletedEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval + }, + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.DeploymentApprovalPendingEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval + }, + approvalOptions: { + typeInfo: exports.TypeInfo.ApprovalOptions + }, + completedApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + deployment: { + typeInfo: exports.TypeInfo.Deployment + }, + pendingApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.DeploymentAttempt.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask + }, + lastModifiedOn: { + isDate: true, + }, + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + postDeploymentGates: { + typeInfo: exports.TypeInfo.ReleaseGates + }, + preDeploymentGates: { + typeInfo: exports.TypeInfo.ReleaseGates + }, + queuedOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.DeploymentReason + }, + releaseDeployPhases: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseDeployPhase + }, + status: { + enumType: exports.TypeInfo.DeploymentStatus + }, + tasks: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTask + } +}; +exports.TypeInfo.DeploymentAuthorizationInfo.fields = { + authorizationHeaderFor: { + enumType: exports.TypeInfo.AuthorizationHeaderFor + } +}; +exports.TypeInfo.DeploymentCompletedEvent.fields = { + deployment: { + typeInfo: exports.TypeInfo.Deployment + }, + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment + } +}; +exports.TypeInfo.DeploymentJob.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask + }, + tasks: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTask + } +}; +exports.TypeInfo.DeploymentManualInterventionPendingEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval + }, + deployment: { + typeInfo: exports.TypeInfo.Deployment + }, + manualIntervention: { + typeInfo: exports.TypeInfo.ManualIntervention + }, + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.DeploymentQueryParameters.fields = { + deploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus + }, + expands: { + enumType: exports.TypeInfo.DeploymentExpands + }, + maxModifiedTime: { + isDate: true, + }, + minModifiedTime: { + isDate: true, + }, + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + queryOrder: { + enumType: exports.TypeInfo.ReleaseQueryOrder + }, + queryType: { + enumType: exports.TypeInfo.DeploymentsQueryType + } +}; +exports.TypeInfo.DeploymentStartedEvent.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment + }, + 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 + } +}; +exports.TypeInfo.Folder.fields = { + createdOn: { + isDate: true, + }, + lastChangedDate: { + isDate: true, + } +}; +exports.TypeInfo.GatesDeployPhase.fields = { + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.IgnoredGate.fields = { + lastModifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.MachineGroupBasedDeployPhase.fields = { + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.MailMessage.fields = { + replyBy: { + isDate: true, + }, + sections: { + isArray: true, + enumType: exports.TypeInfo.MailSectionType + }, + senderType: { + enumType: exports.TypeInfo.SenderType + } +}; +exports.TypeInfo.ManualIntervention.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ManualInterventionStatus + } +}; +exports.TypeInfo.ManualInterventionUpdateMetadata.fields = { + status: { + enumType: exports.TypeInfo.ManualInterventionStatus + } +}; +exports.TypeInfo.MultiConfigInput.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes + } +}; +exports.TypeInfo.MultiMachineInput.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes + } +}; +exports.TypeInfo.PackageTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ParallelExecutionInputBase.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes + } +}; +exports.TypeInfo.PipelineProcess.fields = { + type: { + enumType: exports.TypeInfo.PipelineProcessTypes + } +}; +exports.TypeInfo.PropertySelector.fields = { + selectorType: { + enumType: exports.TypeInfo.PropertySelectorType + } +}; +exports.TypeInfo.PullRequestConfiguration.fields = { + codeRepositoryReference: { + typeInfo: exports.TypeInfo.CodeRepositoryReference + } +}; +exports.TypeInfo.PullRequestTrigger.fields = { + pullRequestConfiguration: { + typeInfo: exports.TypeInfo.PullRequestConfiguration + }, + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.Release.fields = { + createdOn: { + isDate: true, + }, + environments: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseEnvironment + }, + modifiedOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.ReleaseReason + }, + status: { + enumType: exports.TypeInfo.ReleaseStatus + }, + 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 + }, + createdOn: { + isDate: true, + }, + history: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApprovalHistory + }, + modifiedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ApprovalStatus + } +}; +exports.TypeInfo.ReleaseApprovalHistory.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + } +}; +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: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + } +}; +exports.TypeInfo.ReleaseCondition.fields = { + conditionType: { + enumType: exports.TypeInfo.ConditionType + } +}; +exports.TypeInfo.ReleaseCreatedEvent.fields = { + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseDefinition.fields = { + createdOn: { + isDate: true, + }, + environments: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseDefinitionEnvironment + }, + lastRelease: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + modifiedOn: { + isDate: true, + }, + pipelineProcess: { + typeInfo: exports.TypeInfo.PipelineProcess + }, + source: { + enumType: exports.TypeInfo.ReleaseDefinitionSource + }, + triggers: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTriggerBase + } +}; +exports.TypeInfo.ReleaseDefinitionApprovals.fields = { + approvalOptions: { + typeInfo: exports.TypeInfo.ApprovalOptions + } +}; +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 + }, + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseSchedule + } +}; +exports.TypeInfo.ReleaseDefinitionEnvironmentTemplate.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseDefinitionEnvironment + } +}; +exports.TypeInfo.ReleaseDefinitionRevision.fields = { + changedDate: { + isDate: true, + }, + changeType: { + enumType: exports.TypeInfo.AuditAction + } +}; +exports.TypeInfo.ReleaseDefinitionSummary.fields = { + releases: { + isArray: true, + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseDeployPhase.fields = { + deploymentJobs: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentJob + }, + manualInterventions: { + isArray: true, + typeInfo: exports.TypeInfo.ManualIntervention + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + }, + startedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.DeployPhaseStatus + } +}; +exports.TypeInfo.ReleaseEnvironment.fields = { + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseCondition + }, + createdOn: { + isDate: true, + }, + deployPhasesSnapshot: { + isArray: true, + typeInfo: exports.TypeInfo.DeployPhase + }, + deploySteps: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentAttempt + }, + modifiedOn: { + isDate: true, + }, + nextScheduledUtcTime: { + isDate: true, + }, + postApprovalsSnapshot: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + postDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + preApprovalsSnapshot: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + preDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + scheduledDeploymentTime: { + isDate: true, + }, + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseSchedule + }, + status: { + enumType: exports.TypeInfo.EnvironmentStatus + }, + variableGroups: { + isArray: true, + typeInfo: exports.TypeInfo.VariableGroup + } +}; +exports.TypeInfo.ReleaseEnvironmentCompletedEvent.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment + }, + reason: { + enumType: exports.TypeInfo.DeploymentReason + } +}; +exports.TypeInfo.ReleaseEnvironmentStatusUpdatedEvent.fields = { + environmentStatus: { + enumType: exports.TypeInfo.EnvironmentStatus + }, + latestDeploymentOperationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + latestDeploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus + } +}; +exports.TypeInfo.ReleaseEnvironmentUpdateMetadata.fields = { + scheduledDeploymentTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.EnvironmentStatus + } +}; +exports.TypeInfo.ReleaseGates.fields = { + deploymentJobs: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentJob + }, + ignoredGates: { + isArray: true, + typeInfo: exports.TypeInfo.IgnoredGate + }, + lastModifiedOn: { + isDate: true, + }, + stabilizationCompletedOn: { + isDate: true, + }, + startedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.GateStatus + }, + succeedingSince: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseGatesPhase.fields = { + deploymentJobs: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentJob + }, + ignoredGates: { + isArray: true, + typeInfo: exports.TypeInfo.IgnoredGate + }, + manualInterventions: { + isArray: true, + typeInfo: exports.TypeInfo.ManualIntervention + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + }, + stabilizationCompletedOn: { + isDate: true, + }, + startedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.DeployPhaseStatus + }, + succeedingSince: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseNotCreatedEvent.fields = { + releaseReason: { + enumType: exports.TypeInfo.ReleaseReason + } +}; +exports.TypeInfo.ReleaseReference.fields = { + createdOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.ReleaseReason + } +}; +exports.TypeInfo.ReleaseRevision.fields = { + changedDate: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseSchedule.fields = { + daysToRelease: { + enumType: exports.TypeInfo.ScheduleDays + } +}; +exports.TypeInfo.ReleaseStartMetadata.fields = { + artifacts: { + isArray: true, + typeInfo: exports.TypeInfo.ArtifactMetadata + }, + reason: { + enumType: exports.TypeInfo.ReleaseReason + } +}; +exports.TypeInfo.ReleaseTask.fields = { + dateEnded: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + finishTime: { + isDate: true, + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.TaskStatus + } +}; +exports.TypeInfo.ReleaseTaskAttachment.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseTasksUpdatedEvent.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask + }, + 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 + } +}; +exports.TypeInfo.RunOnServerDeployPhase.fields = { + deploymentInput: { + typeInfo: exports.TypeInfo.ServerDeploymentInput + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.ScheduledReleaseTrigger.fields = { + schedule: { + typeInfo: exports.TypeInfo.ReleaseSchedule + }, + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ServerDeploymentInput.fields = { + parallelExecution: { + typeInfo: exports.TypeInfo.ExecutionInput + } +}; +exports.TypeInfo.SourcePullRequestVersion.fields = { + pullRequestMergedAt: { + isDate: true, + } +}; +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, + }, + modifiedOn: { + 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 + } +}; + + +/***/ }), + +/***/ 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.RoleAssignment.fields = { + access: { + enumType: exports.TypeInfo.RoleAccess + }, +}; + + +/***/ }), + +/***/ 9565: +/***/ ((__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 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[ElasticComputeState["UnhealthyVm"] = 7] = "UnhealthyVm"; + ElasticComputeState[ElasticComputeState["UnhealthyVmssVm"] = 8] = "UnhealthyVmssVm"; +})(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[ElasticNodeState["RetryDelete"] = 19] = "RetryDelete"; + ElasticNodeState[ElasticNodeState["UnhealthyVm"] = 20] = "UnhealthyVm"; + ElasticNodeState[ElasticNodeState["UnhealthyVmPendingDelete"] = 21] = "UnhealthyVmPendingDelete"; +})(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[ExclusiveLockType["BranchRunLatest"] = 2] = "BranchRunLatest"; + ExclusiveLockType[ExclusiveLockType["Parallel"] = 3] = "Parallel"; +})(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 OrchestrationType; +(function (OrchestrationType) { + OrchestrationType[OrchestrationType["Uniform"] = 0] = "Uniform"; + OrchestrationType[OrchestrationType["Flexible"] = 1] = "Flexible"; +})(OrchestrationType = exports.OrchestrationType || (exports.OrchestrationType = {})); +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 = {})); +/** + * Filters pools based on whether the calling user has permission to use or manage the pool. + */ +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"; + /** + * Run on Saturday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Saturday"] = 32] = "Saturday"; + /** + * Run on Sunday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Sunday"] = 64] = "Sunday"; + /** + * Run on all days of the week. + */ + 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"; + /** + * TaskAgentPool backed by the Elastic pool service + */ + TaskAgentPoolOptions[TaskAgentPoolOptions["ElasticPool"] = 1] = "ElasticPool"; + /** + * Set to true if agents are re-imaged after each TaskAgentJobRequest + */ + TaskAgentPoolOptions[TaskAgentPoolOptions["SingleUseAgents"] = 2] = "SingleUseAgents"; + /** + * Set to true if agents are held for investigation after a TaskAgentJobRequest failure + */ + TaskAgentPoolOptions[TaskAgentPoolOptions["PreserveAgentOnJobFailure"] = 4] = "PreserveAgentOnJobFailure"; +})(TaskAgentPoolOptions = exports.TaskAgentPoolOptions || (exports.TaskAgentPoolOptions = {})); +/** + * The type of agent pool. + */ +var TaskAgentPoolType; +(function (TaskAgentPoolType) { + /** + * A typical pool of task agents + */ + TaskAgentPoolType[TaskAgentPoolType["Automation"] = 1] = "Automation"; + /** + * A deployment pool + */ + 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) { + /** + * Only deployment targets that are offline. + */ + TaskAgentStatusFilter[TaskAgentStatusFilter["Offline"] = 1] = "Offline"; + /** + * Only deployment targets that are online. + */ + 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 = {})); +/** + * Specifies the desired ordering of taskGroups. + */ +var TaskGroupQueryOrder; +(function (TaskGroupQueryOrder) { + /** + * Order by createdon ascending. + */ + TaskGroupQueryOrder[TaskGroupQueryOrder["CreatedOnAscending"] = 0] = "CreatedOnAscending"; + /** + * Order by createdon descending. + */ + 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) { + /** + * Order by id ascending. + */ + VariableGroupQueryOrder[VariableGroupQueryOrder["IdAscending"] = 0] = "IdAscending"; + /** + * Order by id descending. + */ + 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, + "unhealthyVm": 7, + "unhealthyVmssVm": 8 + } + }, + 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, + "retryDelete": 19, + "unhealthyVm": 20, + "unhealthyVmPendingDelete": 21 + } + }, + 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, + "branchRunLatest": 2, + "parallel": 3 + } + }, + 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 + } + }, + OrchestrationType: { + enumValues: { + "uniform": 0, + "flexible": 1 + } + }, + 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: { + 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: {}, + TimelineRecordReference: {}, + TimelineRecordState: { + enumValues: { + "pending": 0, + "inProgress": 1, + "completed": 2 + } + }, + VariableGroup: {}, + VariableGroupActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + VariableGroupQueryOrder: { + enumValues: { + "idAscending": 0, + "idDescending": 1 + } + }, + 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 + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.DeploymentMachineGroupReference.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.DeploymentMachinesChangeEvent.fields = { + machineGroupReference: { + typeInfo: exports.TypeInfo.DeploymentGroupReference + }, + machines: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentMachineChangedData + } +}; +exports.TypeInfo.DeploymentPoolSummary.fields = { + deploymentGroups: { + 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 + }, + stateChangedOn: { + isDate: true, + } +}; +exports.TypeInfo.ElasticNodeSettings.fields = { + state: { + enumType: exports.TypeInfo.ElasticNodeState + } +}; +exports.TypeInfo.ElasticPool.fields = { + offlineSince: { + isDate: true, + }, + orchestrationType: { + enumType: exports.TypeInfo.OrchestrationType + }, + 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.ElasticPoolLog.fields = { + level: { + enumType: exports.TypeInfo.LogLevel + }, + operation: { + enumType: exports.TypeInfo.OperationType + }, + timestamp: { + isDate: true, + } +}; +exports.TypeInfo.ElasticPoolSettings.fields = { + orchestrationType: { + enumType: exports.TypeInfo.OrchestrationType + }, + osType: { + enumType: exports.TypeInfo.OperatingSystemType + } +}; +exports.TypeInfo.EnvironmentDeploymentExecutionRecord.fields = { + finishTime: { + isDate: true, + }, + queueTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.EnvironmentInstance.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + resources: { + isArray: true, + typeInfo: exports.TypeInfo.EnvironmentResourceReference + } +}; +exports.TypeInfo.EnvironmentResource.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +exports.TypeInfo.EnvironmentResourceDeploymentExecutionRecord.fields = { + finishTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + 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.JobCompletedEvent.fields = { + result: { + enumType: exports.TypeInfo.TaskResult + } +}; +exports.TypeInfo.JobEnvironment.fields = { + mask: { + isArray: true, + typeInfo: exports.TypeInfo.MaskHint + }, + secureFiles: { + isArray: true, + typeInfo: exports.TypeInfo.SecureFile + } +}; +exports.TypeInfo.JobRequestMessage.fields = { + environment: { + typeInfo: exports.TypeInfo.JobEnvironment + } +}; +exports.TypeInfo.KubernetesResource.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +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.MaskHint + } +}; +exports.TypeInfo.ResourceLockRequest.fields = { + assignTime: { + isDate: true, + }, + finishTime: { + isDate: true, + }, + lockType: { + enumType: exports.TypeInfo.ExclusiveLockType + }, + queueTime: { + 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: { + isDate: true, + } +}; +exports.TypeInfo.SecureFileEvent.fields = { + secureFiles: { + isArray: true, + typeInfo: exports.TypeInfo.SecureFile + } +}; +exports.TypeInfo.ServerTaskRequestMessage.fields = { + environment: { + typeInfo: exports.TypeInfo.JobEnvironment + }, + taskDefinition: { + typeInfo: exports.TypeInfo.TaskDefinition + } +}; +exports.TypeInfo.ServiceEndpointAuthenticationScheme.fields = { + inputDescriptors: { + 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 + } +}; +exports.TypeInfo.ServiceEndpointRequestResult.fields = {}; +exports.TypeInfo.ServiceEndpointType.fields = { + authenticationSchemes: { + isArray: true, + typeInfo: exports.TypeInfo.ServiceEndpointAuthenticationScheme + }, + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.TaskAgent.fields = { + assignedAgentCloudRequest: { + typeInfo: exports.TypeInfo.TaskAgentCloudRequest + }, + assignedRequest: { + typeInfo: exports.TypeInfo.TaskAgentJobRequest + }, + createdOn: { + isDate: true, + }, + lastCompletedRequest: { + typeInfo: exports.TypeInfo.TaskAgentJobRequest + }, + pendingUpdate: { + typeInfo: exports.TypeInfo.TaskAgentUpdate + }, + status: { + enumType: exports.TypeInfo.TaskAgentStatus + }, + statusChangedOn: { + isDate: true, + } +}; +exports.TypeInfo.TaskAgentCloudRequest.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgentReference + }, + agentConnectedTime: { + isDate: true, + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + provisionedTime: { + isDate: true, + }, + provisionRequestTime: { + isDate: true, + }, + 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 + } +}; +exports.TypeInfo.TaskAgentJobRequest.fields = { + assignTime: { + isDate: true, + }, + 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 + } +}; +exports.TypeInfo.TaskAgentJobStep.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 + } +}; +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: { + 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 + } +}; +exports.TypeInfo.TaskAgentPoolMaintenanceSchedule.fields = { + daysToBuild: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceScheduleDays + } +}; +exports.TypeInfo.TaskAgentPoolReference.fields = { + options: { + enumType: exports.TypeInfo.TaskAgentPoolOptions + }, + poolType: { + enumType: exports.TypeInfo.TaskAgentPoolType + } +}; +exports.TypeInfo.TaskAgentPoolStatus.fields = { + options: { + enumType: exports.TypeInfo.TaskAgentPoolOptions + }, + poolType: { + enumType: exports.TypeInfo.TaskAgentPoolType + } +}; +exports.TypeInfo.TaskAgentPoolSummary.fields = { + deploymentGroups: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentGroupReference + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + queues: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentQueue + } +}; +exports.TypeInfo.TaskAgentQueue.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +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 + }, + requestTime: { + isDate: true, + } +}; +exports.TypeInfo.TaskAgentUpdateReason.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType + } +}; +exports.TypeInfo.TaskAttachment.fields = { + createdOn: { + isDate: true, + }, + lastChangedOn: { + isDate: true, + } +}; +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, + }, + modifiedOn: { + isDate: true, + }, + restrictions: { + typeInfo: exports.TypeInfo.TaskRestrictions + } +}; +exports.TypeInfo.TaskGroupRevision.fields = { + changedDate: { + isDate: true, + }, + changeType: { + enumType: exports.TypeInfo.AuditAction + } +}; +exports.TypeInfo.TaskLog.fields = { + createdOn: { + isDate: true, + }, + lastChangedOn: { + isDate: true, + } +}; +exports.TypeInfo.TaskOrchestrationContainer.fields = { + children: { + 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 + } +}; +exports.TypeInfo.TaskOrchestrationPlan.fields = { + environment: { + typeInfo: exports.TypeInfo.PlanEnvironment + }, + finishTime: { + isDate: true, + }, + implementation: { + typeInfo: exports.TypeInfo.TaskOrchestrationContainer + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TaskOrchestrationPlanState + } +}; +exports.TypeInfo.TaskOrchestrationPlanGroup.fields = { + runningRequests: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentJobRequest + } +}; +exports.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics.fields = { + status: { + enumType: exports.TypeInfo.PlanGroupStatus + } +}; +exports.TypeInfo.TaskOrchestrationQueuedPlan.fields = { + assignTime: { + isDate: true, + }, + queueTime: { + isDate: true, + } +}; +exports.TypeInfo.TaskOrchestrationQueuedPlanGroup.fields = { + plans: { + isArray: true, + typeInfo: exports.TypeInfo.TaskOrchestrationQueuedPlan + } +}; +exports.TypeInfo.TaskRestrictions.fields = { + commands: { + typeInfo: exports.TypeInfo.TaskCommandRestrictions + } +}; +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.TimelineRecordReference.fields = { + 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 + } +}; + + +/***/ }), + +/***/ 3047: +/***/ ((__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__(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 = {})); +/** + * Represents status of code coverage summary for a build + */ +var CoverageDetailedSummaryStatus; +(function (CoverageDetailedSummaryStatus) { + /** + * No coverage status + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["None"] = 0] = "None"; + /** + * The summary evaluation is in progress + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["InProgress"] = 1] = "InProgress"; + /** + * The summary evaluation is finalized and won't change + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["Finalized"] = 2] = "Finalized"; + /** + * The summary evaluation is pending + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["Pending"] = 3] = "Pending"; + /** + * Summary evaluation may be ongoing but another merge has been requested. + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["UpdateRequestQueued"] = 4] = "UpdateRequestQueued"; + /** + * No coverage modules found + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["NoModulesFound"] = 5] = "NoModulesFound"; + /** + * Number of Files exceeded + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["NumberOfFilesExceeded"] = 6] = "NumberOfFilesExceeded"; + /** + * TNo Input Files + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["NoInputFiles"] = 7] = "NoInputFiles"; + /** + * Build got cancelled by user + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["BuildCancelled"] = 8] = "BuildCancelled"; + /** + * Coverage Jobs failed + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["FailedJobs"] = 9] = "FailedJobs"; + /** + * Module merge Timeout + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["ModuleMergeJobTimeout"] = 10] = "ModuleMergeJobTimeout"; + /** + * Coverage successfully completed + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["CodeCoverageSuccess"] = 11] = "CodeCoverageSuccess"; + /** + * Invalid Build Configuration + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["InvalidBuildConfiguration"] = 12] = "InvalidBuildConfiguration"; + /** + * Coverage Analyzer Build not found + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["CoverageAnalyzerBuildNotFound"] = 13] = "CoverageAnalyzerBuildNotFound"; + /** + * Failed to requeue the build + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["FailedToRequeue"] = 14] = "FailedToRequeue"; + /** + * Build got Bailed out + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["BuildBailedOut"] = 15] = "BuildBailedOut"; + /** + * No Code coverage configured + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["NoCodeCoverageTask"] = 16] = "NoCodeCoverageTask"; + /** + * CoverageMerge Job failed + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["MergeJobFailed"] = 17] = "MergeJobFailed"; + /** + * CoverageMergeInvoker Job failed + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["MergeInvokerJobFailed"] = 18] = "MergeInvokerJobFailed"; + /** + * CoverageMonitor Job failed + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["MonitorJobFailed"] = 19] = "MonitorJobFailed"; + /** + * CoverageMergeInvoker Job timeout + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["ModuleMergeInvokerJobTimeout"] = 20] = "ModuleMergeInvokerJobTimeout"; + /** + * CoverageMonitor Job timeout + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["MonitorJobTimeout"] = 21] = "MonitorJobTimeout"; + /** + * Invalid Coverage Input file + */ + CoverageDetailedSummaryStatus[CoverageDetailedSummaryStatus["InvalidCoverageInput"] = 22] = "InvalidCoverageInput"; +})(CoverageDetailedSummaryStatus = exports.CoverageDetailedSummaryStatus || (exports.CoverageDetailedSummaryStatus = {})); +/** + * 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 + */ +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 = {})); +/** + * Hierarchy type of the result/subresults. + */ +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"; + /** + * Unknown hierarchy type. + */ + ResultGroupType[ResultGroupType["Generic"] = 4] = "Generic"; +})(ResultGroupType = exports.ResultGroupType || (exports.ResultGroupType = {})); +var ResultMetadata; +(function (ResultMetadata) { + /** + * Rerun metadata + */ + ResultMetadata[ResultMetadata["Rerun"] = 1] = "Rerun"; + /** + * Flaky metadata + */ + ResultMetadata[ResultMetadata["Flaky"] = 2] = "Flaky"; +})(ResultMetadata = exports.ResultMetadata || (exports.ResultMetadata = {})); +/** + * Additional details with test result metadata + */ +var ResultMetaDataDetails; +(function (ResultMetaDataDetails) { + /** + * Core fields of test result metadata. + */ + ResultMetaDataDetails[ResultMetaDataDetails["None"] = 0] = "None"; + /** + * Test FlakyIdentifiers details in test result metadata. + */ + 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) { + /** + * Suite Clone + */ + ResultObjectType[ResultObjectType["TestSuite"] = 0] = "TestSuite"; + /** + * Plan Clone + */ + ResultObjectType[ResultObjectType["TestPlan"] = 1] = "TestPlan"; +})(ResultObjectType = exports.ResultObjectType || (exports.ResultObjectType = {})); +var RunType; +(function (RunType) { + /** + * Only used during an update to preserve the existing value. + */ + RunType[RunType["Unspecified"] = 0] = "Unspecified"; + /** + * Normal test run. + */ + RunType[RunType["Normal"] = 1] = "Normal"; + /** + * Test run created for the blocked result when a test point is blocked. + */ + RunType[RunType["Blocking"] = 2] = "Blocking"; + /** + * Test run created from Web. + */ + RunType[RunType["Web"] = 4] = "Web"; + /** + * Run initiated from web through MTR + */ + RunType[RunType["MtrRunInitiatedFromWeb"] = 8] = "MtrRunInitiatedFromWeb"; + /** + * These test run would require DTL environment. These could be either of automated or manual test run. + */ + RunType[RunType["RunWithDtlEnv"] = 16] = "RunWithDtlEnv"; + /** + * 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. + */ + 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 = {})); +var SessionResult; +(function (SessionResult) { + /** + * Default + */ + SessionResult[SessionResult["None"] = 0] = "None"; + /** + * Session result with Passed + */ + SessionResult[SessionResult["Passed"] = 1] = "Passed"; + /** + * Session result with Failed + */ + SessionResult[SessionResult["Failed"] = 2] = "Failed"; +})(SessionResult = exports.SessionResult || (exports.SessionResult = {})); +var SessionTimelineType; +(function (SessionTimelineType) { + /** + * Default + */ + SessionTimelineType[SessionTimelineType["None"] = 0] = "None"; + /** + * Timeline type for Queued status + */ + SessionTimelineType[SessionTimelineType["Queued"] = 1] = "Queued"; + /** + * Timeline type for Completed status + */ + SessionTimelineType[SessionTimelineType["Completed"] = 2] = "Completed"; + /** + * Timeline type for Started status + */ + SessionTimelineType[SessionTimelineType["Started"] = 3] = "Started"; +})(SessionTimelineType = exports.SessionTimelineType || (exports.SessionTimelineType = {})); +/** + * Option to get details in response + */ +var SuiteExpand; +(function (SuiteExpand) { + /** + * Include children in response. + */ + SuiteExpand[SuiteExpand["Children"] = 1] = "Children"; + /** + * Include default testers in response. + */ + SuiteExpand[SuiteExpand["DefaultTesters"] = 2] = "DefaultTesters"; +})(SuiteExpand = exports.SuiteExpand || (exports.SuiteExpand = {})); +var TCMServiceDataMigrationStatus; +(function (TCMServiceDataMigrationStatus) { + /** + * Migration Not Started + */ + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["NotStarted"] = 0] = "NotStarted"; + /** + * Migration InProgress + */ + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["InProgress"] = 1] = "InProgress"; + /** + * Migration Completed + */ + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["Completed"] = 2] = "Completed"; + /** + * Migration Failed + */ + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["Failed"] = 3] = "Failed"; +})(TCMServiceDataMigrationStatus = exports.TCMServiceDataMigrationStatus || (exports.TCMServiceDataMigrationStatus = {})); +/** + * Represents the state of an ITestConfiguration object. + */ +var TestConfigurationState; +(function (TestConfigurationState) { + /** + * The configuration can be used for new test runs. + */ + TestConfigurationState[TestConfigurationState["Active"] = 1] = "Active"; + /** + * The configuration has been retired and should not be used for new test runs. + */ + TestConfigurationState[TestConfigurationState["Inactive"] = 2] = "Inactive"; +})(TestConfigurationState = exports.TestConfigurationState || (exports.TestConfigurationState = {})); +/** + * Test Log Context + */ +var TestLogScope; +(function (TestLogScope) { + /** + * Log file is associated with Run, result, subresult + */ + TestLogScope[TestLogScope["Run"] = 0] = "Run"; + /** + * Log File associated with Build + */ + TestLogScope[TestLogScope["Build"] = 1] = "Build"; + /** + * Log File associated with Release + */ + TestLogScope[TestLogScope["Release"] = 2] = "Release"; +})(TestLogScope = exports.TestLogScope || (exports.TestLogScope = {})); +/** + * Test Log Status codes. + */ +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"; + /** + * File cannot be found + */ + TestLogStatusCode[TestLogStatusCode["FileNotFound"] = 14] = "FileNotFound"; + /** + * Directory cannot be found + */ + TestLogStatusCode[TestLogStatusCode["DirectoryNotFound"] = 15] = "DirectoryNotFound"; + /** + * Storage capacity exceeded + */ + TestLogStatusCode[TestLogStatusCode["StorageCapacityExceeded"] = 16] = "StorageCapacityExceeded"; +})(TestLogStatusCode = exports.TestLogStatusCode || (exports.TestLogStatusCode = {})); +/** + * Specifies set of possible log store endpoint type. + */ +var TestLogStoreEndpointType; +(function (TestLogStoreEndpointType) { + /** + * Endpoint type is scoped to root + */ + TestLogStoreEndpointType[TestLogStoreEndpointType["Root"] = 1] = "Root"; + /** + * Endpoint type is scoped to file + */ + TestLogStoreEndpointType[TestLogStoreEndpointType["File"] = 2] = "File"; +})(TestLogStoreEndpointType = exports.TestLogStoreEndpointType || (exports.TestLogStoreEndpointType = {})); +/** + * Specifies set of possible operation type on log store. + */ +var TestLogStoreOperationType; +(function (TestLogStoreOperationType) { + /** + * Operation is scoped to read data only. + */ + TestLogStoreOperationType[TestLogStoreOperationType["Read"] = 1] = "Read"; + /** + * Operation is scoped to create data only. + */ + TestLogStoreOperationType[TestLogStoreOperationType["Create"] = 2] = "Create"; + /** + * Operation is scoped to read and create data. + */ + TestLogStoreOperationType[TestLogStoreOperationType["ReadAndCreate"] = 3] = "ReadAndCreate"; +})(TestLogStoreOperationType = exports.TestLogStoreOperationType || (exports.TestLogStoreOperationType = {})); +/** + * Test Log Types + */ +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"; + /** + * merged Coverage file + */ + TestLogType[TestLogType["MergedCoverageFile"] = 6] = "MergedCoverageFile"; +})(TestLogType = exports.TestLogType || (exports.TestLogType = {})); +/** + * Valid TestOutcome values. + */ +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 = {})); +/** + * Group by for results + */ +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 TestResultsSessionState; +(function (TestResultsSessionState) { + /** + * Default + */ + TestResultsSessionState[TestResultsSessionState["None"] = 0] = "None"; + /** + * Session state with Running + */ + TestResultsSessionState[TestResultsSessionState["Running"] = 1] = "Running"; + /** + * Session state with Completed + */ + TestResultsSessionState[TestResultsSessionState["Completed"] = 2] = "Completed"; + /** + * Session state with Waiting + */ + TestResultsSessionState[TestResultsSessionState["Waiting"] = 3] = "Waiting"; + /** + * Session state with Cancelled + */ + TestResultsSessionState[TestResultsSessionState["Cancelled"] = 4] = "Cancelled"; +})(TestResultsSessionState = exports.TestResultsSessionState || (exports.TestResultsSessionState = {})); +var TestResultsSettingsType; +(function (TestResultsSettingsType) { + /** + * Returns All Test Settings. + */ + TestResultsSettingsType[TestResultsSettingsType["All"] = 1] = "All"; + /** + * Returns Flaky Test Settings. + */ + TestResultsSettingsType[TestResultsSettingsType["Flaky"] = 2] = "Flaky"; + /** + * Returns whether to log new tests or not + */ + TestResultsSettingsType[TestResultsSettingsType["NewTestLogging"] = 3] = "NewTestLogging"; +})(TestResultsSettingsType = exports.TestResultsSettingsType || (exports.TestResultsSettingsType = {})); +/** + * The types of outcomes for test run. + */ +var TestRunOutcome; +(function (TestRunOutcome) { + /** + * Run with zero failed tests and has at least one impacted test + */ + TestRunOutcome[TestRunOutcome["Passed"] = 0] = "Passed"; + /** + * Run with at-least one failed test. + */ + TestRunOutcome[TestRunOutcome["Failed"] = 1] = "Failed"; + /** + * Run with no impacted tests. + */ + TestRunOutcome[TestRunOutcome["NotImpacted"] = 2] = "NotImpacted"; + /** + * Runs with All tests in other category. + */ + TestRunOutcome[TestRunOutcome["Others"] = 3] = "Others"; +})(TestRunOutcome = exports.TestRunOutcome || (exports.TestRunOutcome = {})); +/** + * The types of publish context for run. + */ +var TestRunPublishContext; +(function (TestRunPublishContext) { + /** + * Run is published for Build Context. + */ + TestRunPublishContext[TestRunPublishContext["Build"] = 1] = "Build"; + /** + * Run is published for Release Context. + */ + TestRunPublishContext[TestRunPublishContext["Release"] = 2] = "Release"; + /** + * Run is published for any Context. + */ + TestRunPublishContext[TestRunPublishContext["All"] = 3] = "All"; +})(TestRunPublishContext = exports.TestRunPublishContext || (exports.TestRunPublishContext = {})); +/** + * The types of states for test run. + */ +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"; + /** + * Run is currently initializing This is a legacy state and should not be used any more + */ + TestRunState[TestRunState["Waiting"] = 5] = "Waiting"; + /** + * Run requires investigation because of a test point failure This is a legacy state and should not be used any more + */ + 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) { + /** + * 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"; + /** + * Run state when it is Aborted By the System. + */ + TestRunSubstate[TestRunSubstate["AbortedBySystem"] = 4] = "AbortedBySystem"; + /** + * Run state when run has timedOut. + */ + TestRunSubstate[TestRunSubstate["TimedOut"] = 5] = "TimedOut"; + /** + * Run state while Pending Analysis. + */ + TestRunSubstate[TestRunSubstate["PendingAnalysis"] = 6] = "PendingAnalysis"; + /** + * Run state after being Analysed. + */ + TestRunSubstate[TestRunSubstate["Analyzed"] = 7] = "Analyzed"; + /** + * Run state when cancellation is in Progress. + */ + TestRunSubstate[TestRunSubstate["CancellationInProgress"] = 8] = "CancellationInProgress"; +})(TestRunSubstate = exports.TestRunSubstate || (exports.TestRunSubstate = {})); +/** + * Represents the source from which the test session was created + */ +var TestSessionSource; +(function (TestSessionSource) { + /** + * Source of test session uncertain as it is stale + */ + TestSessionSource[TestSessionSource["Unknown"] = 0] = "Unknown"; + /** + * The session was created from Microsoft Test Manager exploratory desktop tool. + */ + TestSessionSource[TestSessionSource["XTDesktop"] = 1] = "XTDesktop"; + /** + * The session was created from feedback client. + */ + TestSessionSource[TestSessionSource["FeedbackDesktop"] = 2] = "FeedbackDesktop"; + /** + * The session was created from browser extension. + */ + TestSessionSource[TestSessionSource["XTWeb"] = 3] = "XTWeb"; + /** + * The session was created from browser extension. + */ + TestSessionSource[TestSessionSource["FeedbackWeb"] = 4] = "FeedbackWeb"; + /** + * The session was created from web access using Microsoft Test Manager exploratory desktop tool. + */ + TestSessionSource[TestSessionSource["XTDesktop2"] = 5] = "XTDesktop2"; + /** + * To show sessions from all supported sources. + */ + TestSessionSource[TestSessionSource["SessionInsightsForAll"] = 6] = "SessionInsightsForAll"; +})(TestSessionSource = exports.TestSessionSource || (exports.TestSessionSource = {})); +/** + * Represents the state of the test session. + */ +var TestSessionState; +(function (TestSessionState) { + /** + * Only used during an update to preserve the existing value. + */ + TestSessionState[TestSessionState["Unspecified"] = 0] = "Unspecified"; + /** + * The session is still being created. + */ + TestSessionState[TestSessionState["NotStarted"] = 1] = "NotStarted"; + /** + * The session is running. + */ + TestSessionState[TestSessionState["InProgress"] = 2] = "InProgress"; + /** + * The session has paused. + */ + TestSessionState[TestSessionState["Paused"] = 3] = "Paused"; + /** + * The session has completed. + */ + TestSessionState[TestSessionState["Completed"] = 4] = "Completed"; + /** + * This is required for Feedback session which are declined + */ + TestSessionState[TestSessionState["Declined"] = 5] = "Declined"; +})(TestSessionState = exports.TestSessionState || (exports.TestSessionState = {})); +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: {}, + CoverageDetailedSummaryStatus: { + enumValues: { + "none": 0, + "inProgress": 1, + "finalized": 2, + "pending": 3, + "updateRequestQueued": 4, + "noModulesFound": 5, + "numberOfFilesExceeded": 6, + "noInputFiles": 7, + "buildCancelled": 8, + "failedJobs": 9, + "moduleMergeJobTimeout": 10, + "codeCoverageSuccess": 11, + "invalidBuildConfiguration": 12, + "coverageAnalyzerBuildNotFound": 13, + "failedToRequeue": 14, + "buildBailedOut": 15, + "noCodeCoverageTask": 16, + "mergeJobFailed": 17, + "mergeInvokerJobFailed": 18, + "monitorJobFailed": 19, + "moduleMergeInvokerJobTimeout": 20, + "monitorJobTimeout": 21, + "invalidCoverageInput": 22 + } + }, + CoverageQueryFlags: { + enumValues: { + "modules": 1, + "functions": 2, + "blockData": 4 + } + }, + CoverageStatus: { + enumValues: { + "covered": 0, + "notCovered": 1, + "partiallyCovered": 2 + } + }, + CoverageSummaryStatus: { + enumValues: { + "none": 0, + "inProgress": 1, + "completed": 2, + "finalized": 3, + "pending": 4, + "updateRequestQueued": 5 + } + }, + CreateTestMessageLogEntryRequest: {}, + CreateTestResultsRequest: {}, + CreateTestRunRequest: {}, + CustomTestFieldDefinition: {}, + CustomTestFieldScope: { + 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 + } + }, + DatedTestFieldData: {}, + FailingSince: {}, + FetchTestResultsResponse: {}, + FlakyDetection: {}, + FlakyDetectionType: { + enumValues: { + "custom": 1, + "system": 2 + } + }, + FlakySettings: {}, + LastResultDetails: {}, + LegacyBuildConfiguration: {}, + LegacyReleaseReference: {}, + LegacyTestCaseResult: {}, + LegacyTestRun: {}, + LegacyTestSettings: {}, + Metrics: { + enumValues: { + "all": 1, + "resultSummary": 2, + "resultsAnalysis": 3, + "runSummary": 4 + } + }, + OperationType: { + enumValues: { + "add": 1, + "delete": 2 + } + }, + PipelineTestMetrics: {}, + PointLastResult: {}, + PointsResults2: {}, + QueryTestActionResultResponse: {}, + ReleaseReference: {}, + ReleaseReference2: {}, + RequirementsToTestsMapping2: {}, + Response: {}, + ResultDetails: { + enumValues: { + "none": 0, + "iterations": 1, + "workItems": 2, + "subResults": 4, + "point": 8 + } + }, + ResultGroupType: { + enumValues: { + "none": 0, + "rerun": 1, + "dataDriven": 2, + "orderedTest": 3, + "generic": 4 + } + }, + ResultMetadata: { + enumValues: { + "rerun": 1, + "flaky": 2 + } + }, + ResultMetaDataDetails: { + 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 + } + }, + SessionResult: { + enumValues: { + "none": 0, + "passed": 1, + "failed": 2 + } + }, + SessionTimelineType: { + enumValues: { + "none": 0, + "queued": 1, + "completed": 2, + "started": 3 + } + }, + SourceViewBuildCoverage: {}, + SuiteExpand: { + enumValues: { + "children": 1, + "defaultTesters": 2 + } + }, + TCMServiceDataMigrationStatus: { + enumValues: { + "notStarted": 0, + "inProgress": 1, + "completed": 2, + "failed": 3 + } + }, + TestActionResult: {}, + TestActionResult2: {}, + TestActionResultModel: {}, + TestAttachment: {}, + TestAuthoringDetails: {}, + TestCaseReference2: {}, + TestCaseResult: {}, + TestConfiguration: {}, + TestConfigurationState: { + enumValues: { + "active": 1, + "inactive": 2 + } + }, + TestExecutionReportData: {}, + TestExtensionField: {}, + TestExtensionFieldDetails: {}, + TestFailuresAnalysis: {}, + TestHistoryQuery: {}, + TestIterationDetailsModel: {}, + TestLog: {}, + TestLogReference: {}, + TestLogScope: { + enumValues: { + "run": 0, + "build": 1, + "release": 2 + } + }, + TestLogStatus: {}, + TestLogStatusCode: { + 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 + } + }, + TestLogStoreAttachment: {}, + TestLogStoreEndpointDetails: {}, + TestLogStoreEndpointType: { + enumValues: { + "root": 1, + "file": 2 + } + }, + TestLogStoreOperationType: { + enumValues: { + "read": 1, + "create": 2, + "readAndCreate": 3 + } + }, + TestLogType: { + enumValues: { + "generalAttachment": 1, + "codeCoverage": 2, + "testImpact": 3, + "intermediate": 4, + "system": 5, + "mergedCoverageFile": 6 + } + }, + TestMessageLogDetails: {}, + TestMessageLogEntry: {}, + TestMessageLogEntry2: {}, + TestOutcome: { + 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 + } + }, + TestParameter2: {}, + TestPlan: {}, + TestPlanCloneRequest: {}, + TestPlanHubData: {}, + TestPlansWithSelection: {}, + TestPoint: {}, + TestPointReference: {}, + TestPointsEvent: {}, + TestPointsQuery: {}, + TestPointState: { + 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 + } + }, + TestResultsDetails: {}, + TestResultsDetailsForGroup: {}, + TestResultsEx2: {}, + TestResultsQuery: {}, + TestResultsSession: {}, + TestResultsSessionState: { + enumValues: { + "none": 0, + "running": 1, + "completed": 2, + "waiting": 3, + "cancelled": 4 + } + }, + TestResultsSettings: {}, + TestResultsSettingsType: { + enumValues: { + "all": 1, + "flaky": 2, + "newTestLogging": 3 + } + }, + TestResultSummary: {}, + TestResultsUpdateSettings: {}, + TestResultsWithWatermark: {}, + TestResultTrendFilter: {}, + TestRun: {}, + TestRun2: {}, + TestRunCanceledEvent: {}, + TestRunCreatedEvent: {}, + TestRunEvent: {}, + TestRunEx2: {}, + TestRunOutcome: { + enumValues: { + "passed": 0, + "failed": 1, + "notImpacted": 2, + "others": 3 + } + }, + TestRunPublishContext: { + enumValues: { + "build": 1, + "release": 2, + "all": 3 + } + }, + TestRunStartedEvent: {}, + TestRunState: { + enumValues: { + "unspecified": 0, + "notStarted": 1, + "inProgress": 2, + "completed": 3, + "aborted": 4, + "waiting": 5, + "needsInvestigation": 6 + } + }, + TestRunStatistic: {}, + TestRunSubstate: { + enumValues: { + "none": 0, + "creatingEnvironment": 1, + "runningTests": 2, + "canceledByUser": 3, + "abortedBySystem": 4, + "timedOut": 5, + "pendingAnalysis": 6, + "analyzed": 7, + "cancellationInProgress": 8 + } + }, + TestRunSummary2: {}, + TestRunWithDtlEnvEvent: {}, + TestSession: {}, + TestSessionExploredWorkItemReference: {}, + TestSessionSource: { + enumValues: { + "unknown": 0, + "xtDesktop": 1, + "feedbackDesktop": 2, + "xtWeb": 3, + "feedbackWeb": 4, + "xtDesktop2": 5, + "sessionInsightsForAll": 6 + } + }, + TestSessionState: { + enumValues: { + "unspecified": 0, + "notStarted": 1, + "inProgress": 2, + "paused": 3, + "completed": 4, + "declined": 5 + } + }, + TestSettings2: {}, + TestSubResult: {}, + TestSuite: {}, + TestSummaryForWorkItem: {}, + Timeline: {}, + 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 = { + coverageDetailedSummaryStatus: { + enumType: exports.TypeInfo.CoverageDetailedSummaryStatus + }, + 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 + }, + testCaseResult: { + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.ResultUpdateRequestModel.fields = { + actionResultDeletes: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResultModel + }, + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResultModel + } +}; +exports.TypeInfo.ResultUpdateResponse.fields = { + lastUpdated: { + 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, + }, + 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.TestMessageLogDetails + }, + runSummary: { + isArray: true, + typeInfo: exports.TypeInfo.RunSummaryModel + }, + substate: { + enumType: exports.TypeInfo.TestRunSubstate + } +}; +exports.TypeInfo.SourceViewBuildCoverage.fields = { + configuration: { + typeInfo: exports.TypeInfo.BuildConfiguration + } +}; +exports.TypeInfo.TestActionResult.fields = { + creationDate: { + isDate: true, + }, + dateCompleted: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.TestActionResult2.fields = { + creationDate: { + isDate: true, + }, + dateCompleted: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.TestActionResultModel.fields = { + completedDate: { + isDate: true, + }, + startedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestAttachment.fields = { + attachmentType: { + enumType: exports.TypeInfo.AttachmentType + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TestAuthoringDetails.fields = { + lastUpdated: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TestPointState + } +}; +exports.TypeInfo.TestCaseReference2.fields = { + creationDate: { + isDate: true, + }, + lastRefTestRunDate: { + isDate: true, + } +}; +exports.TypeInfo.TestCaseResult.fields = { + completedDate: { + isDate: true, + }, + createdDate: { + isDate: true, + }, + failingSince: { + typeInfo: exports.TypeInfo.FailingSince + }, + iterationDetails: { + isArray: true, + typeInfo: exports.TypeInfo.TestIterationDetailsModel + }, + lastUpdatedDate: { + isDate: true, + }, + releaseReference: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + resultGroupType: { + enumType: exports.TypeInfo.ResultGroupType + }, + startedDate: { + isDate: true, + }, + subResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestSubResult + } +}; +exports.TypeInfo.TestConfiguration.fields = { + lastUpdatedDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TestConfigurationState + } +}; +exports.TypeInfo.TestExecutionReportData.fields = { + reportData: { + 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 + } +}; +exports.TypeInfo.TestHistoryQuery.fields = { + groupBy: { + enumType: exports.TypeInfo.TestResultGroupBy + }, + maxCompleteDate: { + isDate: true, + }, + resultsForGroup: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultHistoryForGroup + } +}; +exports.TypeInfo.TestIterationDetailsModel.fields = { + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResultModel + }, + completedDate: { + isDate: true, + }, + startedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestLog.fields = { + logReference: { + typeInfo: exports.TypeInfo.TestLogReference + }, + modifiedOn: { + 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.TestLogStoreAttachment.fields = { + attachmentType: { + enumType: exports.TypeInfo.AttachmentType + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TestLogStoreEndpointDetails.fields = { + endpointType: { + enumType: exports.TypeInfo.TestLogStoreEndpointType + }, + status: { + enumType: exports.TypeInfo.TestLogStatusCode + } +}; +exports.TypeInfo.TestMessageLogDetails.fields = { + dateCreated: { + isDate: true, + } +}; +exports.TypeInfo.TestMessageLogEntry.fields = { + dateCreated: { + isDate: true, + } +}; +exports.TypeInfo.TestMessageLogEntry2.fields = { + dateCreated: { + isDate: true, + } +}; +exports.TypeInfo.TestParameter2.fields = { + creationDate: { + isDate: true, + }, + dateModified: { + isDate: true, + } +}; +exports.TypeInfo.TestPlan.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPlanCloneRequest.fields = { + destinationTestPlan: { + typeInfo: exports.TypeInfo.TestPlan + } +}; +exports.TypeInfo.TestPlanHubData.fields = { + testPlan: { + typeInfo: exports.TypeInfo.TestPlan + }, + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPoint + }, + testSuites: { + isArray: true, + typeInfo: exports.TypeInfo.TestSuite + } +}; +exports.TypeInfo.TestPlansWithSelection.fields = { + plans: { + isArray: true, + typeInfo: exports.TypeInfo.TestPlan + } +}; +exports.TypeInfo.TestPoint.fields = { + lastResetToActive: { + isDate: true, + }, + lastResultDetails: { + typeInfo: exports.TypeInfo.LastResultDetails + }, + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPointReference.fields = { + state: { + enumType: exports.TypeInfo.TestPointState + } +}; +exports.TypeInfo.TestPointsEvent.fields = { + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPointReference + } +}; +exports.TypeInfo.TestPointsQuery.fields = { + points: { + isArray: true, + typeInfo: exports.TypeInfo.TestPoint + } +}; +exports.TypeInfo.TestPointsUpdatedEvent.fields = { + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPointReference + } +}; +exports.TypeInfo.TestResult2.fields = { + creationDate: { + isDate: true, + }, + dateCompleted: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.TestResultAcrossProjectResponse.fields = { + testResult: { + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.TestResultAttachment.fields = { + attachmentType: { + enumType: exports.TypeInfo.AttachmentType + }, + creationDate: { + isDate: true, + } +}; +exports.TypeInfo.TestResultHistory.fields = { + resultsForGroup: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultHistoryDetailsForGroup + } +}; +exports.TypeInfo.TestResultHistoryDetailsForGroup.fields = { + latestResult: { + typeInfo: exports.TypeInfo.TestCaseResult + } +}; +exports.TypeInfo.TestResultHistoryForGroup.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.TestCaseResult + } +}; +exports.TypeInfo.TestResultModelBase.fields = { + completedDate: { + isDate: true, + }, + startedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestResultReset2.fields = { + dateModified: { + isDate: true, + } +}; +exports.TypeInfo.TestResultsContext.fields = { + contextType: { + enumType: exports.TypeInfo.TestResultsContextType + }, + release: { + typeInfo: exports.TypeInfo.ReleaseReference + } +}; +exports.TypeInfo.TestResultsDetails.fields = { + resultsForGroup: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultsDetailsForGroup + } +}; +exports.TypeInfo.TestResultsDetailsForGroup.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.TestCaseResult + }, + resultsCountByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome + } +}; +exports.TypeInfo.TestResultsEx2.fields = { + creationDate: { + isDate: true, + }, + dateTimeValue: { + isDate: true, + } +}; +exports.TypeInfo.TestResultsQuery.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.TestCaseResult + }, + resultsFilter: { + typeInfo: exports.TypeInfo.ResultsFilter + } +}; +exports.TypeInfo.TestResultsSession.fields = { + endTimeUTC: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.SessionResult + }, + startTimeUTC: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TestResultsSessionState + }, +}; +exports.TypeInfo.TestResultsSettings.fields = { + flakySettings: { + typeInfo: exports.TypeInfo.FlakySettings + } +}; +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.TestResultsUpdateSettings.fields = { + flakySettings: { + typeInfo: exports.TypeInfo.FlakySettings + } +}; +exports.TypeInfo.TestResultsWithWatermark.fields = { + changedDate: { + isDate: true, + }, + pointsResults: { + isArray: true, + typeInfo: exports.TypeInfo.PointsResults2 + } +}; +exports.TypeInfo.TestResultTrendFilter.fields = { + maxCompleteDate: { + isDate: true, + } +}; +exports.TypeInfo.TestRun.fields = { + buildConfiguration: { + typeInfo: exports.TypeInfo.BuildConfiguration + }, + completedDate: { + isDate: true, + }, + createdDate: { + isDate: true, + }, + dueDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + release: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + runStatistics: { + isArray: true, + typeInfo: exports.TypeInfo.RunStatistic + }, + startedDate: { + isDate: true, + }, + substate: { + enumType: exports.TypeInfo.TestRunSubstate + } +}; +exports.TypeInfo.TestRun2.fields = { + completeDate: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + deletedOn: { + isDate: true, + }, + dueDate: { + isDate: true, + }, + lastUpdated: { + isDate: true, + }, + 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, + }, + dateTimeValue: { + isDate: true, + } +}; +exports.TypeInfo.TestRunStartedEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestRunStatistic.fields = { + runStatistics: { + isArray: true, + typeInfo: exports.TypeInfo.RunStatistic + } +}; +exports.TypeInfo.TestRunSummary2.fields = { + testRunCompletedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestRunWithDtlEnvEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestSession.fields = { + endDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + source: { + enumType: exports.TypeInfo.TestSessionSource + }, + startDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TestSessionState + } +}; +exports.TypeInfo.TestSessionExploredWorkItemReference.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.TestSettings2.fields = { + createdDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestSubResult.fields = { + completedDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + resultGroupType: { + enumType: exports.TypeInfo.ResultGroupType + }, + startedDate: { + isDate: true, + }, + subResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestSubResult + } +}; +exports.TypeInfo.TestSuite.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.TestSuite + }, + lastPopulatedDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestSummaryForWorkItem.fields = { + summary: { + typeInfo: exports.TypeInfo.AggregatedDataForResultTrend + } +}; +exports.TypeInfo.Timeline.fields = { + timestampUTC: { + isDate: true, + } +}; +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 + } +}; + + +/***/ }), + +/***/ 8969: +/***/ ((__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__(3047); +const TfsCoreInterfaces = __nccwpck_require__(3931); +/** + * Exclude Flags for suite test case object. Exclude Flags exclude various objects from payload depending on the value passed + */ +var ExcludeFlags; +(function (ExcludeFlags) { + /** + * To exclude nothing + */ + ExcludeFlags[ExcludeFlags["None"] = 0] = "None"; + /** + * To exclude point assignments, pass exclude = 1 + */ + ExcludeFlags[ExcludeFlags["PointAssignments"] = 1] = "PointAssignments"; + /** + * To exclude extra information (links, test plan, test suite), pass exclude = 2 + */ + ExcludeFlags[ExcludeFlags["ExtraInformation"] = 2] = "ExtraInformation"; +})(ExcludeFlags = exports.ExcludeFlags || (exports.ExcludeFlags = {})); +var FailureType; +(function (FailureType) { + FailureType[FailureType["None"] = 0] = "None"; + FailureType[FailureType["Regression"] = 1] = "Regression"; + FailureType[FailureType["New_Issue"] = 2] = "New_Issue"; + FailureType[FailureType["Known_Issue"] = 3] = "Known_Issue"; + FailureType[FailureType["Unknown"] = 4] = "Unknown"; + FailureType[FailureType["Null_Value"] = 5] = "Null_Value"; + FailureType[FailureType["MaxValue"] = 5] = "MaxValue"; +})(FailureType = exports.FailureType || (exports.FailureType = {})); +var LastResolutionState; +(function (LastResolutionState) { + LastResolutionState[LastResolutionState["None"] = 0] = "None"; + LastResolutionState[LastResolutionState["NeedsInvestigation"] = 1] = "NeedsInvestigation"; + LastResolutionState[LastResolutionState["TestIssue"] = 2] = "TestIssue"; + LastResolutionState[LastResolutionState["ProductIssue"] = 3] = "ProductIssue"; + LastResolutionState[LastResolutionState["ConfigurationIssue"] = 4] = "ConfigurationIssue"; + LastResolutionState[LastResolutionState["NullValue"] = 5] = "NullValue"; + LastResolutionState[LastResolutionState["MaxValue"] = 5] = "MaxValue"; +})(LastResolutionState = exports.LastResolutionState || (exports.LastResolutionState = {})); +/** + * Enum representing the return code of data provider. + */ +var LibraryTestCasesDataReturnCode; +(function (LibraryTestCasesDataReturnCode) { + LibraryTestCasesDataReturnCode[LibraryTestCasesDataReturnCode["Success"] = 0] = "Success"; + LibraryTestCasesDataReturnCode[LibraryTestCasesDataReturnCode["Error"] = 1] = "Error"; +})(LibraryTestCasesDataReturnCode = exports.LibraryTestCasesDataReturnCode || (exports.LibraryTestCasesDataReturnCode = {})); +var Outcome; +(function (Outcome) { + /** + * Only used during an update to preserve the existing value. + */ + Outcome[Outcome["Unspecified"] = 0] = "Unspecified"; + /** + * Test has not been completed, or the test type does not report pass/failure. + */ + Outcome[Outcome["None"] = 1] = "None"; + /** + * Test was executed w/o any issues. + */ + Outcome[Outcome["Passed"] = 2] = "Passed"; + /** + * Test was executed, but there were issues. Issues may involve exceptions or failed assertions. + */ + Outcome[Outcome["Failed"] = 3] = "Failed"; + /** + * Test has completed, but we can't say if it passed or failed. May be used for aborted tests... + */ + Outcome[Outcome["Inconclusive"] = 4] = "Inconclusive"; + /** + * The test timed out + */ + Outcome[Outcome["Timeout"] = 5] = "Timeout"; + /** + * Test was aborted. This was not caused by a user gesture, but rather by a framework decision. + */ + Outcome[Outcome["Aborted"] = 6] = "Aborted"; + /** + * Test had it chance for been executed but was not, as ITestElement.IsRunnable == false. + */ + Outcome[Outcome["Blocked"] = 7] = "Blocked"; + /** + * Test was not executed. This was caused by a user gesture - e.g. user hit stop button. + */ + Outcome[Outcome["NotExecuted"] = 8] = "NotExecuted"; + /** + * To be used by Run level results. This is not a failure. + */ + Outcome[Outcome["Warning"] = 9] = "Warning"; + /** + * There was a system error while we were trying to execute a test. + */ + Outcome[Outcome["Error"] = 10] = "Error"; + /** + * Test is Not Applicable for execution. + */ + Outcome[Outcome["NotApplicable"] = 11] = "NotApplicable"; + /** + * Test is paused. + */ + Outcome[Outcome["Paused"] = 12] = "Paused"; + /** + * Test is currently executing. Added this for TCM charts + */ + Outcome[Outcome["InProgress"] = 13] = "InProgress"; + /** + * Test is not impacted. Added fot TIA. + */ + Outcome[Outcome["NotImpacted"] = 14] = "NotImpacted"; + Outcome[Outcome["MaxValue"] = 14] = "MaxValue"; +})(Outcome = exports.Outcome || (exports.Outcome = {})); +var PointState; +(function (PointState) { + /** + * Default + */ + PointState[PointState["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. + */ + PointState[PointState["Ready"] = 1] = "Ready"; + /** + * The test has passed successfully and does not need to be re-run for the test pass to be considered complete. + */ + PointState[PointState["Completed"] = 2] = "Completed"; + /** + * The test point needs to be executed but is not able to. + */ + PointState[PointState["NotReady"] = 3] = "NotReady"; + /** + * The test is being executed. + */ + PointState[PointState["InProgress"] = 4] = "InProgress"; + PointState[PointState["MaxValue"] = 4] = "MaxValue"; +})(PointState = exports.PointState || (exports.PointState = {})); +var ResultState; +(function (ResultState) { + /** + * Only used during an update to preserve the existing value. + */ + ResultState[ResultState["Unspecified"] = 0] = "Unspecified"; + /** + * Test is in the execution queue, was not started yet. + */ + ResultState[ResultState["Pending"] = 1] = "Pending"; + /** + * Test has been queued. This is applicable when a test case is queued for execution + */ + ResultState[ResultState["Queued"] = 2] = "Queued"; + /** + * Test is currently executing. + */ + ResultState[ResultState["InProgress"] = 3] = "InProgress"; + /** + * Test has been paused. This is applicable when a test case is paused by the user (For e.g. Manual Tester can pause the execution of the manual test case) + */ + ResultState[ResultState["Paused"] = 4] = "Paused"; + /** + * Test has completed, but there is no quantitative measure of completeness. This may apply to load tests. + */ + ResultState[ResultState["Completed"] = 5] = "Completed"; + ResultState[ResultState["MaxValue"] = 5] = "MaxValue"; +})(ResultState = exports.ResultState || (exports.ResultState = {})); +var SuiteEntryTypes; +(function (SuiteEntryTypes) { + /** + * Test Case + */ + SuiteEntryTypes[SuiteEntryTypes["TestCase"] = 0] = "TestCase"; + /** + * Child Suite + */ + SuiteEntryTypes[SuiteEntryTypes["Suite"] = 1] = "Suite"; +})(SuiteEntryTypes = exports.SuiteEntryTypes || (exports.SuiteEntryTypes = {})); +/** + * Option to get details in response + */ +var SuiteExpand; +(function (SuiteExpand) { + /** + * Dont include any of the expansions in output. + */ + SuiteExpand[SuiteExpand["None"] = 0] = "None"; + /** + * Include children in response. + */ + SuiteExpand[SuiteExpand["Children"] = 1] = "Children"; + /** + * Include default testers in response. + */ + SuiteExpand[SuiteExpand["DefaultTesters"] = 2] = "DefaultTesters"; +})(SuiteExpand = exports.SuiteExpand || (exports.SuiteExpand = {})); +var TestEntityTypes; +(function (TestEntityTypes) { + TestEntityTypes[TestEntityTypes["TestCase"] = 0] = "TestCase"; + TestEntityTypes[TestEntityTypes["TestPoint"] = 1] = "TestPoint"; +})(TestEntityTypes = exports.TestEntityTypes || (exports.TestEntityTypes = {})); +/** + * Enum used to define the queries used in Test Plans Library. + */ +var TestPlansLibraryQuery; +(function (TestPlansLibraryQuery) { + TestPlansLibraryQuery[TestPlansLibraryQuery["None"] = 0] = "None"; + TestPlansLibraryQuery[TestPlansLibraryQuery["AllTestCases"] = 1] = "AllTestCases"; + TestPlansLibraryQuery[TestPlansLibraryQuery["TestCasesWithActiveBugs"] = 2] = "TestCasesWithActiveBugs"; + TestPlansLibraryQuery[TestPlansLibraryQuery["TestCasesNotLinkedToRequirements"] = 3] = "TestCasesNotLinkedToRequirements"; + TestPlansLibraryQuery[TestPlansLibraryQuery["TestCasesLinkedToRequirements"] = 4] = "TestCasesLinkedToRequirements"; + TestPlansLibraryQuery[TestPlansLibraryQuery["AllSharedSteps"] = 11] = "AllSharedSteps"; + TestPlansLibraryQuery[TestPlansLibraryQuery["SharedStepsNotLinkedToRequirement"] = 12] = "SharedStepsNotLinkedToRequirement"; +})(TestPlansLibraryQuery = exports.TestPlansLibraryQuery || (exports.TestPlansLibraryQuery = {})); +var TestPlansLibraryWorkItemFilterMode; +(function (TestPlansLibraryWorkItemFilterMode) { + /** + * Default. Have the field values separated by an OR clause. + */ + TestPlansLibraryWorkItemFilterMode[TestPlansLibraryWorkItemFilterMode["Or"] = 0] = "Or"; + /** + * Have the field values separated by an AND clause. + */ + TestPlansLibraryWorkItemFilterMode[TestPlansLibraryWorkItemFilterMode["And"] = 1] = "And"; +})(TestPlansLibraryWorkItemFilterMode = exports.TestPlansLibraryWorkItemFilterMode || (exports.TestPlansLibraryWorkItemFilterMode = {})); +/** + * Type of TestSuite + */ +var TestSuiteType; +(function (TestSuiteType) { + /** + * Default suite type + */ + TestSuiteType[TestSuiteType["None"] = 0] = "None"; + /** + * Query Based test Suite + */ + TestSuiteType[TestSuiteType["DynamicTestSuite"] = 1] = "DynamicTestSuite"; + /** + * Static Test Suite + */ + TestSuiteType[TestSuiteType["StaticTestSuite"] = 2] = "StaticTestSuite"; + /** + * Requirement based Test Suite + */ + TestSuiteType[TestSuiteType["RequirementTestSuite"] = 3] = "RequirementTestSuite"; +})(TestSuiteType = exports.TestSuiteType || (exports.TestSuiteType = {})); +var UserFriendlyTestOutcome; +(function (UserFriendlyTestOutcome) { + UserFriendlyTestOutcome[UserFriendlyTestOutcome["InProgress"] = 0] = "InProgress"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Blocked"] = 1] = "Blocked"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Failed"] = 2] = "Failed"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Passed"] = 3] = "Passed"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Ready"] = 4] = "Ready"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["NotApplicable"] = 5] = "NotApplicable"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Paused"] = 6] = "Paused"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Timeout"] = 7] = "Timeout"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Warning"] = 8] = "Warning"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Error"] = 9] = "Error"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["NotExecuted"] = 10] = "NotExecuted"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Inconclusive"] = 11] = "Inconclusive"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Aborted"] = 12] = "Aborted"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["None"] = 13] = "None"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["NotImpacted"] = 14] = "NotImpacted"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["Unspecified"] = 15] = "Unspecified"; + UserFriendlyTestOutcome[UserFriendlyTestOutcome["MaxValue"] = 15] = "MaxValue"; +})(UserFriendlyTestOutcome = exports.UserFriendlyTestOutcome || (exports.UserFriendlyTestOutcome = {})); +exports.TypeInfo = { + CloneOperationCommonResponse: {}, + CloneTestCaseOperationInformation: {}, + CloneTestPlanOperationInformation: {}, + CloneTestPlanParams: {}, + CloneTestSuiteOperationInformation: {}, + DestinationTestPlanCloneParams: {}, + ExcludeFlags: { + enumValues: { + "none": 0, + "pointAssignments": 1, + "extraInformation": 2 + } + }, + FailureType: { + enumValues: { + "none": 0, + "regression": 1, + "new_Issue": 2, + "known_Issue": 3, + "unknown": 4, + "null_Value": 5, + "maxValue": 5 + } + }, + LastResolutionState: { + enumValues: { + "none": 0, + "needsInvestigation": 1, + "testIssue": 2, + "productIssue": 3, + "configurationIssue": 4, + "nullValue": 5, + "maxValue": 5 + } + }, + LibraryTestCasesDataReturnCode: { + enumValues: { + "success": 0, + "error": 1 + } + }, + LibraryWorkItemsData: {}, + LibraryWorkItemsDataProviderRequest: {}, + Outcome: { + 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 + } + }, + PointState: { + enumValues: { + "none": 0, + "ready": 1, + "completed": 2, + "notReady": 3, + "inProgress": 4, + "maxValue": 4 + } + }, + Results: {}, + ResultState: { + enumValues: { + "unspecified": 0, + "pending": 1, + "queued": 2, + "inProgress": 3, + "paused": 4, + "completed": 5, + "maxValue": 5 + } + }, + SourceTestplanResponse: {}, + SourceTestSuiteResponse: {}, + SuiteEntry: {}, + SuiteEntryTypes: { + enumValues: { + "testCase": 0, + "suite": 1 + } + }, + SuiteEntryUpdateParams: {}, + SuiteExpand: { + enumValues: { + "none": 0, + "children": 1, + "defaultTesters": 2 + } + }, + TestCase: {}, + TestCaseAssociatedResult: {}, + TestCaseResultsData: {}, + TestConfiguration: {}, + TestConfigurationCreateUpdateParameters: {}, + TestEntityTypes: { + enumValues: { + "testCase": 0, + "testPoint": 1 + } + }, + TestPlan: {}, + TestPlanCreateParams: {}, + TestPlanDetailedReference: {}, + TestPlansHubRefreshData: {}, + TestPlansLibraryQuery: { + enumValues: { + "none": 0, + "allTestCases": 1, + "testCasesWithActiveBugs": 2, + "testCasesNotLinkedToRequirements": 3, + "testCasesLinkedToRequirements": 4, + "allSharedSteps": 11, + "sharedStepsNotLinkedToRequirement": 12 + } + }, + TestPlansLibraryWorkItemFilter: {}, + TestPlansLibraryWorkItemFilterMode: { + enumValues: { + "or": 0, + "and": 1 + } + }, + TestPlanUpdateParams: {}, + TestPoint: {}, + TestPointResults: {}, + TestPointUpdateParams: {}, + TestSuite: {}, + TestSuiteCreateParams: {}, + TestSuiteReferenceWithProject: {}, + TestSuiteType: { + enumValues: { + "none": 0, + "dynamicTestSuite": 1, + "staticTestSuite": 2, + "requirementTestSuite": 3 + } + }, + TestVariable: {}, + UserFriendlyTestOutcome: { + enumValues: { + "inProgress": 0, + "blocked": 1, + "failed": 2, + "passed": 3, + "ready": 4, + "notApplicable": 5, + "paused": 6, + "timeout": 7, + "warning": 8, + "error": 9, + "notExecuted": 10, + "inconclusive": 11, + "aborted": 12, + "none": 13, + "notImpacted": 14, + "unspecified": 15, + "maxValue": 15 + } + }, +}; +exports.TypeInfo.CloneOperationCommonResponse.fields = { + completionDate: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + state: { + enumType: TFS_TestManagement_Contracts.TypeInfo.CloneOperationState + } +}; +exports.TypeInfo.CloneTestCaseOperationInformation.fields = { + cloneOperationResponse: { + typeInfo: exports.TypeInfo.CloneOperationCommonResponse + }, + destinationTestSuite: { + typeInfo: exports.TypeInfo.TestSuiteReferenceWithProject + }, + sourceTestSuite: { + typeInfo: exports.TypeInfo.SourceTestSuiteResponse + } +}; +exports.TypeInfo.CloneTestPlanOperationInformation.fields = { + cloneOperationResponse: { + typeInfo: exports.TypeInfo.CloneOperationCommonResponse + }, + destinationTestPlan: { + typeInfo: exports.TypeInfo.TestPlan + }, + sourceTestPlan: { + typeInfo: exports.TypeInfo.SourceTestplanResponse + } +}; +exports.TypeInfo.CloneTestPlanParams.fields = { + destinationTestPlan: { + typeInfo: exports.TypeInfo.DestinationTestPlanCloneParams + } +}; +exports.TypeInfo.CloneTestSuiteOperationInformation.fields = { + clonedTestSuite: { + typeInfo: exports.TypeInfo.TestSuiteReferenceWithProject + }, + cloneOperationResponse: { + typeInfo: exports.TypeInfo.CloneOperationCommonResponse + }, + destinationTestSuite: { + typeInfo: exports.TypeInfo.TestSuiteReferenceWithProject + }, + sourceTestSuite: { + typeInfo: exports.TypeInfo.TestSuiteReferenceWithProject + } +}; +exports.TypeInfo.DestinationTestPlanCloneParams.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + } +}; +exports.TypeInfo.LibraryWorkItemsData.fields = { + returnCode: { + enumType: exports.TypeInfo.LibraryTestCasesDataReturnCode + } +}; +exports.TypeInfo.LibraryWorkItemsDataProviderRequest.fields = { + filterValues: { + isArray: true, + typeInfo: exports.TypeInfo.TestPlansLibraryWorkItemFilter + }, + libraryQueryType: { + enumType: exports.TypeInfo.TestPlansLibraryQuery + } +}; +exports.TypeInfo.Results.fields = { + outcome: { + enumType: exports.TypeInfo.Outcome + } +}; +exports.TypeInfo.SourceTestplanResponse.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.SourceTestSuiteResponse.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.SuiteEntry.fields = { + suiteEntryType: { + enumType: exports.TypeInfo.SuiteEntryTypes + } +}; +exports.TypeInfo.SuiteEntryUpdateParams.fields = { + suiteEntryType: { + enumType: exports.TypeInfo.SuiteEntryTypes + } +}; +exports.TypeInfo.TestCase.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.TestCaseAssociatedResult.fields = { + completedDate: { + isDate: true, + }, + outcome: { + enumType: exports.TypeInfo.UserFriendlyTestOutcome + } +}; +exports.TypeInfo.TestCaseResultsData.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.TestCaseAssociatedResult + } +}; +exports.TypeInfo.TestConfiguration.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + state: { + enumType: TFS_TestManagement_Contracts.TypeInfo.TestConfigurationState + } +}; +exports.TypeInfo.TestConfigurationCreateUpdateParameters.fields = { + state: { + enumType: TFS_TestManagement_Contracts.TypeInfo.TestConfigurationState + } +}; +exports.TypeInfo.TestPlan.fields = { + endDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + startDate: { + isDate: true, + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPlanCreateParams.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPlanDetailedReference.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPlansHubRefreshData.fields = { + testCases: { + isArray: true, + typeInfo: exports.TypeInfo.TestCase + }, + testPlan: { + typeInfo: exports.TypeInfo.TestPlanDetailedReference + }, + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPoint + }, + testSuites: { + isArray: true, + typeInfo: exports.TypeInfo.TestSuite + } +}; +exports.TypeInfo.TestPlansLibraryWorkItemFilter.fields = { + filterMode: { + enumType: exports.TypeInfo.TestPlansLibraryWorkItemFilterMode + } +}; +exports.TypeInfo.TestPlanUpdateParams.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPoint.fields = { + lastResetToActive: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + results: { + typeInfo: exports.TypeInfo.TestPointResults + } +}; +exports.TypeInfo.TestPointResults.fields = { + failureType: { + enumType: exports.TypeInfo.FailureType + }, + lastResolutionState: { + enumType: exports.TypeInfo.LastResolutionState + }, + lastResultDetails: { + typeInfo: TFS_TestManagement_Contracts.TypeInfo.LastResultDetails + }, + lastResultState: { + enumType: exports.TypeInfo.ResultState + }, + outcome: { + enumType: exports.TypeInfo.Outcome + }, + state: { + enumType: exports.TypeInfo.PointState + } +}; +exports.TypeInfo.TestPointUpdateParams.fields = { + results: { + typeInfo: exports.TypeInfo.Results + } +}; +exports.TypeInfo.TestSuite.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.TestSuite + }, + lastPopulatedDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + suiteType: { + enumType: exports.TypeInfo.TestSuiteType + } +}; +exports.TypeInfo.TestSuiteCreateParams.fields = { + suiteType: { + enumType: exports.TypeInfo.TestSuiteType + } +}; +exports.TypeInfo.TestSuiteReferenceWithProject.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.TestVariable.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; + + +/***/ }), + +/***/ 9003: +/***/ ((__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 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 + } +}; + + +/***/ }), + +/***/ 5787: +/***/ ((__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__(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 + } +}; + + +/***/ }), + +/***/ 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__(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 + } +}; + + +/***/ }), + +/***/ 6938: +/***/ ((__unused_webpack_module, exports) => { + +"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 the possible types for the comment format. Should be in sync with WorkItemCommentFormat.cs + */ +var CommentFormat; +(function (CommentFormat) { + CommentFormat[CommentFormat["Markdown"] = 0] = "Markdown"; + CommentFormat[CommentFormat["Html"] = 1] = "Html"; +})(CommentFormat = exports.CommentFormat || (exports.CommentFormat = {})); +/** + * 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 + } + }, + CommentFormat: { + enumValues: { + "markdown": 0, + "html": 1 + } + }, + 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, + }, + format: { + enumType: exports.TypeInfo.CommentFormat + }, + 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 = { + format: { + enumType: exports.TypeInfo.CommentFormat + }, + 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, + } +}; + + +/***/ }), + +/***/ 1655: +/***/ ((__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 + } + }, + 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 + } +}; + + +/***/ }), + +/***/ 4524: +/***/ ((__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"; + /** + * $WhenWas. This condition limits the execution of its children to cases when another field value is changed from one value to another. e.g. If the condition is : When the work item state changes from New to Approved, here $WhenWas clause defines the "New" state of the workitem and $When clause defines "Approved" state. + */ + 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"; + /** + * This condition checks if current user is member of a particular group. This condition does not have any 1:1 mapping with any server side rule condition, rather this is a dummy condition added for customer simplicity of understanding. This condition is later translated to a FOR membership filter . e.g. If the condition is : WhenCurrentUserIsMemberOfGroup "Approvers" then "MakeRequired" Field1.Here it translates to a For rule , "MakeRequired" for "Approvers" + */ + RuleConditionType[RuleConditionType["WhenCurrentUserIsMemberOfGroup"] = 11] = "WhenCurrentUserIsMemberOfGroup"; + /** + * This condition checks if current user is not member of a particular group. This condition does not have any 1:1 mapping with any server side rule condition, rather this is a dummy condition added for customer simplicity of understanding. This condition is later translated to a NOT membership filter . e.g. If the condition is : WhenCurrentUserIsNotMemberOfGroup "Approvers" then "MakeRequired" Field1.Here it translates to a Not rule , "MakeRequired" not "Approvers" + */ + 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 + } +}; + + +/***/ }), + +/***/ 3627: +/***/ ((__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, + } + }, + 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 + }, +}; + + +/***/ }), + +/***/ 3052: +/***/ ((__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 status of an operation. + */ +var OperationStatus; +(function (OperationStatus) { + /** + * The operation does not have a 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 = { + Operation: {}, + OperationReference: {}, + OperationStatus: { + enumValues: { + "notSet": 0, + "queued": 1, + "inProgress": 2, + "cancelled": 3, + "succeeded": 4, + "failed": 5 + } + }, +}; +exports.TypeInfo.Operation.fields = { + status: { + enumType: exports.TypeInfo.OperationStatus + } +}; +exports.TypeInfo.OperationReference.fields = { + status: { + enumType: exports.TypeInfo.OperationStatus + } +}; + + +/***/ }), + +/***/ 6790: +/***/ ((__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 + } + } +}; + + +/***/ }), + +/***/ 4652: +/***/ ((__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 + } + } +}; + + +/***/ }), + +/***/ 4498: +/***/ ((__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 = {})); +var UserProfileBackupState; +(function (UserProfileBackupState) { + UserProfileBackupState[UserProfileBackupState["Inactive"] = 0] = "Inactive"; + UserProfileBackupState[UserProfileBackupState["Active"] = 1] = "Active"; +})(UserProfileBackupState = exports.UserProfileBackupState || (exports.UserProfileBackupState = {})); +var UserProfileSyncState; +(function (UserProfileSyncState) { + UserProfileSyncState[UserProfileSyncState["None"] = 0] = "None"; + UserProfileSyncState[UserProfileSyncState["Completed"] = 1] = "Completed"; + UserProfileSyncState[UserProfileSyncState["NewProfileDataAndImageRetrieved"] = 2] = "NewProfileDataAndImageRetrieved"; + UserProfileSyncState[UserProfileSyncState["ProfileDataBackupDone"] = 3] = "ProfileDataBackupDone"; + UserProfileSyncState[UserProfileSyncState["NewProfileDataSet"] = 4] = "NewProfileDataSet"; + UserProfileSyncState[UserProfileSyncState["NewProfileDataUpdateFailed"] = 5] = "NewProfileDataUpdateFailed"; + UserProfileSyncState[UserProfileSyncState["NewProfileImageUpdateFailed"] = 6] = "NewProfileImageUpdateFailed"; +})(UserProfileSyncState = exports.UserProfileSyncState || (exports.UserProfileSyncState = {})); +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: {}, + UserProfileBackupState: { + enumValues: { + "inactive": 0, + "active": 1 + } + }, + UserProfileSyncState: { + enumValues: { + "none": 0, + "completed": 1, + "newProfileDataAndImageRetrieved": 2, + "profileDataBackupDone": 3, + "newProfileDataSet": 4, + "newProfileDataUpdateFailed": 5, + "newProfileImageUpdateFailed": 6 + } + }, + 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, + } +}; + + +/***/ }), + +/***/ 3682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var register = __nccwpck_require__(4670); +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; + + +/***/ }), + +/***/ 5549: +/***/ ((module) => { + +module.exports = addHook; + +function addHook(state, kind, name, hook) { + var orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; + } + + 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, + }); +} + + +/***/ }), + +/***/ 4670: +/***/ ((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"); + } + + if (!options) { + options = {}; + } + + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options); + }, method)(); + } + + 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; + } + + var index = state.registry[name] + .map(function (registered) { + return registered.orig; + }) + .indexOf(method); + + if (index === -1) { + return; + } + + state.registry[name].splice(index, 1); +} + + +/***/ }), + +/***/ 1174: +/***/ (function(module) { + +/** + * 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 commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + 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; + }; + + var parser = { + load: load, + overwrite: overwrite + }; + + var DLList; + + 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; + } + + first() { + if (this._first != null) { + return this._first.value; + } + } + + getArray() { + var node, ref, results; + node = this._first; + results = []; + while (node != null) { + results.push((ref = node, node = node.next, ref.value)); + } + return results; + } + + forEachShift(cb) { + var node; + node = this.shift(); + while (node != null) { + (cb(node), node = this.shift()); + } + return void 0; + } + + 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; + + var Events; + + 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 = {}; + } + }; + } + + _addListener(name, status, cb) { + var base; + if ((base = this._events)[name] == null) { + base[name] = []; + } + this._events[name].push({cb, status}); + return this.instance; + } + + listenerCount(name) { + if (this._events[name] != null) { + return this._events[name].length; + } else { + return 0; + } + } + + 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 Events_1 = Events; + + var DLList$1, Events$1, Queues; + + DLList$1 = DLList_1; + + Events$1 = Events_1; + + 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); + } + + incr() { + if (this._length++ === 0) { + return this.Events.trigger("leftzero"); + } + } + + decr() { + if (--this._length === 0) { + return this.Events.trigger("zero"); + } + } + + 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); + }); + } + + 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(); + } + + async __done__() { + await this.yieldLoop(); + return this._done; + } + + async __groupCheck__(time) { + await this.yieldLoop(); + return (this._nextRequest + this.timeout) < time; + } + + 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; + } + } + + conditionsCheck(weight) { + var capacity; + capacity = this.computeCapacity(); + return (capacity == null) || weight <= capacity; + } + + async __incrementReservoir__(incr) { + var reservoir; + await this.yieldLoop(); + reservoir = this.storeOptions.reservoir += incr; + this.instance._drainAll(this.computeCapacity()); + return reservoir; + } + + async __currentReservoir__() { + await this.yieldLoop(); + return this.storeOptions.reservoir; + } + + isBlocked(now) { + return this._unblockTime >= now; + } + + check(weight, now) { + return this.conditionsCheck(weight) && (this._nextRequest - now) <= 0; + } + + async __check__(weight) { + var now; + await this.yieldLoop(); + now = Date.now(); + return this.check(weight, now); + } + + 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 + }; + } + } + + strategyIsBlock() { + return this.storeOptions.strategy === 3; + } + + 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 + }; + } + + 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; + + var BottleneckError$3, States; + + BottleneckError$3 = BottleneckError_1; + + States = class States { + constructor(status1) { + this.status = status1; + this._jobs = {}; + this.counts = this.status.map(function() { + return 0; + }); + } + + 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]; + } + } + + start(id) { + var initial; + initial = 0; + this._jobs[id] = initial; + return this.counts[initial]++; + } + + remove(id) { + var current; + current = this._jobs[id]; + if (current != null) { + this.counts[current]--; + delete this._jobs[id]; + } + return current != null; + } + + jobStatus(id) { + var ref; + return (ref = this.status[this._jobs[id]]) != null ? ref : null; + } + + 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); + } + } + + statusCounts() { + return this.counts.reduce(((acc, v, i) => { + acc[this.status[i]] = v; + return acc; + }), {}); + } + + }; + + var States_1 = States; + + var DLList$2, Sync; + + DLList$2 = DLList_1; + + 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(); + } + + isEmpty() { + return this._queue.length === 0; + } + + 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(); + } + } + + 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; + } + + }; + + var Sync_1 = Sync; + + var version = "2.19.5"; + var version$1 = { + version: version + }; + + var version$2 = /*#__PURE__*/Object.freeze({ + version: version, + default: version$1 + }); + + var require$$2 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); + + 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; + + parser$3 = parser; + + Events$2 = Events_1; + + RedisConnection$1 = require$$2; + + IORedisConnection$1 = require$$3; + + Scripts$1 = require$$4; + + 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})); + } + } + } + + 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; + })(); + } + + 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; + } + + 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; + } + + keys() { + return Object.keys(this.instances); + } + + 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; + } + + _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; + } + + updateSettings(options = {}) { + parser$3.overwrite(options, this.defaults, this); + parser$3.overwrite(options, options, this.limiterOptions); + if (options.timeout != null) { + return this._startAutoCleanup(); + } + } + + disconnect(flush = true) { + var ref; + if (!this.sharedConnection) { + return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; + } + } + + } + Group.prototype.defaults = { + timeout: 1000 * 60 * 5, + connection: null, + Promise: Promise, + id: "group-key" + }; + + return Group; + + }).call(commonjsGlobal); + + var Group_1 = Group; + + var Batcher, Events$3, parser$4; + + parser$4 = parser; + + Events$3 = Events_1; + + 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(); + } + + _resetPromise() { + return this._promise = new this.Promise((res, rej) => { + return this._resolve = res; + }); + } + + _flush() { + clearTimeout(this._timeout); + this._lastFlush = Date.now(); + this._resolve(); + this.Events.trigger("batch", this._arr); + this._arr = []; + return this._resetPromise(); + } + + 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; + } + + } + Batcher.prototype.defaults = { + maxTime: null, + maxSize: null, + Promise: Promise + }; + + return Batcher; + + }).call(commonjsGlobal); + + var Batcher_1 = Batcher; + + var require$$4$1 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); + + var require$$8 = getCjsExportFromNamespace(version$2); + + 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; + + NUM_PRIORITIES$1 = 10; + + DEFAULT_PRIORITY$1 = 5; + + parser$5 = parser; + + Queues$1 = Queues_1; + + Job$1 = Job_1; + + LocalDatastore$1 = LocalDatastore_1; + + RedisDatastore$1 = require$$4$1; + + Events$4 = Events_1; + + States$1 = States_1; + + Sync$1 = Sync_1; + + 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; + }); + } + + _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."); + } + } + + ready() { + return this._store.ready; + } + + clients() { + return this._store.clients; + } + + channel() { + return `b_${this.id}`; + } + + channel_client() { + return `b_${this.id}_${this._store.clientId}`; + } + + publish(message) { + return this._store.__publish__(message); + } + + disconnect(flush = true) { + return this._store.__disconnect__(flush); + } + + chain(_limiter) { + this._limiter = _limiter; + return this; + } + + queued(priority) { + return this._queues.queued(priority); + } + + clusterQueued() { + return this._store.__queued__(); + } + + empty() { + return this.queued() === 0 && this._submitLock.isEmpty(); + } + + running() { + return this._store.__running__(); + } + + done() { + return this._store.__done__(); + } + + jobStatus(id) { + return this._states.jobStatus(id); + } + + jobs(status) { + return this._states.statusJobs(status); + } + + counts() { + return this._states.statusCounts(); + } + + _randomIndex() { + return Math.random().toString(36).slice(2); + } + + check(weight = 1) { + return this._store.__check__(weight); + } + + _clearGlobalState(index) { + if (this._scheduled[index] != null) { + clearTimeout(this._scheduled[index].expiration); + delete this._scheduled[index]; + return true; + } else { + return false; + } + } + + 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); + } + } + + _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 + }; + } + + _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}); + }); + } + + 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; + } + + 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; + } + + _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); + } + } + + 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); + } + + 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; + } + + 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; + } + + async updateSettings(options = {}) { + await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); + parser$5.overwrite(options, this.instanceDefaults, this); + return this; + } + + currentReservoir() { + return this._store.__currentReservoir__(); + } + + incrementReservoir(incr = 0) { + return this._store.__incrementReservoir__(incr); + } + + } + Bottleneck.default = Bottleneck; + + Bottleneck.Events = Events$4; + + Bottleneck.version = Bottleneck.prototype.version = require$$8.version; + + Bottleneck.strategy = Bottleneck.prototype.strategy = { + LEAK: 1, + OVERFLOW: 2, + OVERFLOW_PRIORITY: 4, + BLOCK: 3 + }; + + Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1; + + Bottleneck.Group = Bottleneck.prototype.Group = Group_1; + + Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require$$2; + + Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require$$3; + + Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1; + + Bottleneck.prototype.jobDefaults = { + priority: DEFAULT_PRIORITY$1, + weight: 1, + expiration: null, + id: "" + }; + + 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 + }; + + Bottleneck.prototype.localStoreDefaults = { + Promise: Promise, + timeout: null, + heartbeatInterval: 250 + }; + + Bottleneck.prototype.redisStoreDefaults = { + Promise: Promise, + timeout: null, + heartbeatInterval: 5000, + clientTimeout: 10000, + Redis: null, + clientOptions: {}, + clusterNodes: null, + clearDatastore: false, + connection: null + }; + + Bottleneck.prototype.instanceDefaults = { + datastore: "local", + connection: null, + id: "", + rejectOnDrop: true, + trackDoneStatus: false, + Promise: Promise + }; + + Bottleneck.prototype.stopDefaults = { + enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", + dropWaitingJobs: true, + dropErrorMessage: "This limiter has been stopped." + }; + + return Bottleneck; + + }).call(commonjsGlobal); + + var Bottleneck_1 = Bottleneck; + + var lib = Bottleneck_1; + + return lib; + +}))); + + +/***/ }), + +/***/ 8803: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(4538); + +var callBind = __nccwpck_require__(2977); + +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; +}; + + +/***/ }), + +/***/ 2977: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bind = __nccwpck_require__(8334); +var GetIntrinsic = __nccwpck_require__(4538); +var setFunctionLength = __nccwpck_require__(4056); + +var $TypeError = __nccwpck_require__(6361); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +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) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 4564: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var hasPropertyDescriptors = __nccwpck_require__(176)(); + +var GetIntrinsic = __nccwpck_require__(4538); + +var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +var $SyntaxError = __nccwpck_require__(5474); +var $TypeError = __nccwpck_require__(6361); + +var gopd = __nccwpck_require__(8501); + +/** @type {(obj: Record, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + + +/***/ }), + +/***/ 8932: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +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); + } + + this.name = 'Deprecation'; + } + +} + +exports.Deprecation = Deprecation; + + +/***/ }), + +/***/ 1933: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./eval')} */ +module.exports = EvalError; + + +/***/ }), + +/***/ 8015: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Error; + + +/***/ }), + +/***/ 4415: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./range')} */ +module.exports = RangeError; + + +/***/ }), + +/***/ 6279: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + + +/***/ }), + +/***/ 5474: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + + +/***/ }), + +/***/ 6361: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + + +/***/ }), + +/***/ 5065: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./uri')} */ +module.exports = URIError; + + +/***/ }), + +/***/ 9320: +/***/ ((module) => { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ 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; +}; + + +/***/ }), + +/***/ 8334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var implementation = __nccwpck_require__(9320); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 4538: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var undefined; + +var $Error = __nccwpck_require__(8015); +var $EvalError = __nccwpck_require__(1933); +var $RangeError = __nccwpck_require__(4415); +var $ReferenceError = __nccwpck_require__(6279); +var $SyntaxError = __nccwpck_require__(5474); +var $TypeError = __nccwpck_require__(6361); +var $URIError = __nccwpck_require__(5065); + +var $Function = Function; + +// 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__(587)(); +var hasProto = __nccwpck_require__(5894)(); + +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 = { + __proto__: null, + '%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 = { + __proto__: null, + '%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__(8334); +var hasOwn = __nccwpck_require__(2157); +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; +}; + + +/***/ }), + +/***/ 8501: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(4538); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + +/***/ }), + +/***/ 176: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(4538); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ 5894: +/***/ ((module) => { + +"use strict"; + + +var test = { + foo: {} +}; + +var $Object = Object; + +module.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); +}; + + +/***/ }), + +/***/ 587: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __nccwpck_require__(7747); + +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(); +}; + + +/***/ }), + +/***/ 7747: +/***/ ((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; +}; + + +/***/ }), + +/***/ 2157: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __nccwpck_require__(8334); + +/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ +module.exports = bind.call(call, $hasOwn); + + +/***/ }), + +/***/ 504: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = __nccwpck_require__(7265); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } + if (obj === global) { + return '{ [object globalThis] }'; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} + + +/***/ }), + +/***/ 7265: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(3837).inspect; + + +/***/ }), + +/***/ 1223: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(2940) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} + + +/***/ }), + +/***/ 4907: +/***/ ((module) => { + +"use strict"; + + +var replace = String.prototype.replace; +var percentTwenties = /%20/g; + +var Format = { + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; + +module.exports = { + 'default': Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return String(value); + } + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986 +}; + + +/***/ }), + +/***/ 2760: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var stringify = __nccwpck_require__(9954); +var parse = __nccwpck_require__(3912); +var formats = __nccwpck_require__(4907); + +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; + + +/***/ }), + +/***/ 3912: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var utils = __nccwpck_require__(2360); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var defaults = { + allowDots: false, + allowPrototypes: false, + allowSparse: false, + arrayLimit: 20, + charset: 'utf-8', + charsetSentinel: false, + comma: false, + decoder: utils.decode, + delimiter: '&', + depth: 5, + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1000, + parseArrays: true, + plainObjects: false, + strictNullHandling: false +}; + +var interpretNumericEntities = function (str) { + return str.replace(/&#(\d+);/g, function ($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)); + }); +}; + +var parseArrayValue = function (val, options) { + if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { + return val.split(','); + } + + return val; +}; + +// This is what browsers will submit when the ✓ character occurs in an +// application/x-www-form-urlencoded body and the encoding of the page containing +// the form is iso-8859-1, or when the submitted form has an accept-charset +// attribute of iso-8859-1. Presumably also with other charsets that do not contain +// the ✓ character, such as us-ascii. +var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') + +// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. +var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') + +var parseValues = function parseQueryStringValues(str, options) { + var obj = { __proto__: null }; + + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + var skipIndex = -1; // Keep track of where the utf8 sentinel was found + var i; + + var charset = options.charset; + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf('utf8=') === 0) { + if (parts[i] === charsetSentinel) { + charset = 'utf-8'; + } else if (parts[i] === isoSentinel) { + charset = 'iso-8859-1'; + } + skipIndex = i; + i = parts.length; // The eslint settings do not allow break; + } + } + } + + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; + } + var part = parts[i]; + + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; + + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, 'key'); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); + val = utils.maybeMap( + parseArrayValue(part.slice(pos + 1), options), + function (encodedVal) { + return options.decoder(encodedVal, defaults.decoder, charset, 'value'); + } + ); + } + + if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { + val = interpretNumericEntities(val); + } + + if (part.indexOf('[]=') > -1) { + val = isArray(val) ? [val] : val; + } + + if (has.call(obj, key)) { + obj[key] = utils.combine(obj[key], val); + } else { + obj[key] = val; + } + } + + return obj; +}; + +var parseObject = function (chain, val, options, valuesParsed) { + var leaf = valuesParsed ? val : parseArrayValue(val, options); + + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; + + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf }; + } else if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else if (cleanRoot !== '__proto__') { + obj[cleanRoot] = leaf; + } + } + + leaf = obj; + } + + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + + // Get the parent + + var segment = options.depth > 0 && brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(parent); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options, valuesParsed); +}; + +var normalizeParseOptions = function normalizeParseOptions(opts) { + if (!opts) { + return defaults; + } + + if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; + + return { + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, + allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, + arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, + decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (str, opts) { + var options = normalizeParseOptions(opts); + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); + obj = utils.merge(obj, newObj, options); + } + + if (options.allowSparse === true) { + return obj; + } + + return utils.compact(obj); +}; + + +/***/ }), + +/***/ 9954: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var getSideChannel = __nccwpck_require__(4334); +var utils = __nccwpck_require__(2360); +var formats = __nccwpck_require__(4907); +var has = Object.prototype.hasOwnProperty; + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + comma: 'comma', + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var isArray = Array.isArray; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; + +var toISO = Date.prototype.toISOString; + +var defaultFormat = formats['default']; +var defaults = { + addQueryPrefix: false, + allowDots: false, + charset: 'utf-8', + charsetSentinel: false, + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; + +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; +}; + +var sentinel = {}; + +var stringify = function stringify( + object, + prefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + sideChannel +) { + var obj = object; + + var tmpSc = sideChannel; + var step = 0; + var findFlag = false; + while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { + // Where object last appeared in the ref tree + var pos = tmpSc.get(object); + step += 1; + if (typeof pos !== 'undefined') { + if (pos === step) { + throw new RangeError('Cyclic object value'); + } else { + findFlag = true; // Break while + } + } + if (typeof tmpSc.get(sentinel) === 'undefined') { + step = 0; + } + } + + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (generateArrayPrefix === 'comma' && isArray(obj)) { + obj = utils.maybeMap(obj, function (value) { + if (value instanceof Date) { + return serializeDate(value); + } + return value; + }); + } + + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; + } + + obj = ''; + } + + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (generateArrayPrefix === 'comma' && isArray(obj)) { + // we need to join elements in + if (encodeValuesOnly && encoder) { + obj = utils.maybeMap(obj, encoder); + } + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; + } else if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix; + + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j]; + var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; + + if (skipNulls && value === null) { + continue; + } + + var keyPrefix = isArray(obj) + ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix + : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']'); + + sideChannel.set(object, step); + var valueSideChannel = getSideChannel(); + valueSideChannel.set(sentinel, sideChannel); + pushToArray(values, stringify( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + valueSideChannel + )); + } + + return values; +}; + +var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { + if (!opts) { + return defaults; + } + + if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + + var format = formats['default']; + if (typeof opts.format !== 'undefined') { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError('Unknown format option provided.'); + } + format = opts.format; + } + var formatter = formats.formatters[format]; + + var filter = defaults.filter; + if (typeof opts.filter === 'function' || isArray(opts.filter)) { + filter = opts.filter; + } + + return { + addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, + encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter: filter, + format: format, + formatter: formatter, + serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === 'function' ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = normalizeStringifyOptions(opts); + + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (opts && opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if (opts && 'indices' in opts) { + arrayFormat = opts.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { + throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); + } + var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (options.sort) { + objKeys.sort(options.sort); + } + + var sideChannel = getSideChannel(); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (options.skipNulls && obj[key] === null) { + continue; + } + pushToArray(keys, stringify( + obj[key], + key, + generateArrayPrefix, + commaRoundTrip, + options.strictNullHandling, + options.skipNulls, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset, + sideChannel + )); + } + + var joined = keys.join(options.delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + if (options.charsetSentinel) { + if (options.charset === 'iso-8859-1') { + // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark + prefix += 'utf8=%26%2310003%3B&'; + } else { + // encodeURIComponent('✓') + prefix += 'utf8=%E2%9C%93&'; + } + } + + return joined.length > 0 ? prefix + joined : ''; +}; + + +/***/ }), + +/***/ 2360: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var formats = __nccwpck_require__(4907); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; + + if (isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } +}; + +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +var merge = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (!target || typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +var decode = function (str, decoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' '); + if (charset === 'iso-8859-1') { + // unescape never throws, no try...catch needed: + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + // utf-8 + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } +}; + +var encode = function encode(str, defaultEncoder, charset, kind, format) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } + + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; + }); + } + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + /* eslint operator-linebreak: [2, "before"] */ + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + compactQueue(queue); + + return value; +}; + +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +var isBuffer = function isBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +var combine = function combine(a, b) { + return [].concat(a, b); +}; + +var maybeMap = function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + combine: combine, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + maybeMap: maybeMap, + merge: merge +}; + + +/***/ }), + +/***/ 4056: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(4538); +var define = __nccwpck_require__(4564); +var hasDescriptors = __nccwpck_require__(176)(); +var gOPD = __nccwpck_require__(8501); + +var $TypeError = __nccwpck_require__(6361); +var $floor = GetIntrinsic('%Math.floor%'); + +/** @typedef {(...args: unknown[]) => unknown} Func */ + +/** @type {(fn: T, length: number, loose?: boolean) => T} */ +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(/** @type {Parameters[0]} */ (fn), 'length', length, true, true); + } else { + define(/** @type {Parameters[0]} */ (fn), 'length', length); + } + } + return fn; +}; + + +/***/ }), + +/***/ 4334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(4538); +var callBound = __nccwpck_require__(8803); +var inspect = __nccwpck_require__(504); + +var $TypeError = __nccwpck_require__(6361); +var $WeakMap = GetIntrinsic('%WeakMap%', true); +var $Map = GetIntrinsic('%Map%', true); + +var $weakMapGet = callBound('WeakMap.prototype.get', true); +var $weakMapSet = callBound('WeakMap.prototype.set', true); +var $weakMapHas = callBound('WeakMap.prototype.has', true); +var $mapGet = callBound('Map.prototype.get', true); +var $mapSet = callBound('Map.prototype.set', true); +var $mapHas = callBound('Map.prototype.has', true); + +/* +* This function traverses the list returning the node corresponding to the given key. +* +* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly. +*/ +var listGetNode = function (list, key) { // eslint-disable-line consistent-return + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; // eslint-disable-line no-param-reassign + return curr; + } + } +}; + +var listGet = function (objects, key) { + var node = listGetNode(objects, key); + return node && node.value; +}; +var listSet = function (objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + // Prepend the new node to the beginning of the list + objects.next = { // eslint-disable-line no-param-reassign + key: key, + next: objects.next, + value: value + }; + } +}; +var listHas = function (objects, key) { + return !!listGetNode(objects, key); +}; + +module.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function (key) { + if (!channel.has(key)) { + throw new $TypeError('Side channel does not contain ' + inspect(key)); + } + }, + get: function (key) { // eslint-disable-line consistent-return + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapGet($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listGet($o, key); + } + } + }, + has: function (key) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapHas($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listHas($o, key); + } + } + return false; + }, + set: function (key, value) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } else { + if (!$o) { + // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head + $o = { key: {}, next: null }; + } + listSet($o, key, value); + } + } + }; + return channel; +}; + + +/***/ }), + +/***/ 4294: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(4219); + + +/***/ }), + +/***/ 4219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var net = __nccwpck_require__(1808); +var tls = __nccwpck_require__(4404); +var http = __nccwpck_require__(3685); +var https = __nccwpck_require__(5687); +var events = __nccwpck_require__(2361); +var assert = __nccwpck_require__(9491); +var util = __nccwpck_require__(3837); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test + + +/***/ }), + +/***/ 4442: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var basiccreds_1 = __nccwpck_require__(7954); +exports.BasicCredentialHandler = basiccreds_1.BasicCredentialHandler; +var bearertoken_1 = __nccwpck_require__(7431); +exports.BearerCredentialHandler = bearertoken_1.BearerCredentialHandler; +var ntlm_1 = __nccwpck_require__(4157); +exports.NtlmCredentialHandler = ntlm_1.NtlmCredentialHandler; +var personalaccesstoken_1 = __nccwpck_require__(7799); +exports.PersonalAccessTokenCredentialHandler = personalaccesstoken_1.PersonalAccessTokenCredentialHandler; + + +/***/ }), + +/***/ 5538: +/***/ (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 url = __nccwpck_require__(7310); +const http = __nccwpck_require__(3685); +const https = __nccwpck_require__(5687); +const util = __nccwpck_require__(9470); +let fs; +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect]; +const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout]; +const NetworkRetryErrors = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED']; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + const encodingCharset = util.obtainContentCharset(this); + // Extract Encoding from header: 'content-encoding' + // Match `gzip`, `gzip, deflate` variations of GZIP encoding + const contentEncoding = this.message.headers['content-encoding'] || ''; + const isGzippedEncoded = new RegExp('(gzip$)|(gzip, *deflate)').test(contentEncoding); + this.message.on('data', function (data) { + const chunk = (typeof data === 'string') ? Buffer.from(data, encodingCharset) : data; + chunks.push(chunk); + }).on('end', function () { + return __awaiter(this, void 0, void 0, function* () { + const buffer = Buffer.concat(chunks); + if (isGzippedEncoded) { // Process GZipped Response Body HERE + const gunzippedBody = yield util.decompressGzippedContent(buffer, encodingCharset); + resolve(gunzippedBody); + } + else { + resolve(buffer.toString(encodingCharset)); + } + }); + }).on('error', function (err) { + reject(err); + }); + })); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = url.parse(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +var EnvironmentVariables; +(function (EnvironmentVariables) { + EnvironmentVariables["HTTP_PROXY"] = "HTTP_PROXY"; + EnvironmentVariables["HTTPS_PROXY"] = "HTTPS_PROXY"; + EnvironmentVariables["NO_PROXY"] = "NO_PROXY"; +})(EnvironmentVariables || (EnvironmentVariables = {})); +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + let no_proxy = process.env[EnvironmentVariables.NO_PROXY]; + if (no_proxy) { + this._httpProxyBypassHosts = []; + no_proxy.split(',').forEach(bypass => { + this._httpProxyBypassHosts.push(util.buildProxyBypassRegexFromEnv(bypass)); + }); + } + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + this._httpProxy = requestOptions.proxy; + if (requestOptions.proxy && requestOptions.proxy.proxyBypassHosts) { + this._httpProxyBypassHosts = []; + requestOptions.proxy.proxyBypassHosts.forEach(bypass => { + this._httpProxyBypassHosts.push(new RegExp(bypass, 'i')); + }); + } + this._certConfig = requestOptions.cert; + if (this._certConfig) { + // If using cert, need fs + fs = __nccwpck_require__(7147); + // cache the cert content into memory, so we don't have to read it from disk every time + if (this._certConfig.caFile && fs.existsSync(this._certConfig.caFile)) { + this._ca = fs.readFileSync(this._certConfig.caFile, 'utf8'); + } + if (this._certConfig.certFile && fs.existsSync(this._certConfig.certFile)) { + this._cert = fs.readFileSync(this._certConfig.certFile, 'utf8'); + } + if (this._certConfig.keyFile && fs.existsSync(this._certConfig.keyFile)) { + this._key = fs.readFileSync(this._certConfig.keyFile, 'utf8'); + } + } + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + let parsedUrl = url.parse(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = (this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + try { + response = yield this.requestRaw(info, data); + } + catch (err) { + numTries++; + if (err && err.code && NetworkRetryErrors.indexOf(err.code) > -1 && numTries < maxTries) { + yield this._performExponentialBackoff(numTries); + continue; + } + throw err; + } + // Check if it's an authentication challenge + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 + && this._allowRedirects + && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = url.parse(redirectUrl); + if (parsedUrl.protocol == 'https:' && parsedUrl.protocol != parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof (data) === 'string') { + info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + }; + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + req.on('socket', (sock) => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.destroy(); + } + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + if (data && typeof (data) === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof (data) !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; + info.options.path = (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.timeout = (this.requestOptions && this.requestOptions.socketTimeout) || this._socketTimeout; + this._socketTimeout = info.options.timeout; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers["user-agent"] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers && !this._isPresigned(url.format(requestUrl))) { + this.handlers.forEach((handler) => { + handler.prepareRequest(info.options); + }); + } + return info; + } + _isPresigned(requestUrl) { + if (this.requestOptions && this.requestOptions.presignedUrlPatterns) { + const patterns = this.requestOptions.presignedUrlPatterns; + for (let i = 0; i < patterns.length; i++) { + if (requestUrl.match(patterns[i])) { + return true; + } + } + } + return false; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getAgent(parsedUrl) { + let agent; + let proxy = this._getProxy(parsedUrl); + let useProxy = proxy.proxyUrl && proxy.proxyUrl.hostname && !this._isMatchInBypassProxyList(parsedUrl); + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (!!agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = __nccwpck_require__(4294); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + proxyAuth: proxy.proxyAuth, + host: proxy.proxyUrl.hostname, + port: proxy.proxyUrl.port + }, + }; + let tunnelAgent; + const overHttps = proxy.proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); + } + if (usingSsl && this._certConfig) { + agent.options = Object.assign(agent.options || {}, { ca: this._ca, cert: this._cert, key: this._key, passphrase: this._certConfig.passphrase }); + } + return agent; + } + _getProxy(parsedUrl) { + let usingSsl = parsedUrl.protocol === 'https:'; + let proxyConfig = this._httpProxy; + // fallback to http_proxy and https_proxy env + let https_proxy = process.env[EnvironmentVariables.HTTPS_PROXY]; + let http_proxy = process.env[EnvironmentVariables.HTTP_PROXY]; + if (!proxyConfig) { + if (https_proxy && usingSsl) { + proxyConfig = { + proxyUrl: https_proxy + }; + } + else if (http_proxy) { + proxyConfig = { + proxyUrl: http_proxy + }; + } + } + let proxyUrl; + let proxyAuth; + if (proxyConfig) { + if (proxyConfig.proxyUrl.length > 0) { + proxyUrl = url.parse(proxyConfig.proxyUrl); + } + if (proxyConfig.proxyUsername || proxyConfig.proxyPassword) { + proxyAuth = proxyConfig.proxyUsername + ":" + proxyConfig.proxyPassword; + } + } + return { proxyUrl: proxyUrl, proxyAuth: proxyAuth }; + } + _isMatchInBypassProxyList(parsedUrl) { + if (!this._httpProxyBypassHosts) { + return false; + } + let bypass = false; + this._httpProxyBypassHosts.forEach(bypassHost => { + if (bypassHost.test(parsedUrl.href)) { + bypass = true; + } + }); + return bypass; + } + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } +} +exports.HttpClient = HttpClient; + + +/***/ }), + +/***/ 7405: +/***/ (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 httpm = __nccwpck_require__(5538); +const util = __nccwpck_require__(9470); +class RestClient { + /** + * Creates an instance of the RestClient + * @constructor + * @param {string} userAgent - userAgent for requests + * @param {string} baseUrl - (Optional) If not specified, use full urls per request. If supplied and a function passes a relative url, it will be appended to this + * @param {ifm.IRequestHandler[]} handlers - handlers are typically auth handlers (basic, bearer, ntlm supplied) + * @param {ifm.IRequestOptions} requestOptions - options for each http requests (http proxy setting, socket timeout) + */ + constructor(userAgent, baseUrl, handlers, requestOptions) { + this.client = new httpm.HttpClient(userAgent, handlers, requestOptions); + if (baseUrl) { + this._baseUrl = baseUrl; + } + } + /** + * Gets a resource from an endpoint + * Be aware that not found returns a null. Other error conditions reject the promise + * @param {string} requestUrl - fully qualified or relative url + * @param {IRequestOptions} requestOptions - (optional) requestOptions object + */ + options(requestUrl, options) { + return __awaiter(this, void 0, void 0, function* () { + let url = util.getUrl(requestUrl, this._baseUrl); + let res = yield this.client.options(url, this._headersFromOptions(options)); + return this.processResponse(res, options); + }); + } + /** + * Gets a resource from an endpoint + * Be aware that not found returns a null. Other error conditions reject the promise + * @param {string} resource - fully qualified url or relative path + * @param {IRequestOptions} requestOptions - (optional) requestOptions object + */ + get(resource, options) { + return __awaiter(this, void 0, void 0, function* () { + let url = util.getUrl(resource, this._baseUrl, (options || {}).queryParameters); + let res = yield this.client.get(url, this._headersFromOptions(options)); + return this.processResponse(res, options); + }); + } + /** + * Deletes a resource from an endpoint + * Be aware that not found returns a null. Other error conditions reject the promise + * @param {string} resource - fully qualified or relative url + * @param {IRequestOptions} requestOptions - (optional) requestOptions object + */ + del(resource, options) { + return __awaiter(this, void 0, void 0, function* () { + let url = util.getUrl(resource, this._baseUrl, (options || {}).queryParameters); + let res = yield this.client.del(url, this._headersFromOptions(options)); + return this.processResponse(res, options); + }); + } + /** + * Creates resource(s) from an endpoint + * T type of object returned. + * Be aware that not found returns a null. Other error conditions reject the promise + * @param {string} resource - fully qualified or relative url + * @param {IRequestOptions} requestOptions - (optional) requestOptions object + */ + create(resource, resources, options) { + return __awaiter(this, void 0, void 0, function* () { + let url = util.getUrl(resource, this._baseUrl); + let headers = this._headersFromOptions(options, true); + let data = JSON.stringify(resources, null, 2); + let res = yield this.client.post(url, data, headers); + return this.processResponse(res, options); + }); + } + /** + * Updates resource(s) from an endpoint + * T type of object returned. + * Be aware that not found returns a null. Other error conditions reject the promise + * @param {string} resource - fully qualified or relative url + * @param {IRequestOptions} requestOptions - (optional) requestOptions object + */ + update(resource, resources, options) { + return __awaiter(this, void 0, void 0, function* () { + let url = util.getUrl(resource, this._baseUrl); + let headers = this._headersFromOptions(options, true); + let data = JSON.stringify(resources, null, 2); + let res = yield this.client.patch(url, data, headers); + return this.processResponse(res, options); + }); + } + /** + * Replaces resource(s) from an endpoint + * T type of object returned. + * Be aware that not found returns a null. Other error conditions reject the promise + * @param {string} resource - fully qualified or relative url + * @param {IRequestOptions} requestOptions - (optional) requestOptions object + */ + replace(resource, resources, options) { + return __awaiter(this, void 0, void 0, function* () { + let url = util.getUrl(resource, this._baseUrl); + let headers = this._headersFromOptions(options, true); + let data = JSON.stringify(resources, null, 2); + let res = yield this.client.put(url, data, headers); + return this.processResponse(res, options); + }); + } + uploadStream(verb, requestUrl, stream, options) { + return __awaiter(this, void 0, void 0, function* () { + let url = util.getUrl(requestUrl, this._baseUrl); + let headers = this._headersFromOptions(options, true); + let res = yield this.client.sendStream(verb, url, stream, headers); + return this.processResponse(res, options); + }); + } + _headersFromOptions(options, contentType) { + options = options || {}; + let headers = options.additionalHeaders || {}; + headers["Accept"] = options.acceptHeader || "application/json"; + if (contentType) { + let found = false; + for (let header in headers) { + if (header.toLowerCase() == "content-type") { + found = true; + } + } + if (!found) { + headers["Content-Type"] = 'application/json; charset=utf-8'; + } + } + return headers; + } + static dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + let a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode; + const response = { + statusCode: statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode == httpm.HttpCodes.NotFound) { + resolve(response); + } + let obj; + let contents; + // get the result from the body + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, RestClient.dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + if (options && options.responseProcessor) { + response.result = options.responseProcessor(obj); + } + else { + response.result = obj; + } + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = "Failed request: (" + statusCode + ")"; + } + let err = new Error(msg); + // attach statusCode and body obj (if available) to the error object + err['statusCode'] = statusCode; + if (response.result) { + err['result'] = response.result; + } + if (response.headers) { + err['responseHeaders'] = response.headers; + } + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.RestClient = RestClient; + + +/***/ }), + +/***/ 9470: +/***/ (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 qs = __nccwpck_require__(2760); +const url = __nccwpck_require__(7310); +const path = __nccwpck_require__(1017); +const zlib = __nccwpck_require__(9796); +/** + * creates an url from a request url and optional base url (http://server:8080) + * @param {string} resource - a fully qualified url or relative path + * @param {string} baseUrl - an optional baseUrl (http://server:8080) + * @param {IRequestOptions} options - an optional options object, could include QueryParameters e.g. + * @return {string} - resultant url + */ +function getUrl(resource, baseUrl, queryParams) { + const pathApi = path.posix || path; + let requestUrl = ''; + if (!baseUrl) { + requestUrl = resource; + } + else if (!resource) { + requestUrl = baseUrl; + } + else { + const base = url.parse(baseUrl); + const resultantUrl = url.parse(resource); + // resource (specific per request) elements take priority + resultantUrl.protocol = resultantUrl.protocol || base.protocol; + resultantUrl.auth = resultantUrl.auth || base.auth; + resultantUrl.host = resultantUrl.host || base.host; + resultantUrl.pathname = pathApi.resolve(base.pathname, resultantUrl.pathname); + if (!resultantUrl.pathname.endsWith('/') && resource.endsWith('/')) { + resultantUrl.pathname += '/'; + } + requestUrl = url.format(resultantUrl); + } + return queryParams ? + getUrlWithParsedQueryParams(requestUrl, queryParams) : + requestUrl; +} +exports.getUrl = getUrl; +/** + * + * @param {string} requestUrl + * @param {IRequestQueryParams} queryParams + * @return {string} - Request's URL with Query Parameters appended/parsed. + */ +function getUrlWithParsedQueryParams(requestUrl, queryParams) { + const url = requestUrl.replace(/\?$/g, ''); // Clean any extra end-of-string "?" character + const parsedQueryParams = qs.stringify(queryParams.params, buildParamsStringifyOptions(queryParams)); + return `${url}${parsedQueryParams}`; +} +/** + * Build options for QueryParams Stringifying. + * + * @param {IRequestQueryParams} queryParams + * @return {object} + */ +function buildParamsStringifyOptions(queryParams) { + let options = { + addQueryPrefix: true, + delimiter: (queryParams.options || {}).separator || '&', + allowDots: (queryParams.options || {}).shouldAllowDots || false, + arrayFormat: (queryParams.options || {}).arrayFormat || 'repeat', + encodeValuesOnly: (queryParams.options || {}).shouldOnlyEncodeValues || true + }; + return options; +} +/** + * Decompress/Decode gzip encoded JSON + * Using Node.js built-in zlib module + * + * @param {Buffer} buffer + * @param {string} charset? - optional; defaults to 'utf-8' + * @return {Promise} + */ +function decompressGzippedContent(buffer, charset) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + zlib.gunzip(buffer, function (error, buffer) { + if (error) { + reject(error); + } + else { + resolve(buffer.toString(charset || 'utf-8')); + } + }); + })); + }); +} +exports.decompressGzippedContent = decompressGzippedContent; +/** + * Builds a RegExp to test urls against for deciding + * wether to bypass proxy from an entry of the + * environment variable setting NO_PROXY + * + * @param {string} bypass + * @return {RegExp} + */ +function buildProxyBypassRegexFromEnv(bypass) { + try { + // We need to keep this around for back-compat purposes + return new RegExp(bypass, 'i'); + } + catch (err) { + if (err instanceof SyntaxError && (bypass || "").startsWith("*")) { + let wildcardEscaped = bypass.replace('*', '(.*)'); + return new RegExp(wildcardEscaped, 'i'); + } + throw err; + } +} +exports.buildProxyBypassRegexFromEnv = buildProxyBypassRegexFromEnv; +/** + * Obtain Response's Content Charset. + * Through inspecting `content-type` response header. + * It Returns 'utf-8' if NO charset specified/matched. + * + * @param {IHttpClientResponse} response + * @return {string} - Content Encoding Charset; Default=utf-8 + */ +function obtainContentCharset(response) { + // Find the charset, if specified. + // Search for the `charset=CHARSET` string, not including `;,\r\n` + // Example: content-type: 'application/json;charset=utf-8' + // |__ matches would be ['charset=utf-8', 'utf-8', index: 18, input: 'application/json; charset=utf-8'] + // |_____ matches[1] would have the charset :tada: , in our example it's utf-8 + // However, if the matches Array was empty or no charset found, 'utf-8' would be returned by default. + const nodeSupportedEncodings = ['ascii', 'utf8', 'utf16le', 'ucs2', 'base64', 'binary', 'hex']; + const contentType = response.message.headers['content-type'] || ''; + const matches = contentType.match(/charset=([^;,\r\n]+)/i); + return (matches && matches[1] && nodeSupportedEncodings.indexOf(matches[1]) != -1) ? matches[1] : 'utf-8'; +} +exports.obtainContentCharset = obtainContentCharset; + + +/***/ }), + +/***/ 7954: +/***/ ((__unused_webpack_module, exports) => { + +"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 })); +class BasicCredentialHandler { + constructor(username, password, allowCrossOriginAuthentication) { + this.username = username; + this.password = password; + this.allowCrossOriginAuthentication = allowCrossOriginAuthentication; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!this.origin) { + this.origin = options.host; + } + // If this is a redirection, don't set the Authorization header + if (this.origin === options.host || this.allowCrossOriginAuthentication) { + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + options.headers['X-TFS-FedAuthRedirect'] = 'Suppress'; + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; + + +/***/ }), + +/***/ 7431: +/***/ ((__unused_webpack_module, exports) => { + +"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 })); +class BearerCredentialHandler { + constructor(token, allowCrossOriginAuthentication) { + this.token = token; + this.allowCrossOriginAuthentication = allowCrossOriginAuthentication; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!this.origin) { + this.origin = options.host; + } + // If this is a redirection, don't set the Authorization header + if (this.origin === options.host || this.allowCrossOriginAuthentication) { + options.headers['Authorization'] = `Bearer ${this.token}`; + } + options.headers['X-TFS-FedAuthRedirect'] = 'Suppress'; + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; + + +/***/ }), + +/***/ 4157: +/***/ ((__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 http = __nccwpck_require__(3685); +const https = __nccwpck_require__(5687); +const _ = __nccwpck_require__(5067); +const ntlm = __nccwpck_require__(2673); +class NtlmCredentialHandler { + constructor(username, password, workstation, domain) { + this._ntlmOptions = {}; + this._ntlmOptions.username = username; + this._ntlmOptions.password = password; + this._ntlmOptions.domain = domain || ''; + this._ntlmOptions.workstation = workstation || ''; + } + prepareRequest(options) { + // No headers or options need to be set. We keep the credentials on the handler itself. + // If a (proxy) agent is set, remove it as we don't support proxy for NTLM at this time + if (options.agent) { + delete options.agent; + } + } + canHandleAuthentication(response) { + if (response && response.message && response.message.statusCode === 401) { + // Ensure that we're talking NTLM here + // Once we have the www-authenticate header, split it so we can ensure we can talk NTLM + const wwwAuthenticate = response.message.headers['www-authenticate']; + return wwwAuthenticate && (wwwAuthenticate.split(', ').indexOf("NTLM") >= 0); + } + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return new Promise((resolve, reject) => { + const callbackForResult = function (err, res) { + if (err) { + reject(err); + } + // We have to readbody on the response before continuing otherwise there is a hang. + res.readBody().then(() => { + resolve(res); + }); + }; + this.handleAuthenticationPrivate(httpClient, requestInfo, objs, callbackForResult); + }); + } + handleAuthenticationPrivate(httpClient, requestInfo, objs, finalCallback) { + // Set up the headers for NTLM authentication + requestInfo.options = _.extend(requestInfo.options, { + username: this._ntlmOptions.username, + password: this._ntlmOptions.password, + domain: this._ntlmOptions.domain, + workstation: this._ntlmOptions.workstation + }); + requestInfo.options.agent = httpClient.isSsl ? + new https.Agent({ keepAlive: true }) : + new http.Agent({ keepAlive: true }); + let self = this; + // The following pattern of sending the type1 message following immediately (in a setImmediate) is + // critical for the NTLM exchange to happen. If we removed setImmediate (or call in a different manner) + // the NTLM exchange will always fail with a 401. + this.sendType1Message(httpClient, requestInfo, objs, function (err, res) { + if (err) { + return finalCallback(err, null, null); + } + /// We have to readbody on the response before continuing otherwise there is a hang. + res.readBody().then(() => { + // It is critical that we have setImmediate here due to how connection requests are queued. + // If setImmediate is removed then the NTLM handshake will not work. + // setImmediate allows us to queue a second request on the same connection. If this second + // request is not queued on the connection when the first request finishes then node closes + // the connection. NTLM requires both requests to be on the same connection so we need this. + setImmediate(function () { + self.sendType3Message(httpClient, requestInfo, objs, res, finalCallback); + }); + }); + }); + } + // The following method is an adaptation of code found at https://github.com/SamDecrock/node-http-ntlm/blob/master/httpntlm.js + sendType1Message(httpClient, requestInfo, objs, finalCallback) { + const type1HexBuffer = ntlm.encodeType1(this._ntlmOptions.workstation, this._ntlmOptions.domain); + const type1msg = `NTLM ${type1HexBuffer.toString('base64')}`; + const type1options = { + headers: { + 'Connection': 'keep-alive', + 'Authorization': type1msg + }, + timeout: requestInfo.options.timeout || 0, + agent: requestInfo.httpModule, + }; + const type1info = {}; + type1info.httpModule = requestInfo.httpModule; + type1info.parsedUrl = requestInfo.parsedUrl; + type1info.options = _.extend(type1options, _.omit(requestInfo.options, 'headers')); + return httpClient.requestRawWithCallback(type1info, objs, finalCallback); + } + // The following method is an adaptation of code found at https://github.com/SamDecrock/node-http-ntlm/blob/master/httpntlm.js + sendType3Message(httpClient, requestInfo, objs, res, callback) { + if (!res.message.headers && !res.message.headers['www-authenticate']) { + throw new Error('www-authenticate not found on response of second request'); + } + /** + * Server will respond with challenge/nonce + * assigned to response's "WWW-AUTHENTICATE" header + * and should adhere to RegExp /^NTLM\s+(.+?)(,|\s+|$)/ + */ + const serverNonceRegex = /^NTLM\s+(.+?)(,|\s+|$)/; + const serverNonce = Buffer.from((res.message.headers['www-authenticate'].match(serverNonceRegex) || [])[1], 'base64'); + let type2msg; + /** + * Wrap decoding the Server's challenge/nonce in + * try-catch block to throw more comprehensive + * Error with clear message to consumer + */ + try { + type2msg = ntlm.decodeType2(serverNonce); + } + catch (error) { + throw new Error(`Decoding Server's Challenge to Obtain Type2Message failed with error: ${error.message}`); + } + const type3msg = ntlm.encodeType3(this._ntlmOptions.username, this._ntlmOptions.workstation, this._ntlmOptions.domain, type2msg, this._ntlmOptions.password).toString('base64'); + const type3options = { + headers: { + 'Authorization': `NTLM ${type3msg}`, + 'Connection': 'Close' + }, + agent: requestInfo.httpModule, + }; + const type3info = {}; + type3info.httpModule = requestInfo.httpModule; + type3info.parsedUrl = requestInfo.parsedUrl; + type3options.headers = _.extend(type3options.headers, requestInfo.options.headers); + type3info.options = _.extend(type3options, _.omit(requestInfo.options, 'headers')); + return httpClient.requestRawWithCallback(type3info, objs, callback); + } +} +exports.NtlmCredentialHandler = NtlmCredentialHandler; + + +/***/ }), + +/***/ 7799: +/***/ ((__unused_webpack_module, exports) => { + +"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 })); +class PersonalAccessTokenCredentialHandler { + constructor(token, allowCrossOriginAuthentication) { + this.token = token; + this.allowCrossOriginAuthentication = allowCrossOriginAuthentication; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!this.origin) { + this.origin = options.host; + } + // If this is a redirection, don't set the Authorization header + if (this.origin === options.host || this.allowCrossOriginAuthentication) { + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + options.headers['X-TFS-FedAuthRedirect'] = 'Suppress'; + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + + +/***/ }), + +/***/ 2352: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var crypto = __nccwpck_require__(6113); + +function zeroextend(str, len) +{ + while (str.length < len) + str = '0' + str; + return (str); +} + +/* + * Fix (odd) parity bits in a 64-bit DES key. + */ +function oddpar(buf) +{ + for (var j = 0; j < buf.length; j++) { + var par = 1; + for (var i = 1; i < 8; i++) { + par = (par + ((buf[j] >> i) & 1)) % 2; + } + buf[j] |= par & 1; + } + return buf; +} + +/* + * Expand a 56-bit key buffer to the full 64-bits for DES. + * + * Based on code sample in: + * http://www.innovation.ch/personal/ronald/ntlm.html + */ +function expandkey(key56) +{ + var key64 = new Buffer(8); + + key64[0] = key56[0] & 0xFE; + key64[1] = ((key56[0] << 7) & 0xFF) | (key56[1] >> 1); + key64[2] = ((key56[1] << 6) & 0xFF) | (key56[2] >> 2); + key64[3] = ((key56[2] << 5) & 0xFF) | (key56[3] >> 3); + key64[4] = ((key56[3] << 4) & 0xFF) | (key56[4] >> 4); + key64[5] = ((key56[4] << 3) & 0xFF) | (key56[5] >> 5); + key64[6] = ((key56[5] << 2) & 0xFF) | (key56[6] >> 6); + key64[7] = (key56[6] << 1) & 0xFF; + + return key64; +} + +/* + * Convert a binary string to a hex string + */ +function bintohex(bin) +{ + var buf = (Buffer.isBuffer(buf) ? buf : new Buffer(bin, 'binary')); + var str = buf.toString('hex').toUpperCase(); + return zeroextend(str, 32); +} + + +module.exports.zeroextend = zeroextend; +module.exports.oddpar = oddpar; +module.exports.expandkey = expandkey; +module.exports.bintohex = bintohex; + + +/***/ }), + +/***/ 2673: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +var log = console.log; +var crypto = __nccwpck_require__(6113); +var $ = __nccwpck_require__(2352); +var lmhashbuf = (__nccwpck_require__(8657).lmhashbuf); +var nthashbuf = (__nccwpck_require__(8657).nthashbuf); + + +function encodeType1(hostname, ntdomain) { + hostname = hostname.toUpperCase(); + ntdomain = ntdomain.toUpperCase(); + var hostnamelen = Buffer.byteLength(hostname, 'ascii'); + var ntdomainlen = Buffer.byteLength(ntdomain, 'ascii'); + + var pos = 0; + var buf = new Buffer(32 + hostnamelen + ntdomainlen); + + buf.write('NTLMSSP', pos, 7, 'ascii'); // byte protocol[8]; + pos += 7; + buf.writeUInt8(0, pos); + pos++; + + buf.writeUInt8(0x01, pos); // byte type; + pos++; + + buf.fill(0x00, pos, pos + 3); // byte zero[3]; + pos += 3; + + buf.writeUInt16LE(0xb203, pos); // short flags; + pos += 2; + + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.writeUInt16LE(ntdomainlen, pos); // short dom_len; + pos += 2; + buf.writeUInt16LE(ntdomainlen, pos); // short dom_len; + pos += 2; + + var ntdomainoff = 0x20 + hostnamelen; + buf.writeUInt16LE(ntdomainoff, pos); // short dom_off; + pos += 2; + + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.writeUInt16LE(hostnamelen, pos); // short host_len; + pos += 2; + buf.writeUInt16LE(hostnamelen, pos); // short host_len; + pos += 2; + + buf.writeUInt16LE(0x20, pos); // short host_off; + pos += 2; + + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.write(hostname, 0x20, hostnamelen, 'ascii'); + buf.write(ntdomain, ntdomainoff, ntdomainlen, 'ascii'); + + return buf; +} + + +/* + * + */ +function decodeType2(buf) +{ + var proto = buf.toString('ascii', 0, 7); + if (buf[7] !== 0x00 || proto !== 'NTLMSSP') + throw new Error('magic was not NTLMSSP'); + + var type = buf.readUInt8(8); + if (type !== 0x02) + throw new Error('message was not NTLMSSP type 0x02'); + + //var msg_len = buf.readUInt16LE(16); + + //var flags = buf.readUInt16LE(20); + + var nonce = buf.slice(24, 32); + return nonce; +} + +function encodeType3(username, hostname, ntdomain, nonce, password) { + hostname = hostname.toUpperCase(); + ntdomain = ntdomain.toUpperCase(); + + var lmh = new Buffer(21); + lmhashbuf(password).copy(lmh); + lmh.fill(0x00, 16); // null pad to 21 bytes + var nth = new Buffer(21); + nthashbuf(password).copy(nth); + nth.fill(0x00, 16); // null pad to 21 bytes + + var lmr = makeResponse(lmh, nonce); + var ntr = makeResponse(nth, nonce); + + var usernamelen = Buffer.byteLength(username, 'ucs2'); + var hostnamelen = Buffer.byteLength(hostname, 'ucs2'); + var ntdomainlen = Buffer.byteLength(ntdomain, 'ucs2'); + var lmrlen = 0x18; + var ntrlen = 0x18; + + var ntdomainoff = 0x40; + var usernameoff = ntdomainoff + ntdomainlen; + var hostnameoff = usernameoff + usernamelen; + var lmroff = hostnameoff + hostnamelen; + var ntroff = lmroff + lmrlen; + + var pos = 0; + var msg_len = 64 + ntdomainlen + usernamelen + hostnamelen + lmrlen + ntrlen; + var buf = new Buffer(msg_len); + + buf.write('NTLMSSP', pos, 7, 'ascii'); // byte protocol[8]; + pos += 7; + buf.writeUInt8(0, pos); + pos++; + + buf.writeUInt8(0x03, pos); // byte type; + pos++; + + buf.fill(0x00, pos, pos + 3); // byte zero[3]; + pos += 3; + + buf.writeUInt16LE(lmrlen, pos); // short lm_resp_len; + pos += 2; + buf.writeUInt16LE(lmrlen, pos); // short lm_resp_len; + pos += 2; + buf.writeUInt16LE(lmroff, pos); // short lm_resp_off; + pos += 2; + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.writeUInt16LE(ntrlen, pos); // short nt_resp_len; + pos += 2; + buf.writeUInt16LE(ntrlen, pos); // short nt_resp_len; + pos += 2; + buf.writeUInt16LE(ntroff, pos); // short nt_resp_off; + pos += 2; + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.writeUInt16LE(ntdomainlen, pos); // short dom_len; + pos += 2; + buf.writeUInt16LE(ntdomainlen, pos); // short dom_len; + pos += 2; + buf.writeUInt16LE(ntdomainoff, pos); // short dom_off; + pos += 2; + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.writeUInt16LE(usernamelen, pos); // short user_len; + pos += 2; + buf.writeUInt16LE(usernamelen, pos); // short user_len; + pos += 2; + buf.writeUInt16LE(usernameoff, pos); // short user_off; + pos += 2; + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.writeUInt16LE(hostnamelen, pos); // short host_len; + pos += 2; + buf.writeUInt16LE(hostnamelen, pos); // short host_len; + pos += 2; + buf.writeUInt16LE(hostnameoff, pos); // short host_off; + pos += 2; + buf.fill(0x00, pos, pos + 6); // byte zero[6]; + pos += 6; + + buf.writeUInt16LE(msg_len, pos); // short msg_len; + pos += 2; + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.writeUInt16LE(0x8201, pos); // short flags; + pos += 2; + buf.fill(0x00, pos, pos + 2); // byte zero[2]; + pos += 2; + + buf.write(ntdomain, ntdomainoff, ntdomainlen, 'ucs2'); + buf.write(username, usernameoff, usernamelen, 'ucs2'); + buf.write(hostname, hostnameoff, hostnamelen, 'ucs2'); + lmr.copy(buf, lmroff, 0, lmrlen); + ntr.copy(buf, ntroff, 0, ntrlen); + + return buf; +} + +function makeResponse(hash, nonce) +{ + var out = new Buffer(24); + for (var i = 0; i < 3; i++) { + var keybuf = $.oddpar($.expandkey(hash.slice(i * 7, i * 7 + 7))); + var des = crypto.createCipheriv('DES-ECB', keybuf, ''); + var str = des.update(nonce.toString('binary'), 'binary', 'binary'); + out.write(str, i * 8, i * 8 + 8, 'binary'); + } + return out; +} + +exports.encodeType1 = encodeType1; +exports.decodeType2 = decodeType2; +exports.encodeType3 = encodeType3; + +// Convenience methods. + +exports.challengeHeader = function (hostname, domain) { + return 'NTLM ' + exports.encodeType1(hostname, domain).toString('base64'); +}; + +exports.responseHeader = function (res, url, domain, username, password) { + var serverNonce = new Buffer((res.headers['www-authenticate'].match(/^NTLM\s+(.+?)(,|\s+|$)/) || [])[1], 'base64'); + var hostname = (__nccwpck_require__(7310).parse)(url).hostname; + return 'NTLM ' + exports.encodeType3(username, hostname, domain, exports.decodeType2(serverNonce), password).toString('base64') +}; + +// Import smbhash module. + +exports.smbhash = __nccwpck_require__(8657); + + +/***/ }), + +/***/ 8657: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var crypto = __nccwpck_require__(6113); +var $ = __nccwpck_require__(2352); + +/* + * Generate the LM Hash + */ +function lmhashbuf(inputstr) +{ + /* ASCII --> uppercase */ + var x = inputstr.substring(0, 14).toUpperCase(); + var xl = Buffer.byteLength(x, 'ascii'); + + /* null pad to 14 bytes */ + var y = new Buffer(14); + y.write(x, 0, xl, 'ascii'); + y.fill(0, xl); + + /* insert odd parity bits in key */ + var halves = [ + $.oddpar($.expandkey(y.slice(0, 7))), + $.oddpar($.expandkey(y.slice(7, 14))) + ]; + + /* DES encrypt magic number "KGS!@#$%" to two + * 8-byte ciphertexts, (ECB, no padding) + */ + var buf = new Buffer(16); + var pos = 0; + var cts = halves.forEach(function(z) { + var des = crypto.createCipheriv('DES-ECB', z, ''); + var str = des.update('KGS!@#$%', 'binary', 'binary'); + buf.write(str, pos, pos + 8, 'binary'); + pos += 8; + }); + + /* concat the two ciphertexts to form 16byte value, + * the LM hash */ + return buf; +} + +function nthashbuf(str) +{ + /* take MD4 hash of UCS-2 encoded password */ + var ucs2 = new Buffer(str, 'ucs2'); + var md4 = crypto.createHash('md4'); + md4.update(ucs2); + return new Buffer(md4.digest('binary'), 'binary'); +} + +function lmhash(is) +{ + return $.bintohex(lmhashbuf(is)); +} + +function nthash(is) +{ + return $.bintohex(nthashbuf(is)); +} + +module.exports.nthashbuf = nthashbuf; +module.exports.lmhashbuf = lmhashbuf; + +module.exports.nthash = nthash; +module.exports.lmhash = lmhash; + + +/***/ }), + +/***/ 1773: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const Client = __nccwpck_require__(3598) +const Dispatcher = __nccwpck_require__(412) +const errors = __nccwpck_require__(8045) +const Pool = __nccwpck_require__(4634) +const BalancedPool = __nccwpck_require__(7931) +const Agent = __nccwpck_require__(7890) +const util = __nccwpck_require__(3983) +const { InvalidArgumentError } = errors +const api = __nccwpck_require__(4059) +const buildConnector = __nccwpck_require__(2067) +const MockClient = __nccwpck_require__(8687) +const MockAgent = __nccwpck_require__(6771) +const MockPool = __nccwpck_require__(6193) +const mockErrors = __nccwpck_require__(888) +const ProxyAgent = __nccwpck_require__(7858) +const RetryHandler = __nccwpck_require__(2286) +const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(1892) +const DecoratorHandler = __nccwpck_require__(6930) +const RedirectHandler = __nccwpck_require__(2860) +const createRedirectInterceptor = __nccwpck_require__(8861) + +let hasCrypto +try { + __nccwpck_require__(6113) + hasCrypto = true +} catch { + hasCrypto = false +} + +Object.assign(Dispatcher.prototype, api) + +module.exports.Dispatcher = Dispatcher +module.exports.Client = Client +module.exports.Pool = Pool +module.exports.BalancedPool = BalancedPool +module.exports.Agent = Agent +module.exports.ProxyAgent = ProxyAgent +module.exports.RetryHandler = RetryHandler + +module.exports.DecoratorHandler = DecoratorHandler +module.exports.RedirectHandler = RedirectHandler +module.exports.createRedirectInterceptor = createRedirectInterceptor + +module.exports.buildConnector = buildConnector +module.exports.errors = errors + +function makeDispatcher (fn) { + return (url, opts, handler) => { + if (typeof opts === 'function') { + handler = opts + opts = null + } + + if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { + throw new InvalidArgumentError('invalid url') + } + + if (opts != null && typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + + if (opts && opts.path != null) { + if (typeof opts.path !== 'string') { + throw new InvalidArgumentError('invalid opts.path') + } + + let path = opts.path + if (!opts.path.startsWith('/')) { + path = `/${path}` + } + + url = new URL(util.parseOrigin(url).origin + path) + } else { + if (!opts) { + opts = typeof url === 'object' ? url : {} + } + + url = util.parseURL(url) + } + + const { agent, dispatcher = getGlobalDispatcher() } = opts + + if (agent) { + throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') + } + + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? 'PUT' : 'GET') + }, handler) + } +} + +module.exports.setGlobalDispatcher = setGlobalDispatcher +module.exports.getGlobalDispatcher = getGlobalDispatcher + +if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { + let fetchImpl = null + module.exports.fetch = async function fetch (resource) { + if (!fetchImpl) { + fetchImpl = (__nccwpck_require__(4881).fetch) + } + + try { + return await fetchImpl(...arguments) + } catch (err) { + if (typeof err === 'object') { + Error.captureStackTrace(err, this) + } + + throw err + } + } + module.exports.Headers = __nccwpck_require__(554).Headers + module.exports.Response = __nccwpck_require__(7823).Response + module.exports.Request = __nccwpck_require__(8359).Request + module.exports.FormData = __nccwpck_require__(2015).FormData + module.exports.File = __nccwpck_require__(8511).File + module.exports.FileReader = __nccwpck_require__(1446).FileReader + + const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(1246) + + module.exports.setGlobalOrigin = setGlobalOrigin + module.exports.getGlobalOrigin = getGlobalOrigin + + const { CacheStorage } = __nccwpck_require__(7907) + const { kConstruct } = __nccwpck_require__(9174) + + // Cache & CacheStorage are tightly coupled with fetch. Even if it may run + // in an older version of Node, it doesn't have any use without fetch. + module.exports.caches = new CacheStorage(kConstruct) +} + +if (util.nodeMajor >= 16) { + const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(1724) + + module.exports.deleteCookie = deleteCookie + module.exports.getCookies = getCookies + module.exports.getSetCookies = getSetCookies + module.exports.setCookie = setCookie + + const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) + + module.exports.parseMIMEType = parseMIMEType + module.exports.serializeAMimeType = serializeAMimeType +} + +if (util.nodeMajor >= 18 && hasCrypto) { + const { WebSocket } = __nccwpck_require__(4284) + + module.exports.WebSocket = WebSocket +} + +module.exports.request = makeDispatcher(api.request) +module.exports.stream = makeDispatcher(api.stream) +module.exports.pipeline = makeDispatcher(api.pipeline) +module.exports.connect = makeDispatcher(api.connect) +module.exports.upgrade = makeDispatcher(api.upgrade) + +module.exports.MockClient = MockClient +module.exports.MockPool = MockPool +module.exports.MockAgent = MockAgent +module.exports.mockErrors = mockErrors + + +/***/ }), + +/***/ 7890: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { InvalidArgumentError } = __nccwpck_require__(8045) +const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(2785) +const DispatcherBase = __nccwpck_require__(4839) +const Pool = __nccwpck_require__(4634) +const Client = __nccwpck_require__(3598) +const util = __nccwpck_require__(3983) +const createRedirectInterceptor = __nccwpck_require__(8861) +const { WeakRef, FinalizationRegistry } = __nccwpck_require__(6436)() + +const kOnConnect = Symbol('onConnect') +const kOnDisconnect = Symbol('onDisconnect') +const kOnConnectionError = Symbol('onConnectionError') +const kMaxRedirections = Symbol('maxRedirections') +const kOnDrain = Symbol('onDrain') +const kFactory = Symbol('factory') +const kFinalizer = Symbol('finalizer') +const kOptions = Symbol('options') + +function defaultFactory (origin, opts) { + return opts && opts.connections === 1 + ? new Client(origin, opts) + : new Pool(origin, opts) +} + +class Agent extends DispatcherBase { + constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + super() + + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') + } + + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') + } + + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { + throw new InvalidArgumentError('maxRedirections must be a positive number') + } + + if (connect && typeof connect !== 'function') { + connect = { ...connect } + } + + this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) + ? options.interceptors.Agent + : [createRedirectInterceptor({ maxRedirections })] + + this[kOptions] = { ...util.deepClone(options), connect } + this[kOptions].interceptors = options.interceptors + ? { ...options.interceptors } + : undefined + this[kMaxRedirections] = maxRedirections + this[kFactory] = factory + this[kClients] = new Map() + this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => { + const ref = this[kClients].get(key) + if (ref !== undefined && ref.deref() === undefined) { + this[kClients].delete(key) + } + }) + + const agent = this + + this[kOnDrain] = (origin, targets) => { + agent.emit('drain', origin, [agent, ...targets]) + } + + this[kOnConnect] = (origin, targets) => { + agent.emit('connect', origin, [agent, ...targets]) + } + + this[kOnDisconnect] = (origin, targets, err) => { + agent.emit('disconnect', origin, [agent, ...targets], err) + } + + this[kOnConnectionError] = (origin, targets, err) => { + agent.emit('connectionError', origin, [agent, ...targets], err) + } + } + + get [kRunning] () { + let ret = 0 + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore next: gc is undeterministic */ + if (client) { + ret += client[kRunning] + } + } + return ret + } + + [kDispatch] (opts, handler) { + let key + if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { + key = String(opts.origin) + } else { + throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') + } + + const ref = this[kClients].get(key) + + let dispatcher = ref ? ref.deref() : null + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]) + .on('drain', this[kOnDrain]) + .on('connect', this[kOnConnect]) + .on('disconnect', this[kOnDisconnect]) + .on('connectionError', this[kOnConnectionError]) + + this[kClients].set(key, new WeakRef(dispatcher)) + this[kFinalizer].register(dispatcher, key) + } + + return dispatcher.dispatch(opts, handler) + } + + async [kClose] () { + const closePromises = [] + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore else: gc is undeterministic */ + if (client) { + closePromises.push(client.close()) + } + } + + await Promise.all(closePromises) + } + + async [kDestroy] (err) { + const destroyPromises = [] + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore else: gc is undeterministic */ + if (client) { + destroyPromises.push(client.destroy(err)) + } + } + + await Promise.all(destroyPromises) + } +} + +module.exports = Agent + + +/***/ }), + +/***/ 7032: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { addAbortListener } = __nccwpck_require__(3983) +const { RequestAbortedError } = __nccwpck_require__(8045) + +const kListener = Symbol('kListener') +const kSignal = Symbol('kSignal') + +function abort (self) { + if (self.abort) { + self.abort() + } else { + self.onError(new RequestAbortedError()) + } +} + +function addSignal (self, signal) { + self[kSignal] = null + self[kListener] = null + + if (!signal) { + return + } + + if (signal.aborted) { + abort(self) + return + } + + self[kSignal] = signal + self[kListener] = () => { + abort(self) + } + + addAbortListener(self[kSignal], self[kListener]) +} + +function removeSignal (self) { + if (!self[kSignal]) { + return + } + + if ('removeEventListener' in self[kSignal]) { + self[kSignal].removeEventListener('abort', self[kListener]) + } else { + self[kSignal].removeListener('abort', self[kListener]) + } + + self[kSignal] = null + self[kListener] = null +} + +module.exports = { + addSignal, + removeSignal +} + + +/***/ }), + +/***/ 9744: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { AsyncResource } = __nccwpck_require__(852) +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(8045) +const util = __nccwpck_require__(3983) +const { addSignal, removeSignal } = __nccwpck_require__(7032) + +class ConnectHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } + + const { signal, opaque, responseHeaders } = opts + + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } + + super('UNDICI_CONNECT') + + this.opaque = opaque || null + this.responseHeaders = responseHeaders || null + this.callback = callback + this.abort = null + + addSignal(this, signal) + } + + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } + + this.abort = abort + this.context = context + } + + onHeaders () { + throw new SocketError('bad connect', null) + } + + onUpgrade (statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this + + removeSignal(this) + + this.callback = null + + let headers = rawHeaders + // Indicates is an HTTP2Session + if (headers != null) { + headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + } + + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }) + } + + onError (err) { + const { callback, opaque } = this + + removeSignal(this) + + if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + } +} + +function connect (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } + + try { + const connectHandler = new ConnectHandler(opts, callback) + this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } +} + +module.exports = connect + + +/***/ }), + +/***/ 8752: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { + Readable, + Duplex, + PassThrough +} = __nccwpck_require__(2781) +const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError +} = __nccwpck_require__(8045) +const util = __nccwpck_require__(3983) +const { AsyncResource } = __nccwpck_require__(852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) +const assert = __nccwpck_require__(9491) + +const kResume = Symbol('resume') + +class PipelineRequest extends Readable { + constructor () { + super({ autoDestroy: true }) + + this[kResume] = null + } + + _read () { + const { [kResume]: resume } = this + + if (resume) { + this[kResume] = null + resume() + } + } + + _destroy (err, callback) { + this._read() + + callback(err) + } +} + +class PipelineResponse extends Readable { + constructor (resume) { + super({ autoDestroy: true }) + this[kResume] = resume + } + + _read () { + this[kResume]() + } + + _destroy (err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError() + } + + callback(err) + } +} + +class PipelineHandler extends AsyncResource { + constructor (opts, handler) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + + if (typeof handler !== 'function') { + throw new InvalidArgumentError('invalid handler') + } + + const { signal, method, opaque, onInfo, responseHeaders } = opts + + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } + + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } + + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } + + super('UNDICI_PIPELINE') + + this.opaque = opaque || null + this.responseHeaders = responseHeaders || null + this.handler = handler + this.abort = null + this.context = null + this.onInfo = onInfo || null + + this.req = new PipelineRequest().on('error', util.nop) + + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this + + if (body && body.resume) { + body.resume() + } + }, + write: (chunk, encoding, callback) => { + const { req } = this + + if (req.push(chunk, encoding) || req._readableState.destroyed) { + callback() + } else { + req[kResume] = callback + } + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this + + if (!err && !ret._readableState.endEmitted) { + err = new RequestAbortedError() + } + + if (abort && err) { + abort() + } + + util.destroy(body, err) + util.destroy(req, err) + util.destroy(res, err) + + removeSignal(this) + + callback(err) + } + }).on('prefinish', () => { + const { req } = this + + // Node < 15 does not call _final in same tick. + req.push(null) + }) + + this.res = null + + addSignal(this, signal) + } + + onConnect (abort, context) { + const { ret, res } = this + + assert(!res, 'pipeline cannot be retried') + + if (ret.destroyed) { + throw new RequestAbortedError() + } + + this.abort = abort + this.context = context + } + + onHeaders (statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this + + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + this.onInfo({ statusCode, headers }) + } + return + } + + this.res = new PipelineResponse(resume) + + let body + try { + this.handler = null + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }) + } catch (err) { + this.res.on('error', util.nop) + throw err + } + + if (!body || typeof body.on !== 'function') { + throw new InvalidReturnValueError('expected Readable') + } + + body + .on('data', (chunk) => { + const { ret, body } = this + + if (!ret.push(chunk) && body.pause) { + body.pause() + } + }) + .on('error', (err) => { + const { ret } = this + + util.destroy(ret, err) + }) + .on('end', () => { + const { ret } = this + + ret.push(null) + }) + .on('close', () => { + const { ret } = this + + if (!ret._readableState.ended) { + util.destroy(ret, new RequestAbortedError()) + } + }) + + this.body = body + } + + onData (chunk) { + const { res } = this + return res.push(chunk) + } + + onComplete (trailers) { + const { res } = this + res.push(null) + } + + onError (err) { + const { ret } = this + this.handler = null + util.destroy(ret, err) + } +} + +function pipeline (opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler) + this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) + return pipelineHandler.ret + } catch (err) { + return new PassThrough().destroy(err) + } +} + +module.exports = pipeline + + +/***/ }), + +/***/ 5448: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const Readable = __nccwpck_require__(3858) +const { + InvalidArgumentError, + RequestAbortedError +} = __nccwpck_require__(8045) +const util = __nccwpck_require__(3983) +const { getResolveErrorBodyCallback } = __nccwpck_require__(7474) +const { AsyncResource } = __nccwpck_require__(852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) + +class RequestHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts + + try { + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } + + if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { + throw new InvalidArgumentError('invalid highWaterMark') + } + + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } + + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } + + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } + + super('UNDICI_REQUEST') + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on('error', util.nop), err) + } + throw err + } + + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.callback = callback + this.res = null + this.abort = null + this.body = body + this.trailers = {} + this.context = null + this.onInfo = onInfo || null + this.throwOnError = throwOnError + this.highWaterMark = highWaterMark + + if (util.isStream(body)) { + body.on('error', (err) => { + this.onError(err) + }) + } + + addSignal(this, signal) + } + + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } + + this.abort = abort + this.context = context + } + + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this + + const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }) + } + return + } + + const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers + const contentType = parsedHeaders['content-type'] + const body = new Readable({ resume, abort, contentType, highWaterMark }) + + this.callback = null + this.res = body + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) { + this.runInAsyncScope(getResolveErrorBodyCallback, null, + { callback, body, contentType, statusCode, statusMessage, headers } + ) + } else { + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body, + context + }) + } + } + } + + onData (chunk) { + const { res } = this + return res.push(chunk) + } + + onComplete (trailers) { + const { res } = this + + removeSignal(this) + + util.parseHeaders(trailers, this.trailers) + + res.push(null) + } + + onError (err) { + const { res, callback, body, opaque } = this + + removeSignal(this) + + if (callback) { + // TODO: Does this need queueMicrotask? + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + + if (res) { + this.res = null + // Ensure all queued handlers are invoked before destroying res. + queueMicrotask(() => { + util.destroy(res, err) + }) + } + + if (body) { + this.body = null + util.destroy(body, err) + } + } +} + +function request (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } + + try { + this.dispatch(opts, new RequestHandler(opts, callback)) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } +} + +module.exports = request +module.exports.RequestHandler = RequestHandler + + +/***/ }), + +/***/ 5395: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { finished, PassThrough } = __nccwpck_require__(2781) +const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError +} = __nccwpck_require__(8045) +const util = __nccwpck_require__(3983) +const { getResolveErrorBodyCallback } = __nccwpck_require__(7474) +const { AsyncResource } = __nccwpck_require__(852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) + +class StreamHandler extends AsyncResource { + constructor (opts, factory, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts + + try { + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } + + if (typeof factory !== 'function') { + throw new InvalidArgumentError('invalid factory') + } + + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } + + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } + + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } + + super('UNDICI_STREAM') + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on('error', util.nop), err) + } + throw err + } + + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.factory = factory + this.callback = callback + this.res = null + this.abort = null + this.context = null + this.trailers = null + this.body = body + this.onInfo = onInfo || null + this.throwOnError = throwOnError || false + + if (util.isStream(body)) { + body.on('error', (err) => { + this.onError(err) + }) + } + + addSignal(this, signal) + } + + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } + + this.abort = abort + this.context = context + } + + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this + + const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }) + } + return + } + + this.factory = null + + let res + + if (this.throwOnError && statusCode >= 400) { + const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers + const contentType = parsedHeaders['content-type'] + res = new PassThrough() + + this.callback = null + this.runInAsyncScope(getResolveErrorBodyCallback, null, + { callback, body: res, contentType, statusCode, statusMessage, headers } + ) + } else { + if (factory === null) { + return + } + + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }) + + if ( + !res || + typeof res.write !== 'function' || + typeof res.end !== 'function' || + typeof res.on !== 'function' + ) { + throw new InvalidReturnValueError('expected Writable') + } + + // TODO: Avoid finished. It registers an unnecessary amount of listeners. + finished(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this + + this.res = null + if (err || !res.readable) { + util.destroy(res, err) + } + + this.callback = null + this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) + + if (err) { + abort() + } + }) + } + + res.on('drain', resume) + + this.res = res + + const needDrain = res.writableNeedDrain !== undefined + ? res.writableNeedDrain + : res._writableState && res._writableState.needDrain + + return needDrain !== true + } + + onData (chunk) { + const { res } = this + + return res ? res.write(chunk) : true + } + + onComplete (trailers) { + const { res } = this + + removeSignal(this) + + if (!res) { + return + } + + this.trailers = util.parseHeaders(trailers) + + res.end() + } + + onError (err) { + const { res, callback, opaque, body } = this + + removeSignal(this) + + this.factory = null + + if (res) { + this.res = null + util.destroy(res, err) + } else if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + + if (body) { + this.body = null + util.destroy(body, err) + } + } +} + +function stream (opts, factory, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } + + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } +} + +module.exports = stream + + +/***/ }), + +/***/ 6923: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(8045) +const { AsyncResource } = __nccwpck_require__(852) +const util = __nccwpck_require__(3983) +const { addSignal, removeSignal } = __nccwpck_require__(7032) +const assert = __nccwpck_require__(9491) + +class UpgradeHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } + + const { signal, opaque, responseHeaders } = opts + + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } + + super('UNDICI_UPGRADE') + + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.callback = callback + this.abort = null + this.context = null + + addSignal(this, signal) + } + + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } + + this.abort = abort + this.context = null + } + + onHeaders () { + throw new SocketError('bad upgrade', null) + } + + onUpgrade (statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this + + assert.strictEqual(statusCode, 101) + + removeSignal(this) + + this.callback = null + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }) + } + + onError (err) { + const { callback, opaque } = this + + removeSignal(this) + + if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + } +} + +function upgrade (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } + + try { + const upgradeHandler = new UpgradeHandler(opts, callback) + this.dispatch({ + ...opts, + method: opts.method || 'GET', + upgrade: opts.protocol || 'Websocket' + }, upgradeHandler) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } +} + +module.exports = upgrade + + +/***/ }), + +/***/ 4059: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports.request = __nccwpck_require__(5448) +module.exports.stream = __nccwpck_require__(5395) +module.exports.pipeline = __nccwpck_require__(8752) +module.exports.upgrade = __nccwpck_require__(6923) +module.exports.connect = __nccwpck_require__(9744) + + +/***/ }), + +/***/ 3858: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Ported from https://github.com/nodejs/undici/pull/907 + + + +const assert = __nccwpck_require__(9491) +const { Readable } = __nccwpck_require__(2781) +const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(8045) +const util = __nccwpck_require__(3983) +const { ReadableStreamFrom, toUSVString } = __nccwpck_require__(3983) + +let Blob + +const kConsume = Symbol('kConsume') +const kReading = Symbol('kReading') +const kBody = Symbol('kBody') +const kAbort = Symbol('abort') +const kContentType = Symbol('kContentType') + +const noop = () => {} + +module.exports = class BodyReadable extends Readable { + constructor ({ + resume, + abort, + contentType = '', + highWaterMark = 64 * 1024 // Same as nodejs fs streams. + }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }) + + this._readableState.dataEmitted = false + + this[kAbort] = abort + this[kConsume] = null + this[kBody] = null + this[kContentType] = contentType + + // Is stream being consumed through Readable API? + // This is an optimization so that we avoid checking + // for 'data' and 'readable' listeners in the hot path + // inside push(). + this[kReading] = false + } + + destroy (err) { + if (this.destroyed) { + // Node < 16 + return this + } + + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError() + } + + if (err) { + this[kAbort]() + } + + return super.destroy(err) + } + + emit (ev, ...args) { + if (ev === 'data') { + // Node < 16.7 + this._readableState.dataEmitted = true + } else if (ev === 'error') { + // Node < 16 + this._readableState.errorEmitted = true + } + return super.emit(ev, ...args) + } + + on (ev, ...args) { + if (ev === 'data' || ev === 'readable') { + this[kReading] = true + } + return super.on(ev, ...args) + } + + addListener (ev, ...args) { + return this.on(ev, ...args) + } + + off (ev, ...args) { + const ret = super.off(ev, ...args) + if (ev === 'data' || ev === 'readable') { + this[kReading] = ( + this.listenerCount('data') > 0 || + this.listenerCount('readable') > 0 + ) + } + return ret + } + + removeListener (ev, ...args) { + return this.off(ev, ...args) + } + + push (chunk) { + if (this[kConsume] && chunk !== null && this.readableLength === 0) { + consumePush(this[kConsume], chunk) + return this[kReading] ? super.push(chunk) : true + } + return super.push(chunk) + } + + // https://fetch.spec.whatwg.org/#dom-body-text + async text () { + return consume(this, 'text') + } + + // https://fetch.spec.whatwg.org/#dom-body-json + async json () { + return consume(this, 'json') + } + + // https://fetch.spec.whatwg.org/#dom-body-blob + async blob () { + return consume(this, 'blob') + } + + // https://fetch.spec.whatwg.org/#dom-body-arraybuffer + async arrayBuffer () { + return consume(this, 'arrayBuffer') + } + + // https://fetch.spec.whatwg.org/#dom-body-formdata + async formData () { + // TODO: Implement. + throw new NotSupportedError() + } + + // https://fetch.spec.whatwg.org/#dom-body-bodyused + get bodyUsed () { + return util.isDisturbed(this) + } + + // https://fetch.spec.whatwg.org/#dom-body-body + get body () { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this) + if (this[kConsume]) { + // TODO: Is this the best way to force a lock? + this[kBody].getReader() // Ensure stream is locked. + assert(this[kBody].locked) + } + } + return this[kBody] + } + + dump (opts) { + let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144 + const signal = opts && opts.signal + + if (signal) { + try { + if (typeof signal !== 'object' || !('aborted' in signal)) { + throw new InvalidArgumentError('signal must be an AbortSignal') + } + util.throwIfAborted(signal) + } catch (err) { + return Promise.reject(err) + } + } + + if (this.closed) { + return Promise.resolve(null) + } + + return new Promise((resolve, reject) => { + const signalListenerCleanup = signal + ? util.addAbortListener(signal, () => { + this.destroy() + }) + : noop + + this + .on('close', function () { + signalListenerCleanup() + if (signal && signal.aborted) { + reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' })) + } else { + resolve(null) + } + }) + .on('error', noop) + .on('data', function (chunk) { + limit -= chunk.length + if (limit <= 0) { + this.destroy() + } + }) + .resume() + }) + } +} + +// https://streams.spec.whatwg.org/#readablestream-locked +function isLocked (self) { + // Consume is an implicit lock. + return (self[kBody] && self[kBody].locked === true) || self[kConsume] +} + +// https://fetch.spec.whatwg.org/#body-unusable +function isUnusable (self) { + return util.isDisturbed(self) || isLocked(self) +} + +async function consume (stream, type) { + if (isUnusable(stream)) { + throw new TypeError('unusable') + } + + assert(!stream[kConsume]) + + return new Promise((resolve, reject) => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + } + + stream + .on('error', function (err) { + consumeFinish(this[kConsume], err) + }) + .on('close', function () { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()) + } + }) + + process.nextTick(consumeStart, stream[kConsume]) + }) +} + +function consumeStart (consume) { + if (consume.body === null) { + return + } + + const { _readableState: state } = consume.stream + + for (const chunk of state.buffer) { + consumePush(consume, chunk) + } + + if (state.endEmitted) { + consumeEnd(this[kConsume]) + } else { + consume.stream.on('end', function () { + consumeEnd(this[kConsume]) + }) + } + + consume.stream.resume() + + while (consume.stream.read() != null) { + // Loop + } +} + +function consumeEnd (consume) { + const { type, body, resolve, stream, length } = consume + + try { + if (type === 'text') { + resolve(toUSVString(Buffer.concat(body))) + } else if (type === 'json') { + resolve(JSON.parse(Buffer.concat(body))) + } else if (type === 'arrayBuffer') { + const dst = new Uint8Array(length) + + let pos = 0 + for (const buf of body) { + dst.set(buf, pos) + pos += buf.byteLength + } + + resolve(dst.buffer) + } else if (type === 'blob') { + if (!Blob) { + Blob = (__nccwpck_require__(4300).Blob) + } + resolve(new Blob(body, { type: stream[kContentType] })) + } + + consumeFinish(consume) + } catch (err) { + stream.destroy(err) + } +} + +function consumePush (consume, chunk) { + consume.length += chunk.length + consume.body.push(chunk) +} + +function consumeFinish (consume, err) { + if (consume.body === null) { + return + } + + if (err) { + consume.reject(err) + } else { + consume.resolve() + } + + consume.type = null + consume.stream = null + consume.resolve = null + consume.reject = null + consume.length = 0 + consume.body = null +} + + +/***/ }), + +/***/ 7474: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const assert = __nccwpck_require__(9491) +const { + ResponseStatusCodeError +} = __nccwpck_require__(8045) +const { toUSVString } = __nccwpck_require__(3983) + +async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert(body) + + let chunks = [] + let limit = 0 + + for await (const chunk of body) { + chunks.push(chunk) + limit += chunk.length + if (limit > 128 * 1024) { + chunks = null + break + } + } + + if (statusCode === 204 || !contentType || !chunks) { + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) + return + } + + try { + if (contentType.startsWith('application/json')) { + const payload = JSON.parse(toUSVString(Buffer.concat(chunks))) + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) + return + } + + if (contentType.startsWith('text/')) { + const payload = toUSVString(Buffer.concat(chunks)) + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) + return + } + } catch (err) { + // Process in a fallback if error + } + + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) +} + +module.exports = { getResolveErrorBodyCallback } + + +/***/ }), + +/***/ 7931: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { + BalancedPoolMissingUpstreamError, + InvalidArgumentError +} = __nccwpck_require__(8045) +const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher +} = __nccwpck_require__(3198) +const Pool = __nccwpck_require__(4634) +const { kUrl, kInterceptors } = __nccwpck_require__(2785) +const { parseOrigin } = __nccwpck_require__(3983) +const kFactory = Symbol('factory') + +const kOptions = Symbol('options') +const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') +const kCurrentWeight = Symbol('kCurrentWeight') +const kIndex = Symbol('kIndex') +const kWeight = Symbol('kWeight') +const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') +const kErrorPenalty = Symbol('kErrorPenalty') + +function getGreatestCommonDivisor (a, b) { + if (b === 0) return a + return getGreatestCommonDivisor(b, a % b) +} + +function defaultFactory (origin, opts) { + return new Pool(origin, opts) +} + +class BalancedPool extends PoolBase { + constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super() + + this[kOptions] = opts + this[kIndex] = -1 + this[kCurrentWeight] = 0 + + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 + this[kErrorPenalty] = this[kOptions].errorPenalty || 15 + + if (!Array.isArray(upstreams)) { + upstreams = [upstreams] + } + + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') + } + + this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) + ? opts.interceptors.BalancedPool + : [] + this[kFactory] = factory + + for (const upstream of upstreams) { + this.addUpstream(upstream) + } + this._updateBalancedPoolStats() + } + + addUpstream (upstream) { + const upstreamOrigin = parseOrigin(upstream).origin + + if (this[kClients].find((pool) => ( + pool[kUrl].origin === upstreamOrigin && + pool.closed !== true && + pool.destroyed !== true + ))) { + return this + } + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) + + this[kAddClient](pool) + pool.on('connect', () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) + }) + + pool.on('connectionError', () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) + this._updateBalancedPoolStats() + }) + + pool.on('disconnect', (...args) => { + const err = args[2] + if (err && err.code === 'UND_ERR_SOCKET') { + // decrease the weight of the pool. + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) + this._updateBalancedPoolStats() + } + }) + + for (const client of this[kClients]) { + client[kWeight] = this[kMaxWeightPerServer] + } + + this._updateBalancedPoolStats() + + return this + } + + _updateBalancedPoolStats () { + this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0) + } + + removeUpstream (upstream) { + const upstreamOrigin = parseOrigin(upstream).origin + + const pool = this[kClients].find((pool) => ( + pool[kUrl].origin === upstreamOrigin && + pool.closed !== true && + pool.destroyed !== true + )) + + if (pool) { + this[kRemoveClient](pool) + } + + return this + } + + get upstreams () { + return this[kClients] + .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) + .map((p) => p[kUrl].origin) + } + + [kGetDispatcher] () { + // We validate that pools is greater than 0, + // otherwise we would have to wait until an upstream + // is added, which might never happen. + if (this[kClients].length === 0) { + throw new BalancedPoolMissingUpstreamError() + } + + const dispatcher = this[kClients].find(dispatcher => ( + !dispatcher[kNeedDrain] && + dispatcher.closed !== true && + dispatcher.destroyed !== true + )) + + if (!dispatcher) { + return + } + + const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) + + if (allClientsBusy) { + return + } + + let counter = 0 + + let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) + + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length + const pool = this[kClients][this[kIndex]] + + // find pool index with the largest weight + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { + maxWeightIndex = this[kIndex] + } + + // decrease the current weight every `this[kClients].length`. + if (this[kIndex] === 0) { + // Set the current weight to the next lower weight. + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] + + if (this[kCurrentWeight] <= 0) { + this[kCurrentWeight] = this[kMaxWeightPerServer] + } + } + if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { + return pool + } + } + + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] + this[kIndex] = maxWeightIndex + return this[kClients][maxWeightIndex] + } +} + +module.exports = BalancedPool + + +/***/ }), + +/***/ 6101: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { kConstruct } = __nccwpck_require__(9174) +const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(2396) +const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(3983) +const { kHeadersList } = __nccwpck_require__(2785) +const { webidl } = __nccwpck_require__(1744) +const { Response, cloneResponse } = __nccwpck_require__(7823) +const { Request } = __nccwpck_require__(8359) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(5861) +const { fetching } = __nccwpck_require__(4881) +const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(2538) +const assert = __nccwpck_require__(9491) +const { getGlobalDispatcher } = __nccwpck_require__(1892) + +/** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + +/** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + +class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList + + constructor () { + if (arguments[0] !== kConstruct) { + webidl.illegalConstructor() + } + + this.#relevantRequestResponseList = arguments[1] + } + + async match (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' }) + + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + const p = await this.matchAll(request, options) + + if (p.length === 0) { + return + } + + return p[0] + } + + async matchAll (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) + + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + // 1. + let r = null + + // 2. + if (request !== undefined) { + if (request instanceof Request) { + // 2.1.1 + r = request[kState] + + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { + // 2.2.1 + r = new Request(request)[kState] + } + } + + // 5. + // 5.1 + const responses = [] + + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + responses.push(requestResponse[1]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) + + // 5.3.2 + for (const requestResponse of requestResponses) { + responses.push(requestResponse[1]) + } + } + + // 5.4 + // We don't implement CORs so we don't need to loop over the responses, yay! + + // 5.5.1 + const responseList = [] + + // 5.5.2 + for (const response of responses) { + // 5.5.2.1 + const responseObject = new Response(response.body?.source ?? null) + const body = responseObject[kState].body + responseObject[kState] = response + responseObject[kState].body = body + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' + + responseList.push(responseObject) + } + + // 6. + return Object.freeze(responseList) + } + + async add (request) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' }) + + request = webidl.converters.RequestInfo(request) + + // 1. + const requests = [request] + + // 2. + const responseArrayPromise = this.addAll(requests) + + // 3. + return await responseArrayPromise + } + + async addAll (requests) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' }) + + requests = webidl.converters['sequence'](requests) + + // 1. + const responsePromises = [] + + // 2. + const requestList = [] + + // 3. + for (const request of requests) { + if (typeof request === 'string') { + continue + } + + // 3.1 + const r = request[kState] + + // 3.2 + if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme when method is not GET.' + }) + } + } + + // 4. + /** @type {ReturnType[]} */ + const fetchControllers = [] + + // 5. + for (const request of requests) { + // 5.1 + const r = new Request(request)[kState] + + // 5.2 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme.' + }) + } + + // 5.4 + r.initiator = 'fetch' + r.destination = 'subresource' + + // 5.5 + requestList.push(r) + + // 5.6 + const responsePromise = createDeferredPromise() + + // 5.7 + fetchControllers.push(fetching({ + request: r, + dispatcher: getGlobalDispatcher(), + processResponse (response) { + // 1. + if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { + responsePromise.reject(webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Received an invalid status code or the request failed.' + })) + } else if (response.headersList.contains('vary')) { // 2. + // 2.1 + const fieldValues = getFieldValues(response.headersList.get('vary')) + + // 2.2 + for (const fieldValue of fieldValues) { + // 2.2.1 + if (fieldValue === '*') { + responsePromise.reject(webidl.errors.exception({ + header: 'Cache.addAll', + message: 'invalid vary field value' + })) + + for (const controller of fetchControllers) { + controller.abort() + } + + return + } + } + } + }, + processResponseEndOfBody (response) { + // 1. + if (response.aborted) { + responsePromise.reject(new DOMException('aborted', 'AbortError')) + return + } + + // 2. + responsePromise.resolve(response) + } + })) + + // 5.8 + responsePromises.push(responsePromise.promise) + } + + // 6. + const p = Promise.all(responsePromises) + + // 7. + const responses = await p + + // 7.1 + const operations = [] + + // 7.2 + let index = 0 + + // 7.3 + for (const response of responses) { + // 7.3.1 + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 7.3.2 + request: requestList[index], // 7.3.3 + response // 7.3.4 + } + + operations.push(operation) // 7.3.5 + + index++ // 7.3.6 + } + + // 7.5 + const cacheJobPromise = createDeferredPromise() + + // 7.6.1 + let errorData = null + + // 7.6.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + // 7.6.3 + queueMicrotask(() => { + // 7.6.3.1 + if (errorData === null) { + cacheJobPromise.resolve(undefined) + } else { + // 7.6.3.2 + cacheJobPromise.reject(errorData) + } + }) + + // 7.7 + return cacheJobPromise.promise + } + + async put (request, response) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' }) + + request = webidl.converters.RequestInfo(request) + response = webidl.converters.Response(response) + + // 1. + let innerRequest = null + + // 2. + if (request instanceof Request) { + innerRequest = request[kState] + } else { // 3. + innerRequest = new Request(request)[kState] + } + + // 4. + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Expected an http/s scheme when method is not GET' + }) + } + + // 5. + const innerResponse = response[kState] + + // 6. + if (innerResponse.status === 206) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got 206 status' + }) + } + + // 7. + if (innerResponse.headersList.contains('vary')) { + // 7.1. + const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) + + // 7.2. + for (const fieldValue of fieldValues) { + // 7.2.1 + if (fieldValue === '*') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got * vary field value' + }) + } + } + } + + // 8. + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Response body is locked or disturbed' + }) + } + + // 9. + const clonedResponse = cloneResponse(innerResponse) + + // 10. + const bodyReadPromise = createDeferredPromise() + + // 11. + if (innerResponse.body != null) { + // 11.1 + const stream = innerResponse.body.stream + + // 11.2 + const reader = stream.getReader() + + // 11.3 + readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) + } else { + bodyReadPromise.resolve(undefined) + } + + // 12. + /** @type {CacheBatchOperation[]} */ + const operations = [] + + // 13. + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 14. + request: innerRequest, // 15. + response: clonedResponse // 16. + } + + // 17. + operations.push(operation) + + // 19. + const bytes = await bodyReadPromise.promise + + if (clonedResponse.body != null) { + clonedResponse.body.source = bytes + } + + // 19.1 + const cacheJobPromise = createDeferredPromise() + + // 19.2.1 + let errorData = null + + // 19.2.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + // 19.2.3 + queueMicrotask(() => { + // 19.2.3.1 + if (errorData === null) { + cacheJobPromise.resolve() + } else { // 19.2.3.2 + cacheJobPromise.reject(errorData) + } + }) + + return cacheJobPromise.promise + } + + async delete (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' }) + + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + /** + * @type {Request} + */ + let r = null + + if (request instanceof Request) { + r = request[kState] + + if (r.method !== 'GET' && !options.ignoreMethod) { + return false + } + } else { + assert(typeof request === 'string') + + r = new Request(request)[kState] + } + + /** @type {CacheBatchOperation[]} */ + const operations = [] + + /** @type {CacheBatchOperation} */ + const operation = { + type: 'delete', + request: r, + options + } + + operations.push(operation) + + const cacheJobPromise = createDeferredPromise() + + let errorData = null + let requestResponses + + try { + requestResponses = this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(!!requestResponses?.length) + } else { + cacheJobPromise.reject(errorData) + } + }) + + return cacheJobPromise.promise + } + + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {readonly Request[]} + */ + async keys (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) + + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + // 1. + let r = null + + // 2. + if (request !== undefined) { + // 2.1 + if (request instanceof Request) { + // 2.1.1 + r = request[kState] + + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { // 2.2 + r = new Request(request)[kState] + } + } + + // 4. + const promise = createDeferredPromise() + + // 5. + // 5.1 + const requests = [] + + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + // 5.2.1.1 + requests.push(requestResponse[0]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) + + // 5.3.2 + for (const requestResponse of requestResponses) { + // 5.3.2.1 + requests.push(requestResponse[0]) + } + } + + // 5.4 + queueMicrotask(() => { + // 5.4.1 + const requestList = [] + + // 5.4.2 + for (const request of requests) { + const requestObject = new Request('https://a') + requestObject[kState] = request + requestObject[kHeaders][kHeadersList] = request.headersList + requestObject[kHeaders][kGuard] = 'immutable' + requestObject[kRealm] = request.client + + // 5.4.2.1 + requestList.push(requestObject) + } + + // 5.4.3 + promise.resolve(Object.freeze(requestList)) + }) + + return promise.promise + } + + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations (operations) { + // 1. + const cache = this.#relevantRequestResponseList + + // 2. + const backupCache = [...cache] + + // 3. + const addedItems = [] + + // 4.1 + const resultList = [] + + try { + // 4.2 + for (const operation of operations) { + // 4.2.1 + if (operation.type !== 'delete' && operation.type !== 'put') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'operation type does not match "delete" or "put"' + }) + } + + // 4.2.2 + if (operation.type === 'delete' && operation.response != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'delete operation should not have an associated response' + }) + } + + // 4.2.3 + if (this.#queryCache(operation.request, operation.options, addedItems).length) { + throw new DOMException('???', 'InvalidStateError') + } + + // 4.2.4 + let requestResponses + + // 4.2.5 + if (operation.type === 'delete') { + // 4.2.5.1 + requestResponses = this.#queryCache(operation.request, operation.options) + + // TODO: the spec is wrong, this is needed to pass WPTs + if (requestResponses.length === 0) { + return [] + } + + // 4.2.5.2 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) + + // 4.2.5.2.1 + cache.splice(idx, 1) + } + } else if (operation.type === 'put') { // 4.2.6 + // 4.2.6.1 + if (operation.response == null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'put operation should have an associated response' + }) + } + + // 4.2.6.2 + const r = operation.request + + // 4.2.6.3 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'expected http or https scheme' + }) + } + + // 4.2.6.4 + if (r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'not get method' + }) + } + + // 4.2.6.5 + if (operation.options != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'options must not be defined' + }) + } + + // 4.2.6.6 + requestResponses = this.#queryCache(operation.request) + + // 4.2.6.7 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) + + // 4.2.6.7.1 + cache.splice(idx, 1) + } + + // 4.2.6.8 + cache.push([operation.request, operation.response]) + + // 4.2.6.10 + addedItems.push([operation.request, operation.response]) + } + + // 4.2.7 + resultList.push([operation.request, operation.response]) + } + + // 4.3 + return resultList + } catch (e) { // 5. + // 5.1 + this.#relevantRequestResponseList.length = 0 + + // 5.2 + this.#relevantRequestResponseList = backupCache + + // 5.3 + throw e + } + } + + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache (requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = [] + + const storage = targetStorage ?? this.#relevantRequestResponseList + + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { + resultList.push(requestResponse) + } + } + + return resultList + } + + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem (requestQuery, request, response = null, options) { + // if (options?.ignoreMethod === false && request.method === 'GET') { + // return false + // } + + const queryURL = new URL(requestQuery.url) + + const cachedURL = new URL(request.url) + + if (options?.ignoreSearch) { + cachedURL.search = '' + + queryURL.search = '' + } + + if (!urlEquals(queryURL, cachedURL, true)) { + return false + } + + if ( + response == null || + options?.ignoreVary || + !response.headersList.contains('vary') + ) { + return true + } + + const fieldValues = getFieldValues(response.headersList.get('vary')) + + for (const fieldValue of fieldValues) { + if (fieldValue === '*') { + return false + } + + const requestValue = request.headersList.get(fieldValue) + const queryValue = requestQuery.headersList.get(fieldValue) + + // If one has the header and the other doesn't, or one has + // a different value than the other, return false + if (requestValue !== queryValue) { + return false + } + } + + return true + } +} + +Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: 'Cache', + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) + +const cacheQueryOptionConverters = [ + { + key: 'ignoreSearch', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'ignoreMethod', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'ignoreVary', + converter: webidl.converters.boolean, + defaultValue: false + } +] + +webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) + +webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ + ...cacheQueryOptionConverters, + { + key: 'cacheName', + converter: webidl.converters.DOMString + } +]) + +webidl.converters.Response = webidl.interfaceConverter(Response) + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.RequestInfo +) + +module.exports = { + Cache +} + + +/***/ }), + +/***/ 7907: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { kConstruct } = __nccwpck_require__(9174) +const { Cache } = __nccwpck_require__(6101) +const { webidl } = __nccwpck_require__(1744) +const { kEnumerableProperty } = __nccwpck_require__(3983) + +class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) + + cacheName = webidl.converters.DOMString(cacheName) + + // 2.1.1 + // 2.2 + return this.#caches.has(cacheName) + } + + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) + + cacheName = webidl.converters.DOMString(cacheName) + + // 2.1 + if (this.#caches.has(cacheName)) { + // await caches.open('v1') !== await caches.open('v1') + + // 2.1.1 + const cache = this.#caches.get(cacheName) + + // 2.1.1.1 + return new Cache(kConstruct, cache) + } + + // 2.2 + const cache = [] + + // 2.3 + this.#caches.set(cacheName, cache) + + // 2.4 + return new Cache(kConstruct, cache) + } + + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) + + cacheName = webidl.converters.DOMString(cacheName) + + return this.#caches.delete(cacheName) + } + + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {string[]} + */ + async keys () { + webidl.brandCheck(this, CacheStorage) + + // 2.1 + const keys = this.#caches.keys() + + // 2.2 + return [...keys] + } +} + +Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: 'CacheStorage', + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) + +module.exports = { + CacheStorage +} + + +/***/ }), + +/***/ 9174: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = { + kConstruct: (__nccwpck_require__(2785).kConstruct) +} + + +/***/ }), + +/***/ 2396: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const assert = __nccwpck_require__(9491) +const { URLSerializer } = __nccwpck_require__(685) +const { isValidHeaderName } = __nccwpck_require__(2538) + +/** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ +function urlEquals (A, B, excludeFragment = false) { + const serializedA = URLSerializer(A, excludeFragment) + + const serializedB = URLSerializer(B, excludeFragment) + + return serializedA === serializedB +} + +/** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ +function fieldValues (header) { + assert(header !== null) + + const values = [] + + for (let value of header.split(',')) { + value = value.trim() + + if (!value.length) { + continue + } else if (!isValidHeaderName(value)) { + continue + } + + values.push(value) + } + + return values +} + +module.exports = { + urlEquals, + fieldValues +} + + +/***/ }), + +/***/ 3598: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// @ts-check + + + +/* global WebAssembly */ + +const assert = __nccwpck_require__(9491) +const net = __nccwpck_require__(1808) +const http = __nccwpck_require__(3685) +const { pipeline } = __nccwpck_require__(2781) +const util = __nccwpck_require__(3983) +const timers = __nccwpck_require__(9459) +const Request = __nccwpck_require__(2905) +const DispatcherBase = __nccwpck_require__(4839) +const { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + InvalidArgumentError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError, + ClientDestroyedError +} = __nccwpck_require__(8045) +const buildConnector = __nccwpck_require__(2067) +const { + kUrl, + kReset, + kServerName, + kClient, + kBusy, + kParser, + kConnect, + kBlocking, + kResuming, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRedirections, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kHTTPConnVersion, + // HTTP2 + kHost, + kHTTP2Session, + kHTTP2SessionState, + kHTTP2BuildRequest, + kHTTP2CopyHeaders, + kHTTP1BuildRequest +} = __nccwpck_require__(2785) + +/** @type {import('http2')} */ +let http2 +try { + http2 = __nccwpck_require__(5158) +} catch { + // @ts-ignore + http2 = { constants: {} } +} + +const { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS + } +} = http2 + +// Experimental +let h2ExperimentalWarned = false + +const FastBuffer = Buffer[Symbol.species] + +const kClosedResolve = Symbol('kClosedResolve') + +const channels = {} + +try { + const diagnosticsChannel = __nccwpck_require__(7643) + channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders') + channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect') + channels.connectError = diagnosticsChannel.channel('undici:client:connectError') + channels.connected = diagnosticsChannel.channel('undici:client:connected') +} catch { + channels.sendHeaders = { hasSubscribers: false } + channels.beforeConnect = { hasSubscribers: false } + channels.connectError = { hasSubscribers: false } + channels.connected = { hasSubscribers: false } +} + +/** + * @type {import('../types/client').default} + */ +class Client extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../types/client').Client.Options} options + */ + constructor (url, { + interceptors, + maxHeaderSize, + headersTimeout, + socketTimeout, + requestTimeout, + connectTimeout, + bodyTimeout, + idleTimeout, + keepAlive, + keepAliveTimeout, + maxKeepAliveTimeout, + keepAliveMaxTimeout, + keepAliveTimeoutThreshold, + socketPath, + pipelining, + tls, + strictContentLength, + maxCachedSessions, + maxRedirections, + connect, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + allowH2, + maxConcurrentStreams + } = {}) { + super() + + if (keepAlive !== undefined) { + throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') + } + + if (socketTimeout !== undefined) { + throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') + } + + if (requestTimeout !== undefined) { + throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') + } + + if (idleTimeout !== undefined) { + throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') + } + + if (maxKeepAliveTimeout !== undefined) { + throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') + } + + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { + throw new InvalidArgumentError('invalid maxHeaderSize') + } + + if (socketPath != null && typeof socketPath !== 'string') { + throw new InvalidArgumentError('invalid socketPath') + } + + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { + throw new InvalidArgumentError('invalid connectTimeout') + } + + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { + throw new InvalidArgumentError('invalid keepAliveTimeout') + } + + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { + throw new InvalidArgumentError('invalid keepAliveMaxTimeout') + } + + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { + throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') + } + + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') + } + + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') + } + + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') + } + + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError('maxRedirections must be a positive number') + } + + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { + throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') + } + + if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { + throw new InvalidArgumentError('localAddress must be valid string IP address') + } + + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError('maxResponseSize must be a positive number') + } + + if ( + autoSelectFamilyAttemptTimeout != null && + (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) + ) { + throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') + } + + // h2 + if (allowH2 != null && typeof allowH2 !== 'boolean') { + throw new InvalidArgumentError('allowH2 must be a valid boolean value') + } + + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0') + } + + if (typeof connect !== 'function') { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...connect + }) + } + + this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) + ? interceptors.Client + : [createRedirectInterceptor({ maxRedirections })] + this[kUrl] = util.parseOrigin(url) + this[kConnector] = connect + this[kSocket] = null + this[kPipelining] = pipelining != null ? pipelining : 1 + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] + this[kServerName] = null + this[kLocalAddress] = localAddress != null ? localAddress : null + this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming + this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength + this[kMaxRedirections] = maxRedirections + this[kMaxRequests] = maxRequestsPerClient + this[kClosedResolve] = null + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 + this[kHTTPConnVersion] = 'h1' + + // HTTP/2 + this[kHTTP2Session] = null + this[kHTTP2SessionState] = !allowH2 + ? null + : { + // streams: null, // Fixed queue of streams - For future support of `push` + openStreams: 0, // Keep track of them to decide wether or not unref the session + maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server + } + this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}` + + // kQueue is built up of 3 sections separated by + // the kRunningIdx and kPendingIdx indices. + // | complete | running | pending | + // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length + // kRunningIdx points to the first running element. + // kPendingIdx points to the first pending element. + // This implements a fast queue with an amortized + // time of O(1). + + this[kQueue] = [] + this[kRunningIdx] = 0 + this[kPendingIdx] = 0 + } + + get pipelining () { + return this[kPipelining] + } + + set pipelining (value) { + this[kPipelining] = value + resume(this, true) + } + + get [kPending] () { + return this[kQueue].length - this[kPendingIdx] + } + + get [kRunning] () { + return this[kPendingIdx] - this[kRunningIdx] + } + + get [kSize] () { + return this[kQueue].length - this[kRunningIdx] + } + + get [kConnected] () { + return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed + } + + get [kBusy] () { + const socket = this[kSocket] + return ( + (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) || + (this[kSize] >= (this[kPipelining] || 1)) || + this[kPending] > 0 + ) + } + + /* istanbul ignore: only used for test */ + [kConnect] (cb) { + connect(this) + this.once('connect', cb) + } + + [kDispatch] (opts, handler) { + const origin = opts.origin || this[kUrl].origin + + const request = this[kHTTPConnVersion] === 'h2' + ? Request[kHTTP2BuildRequest](origin, opts, handler) + : Request[kHTTP1BuildRequest](origin, opts, handler) + + this[kQueue].push(request) + if (this[kResuming]) { + // Do nothing. + } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + // Wait a tick in case stream/iterator is ended in the same tick. + this[kResuming] = 1 + process.nextTick(resume, this) + } else { + resume(this, true) + } + + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2 + } + + return this[kNeedDrain] < 2 + } + + async [kClose] () { + // TODO: for H2 we need to gracefully flush the remaining enqueued + // request and close each stream. + return new Promise((resolve) => { + if (!this[kSize]) { + resolve(null) + } else { + this[kClosedResolve] = resolve + } + }) + } + + async [kDestroy] (err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(this, request, err) + } + + const callback = () => { + if (this[kClosedResolve]) { + // TODO (fix): Should we error here with ClientDestroyedError? + this[kClosedResolve]() + this[kClosedResolve] = null + } + resolve() + } + + if (this[kHTTP2Session] != null) { + util.destroy(this[kHTTP2Session], err) + this[kHTTP2Session] = null + this[kHTTP2SessionState] = null + } + + if (!this[kSocket]) { + queueMicrotask(callback) + } else { + util.destroy(this[kSocket].on('close', callback), err) + } + + resume(this) + }) + } +} + +function onHttp2SessionError (err) { + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + + this[kSocket][kError] = err + + onError(this[kClient], err) +} + +function onHttp2FrameError (type, code, id) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + + if (id === 0) { + this[kSocket][kError] = err + onError(this[kClient], err) + } +} + +function onHttp2SessionEnd () { + util.destroy(this, new SocketError('other side closed')) + util.destroy(this[kSocket], new SocketError('other side closed')) +} + +function onHTTP2GoAway (code) { + const client = this[kClient] + const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) + client[kSocket] = null + client[kHTTP2Session] = null + + if (client.destroyed) { + assert(this[kPending] === 0) + + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(this, request, err) + } + } else if (client[kRunning] > 0) { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null + + errorRequest(client, request, err) + } + + client[kPendingIdx] = client[kRunningIdx] + + assert(client[kRunning] === 0) + + client.emit('disconnect', + client[kUrl], + [client], + err + ) + + resume(client) +} + +const constants = __nccwpck_require__(953) +const createRedirectInterceptor = __nccwpck_require__(8861) +const EMPTY_BUF = Buffer.alloc(0) + +async function lazyllhttp () { + const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(1145) : undefined + + let mod + try { + mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(5627), 'base64')) + } catch (e) { + /* istanbul ignore next */ + + // We could check if the error was caused by the simd option not + // being enabled, but the occurring of this other error + // * https://github.com/emscripten-core/emscripten/issues/11495 + // got me to remove that check to avoid breaking Node 12. + mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || __nccwpck_require__(1145), 'base64')) + } + + return await WebAssembly.instantiate(mod, { + env: { + /* eslint-disable camelcase */ + + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0 + }, + wasm_on_status: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_message_begin: (p) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onMessageBegin() || 0 + }, + wasm_on_header_field: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_header_value: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 + }, + wasm_on_body: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_message_complete: (p) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onMessageComplete() || 0 + } + + /* eslint-enable camelcase */ + } + }) +} + +let llhttpInstance = null +let llhttpPromise = lazyllhttp() +llhttpPromise.catch() + +let currentParser = null +let currentBufferRef = null +let currentBufferSize = 0 +let currentBufferPtr = null + +const TIMEOUT_HEADERS = 1 +const TIMEOUT_BODY = 2 +const TIMEOUT_IDLE = 3 + +class Parser { + constructor (client, socket, { exports }) { + assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) + + this.llhttp = exports + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) + this.client = client + this.socket = socket + this.timeout = null + this.timeoutValue = null + this.timeoutType = null + this.statusCode = null + this.statusText = '' + this.upgrade = false + this.headers = [] + this.headersSize = 0 + this.headersMaxSize = client[kMaxHeadersSize] + this.shouldKeepAlive = false + this.paused = false + this.resume = this.resume.bind(this) + + this.bytesRead = 0 + + this.keepAlive = '' + this.contentLength = '' + this.connection = '' + this.maxResponseSize = client[kMaxResponseSize] + } + + setTimeout (value, type) { + this.timeoutType = type + if (value !== this.timeoutValue) { + timers.clearTimeout(this.timeout) + if (value) { + this.timeout = timers.setTimeout(onParserTimeout, value, this) + // istanbul ignore else: only for jest + if (this.timeout.unref) { + this.timeout.unref() + } + } else { + this.timeout = null + } + this.timeoutValue = value + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } + } + } + + resume () { + if (this.socket.destroyed || !this.paused) { + return + } + + assert(this.ptr != null) + assert(currentParser == null) + + this.llhttp.llhttp_resume(this.ptr) + + assert(this.timeoutType === TIMEOUT_BODY) + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } + } + + this.paused = false + this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. + this.readMore() + } + + readMore () { + while (!this.paused && this.ptr) { + const chunk = this.socket.read() + if (chunk === null) { + break + } + this.execute(chunk) + } + } + + execute (data) { + assert(this.ptr != null) + assert(currentParser == null) + assert(!this.paused) + + const { socket, llhttp } = this + + if (data.length > currentBufferSize) { + if (currentBufferPtr) { + llhttp.free(currentBufferPtr) + } + currentBufferSize = Math.ceil(data.length / 4096) * 4096 + currentBufferPtr = llhttp.malloc(currentBufferSize) + } + + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) + + // Call `execute` on the wasm parser. + // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, + // and finally the length of bytes to parse. + // The return value is an error code or `constants.ERROR.OK`. + try { + let ret + + try { + currentBufferRef = data + currentParser = this + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) + /* eslint-disable-next-line no-useless-catch */ + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err + } finally { + currentParser = null + currentBufferRef = null + } + + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr + + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data.slice(offset)) + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true + socket.unshift(data.slice(offset)) + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr) + let message = '' + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) + message = + 'Response does not match the HTTP/1.1 protocol (' + + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + + ')' + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) + } + } catch (err) { + util.destroy(socket, err) + } + } + + destroy () { + assert(this.ptr != null) + assert(currentParser == null) + + this.llhttp.llhttp_free(this.ptr) + this.ptr = null + + timers.clearTimeout(this.timeout) + this.timeout = null + this.timeoutValue = null + this.timeoutType = null + + this.paused = false + } + + onStatus (buf) { + this.statusText = buf.toString() + } + + onMessageBegin () { + const { socket, client } = this + + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) { + return -1 + } + + const request = client[kQueue][client[kRunningIdx]] + if (!request) { + return -1 + } + } + + onHeaderField (buf) { + const len = this.headers.length + + if ((len & 1) === 0) { + this.headers.push(buf) + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) + } + + this.trackHeader(buf.length) + } + + onHeaderValue (buf) { + let len = this.headers.length + + if ((len & 1) === 1) { + this.headers.push(buf) + len += 1 + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) + } + + const key = this.headers[len - 2] + if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') { + this.keepAlive += buf.toString() + } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') { + this.connection += buf.toString() + } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') { + this.contentLength += buf.toString() + } + + this.trackHeader(buf.length) + } + + trackHeader (len) { + this.headersSize += len + if (this.headersSize >= this.headersMaxSize) { + util.destroy(this.socket, new HeadersOverflowError()) + } + } + + onUpgrade (head) { + const { upgrade, client, socket, headers, statusCode } = this + + assert(upgrade) + + const request = client[kQueue][client[kRunningIdx]] + assert(request) + + assert(!socket.destroyed) + assert(socket === client[kSocket]) + assert(!this.paused) + assert(request.upgrade || request.method === 'CONNECT') + + this.statusCode = null + this.statusText = '' + this.shouldKeepAlive = null + + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 + + socket.unshift(head) + + socket[kParser].destroy() + socket[kParser] = null + + socket[kClient] = null + socket[kError] = null + socket + .removeListener('error', onSocketError) + .removeListener('readable', onSocketReadable) + .removeListener('end', onSocketEnd) + .removeListener('close', onSocketClose) + + client[kSocket] = null + client[kQueue][client[kRunningIdx]++] = null + client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) + + try { + request.onUpgrade(statusCode, headers, socket) + } catch (err) { + util.destroy(socket, err) + } + + resume(client) + } + + onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this + + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) { + return -1 + } + + const request = client[kQueue][client[kRunningIdx]] + + /* istanbul ignore next: difficult to make a test case for */ + if (!request) { + return -1 + } + + assert(!this.upgrade) + assert(this.statusCode < 200) + + if (statusCode === 100) { + util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) + return -1 + } + + /* this can only happen if server is misbehaving */ + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) + return -1 + } + + assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS) + + this.statusCode = statusCode + this.shouldKeepAlive = ( + shouldKeepAlive || + // Override llhttp value which does not allow keepAlive for HEAD. + (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') + ) + + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null + ? request.bodyTimeout + : client[kBodyTimeout] + this.setTimeout(bodyTimeout, TIMEOUT_BODY) + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } + } + + if (request.method === 'CONNECT') { + assert(client[kRunning] === 1) + this.upgrade = true + return 2 + } + + if (upgrade) { + assert(client[kRunning] === 1) + this.upgrade = true + return 2 + } + + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 + + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null + + if (keepAliveTimeout != null) { + const timeout = Math.min( + keepAliveTimeout - client[kKeepAliveTimeoutThreshold], + client[kKeepAliveMaxTimeout] + ) + if (timeout <= 0) { + socket[kReset] = true + } else { + client[kKeepAliveTimeoutValue] = timeout + } + } else { + client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] + } + } else { + // Stop more requests from being dispatched. + socket[kReset] = true + } + + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false + + if (request.aborted) { + return -1 + } + + if (request.method === 'HEAD') { + return 1 + } + + if (statusCode < 200) { + return 1 + } + + if (socket[kBlocking]) { + socket[kBlocking] = false + resume(client) + } + + return pause ? constants.ERROR.PAUSED : 0 + } + + onBody (buf) { + const { client, socket, statusCode, maxResponseSize } = this + + if (socket.destroyed) { + return -1 + } + + const request = client[kQueue][client[kRunningIdx]] + assert(request) + + assert.strictEqual(this.timeoutType, TIMEOUT_BODY) + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } + } + + assert(statusCode >= 200) + + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()) + return -1 + } + + this.bytesRead += buf.length + + if (request.onData(buf) === false) { + return constants.ERROR.PAUSED + } + } + + onMessageComplete () { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this + + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1 + } + + if (upgrade) { + return + } + + const request = client[kQueue][client[kRunningIdx]] + assert(request) + + assert(statusCode >= 100) + + this.statusCode = null + this.statusText = '' + this.bytesRead = 0 + this.contentLength = '' + this.keepAlive = '' + this.connection = '' + + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 + + if (statusCode < 200) { + return + } + + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()) + return -1 + } + + request.onComplete(headers) + + client[kQueue][client[kRunningIdx]++] = null + + if (socket[kWriting]) { + assert.strictEqual(client[kRunning], 0) + // Response completed before request. + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (socket[kReset] && client[kRunning] === 0) { + // Destroy socket once all requests have completed. + // The request at the tail of the pipeline is the one + // that requested reset and no further requests should + // have been queued since then. + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (client[kPipelining] === 1) { + // We must wait a full event loop cycle to reuse this socket to make sure + // that non-spec compliant servers are not closing the connection even if they + // said they won't. + setImmediate(resume, client) + } else { + resume(client) + } + } +} + +function onParserTimeout (parser) { + const { socket, timeoutType, client } = parser + + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert(!parser.paused, 'cannot be paused while waiting for headers') + util.destroy(socket, new HeadersTimeoutError()) + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!parser.paused) { + util.destroy(socket, new BodyTimeoutError()) + } + } else if (timeoutType === TIMEOUT_IDLE) { + assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) + util.destroy(socket, new InformationalError('socket idle timeout')) + } +} + +function onSocketReadable () { + const { [kParser]: parser } = this + if (parser) { + parser.readMore() + } +} + +function onSocketError (err) { + const { [kClient]: client, [kParser]: parser } = this + + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + + if (client[kHTTPConnVersion] !== 'h2') { + // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded + // to the user. + if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so for as a valid response. + parser.onMessageComplete() + return + } + } + + this[kError] = err + + onError(this[kClient], err) +} + +function onError (client, err) { + if ( + client[kRunning] === 0 && + err.code !== 'UND_ERR_INFO' && + err.code !== 'UND_ERR_SOCKET' + ) { + // Error is not caused by running request and not a recoverable + // socket error. + + assert(client[kPendingIdx] === client[kRunningIdx]) + + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(client, request, err) + } + assert(client[kSize] === 0) + } +} + +function onSocketEnd () { + const { [kParser]: parser, [kClient]: client } = this + + if (client[kHTTPConnVersion] !== 'h2') { + if (parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + return + } + } + + util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) +} + +function onSocketClose () { + const { [kClient]: client, [kParser]: parser } = this + + if (client[kHTTPConnVersion] === 'h1' && parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + } + + this[kParser].destroy() + this[kParser] = null + } + + const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) + + client[kSocket] = null + + if (client.destroyed) { + assert(client[kPending] === 0) + + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(client, request, err) + } + } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null + + errorRequest(client, request, err) + } + + client[kPendingIdx] = client[kRunningIdx] + + assert(client[kRunning] === 0) + + client.emit('disconnect', client[kUrl], [client], err) + + resume(client) +} + +async function connect (client) { + assert(!client[kConnecting]) + assert(!client[kSocket]) + + let { host, hostname, protocol, port } = client[kUrl] + + // Resolve ipv6 + if (hostname[0] === '[') { + const idx = hostname.indexOf(']') + + assert(idx !== -1) + const ip = hostname.substring(1, idx) + + assert(net.isIP(ip)) + hostname = ip + } + + client[kConnecting] = true + + if (channels.beforeConnect.hasSubscribers) { + channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }) + } + + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) { + reject(err) + } else { + resolve(socket) + } + }) + }) + + if (client.destroyed) { + util.destroy(socket.on('error', () => {}), new ClientDestroyedError()) + return + } + + client[kConnecting] = false + + assert(socket) + + const isH2 = socket.alpnProtocol === 'h2' + if (isH2) { + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true + process.emitWarning('H2 support is experimental, expect them to change at any time.', { + code: 'UNDICI-H2' + }) + } + + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams + }) + + client[kHTTPConnVersion] = 'h2' + session[kClient] = client + session[kSocket] = socket + session.on('error', onHttp2SessionError) + session.on('frameError', onHttp2FrameError) + session.on('end', onHttp2SessionEnd) + session.on('goaway', onHTTP2GoAway) + session.on('close', onSocketClose) + session.unref() + + client[kHTTP2Session] = session + socket[kHTTP2Session] = session + } else { + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise + llhttpPromise = null + } + + socket[kNoRef] = false + socket[kWriting] = false + socket[kReset] = false + socket[kBlocking] = false + socket[kParser] = new Parser(client, socket, llhttpInstance) + } + + socket[kCounter] = 0 + socket[kMaxRequests] = client[kMaxRequests] + socket[kClient] = client + socket[kError] = null + + socket + .on('error', onSocketError) + .on('readable', onSocketReadable) + .on('end', onSocketEnd) + .on('close', onSocketClose) + + client[kSocket] = socket + + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }) + } + client.emit('connect', client[kUrl], [client]) + } catch (err) { + if (client.destroyed) { + return + } + + client[kConnecting] = false + + if (channels.connectError.hasSubscribers) { + channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }) + } + + if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { + assert(client[kRunning] === 0) + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++] + errorRequest(client, request, err) + } + } else { + onError(client, err) + } + + client.emit('connectionError', client[kUrl], [client], err) + } + + resume(client) +} + +function emitDrain (client) { + client[kNeedDrain] = 0 + client.emit('drain', client[kUrl], [client]) +} + +function resume (client, sync) { + if (client[kResuming] === 2) { + return + } + + client[kResuming] = 2 + + _resume(client, sync) + client[kResuming] = 0 + + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]) + client[kPendingIdx] -= client[kRunningIdx] + client[kRunningIdx] = 0 + } +} + +function _resume (client, sync) { + while (true) { + if (client.destroyed) { + assert(client[kPending] === 0) + return + } + + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve]() + client[kClosedResolve] = null + return + } + + const socket = client[kSocket] + + if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref() + socket[kNoRef] = true + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref() + socket[kNoRef] = false + } + + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { + socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE) + } + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]] + const headersTimeout = request.headersTimeout != null + ? request.headersTimeout + : client[kHeadersTimeout] + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) + } + } + } + + if (client[kBusy]) { + client[kNeedDrain] = 2 + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1 + process.nextTick(emitDrain, client) + } else { + emitDrain(client) + } + continue + } + + if (client[kPending] === 0) { + return + } + + if (client[kRunning] >= (client[kPipelining] || 1)) { + return + } + + const request = client[kQueue][client[kPendingIdx]] + + if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) { + return + } + + client[kServerName] = request.servername + + if (socket && socket.servername !== request.servername) { + util.destroy(socket, new InformationalError('servername changed')) + return + } + } + + if (client[kConnecting]) { + return + } + + if (!socket && !client[kHTTP2Session]) { + connect(client) + return + } + + if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { + return + } + + if (client[kRunning] > 0 && !request.idempotent) { + // Non-idempotent request cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return + } + + if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { + // Don't dispatch an upgrade until all preceding requests have completed. + // A misbehaving server might upgrade the connection before all pipelined + // request has completed. + return + } + + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && + (util.isStream(request.body) || util.isAsyncIterable(request.body))) { + // Request with stream or iterator body can error while other requests + // are inflight and indirectly error those as well. + // Ensure this doesn't happen by waiting for inflight + // to complete before dispatching. + + // Request with stream or iterator body cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return + } + + if (!request.aborted && write(client, request)) { + client[kPendingIdx]++ + } else { + client[kQueue].splice(client[kPendingIdx], 1) + } + } +} + +// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 +function shouldSendContentLength (method) { + return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' +} + +function write (client, request) { + if (client[kHTTPConnVersion] === 'h2') { + writeH2(client, client[kHTTP2Session], request) + return + } + + const { body, method, path, host, upgrade, headers, blocking, reset } = request + + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) + + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) + } + + const bodyLength = util.bodyLength(body) + + let contentLength = bodyLength + + if (contentLength === null) { + contentLength = request.contentLength + } + + if (contentLength === 0 && !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + + contentLength = null + } + + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) + return false + } + + process.emitWarning(new RequestContentLengthMismatchError()) + } + + const socket = client[kSocket] + + try { + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } + + errorRequest(client, request, err || new RequestAbortedError()) + + util.destroy(socket, new InformationalError('aborted')) + }) + } catch (err) { + errorRequest(client, request, err) + } + + if (request.aborted) { + return false + } + + if (method === 'HEAD') { + // https://github.com/mcollina/undici/issues/258 + // Close after a HEAD request to interop with misbehaving servers + // that may send a body in the response. + + socket[kReset] = true + } + + if (upgrade || method === 'CONNECT') { + // On CONNECT or upgrade, block pipeline from dispatching further + // requests on this connection. + + socket[kReset] = true + } + + if (reset != null) { + socket[kReset] = reset + } + + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { + socket[kReset] = true + } + + if (blocking) { + socket[kBlocking] = true + } + + let header = `${method} ${path} HTTP/1.1\r\n` + + if (typeof host === 'string') { + header += `host: ${host}\r\n` + } else { + header += client[kHostHeader] + } + + if (upgrade) { + header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` + } else if (client[kPipelining] && !socket[kReset]) { + header += 'connection: keep-alive\r\n' + } else { + header += 'connection: close\r\n' + } + + if (headers) { + header += headers + } + + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request, headers: header, socket }) + } + + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') + } else { + assert(contentLength === null, 'no body must not have content length') + socket.write(`${header}\r\n`, 'latin1') + } + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, 'buffer body must have content length') + + socket.cork() + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + socket.write(body) + socket.uncork() + request.onBodySent(body) + request.onRequestSent() + if (!expectsPayload) { + socket[kReset] = true + } + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }) + } else { + writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }) + } + } else if (util.isStream(body)) { + writeStream({ body, client, request, socket, contentLength, header, expectsPayload }) + } else if (util.isIterable(body)) { + writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }) + } else { + assert(false) + } + + return true +} + +function writeH2 (client, session, request) { + const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request + + let headers + if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) + else headers = reqHeaders + + if (upgrade) { + errorRequest(client, request, new Error('Upgrade not supported for H2')) + return false + } + + try { + // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } + + errorRequest(client, request, err || new RequestAbortedError()) + }) + } catch (err) { + errorRequest(client, request, err) + } + + if (request.aborted) { + return false + } + + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream + const h2State = client[kHTTP2SessionState] + + headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] + headers[HTTP2_HEADER_METHOD] = method + + if (method === 'CONNECT') { + session.ref() + // we are already connected, streams are pending, first request + // will create a new stream. We trigger a request to create the stream and wait until + // `ready` event is triggered + // We disabled endStream to allow the user to write to the stream + stream = session.request(headers, { endStream: false, signal }) + + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + } else { + stream.once('ready', () => { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + }) + } + + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) session.unref() + }) + + return true + } + + // https://tools.ietf.org/html/rfc7540#section-8.3 + // :path and :scheme headers must be omited when sending CONNECT + + headers[HTTP2_HEADER_PATH] = path + headers[HTTP2_HEADER_SCHEME] = 'https' + + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) + + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) + } + + let contentLength = util.bodyLength(body) + + if (contentLength == null) { + contentLength = request.contentLength + } + + if (contentLength === 0 || !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + + contentLength = null + } + + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) + return false + } + + process.emitWarning(new RequestContentLengthMismatchError()) + } + + if (contentLength != null) { + assert(body, 'no body must not have content length') + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` + } + + session.ref() + + const shouldEndStream = method === 'GET' || method === 'HEAD' + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = '100-continue' + stream = session.request(headers, { endStream: shouldEndStream, signal }) + + stream.once('continue', writeBodyH2) + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }) + writeBodyH2() + } + + // Increment counter as we have new several streams open + ++h2State.openStreams + + stream.once('response', headers => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers + + if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { + stream.pause() + } + }) + + stream.once('end', () => { + request.onComplete([]) + }) + + stream.on('data', (chunk) => { + if (request.onData(chunk) === false) { + stream.pause() + } + }) + + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) { + session.unref() + } + }) + + stream.once('error', function (err) { + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) + + stream.once('frameError', (type, code) => { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + errorRequest(client, request, err) + + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) + + // stream.on('aborted', () => { + // // TODO(HTTP/2): Support aborted + // }) + + // stream.on('timeout', () => { + // // TODO(HTTP/2): Support timeout + // }) + + // stream.on('push', headers => { + // // TODO(HTTP/2): Suppor push + // }) + + // stream.on('trailers', headers => { + // // TODO(HTTP/2): Support trailers + // }) + + return true + + function writeBodyH2 () { + /* istanbul ignore else: assertion */ + if (!body) { + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, 'buffer body must have content length') + stream.cork() + stream.write(body) + stream.uncork() + stream.end() + request.onBodySent(body) + request.onRequestSent() + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ + client, + request, + contentLength, + h2stream: stream, + expectsPayload, + body: body.stream(), + socket: client[kSocket], + header: '' + }) + } else { + writeBlob({ + body, + client, + request, + contentLength, + expectsPayload, + h2stream: stream, + header: '', + socket: client[kSocket] + }) + } + } else if (util.isStream(body)) { + writeStream({ + body, + client, + request, + contentLength, + expectsPayload, + socket: client[kSocket], + h2stream: stream, + header: '' + }) + } else if (util.isIterable(body)) { + writeIterable({ + body, + client, + request, + contentLength, + expectsPayload, + header: '', + h2stream: stream, + socket: client[kSocket] + }) + } else { + assert(false) + } + } +} + +function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') + + if (client[kHTTPConnVersion] === 'h2') { + // For HTTP/2, is enough to pipe the stream + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util.destroy(body, err) + util.destroy(h2stream, err) + } else { + request.onRequestSent() + } + } + ) + + pipe.on('data', onPipeData) + pipe.once('end', () => { + pipe.removeListener('data', onPipeData) + util.destroy(pipe) + }) + + function onPipeData (chunk) { + request.onBodySent(chunk) + } + + return + } + + let finished = false + + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) + + const onData = function (chunk) { + if (finished) { + return + } + + try { + if (!writer.write(chunk) && this.pause) { + this.pause() + } + } catch (err) { + util.destroy(this, err) + } + } + const onDrain = function () { + if (finished) { + return + } + + if (body.resume) { + body.resume() + } + } + const onAbort = function () { + if (finished) { + return + } + const err = new RequestAbortedError() + queueMicrotask(() => onFinished(err)) + } + const onFinished = function (err) { + if (finished) { + return + } + + finished = true + + assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) + + socket + .off('drain', onDrain) + .off('error', onFinished) + + body + .removeListener('data', onData) + .removeListener('end', onFinished) + .removeListener('error', onFinished) + .removeListener('close', onAbort) + + if (!err) { + try { + writer.end() + } catch (er) { + err = er + } + } + + writer.destroy(err) + + if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { + util.destroy(body, err) + } else { + util.destroy(body) + } + } + + body + .on('data', onData) + .on('end', onFinished) + .on('error', onFinished) + .on('close', onAbort) + + if (body.resume) { + body.resume() + } + + socket + .on('drain', onDrain) + .on('error', onFinished) +} + +async function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength === body.size, 'blob body must have content length') + + const isH2 = client[kHTTPConnVersion] === 'h2' + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError() + } + + const buffer = Buffer.from(await body.arrayBuffer()) + + if (isH2) { + h2stream.cork() + h2stream.write(buffer) + h2stream.uncork() + } else { + socket.cork() + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + socket.write(buffer) + socket.uncork() + } + + request.onBodySent(buffer) + request.onRequestSent() + + if (!expectsPayload) { + socket[kReset] = true + } + + resume(client) + } catch (err) { + util.destroy(isH2 ? h2stream : socket, err) + } +} + +async function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') + + let callback = null + function onDrain () { + if (callback) { + const cb = callback + callback = null + cb() + } + } + + const waitForDrain = () => new Promise((resolve, reject) => { + assert(callback === null) + + if (socket[kError]) { + reject(socket[kError]) + } else { + callback = resolve + } + }) + + if (client[kHTTPConnVersion] === 'h2') { + h2stream + .on('close', onDrain) + .on('drain', onDrain) + + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError] + } + + const res = h2stream.write(chunk) + request.onBodySent(chunk) + if (!res) { + await waitForDrain() + } + } + } catch (err) { + h2stream.destroy(err) + } finally { + request.onRequestSent() + h2stream.end() + h2stream + .off('close', onDrain) + .off('drain', onDrain) + } + + return + } + + socket + .on('close', onDrain) + .on('drain', onDrain) + + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError] + } + + if (!writer.write(chunk)) { + await waitForDrain() + } + } + + writer.end() + } catch (err) { + writer.destroy(err) + } finally { + socket + .off('close', onDrain) + .off('drain', onDrain) + } +} + +class AsyncWriter { + constructor ({ socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket + this.request = request + this.contentLength = contentLength + this.client = client + this.bytesWritten = 0 + this.expectsPayload = expectsPayload + this.header = header + + socket[kWriting] = true + } + + write (chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this + + if (socket[kError]) { + throw socket[kError] + } + + if (socket.destroyed) { + return false + } + + const len = Buffer.byteLength(chunk) + if (!len) { + return true + } + + // We should defer writing chunks. + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError() + } + + process.emitWarning(new RequestContentLengthMismatchError()) + } + + socket.cork() + + if (bytesWritten === 0) { + if (!expectsPayload) { + socket[kReset] = true + } + + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') + } else { + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + } + } + + if (contentLength === null) { + socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') + } + + this.bytesWritten += len + + const ret = socket.write(chunk) + + socket.uncork() + + request.onBodySent(chunk) + + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh() + } + } + } + + return ret + } + + end () { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this + request.onRequestSent() + + socket[kWriting] = false + + if (socket[kError]) { + throw socket[kError] + } + + if (socket.destroyed) { + return + } + + if (bytesWritten === 0) { + if (expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD send a Content-Length in a request message when + // no Transfer-Encoding is sent and the request method defines a meaning + // for an enclosed payload body. + + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') + } else { + socket.write(`${header}\r\n`, 'latin1') + } + } else if (contentLength === null) { + socket.write('\r\n0\r\n\r\n', 'latin1') + } + + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError() + } else { + process.emitWarning(new RequestContentLengthMismatchError()) + } + } + + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh() + } + } + + resume(client) + } + + destroy (err) { + const { socket, client } = this + + socket[kWriting] = false + + if (err) { + assert(client[kRunning] <= 1, 'pipeline should only contain this request') + util.destroy(socket, err) + } + } +} + +function errorRequest (client, request, err) { + try { + request.onError(err) + assert(request.aborted) + } catch (err) { + client.emit('error', err) + } +} + +module.exports = Client + + +/***/ }), + +/***/ 6436: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/* istanbul ignore file: only for Node 12 */ + +const { kConnected, kSize } = __nccwpck_require__(2785) + +class CompatWeakRef { + constructor (value) { + this.value = value + } + + deref () { + return this.value[kConnected] === 0 && this.value[kSize] === 0 + ? undefined + : this.value + } +} + +class CompatFinalizer { + constructor (finalizer) { + this.finalizer = finalizer + } + + register (dispatcher, key) { + if (dispatcher.on) { + dispatcher.on('disconnect', () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { + this.finalizer(key) + } + }) + } + } +} + +module.exports = function () { + // FIXME: remove workaround when the Node bug is fixed + // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 + if (process.env.NODE_V8_COVERAGE) { + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + } + } + return { + WeakRef: global.WeakRef || CompatWeakRef, + FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer + } +} + + +/***/ }), + +/***/ 663: +/***/ ((module) => { + +"use strict"; + + +// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size +const maxAttributeValueSize = 1024 + +// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size +const maxNameValuePairSize = 4096 + +module.exports = { + maxAttributeValueSize, + maxNameValuePairSize +} + + +/***/ }), + +/***/ 1724: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { parseSetCookie } = __nccwpck_require__(4408) +const { stringify, getHeadersList } = __nccwpck_require__(3121) +const { webidl } = __nccwpck_require__(1744) +const { Headers } = __nccwpck_require__(554) + +/** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + +/** + * @param {Headers} headers + * @returns {Record} + */ +function getCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + const cookie = headers.get('cookie') + const out = {} + + if (!cookie) { + return out + } + + for (const piece of cookie.split(';')) { + const [name, ...value] = piece.split('=') + + out[name.trim()] = value.join('=') + } + + return out +} + +/** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ +function deleteCookie (headers, name, attributes) { + webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + name = webidl.converters.DOMString(name) + attributes = webidl.converters.DeleteCookieAttributes(attributes) + + // Matches behavior of + // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 + setCookie(headers, { + name, + value: '', + expires: new Date(0), + ...attributes + }) +} + +/** + * @param {Headers} headers + * @returns {Cookie[]} + */ +function getSetCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + const cookies = getHeadersList(headers).cookies + + if (!cookies) { + return [] + } + + // In older versions of undici, cookies is a list of name:value. + return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) +} + +/** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ +function setCookie (headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + cookie = webidl.converters.Cookie(cookie) + + const str = stringify(cookie) + + if (str) { + headers.append('Set-Cookie', stringify(cookie)) + } +} + +webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'path', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'domain', + defaultValue: null + } +]) + +webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: 'name' + }, + { + converter: webidl.converters.DOMString, + key: 'value' + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === 'number') { + return webidl.converters['unsigned long long'](value) + } + + return new Date(value) + }), + key: 'expires', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters['long long']), + key: 'maxAge', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'domain', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'path', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: 'secure', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: 'httpOnly', + defaultValue: null + }, + { + converter: webidl.converters.USVString, + key: 'sameSite', + allowedValues: ['Strict', 'Lax', 'None'] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: 'unparsed', + defaultValue: [] + } +]) + +module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie +} + + +/***/ }), + +/***/ 4408: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(663) +const { isCTLExcludingHtab } = __nccwpck_require__(3121) +const { collectASequenceOfCodePointsFast } = __nccwpck_require__(685) +const assert = __nccwpck_require__(9491) + +/** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ +function parseSetCookie (header) { + // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F + // character (CTL characters excluding HTAB): Abort these steps and + // ignore the set-cookie-string entirely. + if (isCTLExcludingHtab(header)) { + return null + } + + let nameValuePair = '' + let unparsedAttributes = '' + let name = '' + let value = '' + + // 2. If the set-cookie-string contains a %x3B (";") character: + if (header.includes(';')) { + // 1. The name-value-pair string consists of the characters up to, + // but not including, the first %x3B (";"), and the unparsed- + // attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question). + const position = { position: 0 } + + nameValuePair = collectASequenceOfCodePointsFast(';', header, position) + unparsedAttributes = header.slice(position.position) + } else { + // Otherwise: + + // 1. The name-value-pair string consists of all the characters + // contained in the set-cookie-string, and the unparsed- + // attributes is the empty string. + nameValuePair = header + } + + // 3. If the name-value-pair string lacks a %x3D ("=") character, then + // the name string is empty, and the value string is the value of + // name-value-pair. + if (!nameValuePair.includes('=')) { + value = nameValuePair + } else { + // Otherwise, the name string consists of the characters up to, but + // not including, the first %x3D ("=") character, and the (possibly + // empty) value string consists of the characters after the first + // %x3D ("=") character. + const position = { position: 0 } + name = collectASequenceOfCodePointsFast( + '=', + nameValuePair, + position + ) + value = nameValuePair.slice(position.position + 1) + } + + // 4. Remove any leading or trailing WSP characters from the name + // string and the value string. + name = name.trim() + value = value.trim() + + // 5. If the sum of the lengths of the name string and the value string + // is more than 4096 octets, abort these steps and ignore the set- + // cookie-string entirely. + if (name.length + value.length > maxNameValuePairSize) { + return null + } + + // 6. The cookie-name is the name string, and the cookie-value is the + // value string. + return { + name, value, ...parseUnparsedAttributes(unparsedAttributes) + } +} + +/** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ +function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { + // 1. If the unparsed-attributes string is empty, skip the rest of + // these steps. + if (unparsedAttributes.length === 0) { + return cookieAttributeList + } + + // 2. Discard the first character of the unparsed-attributes (which + // will be a %x3B (";") character). + assert(unparsedAttributes[0] === ';') + unparsedAttributes = unparsedAttributes.slice(1) + + let cookieAv = '' + + // 3. If the remaining unparsed-attributes contains a %x3B (";") + // character: + if (unparsedAttributes.includes(';')) { + // 1. Consume the characters of the unparsed-attributes up to, but + // not including, the first %x3B (";") character. + cookieAv = collectASequenceOfCodePointsFast( + ';', + unparsedAttributes, + { position: 0 } + ) + unparsedAttributes = unparsedAttributes.slice(cookieAv.length) + } else { + // Otherwise: + + // 1. Consume the remainder of the unparsed-attributes. + cookieAv = unparsedAttributes + unparsedAttributes = '' + } + + // Let the cookie-av string be the characters consumed in this step. + + let attributeName = '' + let attributeValue = '' + + // 4. If the cookie-av string contains a %x3D ("=") character: + if (cookieAv.includes('=')) { + // 1. The (possibly empty) attribute-name string consists of the + // characters up to, but not including, the first %x3D ("=") + // character, and the (possibly empty) attribute-value string + // consists of the characters after the first %x3D ("=") + // character. + const position = { position: 0 } + + attributeName = collectASequenceOfCodePointsFast( + '=', + cookieAv, + position + ) + attributeValue = cookieAv.slice(position.position + 1) + } else { + // Otherwise: + + // 1. The attribute-name string consists of the entire cookie-av + // string, and the attribute-value string is empty. + attributeName = cookieAv + } + + // 5. Remove any leading or trailing WSP characters from the attribute- + // name string and the attribute-value string. + attributeName = attributeName.trim() + attributeValue = attributeValue.trim() + + // 6. If the attribute-value is longer than 1024 octets, ignore the + // cookie-av string and return to Step 1 of this algorithm. + if (attributeValue.length > maxAttributeValueSize) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 7. Process the attribute-name and attribute-value according to the + // requirements in the following subsections. (Notice that + // attributes with unrecognized attribute-names are ignored.) + const attributeNameLowercase = attributeName.toLowerCase() + + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 + // If the attribute-name case-insensitively matches the string + // "Expires", the user agent MUST process the cookie-av as follows. + if (attributeNameLowercase === 'expires') { + // 1. Let the expiry-time be the result of parsing the attribute-value + // as cookie-date (see Section 5.1.1). + const expiryTime = new Date(attributeValue) + + // 2. If the attribute-value failed to parse as a cookie date, ignore + // the cookie-av. + + cookieAttributeList.expires = expiryTime + } else if (attributeNameLowercase === 'max-age') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 + // If the attribute-name case-insensitively matches the string "Max- + // Age", the user agent MUST process the cookie-av as follows. + + // 1. If the first character of the attribute-value is not a DIGIT or a + // "-" character, ignore the cookie-av. + const charCode = attributeValue.charCodeAt(0) + + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 2. If the remainder of attribute-value contains a non-DIGIT + // character, ignore the cookie-av. + if (!/^\d+$/.test(attributeValue)) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 3. Let delta-seconds be the attribute-value converted to an integer. + const deltaSeconds = Number(attributeValue) + + // 4. Let cookie-age-limit be the maximum age of the cookie (which + // SHOULD be 400 days or less, see Section 4.1.2.2). + + // 5. Set delta-seconds to the smaller of its present value and cookie- + // age-limit. + // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) + + // 6. If delta-seconds is less than or equal to zero (0), let expiry- + // time be the earliest representable date and time. Otherwise, let + // the expiry-time be the current date and time plus delta-seconds + // seconds. + // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds + + // 7. Append an attribute to the cookie-attribute-list with an + // attribute-name of Max-Age and an attribute-value of expiry-time. + cookieAttributeList.maxAge = deltaSeconds + } else if (attributeNameLowercase === 'domain') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 + // If the attribute-name case-insensitively matches the string "Domain", + // the user agent MUST process the cookie-av as follows. + + // 1. Let cookie-domain be the attribute-value. + let cookieDomain = attributeValue + + // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be + // cookie-domain without its leading %x2E ("."). + if (cookieDomain[0] === '.') { + cookieDomain = cookieDomain.slice(1) + } + + // 3. Convert the cookie-domain to lower case. + cookieDomain = cookieDomain.toLowerCase() + + // 4. Append an attribute to the cookie-attribute-list with an + // attribute-name of Domain and an attribute-value of cookie-domain. + cookieAttributeList.domain = cookieDomain + } else if (attributeNameLowercase === 'path') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 + // If the attribute-name case-insensitively matches the string "Path", + // the user agent MUST process the cookie-av as follows. + + // 1. If the attribute-value is empty or if the first character of the + // attribute-value is not %x2F ("/"): + let cookiePath = '' + if (attributeValue.length === 0 || attributeValue[0] !== '/') { + // 1. Let cookie-path be the default-path. + cookiePath = '/' + } else { + // Otherwise: + + // 1. Let cookie-path be the attribute-value. + cookiePath = attributeValue + } + + // 2. Append an attribute to the cookie-attribute-list with an + // attribute-name of Path and an attribute-value of cookie-path. + cookieAttributeList.path = cookiePath + } else if (attributeNameLowercase === 'secure') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 + // If the attribute-name case-insensitively matches the string "Secure", + // the user agent MUST append an attribute to the cookie-attribute-list + // with an attribute-name of Secure and an empty attribute-value. + + cookieAttributeList.secure = true + } else if (attributeNameLowercase === 'httponly') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 + // If the attribute-name case-insensitively matches the string + // "HttpOnly", the user agent MUST append an attribute to the cookie- + // attribute-list with an attribute-name of HttpOnly and an empty + // attribute-value. + + cookieAttributeList.httpOnly = true + } else if (attributeNameLowercase === 'samesite') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 + // If the attribute-name case-insensitively matches the string + // "SameSite", the user agent MUST process the cookie-av as follows: + + // 1. Let enforcement be "Default". + let enforcement = 'Default' + + const attributeValueLowercase = attributeValue.toLowerCase() + // 2. If cookie-av's attribute-value is a case-insensitive match for + // "None", set enforcement to "None". + if (attributeValueLowercase.includes('none')) { + enforcement = 'None' + } + + // 3. If cookie-av's attribute-value is a case-insensitive match for + // "Strict", set enforcement to "Strict". + if (attributeValueLowercase.includes('strict')) { + enforcement = 'Strict' + } + + // 4. If cookie-av's attribute-value is a case-insensitive match for + // "Lax", set enforcement to "Lax". + if (attributeValueLowercase.includes('lax')) { + enforcement = 'Lax' + } + + // 5. Append an attribute to the cookie-attribute-list with an + // attribute-name of "SameSite" and an attribute-value of + // enforcement. + cookieAttributeList.sameSite = enforcement + } else { + cookieAttributeList.unparsed ??= [] + + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) + } + + // 8. Return to Step 1 of this algorithm. + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) +} + +module.exports = { + parseSetCookie, + parseUnparsedAttributes +} + + +/***/ }), + +/***/ 3121: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const assert = __nccwpck_require__(9491) +const { kHeadersList } = __nccwpck_require__(2785) + +function isCTLExcludingHtab (value) { + if (value.length === 0) { + return false + } + + for (const char of value) { + const code = char.charCodeAt(0) + + if ( + (code >= 0x00 || code <= 0x08) || + (code >= 0x0A || code <= 0x1F) || + code === 0x7F + ) { + return false + } + } +} + +/** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ +function validateCookieName (name) { + for (const char of name) { + const code = char.charCodeAt(0) + + if ( + (code <= 0x20 || code > 0x7F) || + char === '(' || + char === ')' || + char === '>' || + char === '<' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' + ) { + throw new Error('Invalid cookie name') + } + } +} + +/** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ +function validateCookieValue (value) { + for (const char of value) { + const code = char.charCodeAt(0) + + if ( + code < 0x21 || // exclude CTLs (0-31) + code === 0x22 || + code === 0x2C || + code === 0x3B || + code === 0x5C || + code > 0x7E // non-ascii + ) { + throw new Error('Invalid header value') + } + } +} + +/** + * path-value = + * @param {string} path + */ +function validateCookiePath (path) { + for (const char of path) { + const code = char.charCodeAt(0) + + if (code < 0x21 || char === ';') { + throw new Error('Invalid cookie path') + } + } +} + +/** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ +function validateCookieDomain (domain) { + if ( + domain.startsWith('-') || + domain.endsWith('.') || + domain.endsWith('-') + ) { + throw new Error('Invalid cookie domain') + } +} + +/** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ +function toIMFDate (date) { + if (typeof date === 'number') { + date = new Date(date) + } + + const days = [ + 'Sun', 'Mon', 'Tue', 'Wed', + 'Thu', 'Fri', 'Sat' + ] + + const months = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' + ] + + const dayName = days[date.getUTCDay()] + const day = date.getUTCDate().toString().padStart(2, '0') + const month = months[date.getUTCMonth()] + const year = date.getUTCFullYear() + const hour = date.getUTCHours().toString().padStart(2, '0') + const minute = date.getUTCMinutes().toString().padStart(2, '0') + const second = date.getUTCSeconds().toString().padStart(2, '0') + + return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT` +} + +/** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ +function validateCookieMaxAge (maxAge) { + if (maxAge < 0) { + throw new Error('Invalid cookie max-age') + } +} + +/** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ +function stringify (cookie) { + if (cookie.name.length === 0) { + return null + } + + validateCookieName(cookie.name) + validateCookieValue(cookie.value) + + const out = [`${cookie.name}=${cookie.value}`] + + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 + if (cookie.name.startsWith('__Secure-')) { + cookie.secure = true + } + + if (cookie.name.startsWith('__Host-')) { + cookie.secure = true + cookie.domain = null + cookie.path = '/' + } + + if (cookie.secure) { + out.push('Secure') + } + + if (cookie.httpOnly) { + out.push('HttpOnly') + } + + if (typeof cookie.maxAge === 'number') { + validateCookieMaxAge(cookie.maxAge) + out.push(`Max-Age=${cookie.maxAge}`) + } + + if (cookie.domain) { + validateCookieDomain(cookie.domain) + out.push(`Domain=${cookie.domain}`) + } + + if (cookie.path) { + validateCookiePath(cookie.path) + out.push(`Path=${cookie.path}`) + } + + if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { + out.push(`Expires=${toIMFDate(cookie.expires)}`) + } + + if (cookie.sameSite) { + out.push(`SameSite=${cookie.sameSite}`) + } + + for (const part of cookie.unparsed) { + if (!part.includes('=')) { + throw new Error('Invalid unparsed') + } + + const [key, ...value] = part.split('=') + + out.push(`${key.trim()}=${value.join('=')}`) + } + + return out.join('; ') +} + +let kHeadersListNode + +function getHeadersList (headers) { + if (headers[kHeadersList]) { + return headers[kHeadersList] + } + + if (!kHeadersListNode) { + kHeadersListNode = Object.getOwnPropertySymbols(headers).find( + (symbol) => symbol.description === 'headers list' + ) + + assert(kHeadersListNode, 'Headers cannot be parsed') + } + + const headersList = headers[kHeadersListNode] + assert(headersList) + + return headersList +} + +module.exports = { + isCTLExcludingHtab, + stringify, + getHeadersList +} + + +/***/ }), + +/***/ 2067: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const net = __nccwpck_require__(1808) +const assert = __nccwpck_require__(9491) +const util = __nccwpck_require__(3983) +const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(8045) + +let tls // include tls conditionally since it is not always available + +// TODO: session re-use does not wait for the first +// connection to resolve the session and might therefore +// resolve the same servername multiple times even when +// re-use is enabled. + +let SessionCache +// FIXME: remove workaround when the Node bug is fixed +// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 +if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { + SessionCache = class WeakSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { + return + } + + const ref = this._sessionCache.get(key) + if (ref !== undefined && ref.deref() === undefined) { + this._sessionCache.delete(key) + } + }) + } + + get (sessionKey) { + const ref = this._sessionCache.get(sessionKey) + return ref ? ref.deref() : null + } + + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return + } + + this._sessionCache.set(sessionKey, new WeakRef(session)) + this._sessionRegistry.register(session, sessionKey) + } + } +} else { + SessionCache = class SimpleSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() + } + + get (sessionKey) { + return this._sessionCache.get(sessionKey) + } + + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return + } + + if (this._sessionCache.size >= this._maxCachedSessions) { + // remove the oldest session + const { value: oldestKey } = this._sessionCache.keys().next() + this._sessionCache.delete(oldestKey) + } + + this._sessionCache.set(sessionKey, session) + } + } +} + +function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { + throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') + } + + const options = { path: socketPath, ...opts } + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) + timeout = timeout == null ? 10e3 : timeout + allowH2 = allowH2 != null ? allowH2 : false + return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket + if (protocol === 'https:') { + if (!tls) { + tls = __nccwpck_require__(4404) + } + servername = servername || options.servername || util.getServerName(host) || null + + const sessionKey = servername || hostname + const session = sessionCache.get(sessionKey) || null + + assert(sessionKey) + + socket = tls.connect({ + highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... + ...options, + servername, + session, + localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], + socket: httpSocket, // upgrade socket connection + port: port || 443, + host: hostname + }) + + socket + .on('session', function (session) { + // TODO (fix): Can a session become invalid once established? Don't think so? + sessionCache.set(sessionKey, session) + }) + } else { + assert(!httpSocket, 'httpSocket can only be sent on TLS update') + socket = net.connect({ + highWaterMark: 64 * 1024, // Same as nodejs fs streams. + ...options, + localAddress, + port: port || 80, + host: hostname + }) + } + + // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay + socket.setKeepAlive(true, keepAliveInitialDelay) + } + + const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout) + + socket + .setNoDelay(true) + .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { + cancelTimeout() + + if (callback) { + const cb = callback + callback = null + cb(null, this) + } + }) + .on('error', function (err) { + cancelTimeout() + + if (callback) { + const cb = callback + callback = null + cb(err) + } + }) + + return socket + } +} + +function setupTimeout (onConnectTimeout, timeout) { + if (!timeout) { + return () => {} + } + + let s1 = null + let s2 = null + const timeoutId = setTimeout(() => { + // setImmediate is added to make sure that we priotorise socket error events over timeouts + s1 = setImmediate(() => { + if (process.platform === 'win32') { + // Windows needs an extra setImmediate probably due to implementation differences in the socket logic + s2 = setImmediate(() => onConnectTimeout()) + } else { + onConnectTimeout() + } + }) + }, timeout) + return () => { + clearTimeout(timeoutId) + clearImmediate(s1) + clearImmediate(s2) + } +} + +function onConnectTimeout (socket) { + util.destroy(socket, new ConnectTimeoutError()) +} + +module.exports = buildConnector + + +/***/ }), + +/***/ 4462: +/***/ ((module) => { + +"use strict"; + + +/** @type {Record} */ +const headerNameLowerCasedRecord = {} + +// https://developer.mozilla.org/docs/Web/HTTP/Headers +const wellknownHeaderNames = [ + 'Accept', + 'Accept-Encoding', + 'Accept-Language', + 'Accept-Ranges', + 'Access-Control-Allow-Credentials', + 'Access-Control-Allow-Headers', + 'Access-Control-Allow-Methods', + 'Access-Control-Allow-Origin', + 'Access-Control-Expose-Headers', + 'Access-Control-Max-Age', + 'Access-Control-Request-Headers', + 'Access-Control-Request-Method', + 'Age', + 'Allow', + 'Alt-Svc', + 'Alt-Used', + 'Authorization', + 'Cache-Control', + 'Clear-Site-Data', + 'Connection', + 'Content-Disposition', + 'Content-Encoding', + 'Content-Language', + 'Content-Length', + 'Content-Location', + 'Content-Range', + 'Content-Security-Policy', + 'Content-Security-Policy-Report-Only', + 'Content-Type', + 'Cookie', + 'Cross-Origin-Embedder-Policy', + 'Cross-Origin-Opener-Policy', + 'Cross-Origin-Resource-Policy', + 'Date', + 'Device-Memory', + 'Downlink', + 'ECT', + 'ETag', + 'Expect', + 'Expect-CT', + 'Expires', + 'Forwarded', + 'From', + 'Host', + 'If-Match', + 'If-Modified-Since', + 'If-None-Match', + 'If-Range', + 'If-Unmodified-Since', + 'Keep-Alive', + 'Last-Modified', + 'Link', + 'Location', + 'Max-Forwards', + 'Origin', + 'Permissions-Policy', + 'Pragma', + 'Proxy-Authenticate', + 'Proxy-Authorization', + 'RTT', + 'Range', + 'Referer', + 'Referrer-Policy', + 'Refresh', + 'Retry-After', + 'Sec-WebSocket-Accept', + 'Sec-WebSocket-Extensions', + 'Sec-WebSocket-Key', + 'Sec-WebSocket-Protocol', + 'Sec-WebSocket-Version', + 'Server', + 'Server-Timing', + 'Service-Worker-Allowed', + 'Service-Worker-Navigation-Preload', + 'Set-Cookie', + 'SourceMap', + 'Strict-Transport-Security', + 'Supports-Loading-Mode', + 'TE', + 'Timing-Allow-Origin', + 'Trailer', + 'Transfer-Encoding', + 'Upgrade', + 'Upgrade-Insecure-Requests', + 'User-Agent', + 'Vary', + 'Via', + 'WWW-Authenticate', + 'X-Content-Type-Options', + 'X-DNS-Prefetch-Control', + 'X-Frame-Options', + 'X-Permitted-Cross-Domain-Policies', + 'X-Powered-By', + 'X-Requested-With', + 'X-XSS-Protection' +] + +for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i] + const lowerCasedKey = key.toLowerCase() + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = + lowerCasedKey +} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(headerNameLowerCasedRecord, null) + +module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord +} + + +/***/ }), + +/***/ 8045: +/***/ ((module) => { + +"use strict"; + + +class UndiciError extends Error { + constructor (message) { + super(message) + this.name = 'UndiciError' + this.code = 'UND_ERR' + } +} + +class ConnectTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ConnectTimeoutError) + this.name = 'ConnectTimeoutError' + this.message = message || 'Connect Timeout Error' + this.code = 'UND_ERR_CONNECT_TIMEOUT' + } +} + +class HeadersTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, HeadersTimeoutError) + this.name = 'HeadersTimeoutError' + this.message = message || 'Headers Timeout Error' + this.code = 'UND_ERR_HEADERS_TIMEOUT' + } +} + +class HeadersOverflowError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, HeadersOverflowError) + this.name = 'HeadersOverflowError' + this.message = message || 'Headers Overflow Error' + this.code = 'UND_ERR_HEADERS_OVERFLOW' + } +} + +class BodyTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, BodyTimeoutError) + this.name = 'BodyTimeoutError' + this.message = message || 'Body Timeout Error' + this.code = 'UND_ERR_BODY_TIMEOUT' + } +} + +class ResponseStatusCodeError extends UndiciError { + constructor (message, statusCode, headers, body) { + super(message) + Error.captureStackTrace(this, ResponseStatusCodeError) + this.name = 'ResponseStatusCodeError' + this.message = message || 'Response Status Code Error' + this.code = 'UND_ERR_RESPONSE_STATUS_CODE' + this.body = body + this.status = statusCode + this.statusCode = statusCode + this.headers = headers + } +} + +class InvalidArgumentError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InvalidArgumentError) + this.name = 'InvalidArgumentError' + this.message = message || 'Invalid Argument Error' + this.code = 'UND_ERR_INVALID_ARG' + } +} + +class InvalidReturnValueError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InvalidReturnValueError) + this.name = 'InvalidReturnValueError' + this.message = message || 'Invalid Return Value Error' + this.code = 'UND_ERR_INVALID_RETURN_VALUE' + } +} + +class RequestAbortedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, RequestAbortedError) + this.name = 'AbortError' + this.message = message || 'Request aborted' + this.code = 'UND_ERR_ABORTED' + } +} + +class InformationalError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InformationalError) + this.name = 'InformationalError' + this.message = message || 'Request information' + this.code = 'UND_ERR_INFO' + } +} + +class RequestContentLengthMismatchError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, RequestContentLengthMismatchError) + this.name = 'RequestContentLengthMismatchError' + this.message = message || 'Request body length does not match content-length header' + this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' + } +} + +class ResponseContentLengthMismatchError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseContentLengthMismatchError) + this.name = 'ResponseContentLengthMismatchError' + this.message = message || 'Response body length does not match content-length header' + this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' + } +} + +class ClientDestroyedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ClientDestroyedError) + this.name = 'ClientDestroyedError' + this.message = message || 'The client is destroyed' + this.code = 'UND_ERR_DESTROYED' + } +} + +class ClientClosedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ClientClosedError) + this.name = 'ClientClosedError' + this.message = message || 'The client is closed' + this.code = 'UND_ERR_CLOSED' + } +} + +class SocketError extends UndiciError { + constructor (message, socket) { + super(message) + Error.captureStackTrace(this, SocketError) + this.name = 'SocketError' + this.message = message || 'Socket error' + this.code = 'UND_ERR_SOCKET' + this.socket = socket + } +} + +class NotSupportedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, NotSupportedError) + this.name = 'NotSupportedError' + this.message = message || 'Not supported error' + this.code = 'UND_ERR_NOT_SUPPORTED' + } +} + +class BalancedPoolMissingUpstreamError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, NotSupportedError) + this.name = 'MissingUpstreamError' + this.message = message || 'No upstream has been added to the BalancedPool' + this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' + } +} + +class HTTPParserError extends Error { + constructor (message, code, data) { + super(message) + Error.captureStackTrace(this, HTTPParserError) + this.name = 'HTTPParserError' + this.code = code ? `HPE_${code}` : undefined + this.data = data ? data.toString() : undefined + } +} + +class ResponseExceededMaxSizeError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseExceededMaxSizeError) + this.name = 'ResponseExceededMaxSizeError' + this.message = message || 'Response content exceeded max size' + this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } +} + +class RequestRetryError extends UndiciError { + constructor (message, code, { headers, data }) { + super(message) + Error.captureStackTrace(this, RequestRetryError) + this.name = 'RequestRetryError' + this.message = message || 'Request retry error' + this.code = 'UND_ERR_REQ_RETRY' + this.statusCode = code + this.data = data + this.headers = headers + } +} + +module.exports = { + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError +} + + +/***/ }), + +/***/ 2905: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { + InvalidArgumentError, + NotSupportedError +} = __nccwpck_require__(8045) +const assert = __nccwpck_require__(9491) +const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(2785) +const util = __nccwpck_require__(3983) + +// tokenRegExp and headerCharRegex have been lifted from +// https://github.com/nodejs/node/blob/main/lib/_http_common.js + +/** + * Verifies that the given val is a valid HTTP token + * per the rules defined in RFC 7230 + * See https://tools.ietf.org/html/rfc7230#section-3.2.6 + */ +const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/ + +/** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ +const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ + +// Verifies that a given path is valid does not contain control chars \x00 to \x20 +const invalidPathRegex = /[^\u0021-\u00ff]/ + +const kHandler = Symbol('handler') + +const channels = {} + +let extractBody + +try { + const diagnosticsChannel = __nccwpck_require__(7643) + channels.create = diagnosticsChannel.channel('undici:request:create') + channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent') + channels.headers = diagnosticsChannel.channel('undici:request:headers') + channels.trailers = diagnosticsChannel.channel('undici:request:trailers') + channels.error = diagnosticsChannel.channel('undici:request:error') +} catch { + channels.create = { hasSubscribers: false } + channels.bodySent = { hasSubscribers: false } + channels.headers = { hasSubscribers: false } + channels.trailers = { hasSubscribers: false } + channels.error = { hasSubscribers: false } +} + +class Request { + constructor (origin, { + path, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + throwOnError, + expectContinue + }, handler) { + if (typeof path !== 'string') { + throw new InvalidArgumentError('path must be a string') + } else if ( + path[0] !== '/' && + !(path.startsWith('http://') || path.startsWith('https://')) && + method !== 'CONNECT' + ) { + throw new InvalidArgumentError('path must be an absolute URL or start with a slash') + } else if (invalidPathRegex.exec(path) !== null) { + throw new InvalidArgumentError('invalid request path') + } + + if (typeof method !== 'string') { + throw new InvalidArgumentError('method must be a string') + } else if (tokenRegExp.exec(method) === null) { + throw new InvalidArgumentError('invalid request method') + } + + if (upgrade && typeof upgrade !== 'string') { + throw new InvalidArgumentError('upgrade must be a string') + } + + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError('invalid headersTimeout') + } + + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError('invalid bodyTimeout') + } + + if (reset != null && typeof reset !== 'boolean') { + throw new InvalidArgumentError('invalid reset') + } + + if (expectContinue != null && typeof expectContinue !== 'boolean') { + throw new InvalidArgumentError('invalid expectContinue') + } + + this.headersTimeout = headersTimeout + + this.bodyTimeout = bodyTimeout + + this.throwOnError = throwOnError === true + + this.method = method + + this.abort = null + + if (body == null) { + this.body = null + } else if (util.isStream(body)) { + this.body = body + + const rState = this.body._readableState + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy () { + util.destroy(this) + } + this.body.on('end', this.endHandler) + } + + this.errorHandler = err => { + if (this.abort) { + this.abort(err) + } else { + this.error = err + } + } + this.body.on('error', this.errorHandler) + } else if (util.isBuffer(body)) { + this.body = body.byteLength ? body : null + } else if (ArrayBuffer.isView(body)) { + this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null + } else if (body instanceof ArrayBuffer) { + this.body = body.byteLength ? Buffer.from(body) : null + } else if (typeof body === 'string') { + this.body = body.length ? Buffer.from(body) : null + } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) { + this.body = body + } else { + throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') + } + + this.completed = false + + this.aborted = false + + this.upgrade = upgrade || null + + this.path = query ? util.buildURL(path, query) : path + + this.origin = origin + + this.idempotent = idempotent == null + ? method === 'HEAD' || method === 'GET' + : idempotent + + this.blocking = blocking == null ? false : blocking + + this.reset = reset == null ? null : reset + + this.host = null + + this.contentLength = null + + this.contentType = null + + this.headers = '' + + // Only for H2 + this.expectContinue = expectContinue != null ? expectContinue : false + + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError('headers array must be even') + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(this, headers[i], headers[i + 1]) + } + } else if (headers && typeof headers === 'object') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(this, key, headers[key]) + } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') + } + + if (util.isFormDataLike(this.body)) { + if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) { + throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.') + } + + if (!extractBody) { + extractBody = (__nccwpck_require__(1472).extractBody) + } + + const [bodyStream, contentType] = extractBody(body) + if (this.contentType == null) { + this.contentType = contentType + this.headers += `content-type: ${contentType}\r\n` + } + this.body = bodyStream.stream + this.contentLength = bodyStream.length + } else if (util.isBlobLike(body) && this.contentType == null && body.type) { + this.contentType = body.type + this.headers += `content-type: ${body.type}\r\n` + } + + util.validateHandler(handler, method, upgrade) + + this.servername = util.getServerName(this.host) + + this[kHandler] = handler + + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }) + } + } + + onBodySent (chunk) { + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk) + } catch (err) { + this.abort(err) + } + } + } + + onRequestSent () { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }) + } + + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent() + } catch (err) { + this.abort(err) + } + } + } + + onConnect (abort) { + assert(!this.aborted) + assert(!this.completed) + + if (this.error) { + abort(this.error) + } else { + this.abort = abort + return this[kHandler].onConnect(abort) + } + } + + onHeaders (statusCode, headers, resume, statusText) { + assert(!this.aborted) + assert(!this.completed) + + if (channels.headers.hasSubscribers) { + channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) + } + + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText) + } catch (err) { + this.abort(err) + } + } + + onData (chunk) { + assert(!this.aborted) + assert(!this.completed) + + try { + return this[kHandler].onData(chunk) + } catch (err) { + this.abort(err) + return false + } + } + + onUpgrade (statusCode, headers, socket) { + assert(!this.aborted) + assert(!this.completed) + + return this[kHandler].onUpgrade(statusCode, headers, socket) + } + + onComplete (trailers) { + this.onFinally() + + assert(!this.aborted) + + this.completed = true + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }) + } + + try { + return this[kHandler].onComplete(trailers) + } catch (err) { + // TODO (fix): This might be a bad idea? + this.onError(err) + } + } + + onError (error) { + this.onFinally() + + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error }) + } + + if (this.aborted) { + return + } + this.aborted = true + + return this[kHandler].onError(error) + } + + onFinally () { + if (this.errorHandler) { + this.body.off('error', this.errorHandler) + this.errorHandler = null + } + + if (this.endHandler) { + this.body.off('end', this.endHandler) + this.endHandler = null + } + } + + // TODO: adjust to support H2 + addHeader (key, value) { + processHeader(this, key, value) + return this + } + + static [kHTTP1BuildRequest] (origin, opts, handler) { + // TODO: Migrate header parsing here, to make Requests + // HTTP agnostic + return new Request(origin, opts, handler) + } + + static [kHTTP2BuildRequest] (origin, opts, handler) { + const headers = opts.headers + opts = { ...opts, headers: null } + + const request = new Request(origin, opts, handler) + + request.headers = {} + + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError('headers array must be even') + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(request, headers[i], headers[i + 1], true) + } + } else if (headers && typeof headers === 'object') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(request, key, headers[key], true) + } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') + } + + return request + } + + static [kHTTP2CopyHeaders] (raw) { + const rawHeaders = raw.split('\r\n') + const headers = {} + + for (const header of rawHeaders) { + const [key, value] = header.split(': ') + + if (value == null || value.length === 0) continue + + if (headers[key]) headers[key] += `,${value}` + else headers[key] = value + } + + return headers + } +} + +function processHeaderValue (key, val, skipAppend) { + if (val && typeof val === 'object') { + throw new InvalidArgumentError(`invalid ${key} header`) + } + + val = val != null ? `${val}` : '' + + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } + + return skipAppend ? val : `${key}: ${val}\r\n` +} + +function processHeader (request, key, val, skipAppend = false) { + if (val && (typeof val === 'object' && !Array.isArray(val))) { + throw new InvalidArgumentError(`invalid ${key} header`) + } else if (val === undefined) { + return + } + + if ( + request.host === null && + key.length === 4 && + key.toLowerCase() === 'host' + ) { + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } + // Consumed by Client + request.host = val + } else if ( + request.contentLength === null && + key.length === 14 && + key.toLowerCase() === 'content-length' + ) { + request.contentLength = parseInt(val, 10) + if (!Number.isFinite(request.contentLength)) { + throw new InvalidArgumentError('invalid content-length header') + } + } else if ( + request.contentType === null && + key.length === 12 && + key.toLowerCase() === 'content-type' + ) { + request.contentType = val + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) + } else if ( + key.length === 17 && + key.toLowerCase() === 'transfer-encoding' + ) { + throw new InvalidArgumentError('invalid transfer-encoding header') + } else if ( + key.length === 10 && + key.toLowerCase() === 'connection' + ) { + const value = typeof val === 'string' ? val.toLowerCase() : null + if (value !== 'close' && value !== 'keep-alive') { + throw new InvalidArgumentError('invalid connection header') + } else if (value === 'close') { + request.reset = true + } + } else if ( + key.length === 10 && + key.toLowerCase() === 'keep-alive' + ) { + throw new InvalidArgumentError('invalid keep-alive header') + } else if ( + key.length === 7 && + key.toLowerCase() === 'upgrade' + ) { + throw new InvalidArgumentError('invalid upgrade header') + } else if ( + key.length === 6 && + key.toLowerCase() === 'expect' + ) { + throw new NotSupportedError('expect header not supported') + } else if (tokenRegExp.exec(key) === null) { + throw new InvalidArgumentError('invalid header key') + } else { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (skipAppend) { + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}` + else request.headers[key] = processHeaderValue(key, val[i], skipAppend) + } else { + request.headers += processHeaderValue(key, val[i]) + } + } + } else { + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) + } + } +} + +module.exports = Request + + +/***/ }), + +/***/ 2785: +/***/ ((module) => { + +module.exports = { + kClose: Symbol('close'), + kDestroy: Symbol('destroy'), + kDispatch: Symbol('dispatch'), + kUrl: Symbol('url'), + kWriting: Symbol('writing'), + kResuming: Symbol('resuming'), + kQueue: Symbol('queue'), + kConnect: Symbol('connect'), + kConnecting: Symbol('connecting'), + kHeadersList: Symbol('headers list'), + kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), + kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), + kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), + kKeepAliveTimeoutValue: Symbol('keep alive timeout'), + kKeepAlive: Symbol('keep alive'), + kHeadersTimeout: Symbol('headers timeout'), + kBodyTimeout: Symbol('body timeout'), + kServerName: Symbol('server name'), + kLocalAddress: Symbol('local address'), + kHost: Symbol('host'), + kNoRef: Symbol('no ref'), + kBodyUsed: Symbol('used'), + kRunning: Symbol('running'), + kBlocking: Symbol('blocking'), + kPending: Symbol('pending'), + kSize: Symbol('size'), + kBusy: Symbol('busy'), + kQueued: Symbol('queued'), + kFree: Symbol('free'), + kConnected: Symbol('connected'), + kClosed: Symbol('closed'), + kNeedDrain: Symbol('need drain'), + kReset: Symbol('reset'), + kDestroyed: Symbol.for('nodejs.stream.destroyed'), + kMaxHeadersSize: Symbol('max headers size'), + kRunningIdx: Symbol('running index'), + kPendingIdx: Symbol('pending index'), + kError: Symbol('error'), + kClients: Symbol('clients'), + kClient: Symbol('client'), + kParser: Symbol('parser'), + kOnDestroyed: Symbol('destroy callbacks'), + kPipelining: Symbol('pipelining'), + kSocket: Symbol('socket'), + kHostHeader: Symbol('host header'), + kConnector: Symbol('connector'), + kStrictContentLength: Symbol('strict content length'), + kMaxRedirections: Symbol('maxRedirections'), + kMaxRequests: Symbol('maxRequestsPerClient'), + kProxy: Symbol('proxy agent options'), + kCounter: Symbol('socket request counter'), + kInterceptors: Symbol('dispatch interceptors'), + kMaxResponseSize: Symbol('max response size'), + kHTTP2Session: Symbol('http2Session'), + kHTTP2SessionState: Symbol('http2Session state'), + kHTTP2BuildRequest: Symbol('http2 build request'), + kHTTP1BuildRequest: Symbol('http1 build request'), + kHTTP2CopyHeaders: Symbol('http2 copy headers'), + kHTTPConnVersion: Symbol('http connection version'), + kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), + kConstruct: Symbol('constructable') +} + + +/***/ }), + +/***/ 3983: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const assert = __nccwpck_require__(9491) +const { kDestroyed, kBodyUsed } = __nccwpck_require__(2785) +const { IncomingMessage } = __nccwpck_require__(3685) +const stream = __nccwpck_require__(2781) +const net = __nccwpck_require__(1808) +const { InvalidArgumentError } = __nccwpck_require__(8045) +const { Blob } = __nccwpck_require__(4300) +const nodeUtil = __nccwpck_require__(3837) +const { stringify } = __nccwpck_require__(3477) +const { headerNameLowerCasedRecord } = __nccwpck_require__(4462) + +const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) + +function nop () {} + +function isStream (obj) { + return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' +} + +// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) +function isBlobLike (object) { + return (Blob && object instanceof Blob) || ( + object && + typeof object === 'object' && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + /^(Blob|File)$/.test(object[Symbol.toStringTag]) + ) +} + +function buildURL (url, queryParams) { + if (url.includes('?') || url.includes('#')) { + throw new Error('Query params cannot be passed when url already contains "?" or "#".') + } + + const stringified = stringify(queryParams) + + if (stringified) { + url += '?' + stringified + } + + return url +} + +function parseURL (url) { + if (typeof url === 'string') { + url = new URL(url) + + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') + } + + return url + } + + if (!url || typeof url !== 'object') { + throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') + } + + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') + } + + if (!(url instanceof URL)) { + if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { + throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') + } + + if (url.path != null && typeof url.path !== 'string') { + throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') + } + + if (url.pathname != null && typeof url.pathname !== 'string') { + throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') + } + + if (url.hostname != null && typeof url.hostname !== 'string') { + throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') + } + + if (url.origin != null && typeof url.origin !== 'string') { + throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') + } + + const port = url.port != null + ? url.port + : (url.protocol === 'https:' ? 443 : 80) + let origin = url.origin != null + ? url.origin + : `${url.protocol}//${url.hostname}:${port}` + let path = url.path != null + ? url.path + : `${url.pathname || ''}${url.search || ''}` + + if (origin.endsWith('/')) { + origin = origin.substring(0, origin.length - 1) + } + + if (path && !path.startsWith('/')) { + path = `/${path}` + } + // new URL(path, origin) is unsafe when `path` contains an absolute URL + // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: + // If first parameter is a relative URL, second param is required, and will be used as the base URL. + // If first parameter is an absolute URL, a given second param will be ignored. + url = new URL(origin + path) + } + + return url +} + +function parseOrigin (url) { + url = parseURL(url) + + if (url.pathname !== '/' || url.search || url.hash) { + throw new InvalidArgumentError('invalid url') + } + + return url +} + +function getHostname (host) { + if (host[0] === '[') { + const idx = host.indexOf(']') + + assert(idx !== -1) + return host.substring(1, idx) + } + + const idx = host.indexOf(':') + if (idx === -1) return host + + return host.substring(0, idx) +} + +// IP addresses are not valid server names per RFC6066 +// > Currently, the only server names supported are DNS hostnames +function getServerName (host) { + if (!host) { + return null + } + + assert.strictEqual(typeof host, 'string') + + const servername = getHostname(host) + if (net.isIP(servername)) { + return '' + } + + return servername +} + +function deepClone (obj) { + return JSON.parse(JSON.stringify(obj)) +} + +function isAsyncIterable (obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') +} + +function isIterable (obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) +} + +function bodyLength (body) { + if (body == null) { + return 0 + } else if (isStream(body)) { + const state = body._readableState + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) + ? state.length + : null + } else if (isBlobLike(body)) { + return body.size != null ? body.size : null + } else if (isBuffer(body)) { + return body.byteLength + } + + return null +} + +function isDestroyed (stream) { + return !stream || !!(stream.destroyed || stream[kDestroyed]) +} + +function isReadableAborted (stream) { + const state = stream && stream._readableState + return isDestroyed(stream) && state && !state.endEmitted +} + +function destroy (stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) { + return + } + + if (typeof stream.destroy === 'function') { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { + // See: https://github.com/nodejs/node/pull/38505/files + stream.socket = null + } + + stream.destroy(err) + } else if (err) { + process.nextTick((stream, err) => { + stream.emit('error', err) + }, stream, err) + } + + if (stream.destroyed !== true) { + stream[kDestroyed] = true + } +} + +const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ +function parseKeepAliveTimeout (val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) + return m ? parseInt(m[1], 10) * 1000 : null +} + +/** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ +function headerNameToString (value) { + return headerNameLowerCasedRecord[value] || value.toLowerCase() +} + +function parseHeaders (headers, obj = {}) { + // For H2 support + if (!Array.isArray(headers)) return headers + + for (let i = 0; i < headers.length; i += 2) { + const key = headers[i].toString().toLowerCase() + let val = obj[key] + + if (!val) { + if (Array.isArray(headers[i + 1])) { + obj[key] = headers[i + 1].map(x => x.toString('utf8')) + } else { + obj[key] = headers[i + 1].toString('utf8') + } + } else { + if (!Array.isArray(val)) { + val = [val] + obj[key] = val + } + val.push(headers[i + 1].toString('utf8')) + } + } + + // See https://github.com/nodejs/node/pull/46528 + if ('content-length' in obj && 'content-disposition' in obj) { + obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') + } + + return obj +} + +function parseRawHeaders (headers) { + const ret = [] + let hasContentLength = false + let contentDispositionIdx = -1 + + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0].toString() + const val = headers[n + 1].toString('utf8') + + if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) { + ret.push(key, val) + hasContentLength = true + } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { + contentDispositionIdx = ret.push(key, val) - 1 + } else { + ret.push(key, val) + } + } + + // See https://github.com/nodejs/node/pull/46528 + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') + } + + return ret +} + +function isBuffer (buffer) { + // See, https://github.com/mcollina/undici/pull/319 + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) +} + +function validateHandler (handler, method, upgrade) { + if (!handler || typeof handler !== 'object') { + throw new InvalidArgumentError('handler must be an object') + } + + if (typeof handler.onConnect !== 'function') { + throw new InvalidArgumentError('invalid onConnect method') + } + + if (typeof handler.onError !== 'function') { + throw new InvalidArgumentError('invalid onError method') + } + + if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { + throw new InvalidArgumentError('invalid onBodySent method') + } + + if (upgrade || method === 'CONNECT') { + if (typeof handler.onUpgrade !== 'function') { + throw new InvalidArgumentError('invalid onUpgrade method') + } + } else { + if (typeof handler.onHeaders !== 'function') { + throw new InvalidArgumentError('invalid onHeaders method') + } + + if (typeof handler.onData !== 'function') { + throw new InvalidArgumentError('invalid onData method') + } + + if (typeof handler.onComplete !== 'function') { + throw new InvalidArgumentError('invalid onComplete method') + } + } +} + +// A body is disturbed if it has been read from and it cannot +// be re-used without losing state or data. +function isDisturbed (body) { + return !!(body && ( + stream.isDisturbed + ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed? + : body[kBodyUsed] || + body.readableDidRead || + (body._readableState && body._readableState.dataEmitted) || + isReadableAborted(body) + )) +} + +function isErrored (body) { + return !!(body && ( + stream.isErrored + ? stream.isErrored(body) + : /state: 'errored'/.test(nodeUtil.inspect(body) + ))) +} + +function isReadable (body) { + return !!(body && ( + stream.isReadable + ? stream.isReadable(body) + : /state: 'readable'/.test(nodeUtil.inspect(body) + ))) +} + +function getSocketInfo (socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + } +} + +async function * convertIterableToBuffer (iterable) { + for await (const chunk of iterable) { + yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) + } +} + +let ReadableStream +function ReadableStreamFrom (iterable) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(5356).ReadableStream) + } + + if (ReadableStream.from) { + return ReadableStream.from(convertIterableToBuffer(iterable)) + } + + let iterator + return new ReadableStream( + { + async start () { + iterator = iterable[Symbol.asyncIterator]() + }, + async pull (controller) { + const { done, value } = await iterator.next() + if (done) { + queueMicrotask(() => { + controller.close() + }) + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) + controller.enqueue(new Uint8Array(buf)) + } + return controller.desiredSize > 0 + }, + async cancel (reason) { + await iterator.return() + } + }, + 0 + ) +} + +// The chunk should be a FormData instance and contains +// all the required methods. +function isFormDataLike (object) { + return ( + object && + typeof object === 'object' && + typeof object.append === 'function' && + typeof object.delete === 'function' && + typeof object.get === 'function' && + typeof object.getAll === 'function' && + typeof object.has === 'function' && + typeof object.set === 'function' && + object[Symbol.toStringTag] === 'FormData' + ) +} + +function throwIfAborted (signal) { + if (!signal) { return } + if (typeof signal.throwIfAborted === 'function') { + signal.throwIfAborted() + } else { + if (signal.aborted) { + // DOMException not available < v17.0.0 + const err = new Error('The operation was aborted') + err.name = 'AbortError' + throw err + } + } +} + +function addAbortListener (signal, listener) { + if ('addEventListener' in signal) { + signal.addEventListener('abort', listener, { once: true }) + return () => signal.removeEventListener('abort', listener) + } + signal.addListener('abort', listener) + return () => signal.removeListener('abort', listener) +} + +const hasToWellFormed = !!String.prototype.toWellFormed + +/** + * @param {string} val + */ +function toUSVString (val) { + if (hasToWellFormed) { + return `${val}`.toWellFormed() + } else if (nodeUtil.toUSVString) { + return nodeUtil.toUSVString(val) + } + + return `${val}` +} + +// Parsed accordingly to RFC 9110 +// https://www.rfc-editor.org/rfc/rfc9110#field.content-range +function parseRangeHeader (range) { + if (range == null || range === '') return { start: 0, end: null, size: null } + + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null + return m + ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } + : null +} + +const kEnumerableProperty = Object.create(null) +kEnumerableProperty.enumerable = true + +module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isReadableAborted, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + throwIfAborted, + addAbortListener, + parseRangeHeader, + nodeMajor, + nodeMinor, + nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), + safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] +} + + +/***/ }), + +/***/ 4839: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const Dispatcher = __nccwpck_require__(412) +const { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError +} = __nccwpck_require__(8045) +const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(2785) + +const kDestroyed = Symbol('destroyed') +const kClosed = Symbol('closed') +const kOnDestroyed = Symbol('onDestroyed') +const kOnClosed = Symbol('onClosed') +const kInterceptedDispatch = Symbol('Intercepted Dispatch') + +class DispatcherBase extends Dispatcher { + constructor () { + super() + + this[kDestroyed] = false + this[kOnDestroyed] = null + this[kClosed] = false + this[kOnClosed] = [] + } + + get destroyed () { + return this[kDestroyed] + } + + get closed () { + return this[kClosed] + } + + get interceptors () { + return this[kInterceptors] + } + + set interceptors (newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) { + const interceptor = this[kInterceptors][i] + if (typeof interceptor !== 'function') { + throw new InvalidArgumentError('interceptor must be an function') + } + } + } + + this[kInterceptors] = newInterceptors + } + + close (callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } + + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } + + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)) + return + } + + if (this[kClosed]) { + if (this[kOnClosed]) { + this[kOnClosed].push(callback) + } else { + queueMicrotask(() => callback(null, null)) + } + return + } + + this[kClosed] = true + this[kOnClosed].push(callback) + + const onClosed = () => { + const callbacks = this[kOnClosed] + this[kOnClosed] = null + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null) + } + } + + // Should not error. + this[kClose]() + .then(() => this.destroy()) + .then(() => { + queueMicrotask(onClosed) + }) + } + + destroy (err, callback) { + if (typeof err === 'function') { + callback = err + err = null + } + + if (callback === undefined) { + return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) + }) + }) + } + + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } + + if (this[kDestroyed]) { + if (this[kOnDestroyed]) { + this[kOnDestroyed].push(callback) + } else { + queueMicrotask(() => callback(null, null)) + } + return + } + + if (!err) { + err = new ClientDestroyedError() + } + + this[kDestroyed] = true + this[kOnDestroyed] = this[kOnDestroyed] || [] + this[kOnDestroyed].push(callback) + + const onDestroyed = () => { + const callbacks = this[kOnDestroyed] + this[kOnDestroyed] = null + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null) + } + } + + // Should not error. + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed) + }) + } + + [kInterceptedDispatch] (opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch] + return this[kDispatch](opts, handler) + } + + let dispatch = this[kDispatch].bind(this) + for (let i = this[kInterceptors].length - 1; i >= 0; i--) { + dispatch = this[kInterceptors][i](dispatch) + } + this[kInterceptedDispatch] = dispatch + return dispatch(opts, handler) + } + + dispatch (opts, handler) { + if (!handler || typeof handler !== 'object') { + throw new InvalidArgumentError('handler must be an object') + } + + try { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('opts must be an object.') + } + + if (this[kDestroyed] || this[kOnDestroyed]) { + throw new ClientDestroyedError() + } + + if (this[kClosed]) { + throw new ClientClosedError() + } + + return this[kInterceptedDispatch](opts, handler) + } catch (err) { + if (typeof handler.onError !== 'function') { + throw new InvalidArgumentError('invalid onError method') + } + + handler.onError(err) + + return false + } + } +} + +module.exports = DispatcherBase + + +/***/ }), + +/***/ 412: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const EventEmitter = __nccwpck_require__(2361) + +class Dispatcher extends EventEmitter { + dispatch () { + throw new Error('not implemented') + } + + close () { + throw new Error('not implemented') + } + + destroy () { + throw new Error('not implemented') + } +} + +module.exports = Dispatcher + + +/***/ }), + +/***/ 1472: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const Busboy = __nccwpck_require__(727) +const util = __nccwpck_require__(3983) +const { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody +} = __nccwpck_require__(2538) +const { FormData } = __nccwpck_require__(2015) +const { kState } = __nccwpck_require__(5861) +const { webidl } = __nccwpck_require__(1744) +const { DOMException, structuredClone } = __nccwpck_require__(1037) +const { Blob, File: NativeFile } = __nccwpck_require__(4300) +const { kBodyUsed } = __nccwpck_require__(2785) +const assert = __nccwpck_require__(9491) +const { isErrored } = __nccwpck_require__(3983) +const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830) +const { File: UndiciFile } = __nccwpck_require__(8511) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) + +let ReadableStream = globalThis.ReadableStream + +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile +const textEncoder = new TextEncoder() +const textDecoder = new TextDecoder() + +// https://fetch.spec.whatwg.org/#concept-bodyinit-extract +function extractBody (object, keepalive = false) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(5356).ReadableStream) + } + + // 1. Let stream be null. + let stream = null + + // 2. If object is a ReadableStream object, then set stream to object. + if (object instanceof ReadableStream) { + stream = object + } else if (isBlobLike(object)) { + // 3. Otherwise, if object is a Blob object, set stream to the + // result of running object’s get stream. + stream = object.stream() + } else { + // 4. Otherwise, set stream to a new ReadableStream object, and set + // up stream. + stream = new ReadableStream({ + async pull (controller) { + controller.enqueue( + typeof source === 'string' ? textEncoder.encode(source) : source + ) + queueMicrotask(() => readableStreamClose(controller)) + }, + start () {}, + type: undefined + }) + } + + // 5. Assert: stream is a ReadableStream object. + assert(isReadableStreamLike(stream)) + + // 6. Let action be null. + let action = null + + // 7. Let source be null. + let source = null + + // 8. Let length be null. + let length = null + + // 9. Let type be null. + let type = null + + // 10. Switch on object: + if (typeof object === 'string') { + // Set source to the UTF-8 encoding of object. + // Note: setting source to a Uint8Array here breaks some mocking assumptions. + source = object + + // Set type to `text/plain;charset=UTF-8`. + type = 'text/plain;charset=UTF-8' + } else if (object instanceof URLSearchParams) { + // URLSearchParams + + // spec says to run application/x-www-form-urlencoded on body.list + // this is implemented in Node.js as apart of an URLSearchParams instance toString method + // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 + // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 + + // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. + source = object.toString() + + // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. + type = 'application/x-www-form-urlencoded;charset=UTF-8' + } else if (isArrayBuffer(object)) { + // BufferSource/ArrayBuffer + + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.slice()) + } else if (ArrayBuffer.isView(object)) { + // BufferSource/ArrayBufferView + + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) + } else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` + const prefix = `--${boundary}\r\nContent-Disposition: form-data` + + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => + str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') + + // Set action to this step: run the multipart/form-data + // encoding algorithm, with object’s entry list and UTF-8. + // - This ensures that the body is immutable and can't be changed afterwords + // - That the content-length is calculated in advance. + // - And that all parts are pre-encoded and ready to be sent. + + const blobParts = [] + const rn = new Uint8Array([13, 10]) // '\r\n' + length = 0 + let hasUnknownSizeValue = false + + for (const [name, value] of object) { + if (typeof value === 'string') { + const chunk = textEncoder.encode(prefix + + `; name="${escape(normalizeLinefeeds(name))}"` + + `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) + blobParts.push(chunk) + length += chunk.byteLength + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + + (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + + `Content-Type: ${ + value.type || 'application/octet-stream' + }\r\n\r\n`) + blobParts.push(chunk, value, rn) + if (typeof value.size === 'number') { + length += chunk.byteLength + value.size + rn.byteLength + } else { + hasUnknownSizeValue = true + } + } + } + + const chunk = textEncoder.encode(`--${boundary}--`) + blobParts.push(chunk) + length += chunk.byteLength + if (hasUnknownSizeValue) { + length = null + } + + // Set source to object. + source = object + + action = async function * () { + for (const part of blobParts) { + if (part.stream) { + yield * part.stream() + } else { + yield part + } + } + } + + // Set type to `multipart/form-data; boundary=`, + // followed by the multipart/form-data boundary string generated + // by the multipart/form-data encoding algorithm. + type = 'multipart/form-data; boundary=' + boundary + } else if (isBlobLike(object)) { + // Blob + + // Set source to object. + source = object + + // Set length to object’s size. + length = object.size + + // If object’s type attribute is not the empty byte sequence, set + // type to its value. + if (object.type) { + type = object.type + } + } else if (typeof object[Symbol.asyncIterator] === 'function') { + // If keepalive is true, then throw a TypeError. + if (keepalive) { + throw new TypeError('keepalive') + } + + // If object is disturbed or locked, then throw a TypeError. + if (util.isDisturbed(object) || object.locked) { + throw new TypeError( + 'Response body object should not be disturbed or locked' + ) + } + + stream = + object instanceof ReadableStream ? object : ReadableStreamFrom(object) + } + + // 11. If source is a byte sequence, then set action to a + // step that returns source and length to source’s length. + if (typeof source === 'string' || util.isBuffer(source)) { + length = Buffer.byteLength(source) + } + + // 12. If action is non-null, then run these steps in in parallel: + if (action != null) { + // Run action. + let iterator + stream = new ReadableStream({ + async start () { + iterator = action(object)[Symbol.asyncIterator]() + }, + async pull (controller) { + const { value, done } = await iterator.next() + if (done) { + // When running action is done, close stream. + queueMicrotask(() => { + controller.close() + }) + } else { + // Whenever one or more bytes are available and stream is not errored, + // enqueue a Uint8Array wrapping an ArrayBuffer containing the available + // bytes into stream. + if (!isErrored(stream)) { + controller.enqueue(new Uint8Array(value)) + } + } + return controller.desiredSize > 0 + }, + async cancel (reason) { + await iterator.return() + }, + type: undefined + }) + } + + // 13. Let body be a body whose stream is stream, source is source, + // and length is length. + const body = { stream, source, length } + + // 14. Return (body, type). + return [body, type] +} + +// https://fetch.spec.whatwg.org/#bodyinit-safely-extract +function safelyExtractBody (object, keepalive = false) { + if (!ReadableStream) { + // istanbul ignore next + ReadableStream = (__nccwpck_require__(5356).ReadableStream) + } + + // To safely extract a body and a `Content-Type` value from + // a byte sequence or BodyInit object object, run these steps: + + // 1. If object is a ReadableStream object, then: + if (object instanceof ReadableStream) { + // Assert: object is neither disturbed nor locked. + // istanbul ignore next + assert(!util.isDisturbed(object), 'The body has already been consumed.') + // istanbul ignore next + assert(!object.locked, 'The stream is locked.') + } + + // 2. Return the results of extracting object. + return extractBody(object, keepalive) +} + +function cloneBody (body) { + // To clone a body body, run these steps: + + // https://fetch.spec.whatwg.org/#concept-body-clone + + // 1. Let « out1, out2 » be the result of teeing body’s stream. + const [out1, out2] = body.stream.tee() + const out2Clone = structuredClone(out2, { transfer: [out2] }) + // This, for whatever reasons, unrefs out2Clone which allows + // the process to exit by itself. + const [, finalClone] = out2Clone.tee() + + // 2. Set body’s stream to out1. + body.stream = out1 + + // 3. Return a body whose stream is out2 and other members are copied from body. + return { + stream: finalClone, + length: body.length, + source: body.source + } +} + +async function * consumeBody (body) { + if (body) { + if (isUint8Array(body)) { + yield body + } else { + const stream = body.stream + + if (util.isDisturbed(stream)) { + throw new TypeError('The body has already been consumed.') + } + + if (stream.locked) { + throw new TypeError('The stream is locked.') + } + + // Compat. + stream[kBodyUsed] = true + + yield * stream + } + } +} + +function throwIfAborted (state) { + if (state.aborted) { + throw new DOMException('The operation was aborted.', 'AbortError') + } +} + +function bodyMixinMethods (instance) { + const methods = { + blob () { + // The blob() method steps are to return the result of + // running consume body with this and the following step + // given a byte sequence bytes: return a Blob whose + // contents are bytes and whose type attribute is this’s + // MIME type. + return specConsumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this) + + if (mimeType === 'failure') { + mimeType = '' + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType) + } + + // Return a Blob whose contents are bytes and type attribute + // is mimeType. + return new Blob([bytes], { type: mimeType }) + }, instance) + }, + + arrayBuffer () { + // The arrayBuffer() method steps are to return the result + // of running consume body with this and the following step + // given a byte sequence bytes: return a new ArrayBuffer + // whose contents are bytes. + return specConsumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer + }, instance) + }, + + text () { + // The text() method steps are to return the result of running + // consume body with this and UTF-8 decode. + return specConsumeBody(this, utf8DecodeBytes, instance) + }, + + json () { + // The json() method steps are to return the result of running + // consume body with this and parse JSON from bytes. + return specConsumeBody(this, parseJSONFromBytes, instance) + }, + + async formData () { + webidl.brandCheck(this, instance) + + throwIfAborted(this[kState]) + + const contentType = this.headers.get('Content-Type') + + // If mimeType’s essence is "multipart/form-data", then: + if (/multipart\/form-data/.test(contentType)) { + const headers = {} + for (const [key, value] of this.headers) headers[key.toLowerCase()] = value + + const responseFormData = new FormData() + + let busboy + + try { + busboy = new Busboy({ + headers, + preservePath: true + }) + } catch (err) { + throw new DOMException(`${err}`, 'AbortError') + } + + busboy.on('field', (name, value) => { + responseFormData.append(name, value) + }) + busboy.on('file', (name, value, filename, encoding, mimeType) => { + const chunks = [] + + if (encoding === 'base64' || encoding.toLowerCase() === 'base64') { + let base64chunk = '' + + value.on('data', (chunk) => { + base64chunk += chunk.toString().replace(/[\r\n]/gm, '') + + const end = base64chunk.length - base64chunk.length % 4 + chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64')) + + base64chunk = base64chunk.slice(end) + }) + value.on('end', () => { + chunks.push(Buffer.from(base64chunk, 'base64')) + responseFormData.append(name, new File(chunks, filename, { type: mimeType })) + }) + } else { + value.on('data', (chunk) => { + chunks.push(chunk) + }) + value.on('end', () => { + responseFormData.append(name, new File(chunks, filename, { type: mimeType })) + }) + } + }) + + const busboyResolve = new Promise((resolve, reject) => { + busboy.on('finish', resolve) + busboy.on('error', (err) => reject(new TypeError(err))) + }) + + if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk) + busboy.end() + await busboyResolve + + return responseFormData + } else if (/application\/x-www-form-urlencoded/.test(contentType)) { + // Otherwise, if mimeType’s essence is "application/x-www-form-urlencoded", then: + + // 1. Let entries be the result of parsing bytes. + let entries + try { + let text = '' + // application/x-www-form-urlencoded parser will keep the BOM. + // https://url.spec.whatwg.org/#concept-urlencoded-parser + // Note that streaming decoder is stateful and cannot be reused + const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true }) + + for await (const chunk of consumeBody(this[kState].body)) { + if (!isUint8Array(chunk)) { + throw new TypeError('Expected Uint8Array chunk') + } + text += streamingDecoder.decode(chunk, { stream: true }) + } + text += streamingDecoder.decode() + entries = new URLSearchParams(text) + } catch (err) { + // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. + // 2. If entries is failure, then throw a TypeError. + throw Object.assign(new TypeError(), { cause: err }) + } + + // 3. Return a new FormData object whose entries are entries. + const formData = new FormData() + for (const [name, value] of entries) { + formData.append(name, value) + } + return formData + } else { + // Wait a tick before checking if the request has been aborted. + // Otherwise, a TypeError can be thrown when an AbortError should. + await Promise.resolve() + + throwIfAborted(this[kState]) + + // Otherwise, throw a TypeError. + throw webidl.errors.exception({ + header: `${instance.name}.formData`, + message: 'Could not parse content as FormData.' + }) + } + } + } + + return methods +} + +function mixinBody (prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)) +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ +async function specConsumeBody (object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance) + + throwIfAborted(object[kState]) + + // 1. If object is unusable, then return a promise rejected + // with a TypeError. + if (bodyUnusable(object[kState].body)) { + throw new TypeError('Body is unusable') + } + + // 2. Let promise be a new promise. + const promise = createDeferredPromise() + + // 3. Let errorSteps given error be to reject promise with error. + const errorSteps = (error) => promise.reject(error) + + // 4. Let successSteps given a byte sequence data be to resolve + // promise with the result of running convertBytesToJSValue + // with data. If that threw an exception, then run errorSteps + // with that exception. + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)) + } catch (e) { + errorSteps(e) + } + } + + // 5. If object’s body is null, then run successSteps with an + // empty byte sequence. + if (object[kState].body == null) { + successSteps(new Uint8Array()) + return promise.promise + } + + // 6. Otherwise, fully read object’s body given successSteps, + // errorSteps, and object’s relevant global object. + await fullyReadBody(object[kState].body, successSteps, errorSteps) + + // 7. Return promise. + return promise.promise +} + +// https://fetch.spec.whatwg.org/#body-unusable +function bodyUnusable (body) { + // An object including the Body interface mixin is + // said to be unusable if its body is non-null and + // its body’s stream is disturbed or locked. + return body != null && (body.stream.locked || util.isDisturbed(body.stream)) +} + +/** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ +function utf8DecodeBytes (buffer) { + if (buffer.length === 0) { + return '' + } + + // 1. Let buffer be the result of peeking three bytes from + // ioQueue, converted to a byte sequence. + + // 2. If buffer is 0xEF 0xBB 0xBF, then read three + // bytes from ioQueue. (Do nothing with those bytes.) + if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { + buffer = buffer.subarray(3) + } + + // 3. Process a queue with an instance of UTF-8’s + // decoder, ioQueue, output, and "replacement". + const output = textDecoder.decode(buffer) + + // 4. Return output. + return output +} + +/** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ +function parseJSONFromBytes (bytes) { + return JSON.parse(utf8DecodeBytes(bytes)) +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} object + */ +function bodyMimeType (object) { + const { headersList } = object[kState] + const contentType = headersList.get('content-type') + + if (contentType === null) { + return 'failure' + } + + return parseMIMEType(contentType) +} + +module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody +} + + +/***/ }), + +/***/ 1037: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(1267) + +const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] +const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) + +const nullBodyStatus = [101, 204, 205, 304] + +const redirectStatus = [301, 302, 303, 307, 308] +const redirectStatusSet = new Set(redirectStatus) + +// https://fetch.spec.whatwg.org/#block-bad-port +const badPorts = [ + '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', + '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', + '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', + '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', + '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697', + '10080' +] + +const badPortsSet = new Set(badPorts) + +// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies +const referrerPolicy = [ + '', + 'no-referrer', + 'no-referrer-when-downgrade', + 'same-origin', + 'origin', + 'strict-origin', + 'origin-when-cross-origin', + 'strict-origin-when-cross-origin', + 'unsafe-url' +] +const referrerPolicySet = new Set(referrerPolicy) + +const requestRedirect = ['follow', 'manual', 'error'] + +const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE'] +const safeMethodsSet = new Set(safeMethods) + +const requestMode = ['navigate', 'same-origin', 'no-cors', 'cors'] + +const requestCredentials = ['omit', 'same-origin', 'include'] + +const requestCache = [ + 'default', + 'no-store', + 'reload', + 'no-cache', + 'force-cache', + 'only-if-cached' +] + +// https://fetch.spec.whatwg.org/#request-body-header-name +const requestBodyHeader = [ + 'content-encoding', + 'content-language', + 'content-location', + 'content-type', + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + 'content-length' +] + +// https://fetch.spec.whatwg.org/#enumdef-requestduplex +const requestDuplex = [ + 'half' +] + +// http://fetch.spec.whatwg.org/#forbidden-method +const forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK'] +const forbiddenMethodsSet = new Set(forbiddenMethods) + +const subresource = [ + 'audio', + 'audioworklet', + 'font', + 'image', + 'manifest', + 'paintworklet', + 'script', + 'style', + 'track', + 'video', + 'xslt', + '' +] +const subresourceSet = new Set(subresource) + +/** @type {globalThis['DOMException']} */ +const DOMException = globalThis.DOMException ?? (() => { + // DOMException was only made a global in Node v17.0.0, + // but fetch supports >= v16.8. + try { + atob('~') + } catch (err) { + return Object.getPrototypeOf(err).constructor + } +})() + +let channel + +/** @type {globalThis['structuredClone']} */ +const structuredClone = + globalThis.structuredClone ?? + // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js + // structuredClone was added in v17.0.0, but fetch supports v16.8 + function structuredClone (value, options = undefined) { + if (arguments.length === 0) { + throw new TypeError('missing argument') + } + + if (!channel) { + channel = new MessageChannel() + } + channel.port1.unref() + channel.port2.unref() + channel.port1.postMessage(value, options?.transfer) + return receiveMessageOnPort(channel.port2).message + } + +module.exports = { + DOMException, + structuredClone, + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet +} + + +/***/ }), + +/***/ 685: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const assert = __nccwpck_require__(9491) +const { atob } = __nccwpck_require__(4300) +const { isomorphicDecode } = __nccwpck_require__(2538) + +const encoder = new TextEncoder() + +/** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ +const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/ +const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line +/** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ +const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line + +// https://fetch.spec.whatwg.org/#data-url-processor +/** @param {URL} dataURL */ +function dataURLProcessor (dataURL) { + // 1. Assert: dataURL’s scheme is "data". + assert(dataURL.protocol === 'data:') + + // 2. Let input be the result of running the URL + // serializer on dataURL with exclude fragment + // set to true. + let input = URLSerializer(dataURL, true) + + // 3. Remove the leading "data:" string from input. + input = input.slice(5) + + // 4. Let position point at the start of input. + const position = { position: 0 } + + // 5. Let mimeType be the result of collecting a + // sequence of code points that are not equal + // to U+002C (,), given position. + let mimeType = collectASequenceOfCodePointsFast( + ',', + input, + position + ) + + // 6. Strip leading and trailing ASCII whitespace + // from mimeType. + // Undici implementation note: we need to store the + // length because if the mimetype has spaces removed, + // the wrong amount will be sliced from the input in + // step #9 + const mimeTypeLength = mimeType.length + mimeType = removeASCIIWhitespace(mimeType, true, true) + + // 7. If position is past the end of input, then + // return failure + if (position.position >= input.length) { + return 'failure' + } + + // 8. Advance position by 1. + position.position++ + + // 9. Let encodedBody be the remainder of input. + const encodedBody = input.slice(mimeTypeLength + 1) + + // 10. Let body be the percent-decoding of encodedBody. + let body = stringPercentDecode(encodedBody) + + // 11. If mimeType ends with U+003B (;), followed by + // zero or more U+0020 SPACE, followed by an ASCII + // case-insensitive match for "base64", then: + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + // 1. Let stringBody be the isomorphic decode of body. + const stringBody = isomorphicDecode(body) + + // 2. Set body to the forgiving-base64 decode of + // stringBody. + body = forgivingBase64(stringBody) + + // 3. If body is failure, then return failure. + if (body === 'failure') { + return 'failure' + } + + // 4. Remove the last 6 code points from mimeType. + mimeType = mimeType.slice(0, -6) + + // 5. Remove trailing U+0020 SPACE code points from mimeType, + // if any. + mimeType = mimeType.replace(/(\u0020)+$/, '') + + // 6. Remove the last U+003B (;) code point from mimeType. + mimeType = mimeType.slice(0, -1) + } + + // 12. If mimeType starts with U+003B (;), then prepend + // "text/plain" to mimeType. + if (mimeType.startsWith(';')) { + mimeType = 'text/plain' + mimeType + } + + // 13. Let mimeTypeRecord be the result of parsing + // mimeType. + let mimeTypeRecord = parseMIMEType(mimeType) + + // 14. If mimeTypeRecord is failure, then set + // mimeTypeRecord to text/plain;charset=US-ASCII. + if (mimeTypeRecord === 'failure') { + mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') + } + + // 15. Return a new data: URL struct whose MIME + // type is mimeTypeRecord and body is body. + // https://fetch.spec.whatwg.org/#data-url-struct + return { mimeType: mimeTypeRecord, body } +} + +// https://url.spec.whatwg.org/#concept-url-serializer +/** + * @param {URL} url + * @param {boolean} excludeFragment + */ +function URLSerializer (url, excludeFragment = false) { + if (!excludeFragment) { + return url.href + } + + const href = url.href + const hashLength = url.hash.length + + return hashLength === 0 ? href : href.substring(0, href.length - hashLength) +} + +// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points +/** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ +function collectASequenceOfCodePoints (condition, input, position) { + // 1. Let result be the empty string. + let result = '' + + // 2. While position doesn’t point past the end of input and the + // code point at position within input meets the condition condition: + while (position.position < input.length && condition(input[position.position])) { + // 1. Append that code point to the end of result. + result += input[position.position] + + // 2. Advance position by 1. + position.position++ + } + + // 3. Return result. + return result +} + +/** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ +function collectASequenceOfCodePointsFast (char, input, position) { + const idx = input.indexOf(char, position.position) + const start = position.position + + if (idx === -1) { + position.position = input.length + return input.slice(start) + } + + position.position = idx + return input.slice(start, position.position) +} + +// https://url.spec.whatwg.org/#string-percent-decode +/** @param {string} input */ +function stringPercentDecode (input) { + // 1. Let bytes be the UTF-8 encoding of input. + const bytes = encoder.encode(input) + + // 2. Return the percent-decoding of bytes. + return percentDecode(bytes) +} + +// https://url.spec.whatwg.org/#percent-decode +/** @param {Uint8Array} input */ +function percentDecode (input) { + // 1. Let output be an empty byte sequence. + /** @type {number[]} */ + const output = [] + + // 2. For each byte byte in input: + for (let i = 0; i < input.length; i++) { + const byte = input[i] + + // 1. If byte is not 0x25 (%), then append byte to output. + if (byte !== 0x25) { + output.push(byte) + + // 2. Otherwise, if byte is 0x25 (%) and the next two bytes + // after byte in input are not in the ranges + // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), + // and 0x61 (a) to 0x66 (f), all inclusive, append byte + // to output. + } else if ( + byte === 0x25 && + !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2])) + ) { + output.push(0x25) + + // 3. Otherwise: + } else { + // 1. Let bytePoint be the two bytes after byte in input, + // decoded, and then interpreted as hexadecimal number. + const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]) + const bytePoint = Number.parseInt(nextTwoBytes, 16) + + // 2. Append a byte whose value is bytePoint to output. + output.push(bytePoint) + + // 3. Skip the next two bytes in input. + i += 2 + } + } + + // 3. Return output. + return Uint8Array.from(output) +} + +// https://mimesniff.spec.whatwg.org/#parse-a-mime-type +/** @param {string} input */ +function parseMIMEType (input) { + // 1. Remove any leading and trailing HTTP whitespace + // from input. + input = removeHTTPWhitespace(input, true, true) + + // 2. Let position be a position variable for input, + // initially pointing at the start of input. + const position = { position: 0 } + + // 3. Let type be the result of collecting a sequence + // of code points that are not U+002F (/) from + // input, given position. + const type = collectASequenceOfCodePointsFast( + '/', + input, + position + ) + + // 4. If type is the empty string or does not solely + // contain HTTP token code points, then return failure. + // https://mimesniff.spec.whatwg.org/#http-token-code-point + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { + return 'failure' + } + + // 5. If position is past the end of input, then return + // failure + if (position.position > input.length) { + return 'failure' + } + + // 6. Advance position by 1. (This skips past U+002F (/).) + position.position++ + + // 7. Let subtype be the result of collecting a sequence of + // code points that are not U+003B (;) from input, given + // position. + let subtype = collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 8. Remove any trailing HTTP whitespace from subtype. + subtype = removeHTTPWhitespace(subtype, false, true) + + // 9. If subtype is the empty string or does not solely + // contain HTTP token code points, then return failure. + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return 'failure' + } + + const typeLowercase = type.toLowerCase() + const subtypeLowercase = subtype.toLowerCase() + + // 10. Let mimeType be a new MIME type record whose type + // is type, in ASCII lowercase, and subtype is subtype, + // in ASCII lowercase. + // https://mimesniff.spec.whatwg.org/#mime-type + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` + } + + // 11. While position is not past the end of input: + while (position.position < input.length) { + // 1. Advance position by 1. (This skips past U+003B (;).) + position.position++ + + // 2. Collect a sequence of code points that are HTTP + // whitespace from input given position. + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + char => HTTP_WHITESPACE_REGEX.test(char), + input, + position + ) + + // 3. Let parameterName be the result of collecting a + // sequence of code points that are not U+003B (;) + // or U+003D (=) from input, given position. + let parameterName = collectASequenceOfCodePoints( + (char) => char !== ';' && char !== '=', + input, + position + ) + + // 4. Set parameterName to parameterName, in ASCII + // lowercase. + parameterName = parameterName.toLowerCase() + + // 5. If position is not past the end of input, then: + if (position.position < input.length) { + // 1. If the code point at position within input is + // U+003B (;), then continue. + if (input[position.position] === ';') { + continue + } + + // 2. Advance position by 1. (This skips past U+003D (=).) + position.position++ + } + + // 6. If position is past the end of input, then break. + if (position.position > input.length) { + break + } + + // 7. Let parameterValue be null. + let parameterValue = null + + // 8. If the code point at position within input is + // U+0022 ("), then: + if (input[position.position] === '"') { + // 1. Set parameterValue to the result of collecting + // an HTTP quoted string from input, given position + // and the extract-value flag. + parameterValue = collectAnHTTPQuotedString(input, position, true) + + // 2. Collect a sequence of code points that are not + // U+003B (;) from input, given position. + collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 9. Otherwise: + } else { + // 1. Set parameterValue to the result of collecting + // a sequence of code points that are not U+003B (;) + // from input, given position. + parameterValue = collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 2. Remove any trailing HTTP whitespace from parameterValue. + parameterValue = removeHTTPWhitespace(parameterValue, false, true) + + // 3. If parameterValue is the empty string, then continue. + if (parameterValue.length === 0) { + continue + } + } + + // 10. If all of the following are true + // - parameterName is not the empty string + // - parameterName solely contains HTTP token code points + // - parameterValue solely contains HTTP quoted-string token code points + // - mimeType’s parameters[parameterName] does not exist + // then set mimeType’s parameters[parameterName] to parameterValue. + if ( + parameterName.length !== 0 && + HTTP_TOKEN_CODEPOINTS.test(parameterName) && + (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && + !mimeType.parameters.has(parameterName) + ) { + mimeType.parameters.set(parameterName, parameterValue) + } + } + + // 12. Return mimeType. + return mimeType +} + +// https://infra.spec.whatwg.org/#forgiving-base64-decode +/** @param {string} data */ +function forgivingBase64 (data) { + // 1. Remove all ASCII whitespace from data. + data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '') // eslint-disable-line + + // 2. If data’s code point length divides by 4 leaving + // no remainder, then: + if (data.length % 4 === 0) { + // 1. If data ends with one or two U+003D (=) code points, + // then remove them from data. + data = data.replace(/=?=$/, '') + } + + // 3. If data’s code point length divides by 4 leaving + // a remainder of 1, then return failure. + if (data.length % 4 === 1) { + return 'failure' + } + + // 4. If data contains a code point that is not one of + // U+002B (+) + // U+002F (/) + // ASCII alphanumeric + // then return failure. + if (/[^+/0-9A-Za-z]/.test(data)) { + return 'failure' + } + + const binary = atob(data) + const bytes = new Uint8Array(binary.length) + + for (let byte = 0; byte < binary.length; byte++) { + bytes[byte] = binary.charCodeAt(byte) + } + + return bytes +} + +// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string +// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string +/** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ +function collectAnHTTPQuotedString (input, position, extractValue) { + // 1. Let positionStart be position. + const positionStart = position.position + + // 2. Let value be the empty string. + let value = '' + + // 3. Assert: the code point at position within input + // is U+0022 ("). + assert(input[position.position] === '"') + + // 4. Advance position by 1. + position.position++ + + // 5. While true: + while (true) { + // 1. Append the result of collecting a sequence of code points + // that are not U+0022 (") or U+005C (\) from input, given + // position, to value. + value += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== '\\', + input, + position + ) + + // 2. If position is past the end of input, then break. + if (position.position >= input.length) { + break + } + + // 3. Let quoteOrBackslash be the code point at position within + // input. + const quoteOrBackslash = input[position.position] + + // 4. Advance position by 1. + position.position++ + + // 5. If quoteOrBackslash is U+005C (\), then: + if (quoteOrBackslash === '\\') { + // 1. If position is past the end of input, then append + // U+005C (\) to value and break. + if (position.position >= input.length) { + value += '\\' + break + } + + // 2. Append the code point at position within input to value. + value += input[position.position] + + // 3. Advance position by 1. + position.position++ + + // 6. Otherwise: + } else { + // 1. Assert: quoteOrBackslash is U+0022 ("). + assert(quoteOrBackslash === '"') + + // 2. Break. + break + } + } + + // 6. If the extract-value flag is set, then return value. + if (extractValue) { + return value + } + + // 7. Return the code points from positionStart to position, + // inclusive, within input. + return input.slice(positionStart, position.position) +} + +/** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ +function serializeAMimeType (mimeType) { + assert(mimeType !== 'failure') + const { parameters, essence } = mimeType + + // 1. Let serialization be the concatenation of mimeType’s + // type, U+002F (/), and mimeType’s subtype. + let serialization = essence + + // 2. For each name → value of mimeType’s parameters: + for (let [name, value] of parameters.entries()) { + // 1. Append U+003B (;) to serialization. + serialization += ';' + + // 2. Append name to serialization. + serialization += name + + // 3. Append U+003D (=) to serialization. + serialization += '=' + + // 4. If value does not solely contain HTTP token code + // points or value is the empty string, then: + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + // 1. Precede each occurence of U+0022 (") or + // U+005C (\) in value with U+005C (\). + value = value.replace(/(\\|")/g, '\\$1') + + // 2. Prepend U+0022 (") to value. + value = '"' + value + + // 3. Append U+0022 (") to value. + value += '"' + } + + // 5. Append value to serialization. + serialization += value + } + + // 3. Return serialization. + return serialization +} + +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} char + */ +function isHTTPWhiteSpace (char) { + return char === '\r' || char === '\n' || char === '\t' || char === ' ' +} + +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + */ +function removeHTTPWhitespace (str, leading = true, trailing = true) { + let lead = 0 + let trail = str.length - 1 + + if (leading) { + for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); + } + + if (trailing) { + for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); + } + + return str.slice(lead, trail + 1) +} + +/** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {string} char + */ +function isASCIIWhitespace (char) { + return char === '\r' || char === '\n' || char === '\t' || char === '\f' || char === ' ' +} + +/** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + */ +function removeASCIIWhitespace (str, leading = true, trailing = true) { + let lead = 0 + let trail = str.length - 1 + + if (leading) { + for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); + } + + if (trailing) { + for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); + } + + return str.slice(lead, trail + 1) +} + +module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType +} + + +/***/ }), + +/***/ 8511: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { Blob, File: NativeFile } = __nccwpck_require__(4300) +const { types } = __nccwpck_require__(3837) +const { kState } = __nccwpck_require__(5861) +const { isBlobLike } = __nccwpck_require__(2538) +const { webidl } = __nccwpck_require__(1744) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) +const { kEnumerableProperty } = __nccwpck_require__(3983) +const encoder = new TextEncoder() + +class File extends Blob { + constructor (fileBits, fileName, options = {}) { + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: + webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' }) + + fileBits = webidl.converters['sequence'](fileBits) + fileName = webidl.converters.USVString(fileName) + options = webidl.converters.FilePropertyBag(options) + + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. + // Note: Blob handles this for us + + // 2. Let n be the fileName argument to the constructor. + const n = fileName + + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: + + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // 2. Convert every character in t to ASCII lowercase. + let t = options.type + let d + + // eslint-disable-next-line no-labels + substep: { + if (t) { + t = parseMIMEType(t) + + if (t === 'failure') { + t = '' + // eslint-disable-next-line no-labels + break substep + } + + t = serializeAMimeType(t).toLowerCase() + } + + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + d = options.lastModified + } + + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. + + super(processBlobParts(fileBits, options), { type: t }) + this[kState] = { + name: n, + lastModified: d, + type: t + } + } + + get name () { + webidl.brandCheck(this, File) + + return this[kState].name + } + + get lastModified () { + webidl.brandCheck(this, File) + + return this[kState].lastModified + } + + get type () { + webidl.brandCheck(this, File) + + return this[kState].type + } +} + +class FileLike { + constructor (blobLike, fileName, options = {}) { + // TODO: argument idl type check + + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: + + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. + + // 2. Let n be the fileName argument to the constructor. + const n = fileName + + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: + + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // TODO + const t = options.type + + // 2. Convert every character in t to ASCII lowercase. + // TODO + + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + const d = options.lastModified ?? Date.now() + + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. + + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + } + } + + stream (...args) { + webidl.brandCheck(this, FileLike) + + return this[kState].blobLike.stream(...args) + } + + arrayBuffer (...args) { + webidl.brandCheck(this, FileLike) + + return this[kState].blobLike.arrayBuffer(...args) + } + + slice (...args) { + webidl.brandCheck(this, FileLike) + + return this[kState].blobLike.slice(...args) + } + + text (...args) { + webidl.brandCheck(this, FileLike) + + return this[kState].blobLike.text(...args) + } + + get size () { + webidl.brandCheck(this, FileLike) + + return this[kState].blobLike.size + } + + get type () { + webidl.brandCheck(this, FileLike) + + return this[kState].blobLike.type + } + + get name () { + webidl.brandCheck(this, FileLike) + + return this[kState].name + } + + get lastModified () { + webidl.brandCheck(this, FileLike) + + return this[kState].lastModified + } + + get [Symbol.toStringTag] () { + return 'File' + } +} + +Object.defineProperties(File.prototype, { + [Symbol.toStringTag]: { + value: 'File', + configurable: true + }, + name: kEnumerableProperty, + lastModified: kEnumerableProperty +}) + +webidl.converters.Blob = webidl.interfaceConverter(Blob) + +webidl.converters.BlobPart = function (V, opts) { + if (webidl.util.Type(V) === 'Object') { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) + } + + if ( + ArrayBuffer.isView(V) || + types.isAnyArrayBuffer(V) + ) { + return webidl.converters.BufferSource(V, opts) + } + } + + return webidl.converters.USVString(V, opts) +} + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.BlobPart +) + +// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag +webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ + { + key: 'lastModified', + converter: webidl.converters['long long'], + get defaultValue () { + return Date.now() + } + }, + { + key: 'type', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'endings', + converter: (value) => { + value = webidl.converters.DOMString(value) + value = value.toLowerCase() + + if (value !== 'native') { + value = 'transparent' + } + + return value + }, + defaultValue: 'transparent' + } +]) + +/** + * @see https://www.w3.org/TR/FileAPI/#process-blob-parts + * @param {(NodeJS.TypedArray|Blob|string)[]} parts + * @param {{ type: string, endings: string }} options + */ +function processBlobParts (parts, options) { + // 1. Let bytes be an empty sequence of bytes. + /** @type {NodeJS.TypedArray[]} */ + const bytes = [] + + // 2. For each element in parts: + for (const element of parts) { + // 1. If element is a USVString, run the following substeps: + if (typeof element === 'string') { + // 1. Let s be element. + let s = element + + // 2. If the endings member of options is "native", set s + // to the result of converting line endings to native + // of element. + if (options.endings === 'native') { + s = convertLineEndingsNative(s) + } + + // 3. Append the result of UTF-8 encoding s to bytes. + bytes.push(encoder.encode(s)) + } else if ( + types.isAnyArrayBuffer(element) || + types.isTypedArray(element) + ) { + // 2. If element is a BufferSource, get a copy of the + // bytes held by the buffer source, and append those + // bytes to bytes. + if (!element.buffer) { // ArrayBuffer + bytes.push(new Uint8Array(element)) + } else { + bytes.push( + new Uint8Array(element.buffer, element.byteOffset, element.byteLength) + ) + } + } else if (isBlobLike(element)) { + // 3. If element is a Blob, append the bytes it represents + // to bytes. + bytes.push(element) + } + } + + // 3. Return bytes. + return bytes +} + +/** + * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native + * @param {string} s + */ +function convertLineEndingsNative (s) { + // 1. Let native line ending be be the code point U+000A LF. + let nativeLineEnding = '\n' + + // 2. If the underlying platform’s conventions are to + // represent newlines as a carriage return and line feed + // sequence, set native line ending to the code point + // U+000D CR followed by the code point U+000A LF. + if (process.platform === 'win32') { + nativeLineEnding = '\r\n' + } + + return s.replace(/\r?\n/g, nativeLineEnding) +} + +// If this function is moved to ./util.js, some tools (such as +// rollup) will warn about circular dependencies. See: +// https://github.com/nodejs/undici/issues/1629 +function isFileLike (object) { + return ( + (NativeFile && object instanceof NativeFile) || + object instanceof File || ( + object && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + object[Symbol.toStringTag] === 'File' + ) + ) +} + +module.exports = { File, FileLike, isFileLike } + + +/***/ }), + +/***/ 2015: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(2538) +const { kState } = __nccwpck_require__(5861) +const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(8511) +const { webidl } = __nccwpck_require__(1744) +const { Blob, File: NativeFile } = __nccwpck_require__(4300) + +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile + +// https://xhr.spec.whatwg.org/#formdata +class FormData { + constructor (form) { + if (form !== undefined) { + throw webidl.errors.conversionFailed({ + prefix: 'FormData constructor', + argument: 'Argument 1', + types: ['undefined'] + }) + } + + this[kState] = [] + } + + append (name, value, filename = undefined) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' }) + + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" + ) + } + + // 1. Let value be value if given; otherwise blobValue. + + name = webidl.converters.USVString(name) + value = isBlobLike(value) + ? webidl.converters.Blob(value, { strict: false }) + : webidl.converters.USVString(value) + filename = arguments.length === 3 + ? webidl.converters.USVString(filename) + : undefined + + // 2. Let entry be the result of creating an entry with + // name, value, and filename if given. + const entry = makeEntry(name, value, filename) + + // 3. Append entry to this’s entry list. + this[kState].push(entry) + } + + delete (name) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' }) + + name = webidl.converters.USVString(name) + + // The delete(name) method steps are to remove all entries whose name + // is name from this’s entry list. + this[kState] = this[kState].filter(entry => entry.name !== name) + } + + get (name) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' }) + + name = webidl.converters.USVString(name) + + // 1. If there is no entry whose name is name in this’s entry list, + // then return null. + const idx = this[kState].findIndex((entry) => entry.name === name) + if (idx === -1) { + return null + } + + // 2. Return the value of the first entry whose name is name from + // this’s entry list. + return this[kState][idx].value + } + + getAll (name) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' }) + + name = webidl.converters.USVString(name) + + // 1. If there is no entry whose name is name in this’s entry list, + // then return the empty list. + // 2. Return the values of all entries whose name is name, in order, + // from this’s entry list. + return this[kState] + .filter((entry) => entry.name === name) + .map((entry) => entry.value) + } + + has (name) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' }) + + name = webidl.converters.USVString(name) + + // The has(name) method steps are to return true if there is an entry + // whose name is name in this’s entry list; otherwise false. + return this[kState].findIndex((entry) => entry.name === name) !== -1 + } + + set (name, value, filename = undefined) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' }) + + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" + ) + } + + // The set(name, value) and set(name, blobValue, filename) method steps + // are: + + // 1. Let value be value if given; otherwise blobValue. + + name = webidl.converters.USVString(name) + value = isBlobLike(value) + ? webidl.converters.Blob(value, { strict: false }) + : webidl.converters.USVString(value) + filename = arguments.length === 3 + ? toUSVString(filename) + : undefined + + // 2. Let entry be the result of creating an entry with name, value, and + // filename if given. + const entry = makeEntry(name, value, filename) + + // 3. If there are entries in this’s entry list whose name is name, then + // replace the first such entry with entry and remove the others. + const idx = this[kState].findIndex((entry) => entry.name === name) + if (idx !== -1) { + this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ] + } else { + // 4. Otherwise, append entry to this’s entry list. + this[kState].push(entry) + } + } + + entries () { + webidl.brandCheck(this, FormData) + + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key+value' + ) + } + + keys () { + webidl.brandCheck(this, FormData) + + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key' + ) + } + + values () { + webidl.brandCheck(this, FormData) + + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'value' + ) + } + + /** + * @param {(value: string, key: string, self: FormData) => void} callbackFn + * @param {unknown} thisArg + */ + forEach (callbackFn, thisArg = globalThis) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' }) + + if (typeof callbackFn !== 'function') { + throw new TypeError( + "Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'." + ) + } + + for (const [key, value] of this) { + callbackFn.apply(thisArg, [value, key, this]) + } + } +} + +FormData.prototype[Symbol.iterator] = FormData.prototype.entries + +Object.defineProperties(FormData.prototype, { + [Symbol.toStringTag]: { + value: 'FormData', + configurable: true + } +}) + +/** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ +function makeEntry (name, value, filename) { + // 1. Set name to the result of converting name into a scalar value string. + // "To convert a string into a scalar value string, replace any surrogates + // with U+FFFD." + // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end + name = Buffer.from(name).toString('utf8') + + // 2. If value is a string, then set value to the result of converting + // value into a scalar value string. + if (typeof value === 'string') { + value = Buffer.from(value).toString('utf8') + } else { + // 3. Otherwise: + + // 1. If value is not a File object, then set value to a new File object, + // representing the same bytes, whose name attribute value is "blob" + if (!isFileLike(value)) { + value = value instanceof Blob + ? new File([value], 'blob', { type: value.type }) + : new FileLike(value, 'blob', { type: value.type }) + } + + // 2. If filename is given, then set value to a new File object, + // representing the same bytes, whose name attribute is filename. + if (filename !== undefined) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + } + + value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile + ? new File([value], filename, options) + : new FileLike(value, filename, options) + } + } + + // 4. Return an entry whose name is name and whose value is value. + return { name, value } +} + +module.exports = { FormData } + + +/***/ }), + +/***/ 1246: +/***/ ((module) => { + +"use strict"; + + +// In case of breaking changes, increase the version +// number to avoid conflicts. +const globalOrigin = Symbol.for('undici.globalOrigin.1') + +function getGlobalOrigin () { + return globalThis[globalOrigin] +} + +function setGlobalOrigin (newOrigin) { + if (newOrigin === undefined) { + Object.defineProperty(globalThis, globalOrigin, { + value: undefined, + writable: true, + enumerable: false, + configurable: false + }) + + return + } + + const parsedURL = new URL(newOrigin) + + if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { + throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) + } + + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }) +} + +module.exports = { + getGlobalOrigin, + setGlobalOrigin +} + + +/***/ }), + +/***/ 554: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// https://github.com/Ethan-Arrowood/undici-fetch + + + +const { kHeadersList, kConstruct } = __nccwpck_require__(2785) +const { kGuard } = __nccwpck_require__(5861) +const { kEnumerableProperty } = __nccwpck_require__(3983) +const { + makeIterator, + isValidHeaderName, + isValidHeaderValue +} = __nccwpck_require__(2538) +const { webidl } = __nccwpck_require__(1744) +const assert = __nccwpck_require__(9491) + +const kHeadersMap = Symbol('headers map') +const kHeadersSortedMap = Symbol('headers map sorted') + +/** + * @param {number} code + */ +function isHTTPWhiteSpaceCharCode (code) { + return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ +function headerValueNormalize (potentialValue) { + // To normalize a byte sequence potentialValue, remove + // any leading and trailing HTTP whitespace bytes from + // potentialValue. + let i = 0; let j = potentialValue.length + + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i + + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) +} + +function fill (headers, object) { + // To fill a Headers object headers with a given object object, run these steps: + + // 1. If object is a sequence, then for each header in object: + // Note: webidl conversion to array has already been done. + if (Array.isArray(object)) { + for (let i = 0; i < object.length; ++i) { + const header = object[i] + // 1. If header does not contain exactly two items, then throw a TypeError. + if (header.length !== 2) { + throw webidl.errors.exception({ + header: 'Headers constructor', + message: `expected name/value pair to be length 2, found ${header.length}.` + }) + } + + // 2. Append (header’s first item, header’s second item) to headers. + appendHeader(headers, header[0], header[1]) + } + } else if (typeof object === 'object' && object !== null) { + // Note: null should throw + + // 2. Otherwise, object is a record, then for each key → value in object, + // append (key, value) to headers + const keys = Object.keys(object) + for (let i = 0; i < keys.length; ++i) { + appendHeader(headers, keys[i], object[keys[i]]) + } + } else { + throw webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: ['sequence>', 'record'] + }) + } +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ +function appendHeader (headers, name, value) { + // 1. Normalize value. + value = headerValueNormalize(value) + + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value, + type: 'header value' + }) + } + + // 3. If headers’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if headers’s guard is "request" and name is a + // forbidden header name, return. + // Note: undici does not implement forbidden header names + if (headers[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (headers[kGuard] === 'request-no-cors') { + // 5. Otherwise, if headers’s guard is "request-no-cors": + // TODO + } + + // 6. Otherwise, if headers’s guard is "response" and name is a + // forbidden response-header name, return. + + // 7. Append (name, value) to headers’s header list. + return headers[kHeadersList].append(name, value) + + // 8. If headers’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from headers +} + +class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null + + constructor (init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]) + this[kHeadersSortedMap] = init[kHeadersSortedMap] + this.cookies = init.cookies === null ? null : [...init.cookies] + } else { + this[kHeadersMap] = new Map(init) + this[kHeadersSortedMap] = null + } + } + + // https://fetch.spec.whatwg.org/#header-list-contains + contains (name) { + // A header list list contains a header name name if list + // contains a header whose name is a byte-case-insensitive + // match for name. + name = name.toLowerCase() + + return this[kHeadersMap].has(name) + } + + clear () { + this[kHeadersMap].clear() + this[kHeadersSortedMap] = null + this.cookies = null + } + + // https://fetch.spec.whatwg.org/#concept-header-list-append + append (name, value) { + this[kHeadersSortedMap] = null + + // 1. If list contains name, then set name to the first such + // header’s name. + const lowercaseName = name.toLowerCase() + const exists = this[kHeadersMap].get(lowercaseName) + + // 2. Append (name, value) to list. + if (exists) { + const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }) + } else { + this[kHeadersMap].set(lowercaseName, { name, value }) + } + + if (lowercaseName === 'set-cookie') { + this.cookies ??= [] + this.cookies.push(value) + } + } + + // https://fetch.spec.whatwg.org/#concept-header-list-set + set (name, value) { + this[kHeadersSortedMap] = null + const lowercaseName = name.toLowerCase() + + if (lowercaseName === 'set-cookie') { + this.cookies = [value] + } + + // 1. If list contains name, then set the value of + // the first such header to value and remove the + // others. + // 2. Otherwise, append header (name, value) to list. + this[kHeadersMap].set(lowercaseName, { name, value }) + } + + // https://fetch.spec.whatwg.org/#concept-header-list-delete + delete (name) { + this[kHeadersSortedMap] = null + + name = name.toLowerCase() + + if (name === 'set-cookie') { + this.cookies = null + } + + this[kHeadersMap].delete(name) + } + + // https://fetch.spec.whatwg.org/#concept-header-list-get + get (name) { + const value = this[kHeadersMap].get(name.toLowerCase()) + + // 1. If list does not contain name, then return null. + // 2. Return the values of all headers in list whose name + // is a byte-case-insensitive match for name, + // separated from each other by 0x2C 0x20, in order. + return value === undefined ? null : value.value + } + + * [Symbol.iterator] () { + // use the lowercased name + for (const [name, { value }] of this[kHeadersMap]) { + yield [name, value] + } + } + + get entries () { + const headers = {} + + if (this[kHeadersMap].size) { + for (const { name, value } of this[kHeadersMap].values()) { + headers[name] = value + } + } + + return headers + } +} + +// https://fetch.spec.whatwg.org/#headers-class +class Headers { + constructor (init = undefined) { + if (init === kConstruct) { + return + } + this[kHeadersList] = new HeadersList() + + // The new Headers(init) constructor steps are: + + // 1. Set this’s guard to "none". + this[kGuard] = 'none' + + // 2. If init is given, then fill this with init. + if (init !== undefined) { + init = webidl.converters.HeadersInit(init) + fill(this, init) + } + } + + // https://fetch.spec.whatwg.org/#dom-headers-append + append (name, value) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' }) + + name = webidl.converters.ByteString(name) + value = webidl.converters.ByteString(value) + + return appendHeader(this, name, value) + } + + // https://fetch.spec.whatwg.org/#dom-headers-delete + delete (name) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' }) + + name = webidl.converters.ByteString(name) + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.delete', + value: name, + type: 'header name' + }) + } + + // 2. If this’s guard is "immutable", then throw a TypeError. + // 3. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 4. Otherwise, if this’s guard is "request-no-cors", name + // is not a no-CORS-safelisted request-header name, and + // name is not a privileged no-CORS request-header name, + // return. + // 5. Otherwise, if this’s guard is "response" and name is + // a forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (this[kGuard] === 'request-no-cors') { + // TODO + } + + // 6. If this’s header list does not contain name, then + // return. + if (!this[kHeadersList].contains(name)) { + return + } + + // 7. Delete name from this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this. + this[kHeadersList].delete(name) + } + + // https://fetch.spec.whatwg.org/#dom-headers-get + get (name) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' }) + + name = webidl.converters.ByteString(name) + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.get', + value: name, + type: 'header name' + }) + } + + // 2. Return the result of getting name from this’s header + // list. + return this[kHeadersList].get(name) + } + + // https://fetch.spec.whatwg.org/#dom-headers-has + has (name) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' }) + + name = webidl.converters.ByteString(name) + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.has', + value: name, + type: 'header name' + }) + } + + // 2. Return true if this’s header list contains name; + // otherwise false. + return this[kHeadersList].contains(name) + } + + // https://fetch.spec.whatwg.org/#dom-headers-set + set (name, value) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' }) + + name = webidl.converters.ByteString(name) + value = webidl.converters.ByteString(value) + + // 1. Normalize value. + value = headerValueNormalize(value) + + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.set', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.set', + value, + type: 'header value' + }) + } + + // 3. If this’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 5. Otherwise, if this’s guard is "request-no-cors" and + // name/value is not a no-CORS-safelisted request-header, + // return. + // 6. Otherwise, if this’s guard is "response" and name is a + // forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (this[kGuard] === 'request-no-cors') { + // TODO + } + + // 7. Set (name, value) in this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this + this[kHeadersList].set(name, value) + } + + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie () { + webidl.brandCheck(this, Headers) + + // 1. If this’s header list does not contain `Set-Cookie`, then return « ». + // 2. Return the values of all headers in this’s header list whose name is + // a byte-case-insensitive match for `Set-Cookie`, in order. + + const list = this[kHeadersList].cookies + + if (list) { + return [...list] + } + + return [] + } + + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + get [kHeadersSortedMap] () { + if (this[kHeadersList][kHeadersSortedMap]) { + return this[kHeadersList][kHeadersSortedMap] + } + + // 1. Let headers be an empty list of headers with the key being the name + // and value the value. + const headers = [] + + // 2. Let names be the result of convert header names to a sorted-lowercase + // set with all the names of the headers in list. + const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1) + const cookies = this[kHeadersList].cookies + + // 3. For each name of names: + for (let i = 0; i < names.length; ++i) { + const [name, value] = names[i] + // 1. If name is `set-cookie`, then: + if (name === 'set-cookie') { + // 1. Let values be a list of all values of headers in list whose name + // is a byte-case-insensitive match for name, in order. + + // 2. For each value of values: + // 1. Append (name, value) to headers. + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]) + } + } else { + // 2. Otherwise: + + // 1. Let value be the result of getting name from list. + + // 2. Assert: value is non-null. + assert(value !== null) + + // 3. Append (name, value) to headers. + headers.push([name, value]) + } + } + + this[kHeadersList][kHeadersSortedMap] = headers + + // 4. Return headers. + return headers + } + + keys () { + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key') + } + + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key' + ) + } + + values () { + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'value') + } + + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'value' + ) + } + + entries () { + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key+value') + } + + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key+value' + ) + } + + /** + * @param {(value: string, key: string, self: Headers) => void} callbackFn + * @param {unknown} thisArg + */ + forEach (callbackFn, thisArg = globalThis) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' }) + + if (typeof callbackFn !== 'function') { + throw new TypeError( + "Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'." + ) + } + + for (const [key, value] of this) { + callbackFn.apply(thisArg, [value, key, this]) + } + } + + [Symbol.for('nodejs.util.inspect.custom')] () { + webidl.brandCheck(this, Headers) + + return this[kHeadersList] + } +} + +Headers.prototype[Symbol.iterator] = Headers.prototype.entries + +Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + keys: kEnumerableProperty, + values: kEnumerableProperty, + entries: kEnumerableProperty, + forEach: kEnumerableProperty, + [Symbol.iterator]: { enumerable: false }, + [Symbol.toStringTag]: { + value: 'Headers', + configurable: true + } +}) + +webidl.converters.HeadersInit = function (V) { + if (webidl.util.Type(V) === 'Object') { + if (V[Symbol.iterator]) { + return webidl.converters['sequence>'](V) + } + + return webidl.converters['record'](V) + } + + throw webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: ['sequence>', 'record'] + }) +} + +module.exports = { + fill, + Headers, + HeadersList +} + + +/***/ }), + +/***/ 4881: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// https://github.com/Ethan-Arrowood/undici-fetch + + + +const { + Response, + makeNetworkError, + makeAppropriateNetworkError, + filterResponse, + makeResponse +} = __nccwpck_require__(7823) +const { Headers } = __nccwpck_require__(554) +const { Request, makeRequest } = __nccwpck_require__(8359) +const zlib = __nccwpck_require__(9796) +const { + bytesMatch, + makePolicyContainer, + clonePolicyContainer, + requestBadPort, + TAOCheck, + appendRequestOriginHeader, + responseLocationURL, + requestCurrentURL, + setRequestReferrerPolicyOnRedirect, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + createOpaqueTimingInfo, + appendFetchMetadata, + corsCheck, + crossOriginResourcePolicyCheck, + determineRequestsReferrer, + coarsenedSharedCurrentTime, + createDeferredPromise, + isBlobLike, + sameOrigin, + isCancelled, + isAborted, + isErrorLike, + fullyReadBody, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlIsHttpHttpsScheme, + urlHasHttpsScheme +} = __nccwpck_require__(2538) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(5861) +const assert = __nccwpck_require__(9491) +const { safelyExtractBody } = __nccwpck_require__(1472) +const { + redirectStatusSet, + nullBodyStatus, + safeMethodsSet, + requestBodyHeader, + subresourceSet, + DOMException +} = __nccwpck_require__(1037) +const { kHeadersList } = __nccwpck_require__(2785) +const EE = __nccwpck_require__(2361) +const { Readable, pipeline } = __nccwpck_require__(2781) +const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = __nccwpck_require__(3983) +const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(685) +const { TransformStream } = __nccwpck_require__(5356) +const { getGlobalDispatcher } = __nccwpck_require__(1892) +const { webidl } = __nccwpck_require__(1744) +const { STATUS_CODES } = __nccwpck_require__(3685) +const GET_OR_HEAD = ['GET', 'HEAD'] + +/** @type {import('buffer').resolveObjectURL} */ +let resolveObjectURL +let ReadableStream = globalThis.ReadableStream + +class Fetch extends EE { + constructor (dispatcher) { + super() + + this.dispatcher = dispatcher + this.connection = null + this.dump = false + this.state = 'ongoing' + // 2 terminated listeners get added per request, + // but only 1 gets removed. If there are 20 redirects, + // 21 listeners will be added. + // See https://github.com/nodejs/undici/issues/1711 + // TODO (fix): Find and fix root cause for leaked listener. + this.setMaxListeners(21) + } + + terminate (reason) { + if (this.state !== 'ongoing') { + return + } + + this.state = 'terminated' + this.connection?.destroy(reason) + this.emit('terminated', reason) + } + + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort (error) { + if (this.state !== 'ongoing') { + return + } + + // 1. Set controller’s state to "aborted". + this.state = 'aborted' + + // 2. Let fallbackError be an "AbortError" DOMException. + // 3. Set error to fallbackError if it is not given. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } + + // 4. Let serializedError be StructuredSerialize(error). + // If that threw an exception, catch it, and let + // serializedError be StructuredSerialize(fallbackError). + + // 5. Set controller’s serialized abort reason to serializedError. + this.serializedAbortReason = error + + this.connection?.destroy(error) + this.emit('terminated', error) + } +} + +// https://fetch.spec.whatwg.org/#fetch-method +function fetch (input, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) + + // 1. Let p be a new promise. + const p = createDeferredPromise() + + // 2. Let requestObject be the result of invoking the initial value of + // Request as constructor with input and init as arguments. If this throws + // an exception, reject p with it and return p. + let requestObject + + try { + requestObject = new Request(input, init) + } catch (e) { + p.reject(e) + return p.promise + } + + // 3. Let request be requestObject’s request. + const request = requestObject[kState] + + // 4. If requestObject’s signal’s aborted flag is set, then: + if (requestObject.signal.aborted) { + // 1. Abort the fetch() call with p, request, null, and + // requestObject’s signal’s abort reason. + abortFetch(p, request, null, requestObject.signal.reason) + + // 2. Return p. + return p.promise + } + + // 5. Let globalObject be request’s client’s global object. + const globalObject = request.client.globalObject + + // 6. If globalObject is a ServiceWorkerGlobalScope object, then set + // request’s service-workers mode to "none". + if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { + request.serviceWorkers = 'none' + } + + // 7. Let responseObject be null. + let responseObject = null + + // 8. Let relevantRealm be this’s relevant Realm. + const relevantRealm = null + + // 9. Let locallyAborted be false. + let locallyAborted = false + + // 10. Let controller be null. + let controller = null + + // 11. Add the following abort steps to requestObject’s signal: + addAbortListener( + requestObject.signal, + () => { + // 1. Set locallyAborted to true. + locallyAborted = true + + // 2. Assert: controller is non-null. + assert(controller != null) + + // 3. Abort controller with requestObject’s signal’s abort reason. + controller.abort(requestObject.signal.reason) + + // 4. Abort the fetch() call with p, request, responseObject, + // and requestObject’s signal’s abort reason. + abortFetch(p, request, responseObject, requestObject.signal.reason) + } + ) + + // 12. Let handleFetchDone given response response be to finalize and + // report timing with response, globalObject, and "fetch". + const handleFetchDone = (response) => + finalizeAndReportTiming(response, 'fetch') + + // 13. Set controller to the result of calling fetch given request, + // with processResponseEndOfBody set to handleFetchDone, and processResponse + // given response being these substeps: + + const processResponse = (response) => { + // 1. If locallyAborted is true, terminate these substeps. + if (locallyAborted) { + return Promise.resolve() + } + + // 2. If response’s aborted flag is set, then: + if (response.aborted) { + // 1. Let deserializedError be the result of deserialize a serialized + // abort reason given controller’s serialized abort reason and + // relevantRealm. + + // 2. Abort the fetch() call with p, request, responseObject, and + // deserializedError. + + abortFetch(p, request, responseObject, controller.serializedAbortReason) + return Promise.resolve() + } + + // 3. If response is a network error, then reject p with a TypeError + // and terminate these substeps. + if (response.type === 'error') { + p.reject( + Object.assign(new TypeError('fetch failed'), { cause: response.error }) + ) + return Promise.resolve() + } + + // 4. Set responseObject to the result of creating a Response object, + // given response, "immutable", and relevantRealm. + responseObject = new Response() + responseObject[kState] = response + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + + // 5. Resolve p with responseObject. + p.resolve(responseObject) + } + + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici + }) + + // 14. Return p. + return p.promise +} + +// https://fetch.spec.whatwg.org/#finalize-and-report-timing +function finalizeAndReportTiming (response, initiatorType = 'other') { + // 1. If response is an aborted network error, then return. + if (response.type === 'error' && response.aborted) { + return + } + + // 2. If response’s URL list is null or empty, then return. + if (!response.urlList?.length) { + return + } + + // 3. Let originalURL be response’s URL list[0]. + const originalURL = response.urlList[0] + + // 4. Let timingInfo be response’s timing info. + let timingInfo = response.timingInfo + + // 5. Let cacheState be response’s cache state. + let cacheState = response.cacheState + + // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. + if (!urlIsHttpHttpsScheme(originalURL)) { + return + } + + // 7. If timingInfo is null, then return. + if (timingInfo === null) { + return + } + + // 8. If response’s timing allow passed flag is not set, then: + if (!response.timingAllowPassed) { + // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. + timingInfo = createOpaqueTimingInfo({ + startTime: timingInfo.startTime + }) + + // 2. Set cacheState to the empty string. + cacheState = '' + } + + // 9. Set timingInfo’s end time to the coarsened shared current time + // given global’s relevant settings object’s cross-origin isolated + // capability. + // TODO: given global’s relevant settings object’s cross-origin isolated + // capability? + timingInfo.endTime = coarsenedSharedCurrentTime() + + // 10. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo + + // 11. Mark resource timing for timingInfo, originalURL, initiatorType, + // global, and cacheState. + markResourceTiming( + timingInfo, + originalURL, + initiatorType, + globalThis, + cacheState + ) +} + +// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing +function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) { + if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) { + performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState) + } +} + +// https://fetch.spec.whatwg.org/#abort-fetch +function abortFetch (p, request, responseObject, error) { + // Note: AbortSignal.reason was added in node v17.2.0 + // which would give us an undefined error to reject with. + // Remove this once node v16 is no longer supported. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } + + // 1. Reject promise with error. + p.reject(error) + + // 2. If request’s body is not null and is readable, then cancel request’s + // body with error. + if (request.body != null && isReadable(request.body?.stream)) { + request.body.stream.cancel(error).catch((err) => { + if (err.code === 'ERR_INVALID_STATE') { + // Node bug? + return + } + throw err + }) + } + + // 3. If responseObject is null, then return. + if (responseObject == null) { + return + } + + // 4. Let response be responseObject’s response. + const response = responseObject[kState] + + // 5. If response’s body is not null and is readable, then error response’s + // body with error. + if (response.body != null && isReadable(response.body?.stream)) { + response.body.stream.cancel(error).catch((err) => { + if (err.code === 'ERR_INVALID_STATE') { + // Node bug? + return + } + throw err + }) + } +} + +// https://fetch.spec.whatwg.org/#fetching +function fetching ({ + request, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseEndOfBody, + processResponseConsumeBody, + useParallelQueue = false, + dispatcher // undici +}) { + // 1. Let taskDestination be null. + let taskDestination = null + + // 2. Let crossOriginIsolatedCapability be false. + let crossOriginIsolatedCapability = false + + // 3. If request’s client is non-null, then: + if (request.client != null) { + // 1. Set taskDestination to request’s client’s global object. + taskDestination = request.client.globalObject + + // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin + // isolated capability. + crossOriginIsolatedCapability = + request.client.crossOriginIsolatedCapability + } + + // 4. If useParallelQueue is true, then set taskDestination to the result of + // starting a new parallel queue. + // TODO + + // 5. Let timingInfo be a new fetch timing info whose start time and + // post-redirect start time are the coarsened shared current time given + // crossOriginIsolatedCapability. + const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) + const timingInfo = createOpaqueTimingInfo({ + startTime: currenTime + }) + + // 6. Let fetchParams be a new fetch params whose + // request is request, + // timing info is timingInfo, + // process request body chunk length is processRequestBodyChunkLength, + // process request end-of-body is processRequestEndOfBody, + // process response is processResponse, + // process response consume body is processResponseConsumeBody, + // process response end-of-body is processResponseEndOfBody, + // task destination is taskDestination, + // and cross-origin isolated capability is crossOriginIsolatedCapability. + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + } + + // 7. If request’s body is a byte sequence, then set request’s body to + // request’s body as a body. + // NOTE: Since fetching is only called from fetch, body should already be + // extracted. + assert(!request.body || request.body.stream) + + // 8. If request’s window is "client", then set request’s window to request’s + // client, if request’s client’s global object is a Window object; otherwise + // "no-window". + if (request.window === 'client') { + // TODO: What if request.client is null? + request.window = + request.client?.globalObject?.constructor?.name === 'Window' + ? request.client + : 'no-window' + } + + // 9. If request’s origin is "client", then set request’s origin to request’s + // client’s origin. + if (request.origin === 'client') { + // TODO: What if request.client is null? + request.origin = request.client?.origin + } + + // 10. If all of the following conditions are true: + // TODO + + // 11. If request’s policy container is "client", then: + if (request.policyContainer === 'client') { + // 1. If request’s client is non-null, then set request’s policy + // container to a clone of request’s client’s policy container. [HTML] + if (request.client != null) { + request.policyContainer = clonePolicyContainer( + request.client.policyContainer + ) + } else { + // 2. Otherwise, set request’s policy container to a new policy + // container. + request.policyContainer = makePolicyContainer() + } + } + + // 12. If request’s header list does not contain `Accept`, then: + if (!request.headersList.contains('accept')) { + // 1. Let value be `*/*`. + const value = '*/*' + + // 2. A user agent should set value to the first matching statement, if + // any, switching on request’s destination: + // "document" + // "frame" + // "iframe" + // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` + // "image" + // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` + // "style" + // `text/css,*/*;q=0.1` + // TODO + + // 3. Append `Accept`/value to request’s header list. + request.headersList.append('accept', value) + } + + // 13. If request’s header list does not contain `Accept-Language`, then + // user agents should append `Accept-Language`/an appropriate value to + // request’s header list. + if (!request.headersList.contains('accept-language')) { + request.headersList.append('accept-language', '*') + } + + // 14. If request’s priority is null, then use request’s initiator and + // destination appropriately in setting request’s priority to a + // user-agent-defined object. + if (request.priority === null) { + // TODO + } + + // 15. If request is a subresource request, then: + if (subresourceSet.has(request.destination)) { + // TODO + } + + // 16. Run main fetch given fetchParams. + mainFetch(fetchParams) + .catch(err => { + fetchParams.controller.terminate(err) + }) + + // 17. Return fetchParam's controller + return fetchParams.controller +} + +// https://fetch.spec.whatwg.org/#concept-main-fetch +async function mainFetch (fetchParams, recursive = false) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let response be null. + let response = null + + // 3. If request’s local-URLs-only flag is set and request’s current URL is + // not local, then set response to a network error. + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { + response = makeNetworkError('local URLs only') + } + + // 4. Run report Content Security Policy violations for request. + // TODO + + // 5. Upgrade request to a potentially trustworthy URL, if appropriate. + tryUpgradeRequestToAPotentiallyTrustworthyURL(request) + + // 6. If should request be blocked due to a bad port, should fetching request + // be blocked as mixed content, or should request be blocked by Content + // Security Policy returns blocked, then set response to a network error. + if (requestBadPort(request) === 'blocked') { + response = makeNetworkError('bad port') + } + // TODO: should fetching request be blocked as mixed content? + // TODO: should request be blocked by Content Security Policy? + + // 7. If request’s referrer policy is the empty string, then set request’s + // referrer policy to request’s policy container’s referrer policy. + if (request.referrerPolicy === '') { + request.referrerPolicy = request.policyContainer.referrerPolicy + } + + // 8. If request’s referrer is not "no-referrer", then set request’s + // referrer to the result of invoking determine request’s referrer. + if (request.referrer !== 'no-referrer') { + request.referrer = determineRequestsReferrer(request) + } + + // 9. Set request’s current URL’s scheme to "https" if all of the following + // conditions are true: + // - request’s current URL’s scheme is "http" + // - request’s current URL’s host is a domain + // - Matching request’s current URL’s host per Known HSTS Host Domain Name + // Matching results in either a superdomain match with an asserted + // includeSubDomains directive or a congruent match (with or without an + // asserted includeSubDomains directive). [HSTS] + // TODO + + // 10. If recursive is false, then run the remaining steps in parallel. + // TODO + + // 11. If response is null, then set response to the result of running + // the steps corresponding to the first matching statement: + if (response === null) { + response = await (async () => { + const currentURL = requestCurrentURL(request) + + if ( + // - request’s current URL’s origin is same origin with request’s origin, + // and request’s response tainting is "basic" + (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || + // request’s current URL’s scheme is "data" + (currentURL.protocol === 'data:') || + // - request’s mode is "navigate" or "websocket" + (request.mode === 'navigate' || request.mode === 'websocket') + ) { + // 1. Set request’s response tainting to "basic". + request.responseTainting = 'basic' + + // 2. Return the result of running scheme fetch given fetchParams. + return await schemeFetch(fetchParams) + } + + // request’s mode is "same-origin" + if (request.mode === 'same-origin') { + // 1. Return a network error. + return makeNetworkError('request mode cannot be "same-origin"') + } + + // request’s mode is "no-cors" + if (request.mode === 'no-cors') { + // 1. If request’s redirect mode is not "follow", then return a network + // error. + if (request.redirect !== 'follow') { + return makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request' + ) + } + + // 2. Set request’s response tainting to "opaque". + request.responseTainting = 'opaque' + + // 3. Return the result of running scheme fetch given fetchParams. + return await schemeFetch(fetchParams) + } + + // request’s current URL’s scheme is not an HTTP(S) scheme + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { + // Return a network error. + return makeNetworkError('URL scheme must be a HTTP(S) scheme') + } + + // - request’s use-CORS-preflight flag is set + // - request’s unsafe-request flag is set and either request’s method is + // not a CORS-safelisted method or CORS-unsafe request-header names with + // request’s header list is not empty + // 1. Set request’s response tainting to "cors". + // 2. Let corsWithPreflightResponse be the result of running HTTP fetch + // given fetchParams and true. + // 3. If corsWithPreflightResponse is a network error, then clear cache + // entries using request. + // 4. Return corsWithPreflightResponse. + // TODO + + // Otherwise + // 1. Set request’s response tainting to "cors". + request.responseTainting = 'cors' + + // 2. Return the result of running HTTP fetch given fetchParams. + return await httpFetch(fetchParams) + })() + } + + // 12. If recursive is true, then return response. + if (recursive) { + return response + } + + // 13. If response is not a network error and response is not a filtered + // response, then: + if (response.status !== 0 && !response.internalResponse) { + // If request’s response tainting is "cors", then: + if (request.responseTainting === 'cors') { + // 1. Let headerNames be the result of extracting header list values + // given `Access-Control-Expose-Headers` and response’s header list. + // TODO + // 2. If request’s credentials mode is not "include" and headerNames + // contains `*`, then set response’s CORS-exposed header-name list to + // all unique header names in response’s header list. + // TODO + // 3. Otherwise, if headerNames is not null or failure, then set + // response’s CORS-exposed header-name list to headerNames. + // TODO + } + + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (request.responseTainting === 'basic') { + response = filterResponse(response, 'basic') + } else if (request.responseTainting === 'cors') { + response = filterResponse(response, 'cors') + } else if (request.responseTainting === 'opaque') { + response = filterResponse(response, 'opaque') + } else { + assert(false) + } + } + + // 14. Let internalResponse be response, if response is a network error, + // and response’s internal response otherwise. + let internalResponse = + response.status === 0 ? response : response.internalResponse + + // 15. If internalResponse’s URL list is empty, then set it to a clone of + // request’s URL list. + if (internalResponse.urlList.length === 0) { + internalResponse.urlList.push(...request.urlList) + } + + // 16. If request’s timing allow failed flag is unset, then set + // internalResponse’s timing allow passed flag. + if (!request.timingAllowFailed) { + response.timingAllowPassed = true + } + + // 17. If response is not a network error and any of the following returns + // blocked + // - should internalResponse to request be blocked as mixed content + // - should internalResponse to request be blocked by Content Security Policy + // - should internalResponse to request be blocked due to its MIME type + // - should internalResponse to request be blocked due to nosniff + // TODO + + // 18. If response’s type is "opaque", internalResponse’s status is 206, + // internalResponse’s range-requested flag is set, and request’s header + // list does not contain `Range`, then set response and internalResponse + // to a network error. + if ( + response.type === 'opaque' && + internalResponse.status === 206 && + internalResponse.rangeRequested && + !request.headers.contains('range') + ) { + response = internalResponse = makeNetworkError() + } + + // 19. If response is not a network error and either request’s method is + // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, + // set internalResponse’s body to null and disregard any enqueuing toward + // it (if any). + if ( + response.status !== 0 && + (request.method === 'HEAD' || + request.method === 'CONNECT' || + nullBodyStatus.includes(internalResponse.status)) + ) { + internalResponse.body = null + fetchParams.controller.dump = true + } + + // 20. If request’s integrity metadata is not the empty string, then: + if (request.integrity) { + // 1. Let processBodyError be this step: run fetch finale given fetchParams + // and a network error. + const processBodyError = (reason) => + fetchFinale(fetchParams, makeNetworkError(reason)) + + // 2. If request’s response tainting is "opaque", or response’s body is null, + // then run processBodyError and abort these steps. + if (request.responseTainting === 'opaque' || response.body == null) { + processBodyError(response.error) + return + } + + // 3. Let processBody given bytes be these steps: + const processBody = (bytes) => { + // 1. If bytes do not match request’s integrity metadata, + // then run processBodyError and abort these steps. [SRI] + if (!bytesMatch(bytes, request.integrity)) { + processBodyError('integrity mismatch') + return + } + + // 2. Set response’s body to bytes as a body. + response.body = safelyExtractBody(bytes)[0] + + // 3. Run fetch finale given fetchParams and response. + fetchFinale(fetchParams, response) + } + + // 4. Fully read response’s body given processBody and processBodyError. + await fullyReadBody(response.body, processBody, processBodyError) + } else { + // 21. Otherwise, run fetch finale given fetchParams and response. + fetchFinale(fetchParams, response) + } +} + +// https://fetch.spec.whatwg.org/#concept-scheme-fetch +// given a fetch params fetchParams +function schemeFetch (fetchParams) { + // Note: since the connection is destroyed on redirect, which sets fetchParams to a + // cancelled state, we do not want this condition to trigger *unless* there have been + // no redirects. See https://github.com/nodejs/undici/issues/1776 + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { + return Promise.resolve(makeAppropriateNetworkError(fetchParams)) + } + + // 2. Let request be fetchParams’s request. + const { request } = fetchParams + + const { protocol: scheme } = requestCurrentURL(request) + + // 3. Switch on request’s current URL’s scheme and run the associated steps: + switch (scheme) { + case 'about:': { + // If request’s current URL’s path is the string "blank", then return a new response + // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », + // and body is the empty byte sequence as a body. + + // Otherwise, return a network error. + return Promise.resolve(makeNetworkError('about scheme is not supported')) + } + case 'blob:': { + if (!resolveObjectURL) { + resolveObjectURL = (__nccwpck_require__(4300).resolveObjectURL) + } + + // 1. Let blobURLEntry be request’s current URL’s blob URL entry. + const blobURLEntry = requestCurrentURL(request) + + // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 + // Buffer.resolveObjectURL does not ignore URL queries. + if (blobURLEntry.search.length !== 0) { + return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) + } + + const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()) + + // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s + // object is not a Blob object, then return a network error. + if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) { + return Promise.resolve(makeNetworkError('invalid method')) + } + + // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. + const bodyWithType = safelyExtractBody(blobURLEntryObject) + + // 4. Let body be bodyWithType’s body. + const body = bodyWithType[0] + + // 5. Let length be body’s length, serialized and isomorphic encoded. + const length = isomorphicEncode(`${body.length}`) + + // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence. + const type = bodyWithType[1] ?? '' + + // 7. Return a new response whose status message is `OK`, header list is + // « (`Content-Length`, length), (`Content-Type`, type) », and body is body. + const response = makeResponse({ + statusText: 'OK', + headersList: [ + ['content-length', { name: 'Content-Length', value: length }], + ['content-type', { name: 'Content-Type', value: type }] + ] + }) + + response.body = body + + return Promise.resolve(response) + } + case 'data:': { + // 1. Let dataURLStruct be the result of running the + // data: URL processor on request’s current URL. + const currentURL = requestCurrentURL(request) + const dataURLStruct = dataURLProcessor(currentURL) + + // 2. If dataURLStruct is failure, then return a + // network error. + if (dataURLStruct === 'failure') { + return Promise.resolve(makeNetworkError('failed to fetch the data URL')) + } + + // 3. Let mimeType be dataURLStruct’s MIME type, serialized. + const mimeType = serializeAMimeType(dataURLStruct.mimeType) + + // 4. Return a response whose status message is `OK`, + // header list is « (`Content-Type`, mimeType) », + // and body is dataURLStruct’s body as a body. + return Promise.resolve(makeResponse({ + statusText: 'OK', + headersList: [ + ['content-type', { name: 'Content-Type', value: mimeType }] + ], + body: safelyExtractBody(dataURLStruct.body)[0] + })) + } + case 'file:': { + // For now, unfortunate as it is, file URLs are left as an exercise for the reader. + // When in doubt, return a network error. + return Promise.resolve(makeNetworkError('not implemented... yet...')) + } + case 'http:': + case 'https:': { + // Return the result of running HTTP fetch given fetchParams. + + return httpFetch(fetchParams) + .catch((err) => makeNetworkError(err)) + } + default: { + return Promise.resolve(makeNetworkError('unknown scheme')) + } + } +} + +// https://fetch.spec.whatwg.org/#finalize-response +function finalizeResponse (fetchParams, response) { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true + + // 2, If fetchParams’s process response done is not null, then queue a fetch + // task to run fetchParams’s process response done given response, with + // fetchParams’s task destination. + if (fetchParams.processResponseDone != null) { + queueMicrotask(() => fetchParams.processResponseDone(response)) + } +} + +// https://fetch.spec.whatwg.org/#fetch-finale +function fetchFinale (fetchParams, response) { + // 1. If response is a network error, then: + if (response.type === 'error') { + // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ». + response.urlList = [fetchParams.request.urlList[0]] + + // 2. Set response’s timing info to the result of creating an opaque timing + // info for fetchParams’s timing info. + response.timingInfo = createOpaqueTimingInfo({ + startTime: fetchParams.timingInfo.startTime + }) + } + + // 2. Let processResponseEndOfBody be the following steps: + const processResponseEndOfBody = () => { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true + + // If fetchParams’s process response end-of-body is not null, + // then queue a fetch task to run fetchParams’s process response + // end-of-body given response with fetchParams’s task destination. + if (fetchParams.processResponseEndOfBody != null) { + queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) + } + } + + // 3. If fetchParams’s process response is non-null, then queue a fetch task + // to run fetchParams’s process response given response, with fetchParams’s + // task destination. + if (fetchParams.processResponse != null) { + queueMicrotask(() => fetchParams.processResponse(response)) + } + + // 4. If response’s body is null, then run processResponseEndOfBody. + if (response.body == null) { + processResponseEndOfBody() + } else { + // 5. Otherwise: + + // 1. Let transformStream be a new a TransformStream. + + // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, + // enqueues chunk in transformStream. + const identityTransformAlgorithm = (chunk, controller) => { + controller.enqueue(chunk) + } + + // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm + // and flushAlgorithm set to processResponseEndOfBody. + const transformStream = new TransformStream({ + start () {}, + transform: identityTransformAlgorithm, + flush: processResponseEndOfBody + }, { + size () { + return 1 + } + }, { + size () { + return 1 + } + }) + + // 4. Set response’s body to the result of piping response’s body through transformStream. + response.body = { stream: response.body.stream.pipeThrough(transformStream) } + } + + // 6. If fetchParams’s process response consume body is non-null, then: + if (fetchParams.processResponseConsumeBody != null) { + // 1. Let processBody given nullOrBytes be this step: run fetchParams’s + // process response consume body given response and nullOrBytes. + const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes) + + // 2. Let processBodyError be this step: run fetchParams’s process + // response consume body given response and failure. + const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure) + + // 3. If response’s body is null, then queue a fetch task to run processBody + // given null, with fetchParams’s task destination. + if (response.body == null) { + queueMicrotask(() => processBody(null)) + } else { + // 4. Otherwise, fully read response’s body given processBody, processBodyError, + // and fetchParams’s task destination. + return fullyReadBody(response.body, processBody, processBodyError) + } + return Promise.resolve() + } +} + +// https://fetch.spec.whatwg.org/#http-fetch +async function httpFetch (fetchParams) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let response be null. + let response = null + + // 3. Let actualResponse be null. + let actualResponse = null + + // 4. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo + + // 5. If request’s service-workers mode is "all", then: + if (request.serviceWorkers === 'all') { + // TODO + } + + // 6. If response is null, then: + if (response === null) { + // 1. If makeCORSPreflight is true and one of these conditions is true: + // TODO + + // 2. If request’s redirect mode is "follow", then set request’s + // service-workers mode to "none". + if (request.redirect === 'follow') { + request.serviceWorkers = 'none' + } + + // 3. Set response and actualResponse to the result of running + // HTTP-network-or-cache fetch given fetchParams. + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) + + // 4. If request’s response tainting is "cors" and a CORS check + // for request and response returns failure, then return a network error. + if ( + request.responseTainting === 'cors' && + corsCheck(request, response) === 'failure' + ) { + return makeNetworkError('cors failure') + } + + // 5. If the TAO check for request and response returns failure, then set + // request’s timing allow failed flag. + if (TAOCheck(request, response) === 'failure') { + request.timingAllowFailed = true + } + } + + // 7. If either request’s response tainting or response’s type + // is "opaque", and the cross-origin resource policy check with + // request’s origin, request’s client, request’s destination, + // and actualResponse returns blocked, then return a network error. + if ( + (request.responseTainting === 'opaque' || response.type === 'opaque') && + crossOriginResourcePolicyCheck( + request.origin, + request.client, + request.destination, + actualResponse + ) === 'blocked' + ) { + return makeNetworkError('blocked') + } + + // 8. If actualResponse’s status is a redirect status, then: + if (redirectStatusSet.has(actualResponse.status)) { + // 1. If actualResponse’s status is not 303, request’s body is not null, + // and the connection uses HTTP/2, then user agents may, and are even + // encouraged to, transmit an RST_STREAM frame. + // See, https://github.com/whatwg/fetch/issues/1288 + if (request.redirect !== 'manual') { + fetchParams.controller.connection.destroy() + } + + // 2. Switch on request’s redirect mode: + if (request.redirect === 'error') { + // Set response to a network error. + response = makeNetworkError('unexpected redirect') + } else if (request.redirect === 'manual') { + // Set response to an opaque-redirect filtered response whose internal + // response is actualResponse. + // NOTE(spec): On the web this would return an `opaqueredirect` response, + // but that doesn't make sense server side. + // See https://github.com/nodejs/undici/issues/1193. + response = actualResponse + } else if (request.redirect === 'follow') { + // Set response to the result of running HTTP-redirect fetch given + // fetchParams and response. + response = await httpRedirectFetch(fetchParams, response) + } else { + assert(false) + } + } + + // 9. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo + + // 10. Return response. + return response +} + +// https://fetch.spec.whatwg.org/#http-redirect-fetch +function httpRedirectFetch (fetchParams, response) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let actualResponse be response, if response is not a filtered response, + // and response’s internal response otherwise. + const actualResponse = response.internalResponse + ? response.internalResponse + : response + + // 3. Let locationURL be actualResponse’s location URL given request’s current + // URL’s fragment. + let locationURL + + try { + locationURL = responseLocationURL( + actualResponse, + requestCurrentURL(request).hash + ) + + // 4. If locationURL is null, then return response. + if (locationURL == null) { + return response + } + } catch (err) { + // 5. If locationURL is failure, then return a network error. + return Promise.resolve(makeNetworkError(err)) + } + + // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network + // error. + if (!urlIsHttpHttpsScheme(locationURL)) { + return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) + } + + // 7. If request’s redirect count is 20, then return a network error. + if (request.redirectCount === 20) { + return Promise.resolve(makeNetworkError('redirect count exceeded')) + } + + // 8. Increase request’s redirect count by 1. + request.redirectCount += 1 + + // 9. If request’s mode is "cors", locationURL includes credentials, and + // request’s origin is not same origin with locationURL’s origin, then return + // a network error. + if ( + request.mode === 'cors' && + (locationURL.username || locationURL.password) && + !sameOrigin(request, locationURL) + ) { + return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) + } + + // 10. If request’s response tainting is "cors" and locationURL includes + // credentials, then return a network error. + if ( + request.responseTainting === 'cors' && + (locationURL.username || locationURL.password) + ) { + return Promise.resolve(makeNetworkError( + 'URL cannot contain credentials for request mode "cors"' + )) + } + + // 11. If actualResponse’s status is not 303, request’s body is non-null, + // and request’s body’s source is null, then return a network error. + if ( + actualResponse.status !== 303 && + request.body != null && + request.body.source == null + ) { + return Promise.resolve(makeNetworkError()) + } + + // 12. If one of the following is true + // - actualResponse’s status is 301 or 302 and request’s method is `POST` + // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` + if ( + ([301, 302].includes(actualResponse.status) && request.method === 'POST') || + (actualResponse.status === 303 && + !GET_OR_HEAD.includes(request.method)) + ) { + // then: + // 1. Set request’s method to `GET` and request’s body to null. + request.method = 'GET' + request.body = null + + // 2. For each headerName of request-body-header name, delete headerName from + // request’s header list. + for (const headerName of requestBodyHeader) { + request.headersList.delete(headerName) + } + } + + // 13. If request’s current URL’s origin is not same origin with locationURL’s + // origin, then for each headerName of CORS non-wildcard request-header name, + // delete headerName from request’s header list. + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name + request.headersList.delete('authorization') + + // https://fetch.spec.whatwg.org/#authentication-entries + request.headersList.delete('proxy-authorization', true) + + // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. + request.headersList.delete('cookie') + request.headersList.delete('host') + } + + // 14. If request’s body is non-null, then set request’s body to the first return + // value of safely extracting request’s body’s source. + if (request.body != null) { + assert(request.body.source != null) + request.body = safelyExtractBody(request.body.source)[0] + } + + // 15. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo + + // 16. Set timingInfo’s redirect end time and post-redirect start time to the + // coarsened shared current time given fetchParams’s cross-origin isolated + // capability. + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = + coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) + + // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s + // redirect start time to timingInfo’s start time. + if (timingInfo.redirectStartTime === 0) { + timingInfo.redirectStartTime = timingInfo.startTime + } + + // 18. Append locationURL to request’s URL list. + request.urlList.push(locationURL) + + // 19. Invoke set request’s referrer policy on redirect on request and + // actualResponse. + setRequestReferrerPolicyOnRedirect(request, actualResponse) + + // 20. Return the result of running main fetch given fetchParams and true. + return mainFetch(fetchParams, true) +} + +// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch +async function httpNetworkOrCacheFetch ( + fetchParams, + isAuthenticationFetch = false, + isNewConnectionFetch = false +) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let httpFetchParams be null. + let httpFetchParams = null + + // 3. Let httpRequest be null. + let httpRequest = null + + // 4. Let response be null. + let response = null + + // 5. Let storedResponse be null. + // TODO: cache + + // 6. Let httpCache be null. + const httpCache = null + + // 7. Let the revalidatingFlag be unset. + const revalidatingFlag = false + + // 8. Run these steps, but abort when the ongoing fetch is terminated: + + // 1. If request’s window is "no-window" and request’s redirect mode is + // "error", then set httpFetchParams to fetchParams and httpRequest to + // request. + if (request.window === 'no-window' && request.redirect === 'error') { + httpFetchParams = fetchParams + httpRequest = request + } else { + // Otherwise: + + // 1. Set httpRequest to a clone of request. + httpRequest = makeRequest(request) + + // 2. Set httpFetchParams to a copy of fetchParams. + httpFetchParams = { ...fetchParams } + + // 3. Set httpFetchParams’s request to httpRequest. + httpFetchParams.request = httpRequest + } + + // 3. Let includeCredentials be true if one of + const includeCredentials = + request.credentials === 'include' || + (request.credentials === 'same-origin' && + request.responseTainting === 'basic') + + // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s + // body is non-null; otherwise null. + const contentLength = httpRequest.body ? httpRequest.body.length : null + + // 5. Let contentLengthHeaderValue be null. + let contentLengthHeaderValue = null + + // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or + // `PUT`, then set contentLengthHeaderValue to `0`. + if ( + httpRequest.body == null && + ['POST', 'PUT'].includes(httpRequest.method) + ) { + contentLengthHeaderValue = '0' + } + + // 7. If contentLength is non-null, then set contentLengthHeaderValue to + // contentLength, serialized and isomorphic encoded. + if (contentLength != null) { + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) + } + + // 8. If contentLengthHeaderValue is non-null, then append + // `Content-Length`/contentLengthHeaderValue to httpRequest’s header + // list. + if (contentLengthHeaderValue != null) { + httpRequest.headersList.append('content-length', contentLengthHeaderValue) + } + + // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, + // contentLengthHeaderValue) to httpRequest’s header list. + + // 10. If contentLength is non-null and httpRequest’s keepalive is true, + // then: + if (contentLength != null && httpRequest.keepalive) { + // NOTE: keepalive is a noop outside of browser context. + } + + // 11. If httpRequest’s referrer is a URL, then append + // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, + // to httpRequest’s header list. + if (httpRequest.referrer instanceof URL) { + httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href)) + } + + // 12. Append a request `Origin` header for httpRequest. + appendRequestOriginHeader(httpRequest) + + // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] + appendFetchMetadata(httpRequest) + + // 14. If httpRequest’s header list does not contain `User-Agent`, then + // user agents should append `User-Agent`/default `User-Agent` value to + // httpRequest’s header list. + if (!httpRequest.headersList.contains('user-agent')) { + httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node') + } + + // 15. If httpRequest’s cache mode is "default" and httpRequest’s header + // list contains `If-Modified-Since`, `If-None-Match`, + // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set + // httpRequest’s cache mode to "no-store". + if ( + httpRequest.cache === 'default' && + (httpRequest.headersList.contains('if-modified-since') || + httpRequest.headersList.contains('if-none-match') || + httpRequest.headersList.contains('if-unmodified-since') || + httpRequest.headersList.contains('if-match') || + httpRequest.headersList.contains('if-range')) + ) { + httpRequest.cache = 'no-store' + } + + // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent + // no-cache cache-control header modification flag is unset, and + // httpRequest’s header list does not contain `Cache-Control`, then append + // `Cache-Control`/`max-age=0` to httpRequest’s header list. + if ( + httpRequest.cache === 'no-cache' && + !httpRequest.preventNoCacheCacheControlHeaderModification && + !httpRequest.headersList.contains('cache-control') + ) { + httpRequest.headersList.append('cache-control', 'max-age=0') + } + + // 17. If httpRequest’s cache mode is "no-store" or "reload", then: + if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { + // 1. If httpRequest’s header list does not contain `Pragma`, then append + // `Pragma`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('pragma')) { + httpRequest.headersList.append('pragma', 'no-cache') + } + + // 2. If httpRequest’s header list does not contain `Cache-Control`, + // then append `Cache-Control`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('cache-control')) { + httpRequest.headersList.append('cache-control', 'no-cache') + } + } + + // 18. If httpRequest’s header list contains `Range`, then append + // `Accept-Encoding`/`identity` to httpRequest’s header list. + if (httpRequest.headersList.contains('range')) { + httpRequest.headersList.append('accept-encoding', 'identity') + } + + // 19. Modify httpRequest’s header list per HTTP. Do not append a given + // header if httpRequest’s header list contains that header’s name. + // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 + if (!httpRequest.headersList.contains('accept-encoding')) { + if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { + httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate') + } else { + httpRequest.headersList.append('accept-encoding', 'gzip, deflate') + } + } + + httpRequest.headersList.delete('host') + + // 20. If includeCredentials is true, then: + if (includeCredentials) { + // 1. If the user agent is not configured to block cookies for httpRequest + // (see section 7 of [COOKIES]), then: + // TODO: credentials + // 2. If httpRequest’s header list does not contain `Authorization`, then: + // TODO: credentials + } + + // 21. If there’s a proxy-authentication entry, use it as appropriate. + // TODO: proxy-authentication + + // 22. Set httpCache to the result of determining the HTTP cache + // partition, given httpRequest. + // TODO: cache + + // 23. If httpCache is null, then set httpRequest’s cache mode to + // "no-store". + if (httpCache == null) { + httpRequest.cache = 'no-store' + } + + // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", + // then: + if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') { + // TODO: cache + } + + // 9. If aborted, then return the appropriate network error for fetchParams. + // TODO + + // 10. If response is null, then: + if (response == null) { + // 1. If httpRequest’s cache mode is "only-if-cached", then return a + // network error. + if (httpRequest.mode === 'only-if-cached') { + return makeNetworkError('only if cached') + } + + // 2. Let forwardResponse be the result of running HTTP-network fetch + // given httpFetchParams, includeCredentials, and isNewConnectionFetch. + const forwardResponse = await httpNetworkFetch( + httpFetchParams, + includeCredentials, + isNewConnectionFetch + ) + + // 3. If httpRequest’s method is unsafe and forwardResponse’s status is + // in the range 200 to 399, inclusive, invalidate appropriate stored + // responses in httpCache, as per the "Invalidation" chapter of HTTP + // Caching, and set storedResponse to null. [HTTP-CACHING] + if ( + !safeMethodsSet.has(httpRequest.method) && + forwardResponse.status >= 200 && + forwardResponse.status <= 399 + ) { + // TODO: cache + } + + // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, + // then: + if (revalidatingFlag && forwardResponse.status === 304) { + // TODO: cache + } + + // 5. If response is null, then: + if (response == null) { + // 1. Set response to forwardResponse. + response = forwardResponse + + // 2. Store httpRequest and forwardResponse in httpCache, as per the + // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] + // TODO: cache + } + } + + // 11. Set response’s URL list to a clone of httpRequest’s URL list. + response.urlList = [...httpRequest.urlList] + + // 12. If httpRequest’s header list contains `Range`, then set response’s + // range-requested flag. + if (httpRequest.headersList.contains('range')) { + response.rangeRequested = true + } + + // 13. Set response’s request-includes-credentials to includeCredentials. + response.requestIncludesCredentials = includeCredentials + + // 14. If response’s status is 401, httpRequest’s response tainting is not + // "cors", includeCredentials is true, and request’s window is an environment + // settings object, then: + // TODO + + // 15. If response’s status is 407, then: + if (response.status === 407) { + // 1. If request’s window is "no-window", then return a network error. + if (request.window === 'no-window') { + return makeNetworkError() + } + + // 2. ??? + + // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams) + } + + // 4. Prompt the end user as appropriate in request’s window and store + // the result as a proxy-authentication entry. [HTTP-AUTH] + // TODO: Invoke some kind of callback? + + // 5. Set response to the result of running HTTP-network-or-cache fetch given + // fetchParams. + // TODO + return makeNetworkError('proxy authentication required') + } + + // 16. If all of the following are true + if ( + // response’s status is 421 + response.status === 421 && + // isNewConnectionFetch is false + !isNewConnectionFetch && + // request’s body is null, or request’s body is non-null and request’s body’s source is non-null + (request.body == null || request.body.source != null) + ) { + // then: + + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams) + } + + // 2. Set response to the result of running HTTP-network-or-cache + // fetch given fetchParams, isAuthenticationFetch, and true. + + // TODO (spec): The spec doesn't specify this but we need to cancel + // the active response before we can start a new one. + // https://github.com/whatwg/fetch/issues/1293 + fetchParams.controller.connection.destroy() + + response = await httpNetworkOrCacheFetch( + fetchParams, + isAuthenticationFetch, + true + ) + } + + // 17. If isAuthenticationFetch is true, then create an authentication entry + if (isAuthenticationFetch) { + // TODO + } + + // 18. Return response. + return response +} + +// https://fetch.spec.whatwg.org/#http-network-fetch +async function httpNetworkFetch ( + fetchParams, + includeCredentials = false, + forceNewConnection = false +) { + assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) + + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy (err) { + if (!this.destroyed) { + this.destroyed = true + this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) + } + } + } + + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let response be null. + let response = null + + // 3. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo + + // 4. Let httpCache be the result of determining the HTTP cache partition, + // given request. + // TODO: cache + const httpCache = null + + // 5. If httpCache is null, then set request’s cache mode to "no-store". + if (httpCache == null) { + request.cache = 'no-store' + } + + // 6. Let networkPartitionKey be the result of determining the network + // partition key given request. + // TODO + + // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise + // "no". + const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars + + // 8. Switch on request’s mode: + if (request.mode === 'websocket') { + // Let connection be the result of obtaining a WebSocket connection, + // given request’s current URL. + // TODO + } else { + // Let connection be the result of obtaining a connection, given + // networkPartitionKey, request’s current URL’s origin, + // includeCredentials, and forceNewConnection. + // TODO + } + + // 9. Run these steps, but abort when the ongoing fetch is terminated: + + // 1. If connection is failure, then return a network error. + + // 2. Set timingInfo’s final connection timing info to the result of + // calling clamp and coarsen connection timing info with connection’s + // timing info, timingInfo’s post-redirect start time, and fetchParams’s + // cross-origin isolated capability. + + // 3. If connection is not an HTTP/2 connection, request’s body is non-null, + // and request’s body’s source is null, then append (`Transfer-Encoding`, + // `chunked`) to request’s header list. + + // 4. Set timingInfo’s final network-request start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated + // capability. + + // 5. Set response to the result of making an HTTP request over connection + // using request with the following caveats: + + // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] + // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] + + // - If request’s body is non-null, and request’s body’s source is null, + // then the user agent may have a buffer of up to 64 kibibytes and store + // a part of request’s body in that buffer. If the user agent reads from + // request’s body beyond that buffer’s size and the user agent needs to + // resend request, then instead return a network error. + + // - Set timingInfo’s final network-response start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated capability, + // immediately after the user agent’s HTTP parser receives the first byte + // of the response (e.g., frame header bytes for HTTP/2 or response status + // line for HTTP/1.x). + + // - Wait until all the headers are transmitted. + + // - Any responses whose status is in the range 100 to 199, inclusive, + // and is not 101, are to be ignored, except for the purposes of setting + // timingInfo’s final network-response start time above. + + // - If request’s header list contains `Transfer-Encoding`/`chunked` and + // response is transferred via HTTP/1.0 or older, then return a network + // error. + + // - If the HTTP request results in a TLS client certificate dialog, then: + + // 1. If request’s window is an environment settings object, make the + // dialog available in request’s window. + + // 2. Otherwise, return a network error. + + // To transmit request’s body body, run these steps: + let requestBody = null + // 1. If body is null and fetchParams’s process request end-of-body is + // non-null, then queue a fetch task given fetchParams’s process request + // end-of-body and fetchParams’s task destination. + if (request.body == null && fetchParams.processRequestEndOfBody) { + queueMicrotask(() => fetchParams.processRequestEndOfBody()) + } else if (request.body != null) { + // 2. Otherwise, if body is non-null: + + // 1. Let processBodyChunk given bytes be these steps: + const processBodyChunk = async function * (bytes) { + // 1. If the ongoing fetch is terminated, then abort these steps. + if (isCancelled(fetchParams)) { + return + } + + // 2. Run this step in parallel: transmit bytes. + yield bytes + + // 3. If fetchParams’s process request body is non-null, then run + // fetchParams’s process request body given bytes’s length. + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) + } + + // 2. Let processEndOfBody be these steps: + const processEndOfBody = () => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return + } + + // 2. If fetchParams’s process request end-of-body is non-null, + // then run fetchParams’s process request end-of-body. + if (fetchParams.processRequestEndOfBody) { + fetchParams.processRequestEndOfBody() + } + } + + // 3. Let processBodyError given e be these steps: + const processBodyError = (e) => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return + } + + // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. + if (e.name === 'AbortError') { + fetchParams.controller.abort() + } else { + fetchParams.controller.terminate(e) + } + } + + // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, + // processBodyError, and fetchParams’s task destination. + requestBody = (async function * () { + try { + for await (const bytes of request.body.stream) { + yield * processBodyChunk(bytes) + } + processEndOfBody() + } catch (err) { + processBodyError(err) + } + })() + } + + try { + // socket is only provided for websockets + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) + + if (socket) { + response = makeResponse({ status, statusText, headersList, socket }) + } else { + const iterator = body[Symbol.asyncIterator]() + fetchParams.controller.next = () => iterator.next() + + response = makeResponse({ status, statusText, headersList }) + } + } catch (err) { + // 10. If aborted, then: + if (err.name === 'AbortError') { + // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. + fetchParams.controller.connection.destroy() + + // 2. Return the appropriate network error for fetchParams. + return makeAppropriateNetworkError(fetchParams, err) + } + + return makeNetworkError(err) + } + + // 11. Let pullAlgorithm be an action that resumes the ongoing fetch + // if it is suspended. + const pullAlgorithm = () => { + fetchParams.controller.resume() + } + + // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s + // controller with reason, given reason. + const cancelAlgorithm = (reason) => { + fetchParams.controller.abort(reason) + } + + // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by + // the user agent. + // TODO + + // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object + // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. + // TODO + + // 15. Let stream be a new ReadableStream. + // 16. Set up stream with pullAlgorithm set to pullAlgorithm, + // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to + // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(5356).ReadableStream) + } + + const stream = new ReadableStream( + { + async start (controller) { + fetchParams.controller.controller = controller + }, + async pull (controller) { + await pullAlgorithm(controller) + }, + async cancel (reason) { + await cancelAlgorithm(reason) + } + }, + { + highWaterMark: 0, + size () { + return 1 + } + } + ) + + // 17. Run these steps, but abort when the ongoing fetch is terminated: + + // 1. Set response’s body to a new body whose stream is stream. + response.body = { stream } + + // 2. If response is not a network error and request’s cache mode is + // not "no-store", then update response in httpCache for request. + // TODO + + // 3. If includeCredentials is true and the user agent is not configured + // to block cookies for request (see section 7 of [COOKIES]), then run the + // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on + // the value of each header whose name is a byte-case-insensitive match for + // `Set-Cookie` in response’s header list, if any, and request’s current URL. + // TODO + + // 18. If aborted, then: + // TODO + + // 19. Run these steps in parallel: + + // 1. Run these steps, but abort when fetchParams is canceled: + fetchParams.controller.on('terminated', onAborted) + fetchParams.controller.resume = async () => { + // 1. While true + while (true) { + // 1-3. See onData... + + // 4. Set bytes to the result of handling content codings given + // codings and bytes. + let bytes + let isFailure + try { + const { done, value } = await fetchParams.controller.next() + + if (isAborted(fetchParams)) { + break + } + + bytes = done ? undefined : value + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { + // zlib doesn't like empty streams. + bytes = undefined + } else { + bytes = err + + // err may be propagated from the result of calling readablestream.cancel, + // which might not be an error. https://github.com/nodejs/undici/issues/2009 + isFailure = true + } + } + + if (bytes === undefined) { + // 2. Otherwise, if the bytes transmission for response’s message + // body is done normally and stream is readable, then close + // stream, finalize response for fetchParams and response, and + // abort these in-parallel steps. + readableStreamClose(fetchParams.controller.controller) + + finalizeResponse(fetchParams, response) + + return + } + + // 5. Increase timingInfo’s decoded body size by bytes’s length. + timingInfo.decodedBodySize += bytes?.byteLength ?? 0 + + // 6. If bytes is failure, then terminate fetchParams’s controller. + if (isFailure) { + fetchParams.controller.terminate(bytes) + return + } + + // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes + // into stream. + fetchParams.controller.controller.enqueue(new Uint8Array(bytes)) + + // 8. If stream is errored, then terminate the ongoing fetch. + if (isErrored(stream)) { + fetchParams.controller.terminate() + return + } + + // 9. If stream doesn’t need more data ask the user agent to suspend + // the ongoing fetch. + if (!fetchParams.controller.controller.desiredSize) { + return + } + } + } + + // 2. If aborted, then: + function onAborted (reason) { + // 2. If fetchParams is aborted, then: + if (isAborted(fetchParams)) { + // 1. Set response’s aborted flag. + response.aborted = true + + // 2. If stream is readable, then error stream with the result of + // deserialize a serialized abort reason given fetchParams’s + // controller’s serialized abort reason and an + // implementation-defined realm. + if (isReadable(stream)) { + fetchParams.controller.controller.error( + fetchParams.controller.serializedAbortReason + ) + } + } else { + // 3. Otherwise, if stream is readable, error stream with a TypeError. + if (isReadable(stream)) { + fetchParams.controller.controller.error(new TypeError('terminated', { + cause: isErrorLike(reason) ? reason : undefined + })) + } + } + + // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. + // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. + fetchParams.controller.connection.destroy() + } + + // 20. Return response. + return response + + async function dispatch ({ body }) { + const url = requestCurrentURL(request) + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher + + return new Promise((resolve, reject) => agent.dispatch( + { + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === 'websocket' ? 'websocket' : undefined + }, + { + body: null, + abort: null, + + onConnect (abort) { + // TODO (fix): Do we need connection here? + const { connection } = fetchParams.controller + + if (connection.destroyed) { + abort(new DOMException('The operation was aborted.', 'AbortError')) + } else { + fetchParams.controller.on('terminated', abort) + this.abort = connection.abort = abort + } + }, + + onHeaders (status, headersList, resume, statusText) { + if (status < 200) { + return + } + + let codings = [] + let location = '' + + const headers = new Headers() + + // For H2, the headers are a plain JS object + // We distinguish between them and iterate accordingly + if (Array.isArray(headersList)) { + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString('latin1') + const val = headersList[n + 1].toString('latin1') + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()) + } else if (key.toLowerCase() === 'location') { + location = val + } + + headers[kHeadersList].append(key, val) + } + } else { + const keys = Object.keys(headersList) + for (const key of keys) { + const val = headersList[key] + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse() + } else if (key.toLowerCase() === 'location') { + location = val + } + + headers[kHeadersList].append(key, val) + } + } + + this.body = new Readable({ read: resume }) + + const decoders = [] + + const willFollow = request.redirect === 'follow' && + location && + redirectStatusSet.has(status) + + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding + if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { + for (const coding of codings) { + // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 + if (coding === 'x-gzip' || coding === 'gzip') { + decoders.push(zlib.createGunzip({ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })) + } else if (coding === 'deflate') { + decoders.push(zlib.createInflate()) + } else if (coding === 'br') { + decoders.push(zlib.createBrotliDecompress()) + } else { + decoders.length = 0 + break + } + } + } + + resolve({ + status, + statusText, + headersList: headers[kHeadersList], + body: decoders.length + ? pipeline(this.body, ...decoders, () => { }) + : this.body.on('error', () => {}) + }) + + return true + }, + + onData (chunk) { + if (fetchParams.controller.dump) { + return + } + + // 1. If one or more bytes have been transmitted from response’s + // message body, then: + + // 1. Let bytes be the transmitted bytes. + const bytes = chunk + + // 2. Let codings be the result of extracting header list values + // given `Content-Encoding` and response’s header list. + // See pullAlgorithm. + + // 3. Increase timingInfo’s encoded body size by bytes’s length. + timingInfo.encodedBodySize += bytes.byteLength + + // 4. See pullAlgorithm... + + return this.body.push(bytes) + }, + + onComplete () { + if (this.abort) { + fetchParams.controller.off('terminated', this.abort) + } + + fetchParams.controller.ended = true + + this.body.push(null) + }, + + onError (error) { + if (this.abort) { + fetchParams.controller.off('terminated', this.abort) + } + + this.body?.destroy(error) + + fetchParams.controller.terminate(error) + + reject(error) + }, + + onUpgrade (status, headersList, socket) { + if (status !== 101) { + return + } + + const headers = new Headers() + + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString('latin1') + const val = headersList[n + 1].toString('latin1') + + headers[kHeadersList].append(key, val) + } + + resolve({ + status, + statusText: STATUS_CODES[status], + headersList: headers[kHeadersList], + socket + }) + + return true + } + } + )) + } +} + +module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming +} + + +/***/ }), + +/***/ 8359: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/* globals AbortController */ + + + +const { extractBody, mixinBody, cloneBody } = __nccwpck_require__(1472) +const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(554) +const { FinalizationRegistry } = __nccwpck_require__(6436)() +const util = __nccwpck_require__(3983) +const { + isValidHTTPToken, + sameOrigin, + normalizeMethod, + makePolicyContainer, + normalizeMethodRecord +} = __nccwpck_require__(2538) +const { + forbiddenMethodsSet, + corsSafeListedMethodsSet, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + requestDuplex +} = __nccwpck_require__(1037) +const { kEnumerableProperty } = util +const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(5861) +const { webidl } = __nccwpck_require__(1744) +const { getGlobalOrigin } = __nccwpck_require__(1246) +const { URLSerializer } = __nccwpck_require__(685) +const { kHeadersList, kConstruct } = __nccwpck_require__(2785) +const assert = __nccwpck_require__(9491) +const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(2361) + +let TransformStream = globalThis.TransformStream + +const kAbortController = Symbol('abortController') + +const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener('abort', abort) +}) + +// https://fetch.spec.whatwg.org/#request-class +class Request { + // https://fetch.spec.whatwg.org/#dom-request + constructor (input, init = {}) { + if (input === kConstruct) { + return + } + + webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' }) + + input = webidl.converters.RequestInfo(input) + init = webidl.converters.RequestInit(init) + + // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object + this[kRealm] = { + settingsObject: { + baseUrl: getGlobalOrigin(), + get origin () { + return this.baseUrl?.origin + }, + policyContainer: makePolicyContainer() + } + } + + // 1. Let request be null. + let request = null + + // 2. Let fallbackMode be null. + let fallbackMode = null + + // 3. Let baseURL be this’s relevant settings object’s API base URL. + const baseUrl = this[kRealm].settingsObject.baseUrl + + // 4. Let signal be null. + let signal = null + + // 5. If input is a string, then: + if (typeof input === 'string') { + // 1. Let parsedURL be the result of parsing input with baseURL. + // 2. If parsedURL is failure, then throw a TypeError. + let parsedURL + try { + parsedURL = new URL(input, baseUrl) + } catch (err) { + throw new TypeError('Failed to parse URL from ' + input, { cause: err }) + } + + // 3. If parsedURL includes credentials, then throw a TypeError. + if (parsedURL.username || parsedURL.password) { + throw new TypeError( + 'Request cannot be constructed from a URL that includes credentials: ' + + input + ) + } + + // 4. Set request to a new request whose URL is parsedURL. + request = makeRequest({ urlList: [parsedURL] }) + + // 5. Set fallbackMode to "cors". + fallbackMode = 'cors' + } else { + // 6. Otherwise: + + // 7. Assert: input is a Request object. + assert(input instanceof Request) + + // 8. Set request to input’s request. + request = input[kState] + + // 9. Set signal to input’s signal. + signal = input[kSignal] + } + + // 7. Let origin be this’s relevant settings object’s origin. + const origin = this[kRealm].settingsObject.origin + + // 8. Let window be "client". + let window = 'client' + + // 9. If request’s window is an environment settings object and its origin + // is same origin with origin, then set window to request’s window. + if ( + request.window?.constructor?.name === 'EnvironmentSettingsObject' && + sameOrigin(request.window, origin) + ) { + window = request.window + } + + // 10. If init["window"] exists and is non-null, then throw a TypeError. + if (init.window != null) { + throw new TypeError(`'window' option '${window}' must be null`) + } + + // 11. If init["window"] exists, then set window to "no-window". + if ('window' in init) { + window = 'no-window' + } + + // 12. Set request to a new request with the following properties: + request = makeRequest({ + // URL request’s URL. + // undici implementation note: this is set as the first item in request's urlList in makeRequest + // method request’s method. + method: request.method, + // header list A copy of request’s header list. + // undici implementation note: headersList is cloned in makeRequest + headersList: request.headersList, + // unsafe-request flag Set. + unsafeRequest: request.unsafeRequest, + // client This’s relevant settings object. + client: this[kRealm].settingsObject, + // window window. + window, + // priority request’s priority. + priority: request.priority, + // origin request’s origin. The propagation of the origin is only significant for navigation requests + // being handled by a service worker. In this scenario a request can have an origin that is different + // from the current client. + origin: request.origin, + // referrer request’s referrer. + referrer: request.referrer, + // referrer policy request’s referrer policy. + referrerPolicy: request.referrerPolicy, + // mode request’s mode. + mode: request.mode, + // credentials mode request’s credentials mode. + credentials: request.credentials, + // cache mode request’s cache mode. + cache: request.cache, + // redirect mode request’s redirect mode. + redirect: request.redirect, + // integrity metadata request’s integrity metadata. + integrity: request.integrity, + // keepalive request’s keepalive. + keepalive: request.keepalive, + // reload-navigation flag request’s reload-navigation flag. + reloadNavigation: request.reloadNavigation, + // history-navigation flag request’s history-navigation flag. + historyNavigation: request.historyNavigation, + // URL list A clone of request’s URL list. + urlList: [...request.urlList] + }) + + const initHasKey = Object.keys(init).length !== 0 + + // 13. If init is not empty, then: + if (initHasKey) { + // 1. If request’s mode is "navigate", then set it to "same-origin". + if (request.mode === 'navigate') { + request.mode = 'same-origin' + } + + // 2. Unset request’s reload-navigation flag. + request.reloadNavigation = false + + // 3. Unset request’s history-navigation flag. + request.historyNavigation = false + + // 4. Set request’s origin to "client". + request.origin = 'client' + + // 5. Set request’s referrer to "client" + request.referrer = 'client' + + // 6. Set request’s referrer policy to the empty string. + request.referrerPolicy = '' + + // 7. Set request’s URL to request’s current URL. + request.url = request.urlList[request.urlList.length - 1] + + // 8. Set request’s URL list to « request’s URL ». + request.urlList = [request.url] + } + + // 14. If init["referrer"] exists, then: + if (init.referrer !== undefined) { + // 1. Let referrer be init["referrer"]. + const referrer = init.referrer + + // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". + if (referrer === '') { + request.referrer = 'no-referrer' + } else { + // 1. Let parsedReferrer be the result of parsing referrer with + // baseURL. + // 2. If parsedReferrer is failure, then throw a TypeError. + let parsedReferrer + try { + parsedReferrer = new URL(referrer, baseUrl) + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) + } + + // 3. If one of the following is true + // - parsedReferrer’s scheme is "about" and path is the string "client" + // - parsedReferrer’s origin is not same origin with origin + // then set request’s referrer to "client". + if ( + (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || + (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) + ) { + request.referrer = 'client' + } else { + // 4. Otherwise, set request’s referrer to parsedReferrer. + request.referrer = parsedReferrer + } + } + } + + // 15. If init["referrerPolicy"] exists, then set request’s referrer policy + // to it. + if (init.referrerPolicy !== undefined) { + request.referrerPolicy = init.referrerPolicy + } + + // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. + let mode + if (init.mode !== undefined) { + mode = init.mode + } else { + mode = fallbackMode + } + + // 17. If mode is "navigate", then throw a TypeError. + if (mode === 'navigate') { + throw webidl.errors.exception({ + header: 'Request constructor', + message: 'invalid request mode navigate.' + }) + } + + // 18. If mode is non-null, set request’s mode to mode. + if (mode != null) { + request.mode = mode + } + + // 19. If init["credentials"] exists, then set request’s credentials mode + // to it. + if (init.credentials !== undefined) { + request.credentials = init.credentials + } + + // 18. If init["cache"] exists, then set request’s cache mode to it. + if (init.cache !== undefined) { + request.cache = init.cache + } + + // 21. If request’s cache mode is "only-if-cached" and request’s mode is + // not "same-origin", then throw a TypeError. + if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { + throw new TypeError( + "'only-if-cached' can be set only with 'same-origin' mode" + ) + } + + // 22. If init["redirect"] exists, then set request’s redirect mode to it. + if (init.redirect !== undefined) { + request.redirect = init.redirect + } + + // 23. If init["integrity"] exists, then set request’s integrity metadata to it. + if (init.integrity != null) { + request.integrity = String(init.integrity) + } + + // 24. If init["keepalive"] exists, then set request’s keepalive to it. + if (init.keepalive !== undefined) { + request.keepalive = Boolean(init.keepalive) + } + + // 25. If init["method"] exists, then: + if (init.method !== undefined) { + // 1. Let method be init["method"]. + let method = init.method + + // 2. If method is not a method or method is a forbidden method, then + // throw a TypeError. + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`) + } + + if (forbiddenMethodsSet.has(method.toUpperCase())) { + throw new TypeError(`'${method}' HTTP method is unsupported.`) + } + + // 3. Normalize method. + method = normalizeMethodRecord[method] ?? normalizeMethod(method) + + // 4. Set request’s method to method. + request.method = method + } + + // 26. If init["signal"] exists, then set signal to it. + if (init.signal !== undefined) { + signal = init.signal + } + + // 27. Set this’s request to request. + this[kState] = request + + // 28. Set this’s signal to a new AbortSignal object with this’s relevant + // Realm. + // TODO: could this be simplified with AbortSignal.any + // (https://dom.spec.whatwg.org/#dom-abortsignal-any) + const ac = new AbortController() + this[kSignal] = ac.signal + this[kSignal][kRealm] = this[kRealm] + + // 29. If signal is not null, then make this’s signal follow signal. + if (signal != null) { + if ( + !signal || + typeof signal.aborted !== 'boolean' || + typeof signal.addEventListener !== 'function' + ) { + throw new TypeError( + "Failed to construct 'Request': member signal is not of type AbortSignal." + ) + } + + if (signal.aborted) { + ac.abort(signal.reason) + } else { + // Keep a strong ref to ac while request object + // is alive. This is needed to prevent AbortController + // from being prematurely garbage collected. + // See, https://github.com/nodejs/undici/issues/1926. + this[kAbortController] = ac + + const acRef = new WeakRef(ac) + const abort = function () { + const ac = acRef.deref() + if (ac !== undefined) { + ac.abort(this.reason) + } + } + + // Third-party AbortControllers may not work with these. + // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. + try { + // If the max amount of listeners is equal to the default, increase it + // This is only available in node >= v19.9.0 + if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(100, signal) + } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { + setMaxListeners(100, signal) + } + } catch {} + + util.addAbortListener(signal, abort) + requestFinalizer.register(ac, { signal, abort }) + } + } + + // 30. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is request’s header list and guard is + // "request". + this[kHeaders] = new Headers(kConstruct) + this[kHeaders][kHeadersList] = request.headersList + this[kHeaders][kGuard] = 'request' + this[kHeaders][kRealm] = this[kRealm] + + // 31. If this’s request’s mode is "no-cors", then: + if (mode === 'no-cors') { + // 1. If this’s request’s method is not a CORS-safelisted method, + // then throw a TypeError. + if (!corsSafeListedMethodsSet.has(request.method)) { + throw new TypeError( + `'${request.method} is unsupported in no-cors mode.` + ) + } + + // 2. Set this’s headers’s guard to "request-no-cors". + this[kHeaders][kGuard] = 'request-no-cors' + } + + // 32. If init is not empty, then: + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = this[kHeaders][kHeadersList] + // 1. Let headers be a copy of this’s headers and its associated header + // list. + // 2. If init["headers"] exists, then set headers to init["headers"]. + const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) + + // 3. Empty this’s headers’s header list. + headersList.clear() + + // 4. If headers is a Headers object, then for each header in its header + // list, append header’s name/header’s value to this’s headers. + if (headers instanceof HeadersList) { + for (const [key, val] of headers) { + headersList.append(key, val) + } + // Note: Copy the `set-cookie` meta-data. + headersList.cookies = headers.cookies + } else { + // 5. Otherwise, fill this’s headers with headers. + fillHeaders(this[kHeaders], headers) + } + } + + // 33. Let inputBody be input’s request’s body if input is a Request + // object; otherwise null. + const inputBody = input instanceof Request ? input[kState].body : null + + // 34. If either init["body"] exists and is non-null or inputBody is + // non-null, and request’s method is `GET` or `HEAD`, then throw a + // TypeError. + if ( + (init.body != null || inputBody != null) && + (request.method === 'GET' || request.method === 'HEAD') + ) { + throw new TypeError('Request with GET/HEAD method cannot have body.') + } + + // 35. Let initBody be null. + let initBody = null + + // 36. If init["body"] exists and is non-null, then: + if (init.body != null) { + // 1. Let Content-Type be null. + // 2. Set initBody and Content-Type to the result of extracting + // init["body"], with keepalive set to request’s keepalive. + const [extractedBody, contentType] = extractBody( + init.body, + request.keepalive + ) + initBody = extractedBody + + // 3, If Content-Type is non-null and this’s headers’s header list does + // not contain `Content-Type`, then append `Content-Type`/Content-Type to + // this’s headers. + if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) { + this[kHeaders].append('content-type', contentType) + } + } + + // 37. Let inputOrInitBody be initBody if it is non-null; otherwise + // inputBody. + const inputOrInitBody = initBody ?? inputBody + + // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is + // null, then: + if (inputOrInitBody != null && inputOrInitBody.source == null) { + // 1. If initBody is non-null and init["duplex"] does not exist, + // then throw a TypeError. + if (initBody != null && init.duplex == null) { + throw new TypeError('RequestInit: duplex option is required when sending a body.') + } + + // 2. If this’s request’s mode is neither "same-origin" nor "cors", + // then throw a TypeError. + if (request.mode !== 'same-origin' && request.mode !== 'cors') { + throw new TypeError( + 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' + ) + } + + // 3. Set this’s request’s use-CORS-preflight flag. + request.useCORSPreflightFlag = true + } + + // 39. Let finalBody be inputOrInitBody. + let finalBody = inputOrInitBody + + // 40. If initBody is null and inputBody is non-null, then: + if (initBody == null && inputBody != null) { + // 1. If input is unusable, then throw a TypeError. + if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { + throw new TypeError( + 'Cannot construct a Request with a Request object that has already been used.' + ) + } + + // 2. Set finalBody to the result of creating a proxy for inputBody. + if (!TransformStream) { + TransformStream = (__nccwpck_require__(5356).TransformStream) + } + + // https://streams.spec.whatwg.org/#readablestream-create-a-proxy + const identityTransform = new TransformStream() + inputBody.stream.pipeThrough(identityTransform) + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + } + } + + // 41. Set this’s request’s body to finalBody. + this[kState].body = finalBody + } + + // Returns request’s HTTP method, which is "GET" by default. + get method () { + webidl.brandCheck(this, Request) + + // The method getter steps are to return this’s request’s method. + return this[kState].method + } + + // Returns the URL of request as a string. + get url () { + webidl.brandCheck(this, Request) + + // The url getter steps are to return this’s request’s URL, serialized. + return URLSerializer(this[kState].url) + } + + // Returns a Headers object consisting of the headers associated with request. + // Note that headers added in the network layer by the user agent will not + // be accounted for in this object, e.g., the "Host" header. + get headers () { + webidl.brandCheck(this, Request) + + // The headers getter steps are to return this’s headers. + return this[kHeaders] + } + + // Returns the kind of resource requested by request, e.g., "document" + // or "script". + get destination () { + webidl.brandCheck(this, Request) + + // The destination getter are to return this’s request’s destination. + return this[kState].destination + } + + // Returns the referrer of request. Its value can be a same-origin URL if + // explicitly set in init, the empty string to indicate no referrer, and + // "about:client" when defaulting to the global’s default. This is used + // during fetching to determine the value of the `Referer` header of the + // request being made. + get referrer () { + webidl.brandCheck(this, Request) + + // 1. If this’s request’s referrer is "no-referrer", then return the + // empty string. + if (this[kState].referrer === 'no-referrer') { + return '' + } + + // 2. If this’s request’s referrer is "client", then return + // "about:client". + if (this[kState].referrer === 'client') { + return 'about:client' + } + + // Return this’s request’s referrer, serialized. + return this[kState].referrer.toString() + } + + // Returns the referrer policy associated with request. + // This is used during fetching to compute the value of the request’s + // referrer. + get referrerPolicy () { + webidl.brandCheck(this, Request) + + // The referrerPolicy getter steps are to return this’s request’s referrer policy. + return this[kState].referrerPolicy + } + + // Returns the mode associated with request, which is a string indicating + // whether the request will use CORS, or will be restricted to same-origin + // URLs. + get mode () { + webidl.brandCheck(this, Request) + + // The mode getter steps are to return this’s request’s mode. + return this[kState].mode + } + + // Returns the credentials mode associated with request, + // which is a string indicating whether credentials will be sent with the + // request always, never, or only when sent to a same-origin URL. + get credentials () { + // The credentials getter steps are to return this’s request’s credentials mode. + return this[kState].credentials + } + + // Returns the cache mode associated with request, + // which is a string indicating how the request will + // interact with the browser’s cache when fetching. + get cache () { + webidl.brandCheck(this, Request) + + // The cache getter steps are to return this’s request’s cache mode. + return this[kState].cache + } + + // Returns the redirect mode associated with request, + // which is a string indicating how redirects for the + // request will be handled during fetching. A request + // will follow redirects by default. + get redirect () { + webidl.brandCheck(this, Request) + + // The redirect getter steps are to return this’s request’s redirect mode. + return this[kState].redirect + } + + // Returns request’s subresource integrity metadata, which is a + // cryptographic hash of the resource being fetched. Its value + // consists of multiple hashes separated by whitespace. [SRI] + get integrity () { + webidl.brandCheck(this, Request) + + // The integrity getter steps are to return this’s request’s integrity + // metadata. + return this[kState].integrity + } + + // Returns a boolean indicating whether or not request can outlive the + // global in which it was created. + get keepalive () { + webidl.brandCheck(this, Request) + + // The keepalive getter steps are to return this’s request’s keepalive. + return this[kState].keepalive + } + + // Returns a boolean indicating whether or not request is for a reload + // navigation. + get isReloadNavigation () { + webidl.brandCheck(this, Request) + + // The isReloadNavigation getter steps are to return true if this’s + // request’s reload-navigation flag is set; otherwise false. + return this[kState].reloadNavigation + } + + // Returns a boolean indicating whether or not request is for a history + // navigation (a.k.a. back-foward navigation). + get isHistoryNavigation () { + webidl.brandCheck(this, Request) + + // The isHistoryNavigation getter steps are to return true if this’s request’s + // history-navigation flag is set; otherwise false. + return this[kState].historyNavigation + } + + // Returns the signal associated with request, which is an AbortSignal + // object indicating whether or not request has been aborted, and its + // abort event handler. + get signal () { + webidl.brandCheck(this, Request) + + // The signal getter steps are to return this’s signal. + return this[kSignal] + } + + get body () { + webidl.brandCheck(this, Request) + + return this[kState].body ? this[kState].body.stream : null + } + + get bodyUsed () { + webidl.brandCheck(this, Request) + + return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } + + get duplex () { + webidl.brandCheck(this, Request) + + return 'half' + } + + // Returns a clone of request. + clone () { + webidl.brandCheck(this, Request) + + // 1. If this is unusable, then throw a TypeError. + if (this.bodyUsed || this.body?.locked) { + throw new TypeError('unusable') + } + + // 2. Let clonedRequest be the result of cloning this’s request. + const clonedRequest = cloneRequest(this[kState]) + + // 3. Let clonedRequestObject be the result of creating a Request object, + // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. + const clonedRequestObject = new Request(kConstruct) + clonedRequestObject[kState] = clonedRequest + clonedRequestObject[kRealm] = this[kRealm] + clonedRequestObject[kHeaders] = new Headers(kConstruct) + clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList + clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] + clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] + + // 4. Make clonedRequestObject’s signal follow this’s signal. + const ac = new AbortController() + if (this.signal.aborted) { + ac.abort(this.signal.reason) + } else { + util.addAbortListener( + this.signal, + () => { + ac.abort(this.signal.reason) + } + ) + } + clonedRequestObject[kSignal] = ac.signal + + // 4. Return clonedRequestObject. + return clonedRequestObject + } +} + +mixinBody(Request) + +function makeRequest (init) { + // https://fetch.spec.whatwg.org/#requests + const request = { + method: 'GET', + localURLsOnly: false, + unsafeRequest: false, + body: null, + client: null, + reservedClient: null, + replacesClientId: '', + window: 'client', + keepalive: false, + serviceWorkers: 'all', + initiator: '', + destination: '', + priority: null, + origin: 'client', + policyContainer: 'client', + referrer: 'client', + referrerPolicy: '', + mode: 'no-cors', + useCORSPreflightFlag: false, + credentials: 'same-origin', + useCredentials: false, + cache: 'default', + redirect: 'follow', + integrity: '', + cryptoGraphicsNonceMetadata: '', + parserMetadata: '', + reloadNavigation: false, + historyNavigation: false, + userActivation: false, + taintedOrigin: false, + redirectCount: 0, + responseTainting: 'basic', + preventNoCacheCacheControlHeaderModification: false, + done: false, + timingAllowFailed: false, + ...init, + headersList: init.headersList + ? new HeadersList(init.headersList) + : new HeadersList() + } + request.url = request.urlList[0] + return request +} + +// https://fetch.spec.whatwg.org/#concept-request-clone +function cloneRequest (request) { + // To clone a request request, run these steps: + + // 1. Let newRequest be a copy of request, except for its body. + const newRequest = makeRequest({ ...request, body: null }) + + // 2. If request’s body is non-null, set newRequest’s body to the + // result of cloning request’s body. + if (request.body != null) { + newRequest.body = cloneBody(request.body) + } + + // 3. Return newRequest. + return newRequest +} + +Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Request', + configurable: true + } +}) + +webidl.converters.Request = webidl.interfaceConverter( + Request +) + +// https://fetch.spec.whatwg.org/#requestinfo +webidl.converters.RequestInfo = function (V) { + if (typeof V === 'string') { + return webidl.converters.USVString(V) + } + + if (V instanceof Request) { + return webidl.converters.Request(V) + } + + return webidl.converters.USVString(V) +} + +webidl.converters.AbortSignal = webidl.interfaceConverter( + AbortSignal +) + +// https://fetch.spec.whatwg.org/#requestinit +webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: 'method', + converter: webidl.converters.ByteString + }, + { + key: 'headers', + converter: webidl.converters.HeadersInit + }, + { + key: 'body', + converter: webidl.nullableConverter( + webidl.converters.BodyInit + ) + }, + { + key: 'referrer', + converter: webidl.converters.USVString + }, + { + key: 'referrerPolicy', + converter: webidl.converters.DOMString, + // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy + allowedValues: referrerPolicy + }, + { + key: 'mode', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#concept-request-mode + allowedValues: requestMode + }, + { + key: 'credentials', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcredentials + allowedValues: requestCredentials + }, + { + key: 'cache', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcache + allowedValues: requestCache + }, + { + key: 'redirect', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestredirect + allowedValues: requestRedirect + }, + { + key: 'integrity', + converter: webidl.converters.DOMString + }, + { + key: 'keepalive', + converter: webidl.converters.boolean + }, + { + key: 'signal', + converter: webidl.nullableConverter( + (signal) => webidl.converters.AbortSignal( + signal, + { strict: false } + ) + ) + }, + { + key: 'window', + converter: webidl.converters.any + }, + { + key: 'duplex', + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + } +]) + +module.exports = { Request, makeRequest } + + +/***/ }), + +/***/ 7823: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { Headers, HeadersList, fill } = __nccwpck_require__(554) +const { extractBody, cloneBody, mixinBody } = __nccwpck_require__(1472) +const util = __nccwpck_require__(3983) +const { kEnumerableProperty } = util +const { + isValidReasonPhrase, + isCancelled, + isAborted, + isBlobLike, + serializeJavascriptValueToJSONString, + isErrorLike, + isomorphicEncode +} = __nccwpck_require__(2538) +const { + redirectStatusSet, + nullBodyStatus, + DOMException +} = __nccwpck_require__(1037) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(5861) +const { webidl } = __nccwpck_require__(1744) +const { FormData } = __nccwpck_require__(2015) +const { getGlobalOrigin } = __nccwpck_require__(1246) +const { URLSerializer } = __nccwpck_require__(685) +const { kHeadersList, kConstruct } = __nccwpck_require__(2785) +const assert = __nccwpck_require__(9491) +const { types } = __nccwpck_require__(3837) + +const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(5356).ReadableStream) +const textEncoder = new TextEncoder('utf-8') + +// https://fetch.spec.whatwg.org/#response-class +class Response { + // Creates network error Response. + static error () { + // TODO + const relevantRealm = { settingsObject: {} } + + // The static error() method steps are to return the result of creating a + // Response object, given a new network error, "immutable", and this’s + // relevant Realm. + const responseObject = new Response() + responseObject[kState] = makeNetworkError() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + return responseObject + } + + // https://fetch.spec.whatwg.org/#dom-response-json + static json (data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' }) + + if (init !== null) { + init = webidl.converters.ResponseInit(init) + } + + // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. + const bytes = textEncoder.encode( + serializeJavascriptValueToJSONString(data) + ) + + // 2. Let body be the result of extracting bytes. + const body = extractBody(bytes) + + // 3. Let responseObject be the result of creating a Response object, given a new response, + // "response", and this’s relevant Realm. + const relevantRealm = { settingsObject: {} } + const responseObject = new Response() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kGuard] = 'response' + responseObject[kHeaders][kRealm] = relevantRealm + + // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). + initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) + + // 5. Return responseObject. + return responseObject + } + + // Creates a redirect Response that redirects to url with status status. + static redirect (url, status = 302) { + const relevantRealm = { settingsObject: {} } + + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' }) + + url = webidl.converters.USVString(url) + status = webidl.converters['unsigned short'](status) + + // 1. Let parsedURL be the result of parsing url with current settings + // object’s API base URL. + // 2. If parsedURL is failure, then throw a TypeError. + // TODO: base-URL? + let parsedURL + try { + parsedURL = new URL(url, getGlobalOrigin()) + } catch (err) { + throw Object.assign(new TypeError('Failed to parse URL from ' + url), { + cause: err + }) + } + + // 3. If status is not a redirect status, then throw a RangeError. + if (!redirectStatusSet.has(status)) { + throw new RangeError('Invalid status code ' + status) + } + + // 4. Let responseObject be the result of creating a Response object, + // given a new response, "immutable", and this’s relevant Realm. + const responseObject = new Response() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + + // 5. Set responseObject’s response’s status to status. + responseObject[kState].status = status + + // 6. Let value be parsedURL, serialized and isomorphic encoded. + const value = isomorphicEncode(URLSerializer(parsedURL)) + + // 7. Append `Location`/value to responseObject’s response’s header list. + responseObject[kState].headersList.append('location', value) + + // 8. Return responseObject. + return responseObject + } + + // https://fetch.spec.whatwg.org/#dom-response + constructor (body = null, init = {}) { + if (body !== null) { + body = webidl.converters.BodyInit(body) + } + + init = webidl.converters.ResponseInit(init) + + // TODO + this[kRealm] = { settingsObject: {} } + + // 1. Set this’s response to a new response. + this[kState] = makeResponse({}) + + // 2. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is this’s response’s header list and guard + // is "response". + this[kHeaders] = new Headers(kConstruct) + this[kHeaders][kGuard] = 'response' + this[kHeaders][kHeadersList] = this[kState].headersList + this[kHeaders][kRealm] = this[kRealm] + + // 3. Let bodyWithType be null. + let bodyWithType = null + + // 4. If body is non-null, then set bodyWithType to the result of extracting body. + if (body != null) { + const [extractedBody, type] = extractBody(body) + bodyWithType = { body: extractedBody, type } + } + + // 5. Perform initialize a response given this, init, and bodyWithType. + initializeResponse(this, init, bodyWithType) + } + + // Returns response’s type, e.g., "cors". + get type () { + webidl.brandCheck(this, Response) + + // The type getter steps are to return this’s response’s type. + return this[kState].type + } + + // Returns response’s URL, if it has one; otherwise the empty string. + get url () { + webidl.brandCheck(this, Response) + + const urlList = this[kState].urlList + + // The url getter steps are to return the empty string if this’s + // response’s URL is null; otherwise this’s response’s URL, + // serialized with exclude fragment set to true. + const url = urlList[urlList.length - 1] ?? null + + if (url === null) { + return '' + } + + return URLSerializer(url, true) + } + + // Returns whether response was obtained through a redirect. + get redirected () { + webidl.brandCheck(this, Response) + + // The redirected getter steps are to return true if this’s response’s URL + // list has more than one item; otherwise false. + return this[kState].urlList.length > 1 + } + + // Returns response’s status. + get status () { + webidl.brandCheck(this, Response) + + // The status getter steps are to return this’s response’s status. + return this[kState].status + } + + // Returns whether response’s status is an ok status. + get ok () { + webidl.brandCheck(this, Response) + + // The ok getter steps are to return true if this’s response’s status is an + // ok status; otherwise false. + return this[kState].status >= 200 && this[kState].status <= 299 + } + + // Returns response’s status message. + get statusText () { + webidl.brandCheck(this, Response) + + // The statusText getter steps are to return this’s response’s status + // message. + return this[kState].statusText + } + + // Returns response’s headers as Headers. + get headers () { + webidl.brandCheck(this, Response) + + // The headers getter steps are to return this’s headers. + return this[kHeaders] + } + + get body () { + webidl.brandCheck(this, Response) + + return this[kState].body ? this[kState].body.stream : null + } + + get bodyUsed () { + webidl.brandCheck(this, Response) + + return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } + + // Returns a clone of response. + clone () { + webidl.brandCheck(this, Response) + + // 1. If this is unusable, then throw a TypeError. + if (this.bodyUsed || (this.body && this.body.locked)) { + throw webidl.errors.exception({ + header: 'Response.clone', + message: 'Body has already been consumed.' + }) + } + + // 2. Let clonedResponse be the result of cloning this’s response. + const clonedResponse = cloneResponse(this[kState]) + + // 3. Return the result of creating a Response object, given + // clonedResponse, this’s headers’s guard, and this’s relevant Realm. + const clonedResponseObject = new Response() + clonedResponseObject[kState] = clonedResponse + clonedResponseObject[kRealm] = this[kRealm] + clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList + clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard] + clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm] + + return clonedResponseObject + } +} + +mixinBody(Response) + +Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Response', + configurable: true + } +}) + +Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty +}) + +// https://fetch.spec.whatwg.org/#concept-response-clone +function cloneResponse (response) { + // To clone a response response, run these steps: + + // 1. If response is a filtered response, then return a new identical + // filtered response whose internal response is a clone of response’s + // internal response. + if (response.internalResponse) { + return filterResponse( + cloneResponse(response.internalResponse), + response.type + ) + } + + // 2. Let newResponse be a copy of response, except for its body. + const newResponse = makeResponse({ ...response, body: null }) + + // 3. If response’s body is non-null, then set newResponse’s body to the + // result of cloning response’s body. + if (response.body != null) { + newResponse.body = cloneBody(response.body) + } + + // 4. Return newResponse. + return newResponse +} + +function makeResponse (init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: 'default', + status: 200, + timingInfo: null, + cacheState: '', + statusText: '', + ...init, + headersList: init.headersList + ? new HeadersList(init.headersList) + : new HeadersList(), + urlList: init.urlList ? [...init.urlList] : [] + } +} + +function makeNetworkError (reason) { + const isError = isErrorLike(reason) + return makeResponse({ + type: 'error', + status: 0, + error: isError + ? reason + : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === 'AbortError' + }) +} + +function makeFilteredResponse (response, state) { + state = { + internalResponse: response, + ...state + } + + return new Proxy(response, { + get (target, p) { + return p in state ? state[p] : target[p] + }, + set (target, p, value) { + assert(!(p in state)) + target[p] = value + return true + } + }) +} + +// https://fetch.spec.whatwg.org/#concept-filtered-response +function filterResponse (response, type) { + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (type === 'basic') { + // A basic filtered response is a filtered response whose type is "basic" + // and header list excludes any headers in internal response’s header list + // whose name is a forbidden response-header name. + + // Note: undici does not implement forbidden response-header names + return makeFilteredResponse(response, { + type: 'basic', + headersList: response.headersList + }) + } else if (type === 'cors') { + // A CORS filtered response is a filtered response whose type is "cors" + // and header list excludes any headers in internal response’s header + // list whose name is not a CORS-safelisted response-header name, given + // internal response’s CORS-exposed header-name list. + + // Note: undici does not implement CORS-safelisted response-header names + return makeFilteredResponse(response, { + type: 'cors', + headersList: response.headersList + }) + } else if (type === 'opaque') { + // An opaque filtered response is a filtered response whose type is + // "opaque", URL list is the empty list, status is 0, status message + // is the empty byte sequence, header list is empty, and body is null. + + return makeFilteredResponse(response, { + type: 'opaque', + urlList: Object.freeze([]), + status: 0, + statusText: '', + body: null + }) + } else if (type === 'opaqueredirect') { + // An opaque-redirect filtered response is a filtered response whose type + // is "opaqueredirect", status is 0, status message is the empty byte + // sequence, header list is empty, and body is null. + + return makeFilteredResponse(response, { + type: 'opaqueredirect', + status: 0, + statusText: '', + headersList: [], + body: null + }) + } else { + assert(false) + } +} + +// https://fetch.spec.whatwg.org/#appropriate-network-error +function makeAppropriateNetworkError (fetchParams, err = null) { + // 1. Assert: fetchParams is canceled. + assert(isCancelled(fetchParams)) + + // 2. Return an aborted network error if fetchParams is aborted; + // otherwise return a network error. + return isAborted(fetchParams) + ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) + : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) +} + +// https://whatpr.org/fetch/1392.html#initialize-a-response +function initializeResponse (response, init, body) { + // 1. If init["status"] is not in the range 200 to 599, inclusive, then + // throw a RangeError. + if (init.status !== null && (init.status < 200 || init.status > 599)) { + throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') + } + + // 2. If init["statusText"] does not match the reason-phrase token production, + // then throw a TypeError. + if ('statusText' in init && init.statusText != null) { + // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: + // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) + if (!isValidReasonPhrase(String(init.statusText))) { + throw new TypeError('Invalid statusText') + } + } + + // 3. Set response’s response’s status to init["status"]. + if ('status' in init && init.status != null) { + response[kState].status = init.status + } + + // 4. Set response’s response’s status message to init["statusText"]. + if ('statusText' in init && init.statusText != null) { + response[kState].statusText = init.statusText + } + + // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. + if ('headers' in init && init.headers != null) { + fill(response[kHeaders], init.headers) + } + + // 6. If body was given, then: + if (body) { + // 1. If response's status is a null body status, then throw a TypeError. + if (nullBodyStatus.includes(response.status)) { + throw webidl.errors.exception({ + header: 'Response constructor', + message: 'Invalid response status code ' + response.status + }) + } + + // 2. Set response's body to body's body. + response[kState].body = body.body + + // 3. If body's type is non-null and response's header list does not contain + // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. + if (body.type != null && !response[kState].headersList.contains('Content-Type')) { + response[kState].headersList.append('content-type', body.type) + } + } +} + +webidl.converters.ReadableStream = webidl.interfaceConverter( + ReadableStream +) + +webidl.converters.FormData = webidl.interfaceConverter( + FormData +) + +webidl.converters.URLSearchParams = webidl.interfaceConverter( + URLSearchParams +) + +// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit +webidl.converters.XMLHttpRequestBodyInit = function (V) { + if (typeof V === 'string') { + return webidl.converters.USVString(V) + } + + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) + } + + if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { + return webidl.converters.BufferSource(V) + } + + if (util.isFormDataLike(V)) { + return webidl.converters.FormData(V, { strict: false }) + } + + if (V instanceof URLSearchParams) { + return webidl.converters.URLSearchParams(V) + } + + return webidl.converters.DOMString(V) +} + +// https://fetch.spec.whatwg.org/#bodyinit +webidl.converters.BodyInit = function (V) { + if (V instanceof ReadableStream) { + return webidl.converters.ReadableStream(V) + } + + // Note: the spec doesn't include async iterables, + // this is an undici extension. + if (V?.[Symbol.asyncIterator]) { + return V + } + + return webidl.converters.XMLHttpRequestBodyInit(V) +} + +webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: 'status', + converter: webidl.converters['unsigned short'], + defaultValue: 200 + }, + { + key: 'statusText', + converter: webidl.converters.ByteString, + defaultValue: '' + }, + { + key: 'headers', + converter: webidl.converters.HeadersInit + } +]) + +module.exports = { + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse +} + + +/***/ }), + +/***/ 5861: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + kUrl: Symbol('url'), + kHeaders: Symbol('headers'), + kSignal: Symbol('signal'), + kState: Symbol('state'), + kGuard: Symbol('guard'), + kRealm: Symbol('realm') +} + + +/***/ }), + +/***/ 2538: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(1037) +const { getGlobalOrigin } = __nccwpck_require__(1246) +const { performance } = __nccwpck_require__(4074) +const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(3983) +const assert = __nccwpck_require__(9491) +const { isUint8Array } = __nccwpck_require__(9830) + +let supportedHashes = [] + +// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable +/** @type {import('crypto')|undefined} */ +let crypto + +try { + crypto = __nccwpck_require__(6113) + const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) +/* c8 ignore next 3 */ +} catch { +} + +function responseURL (response) { + // https://fetch.spec.whatwg.org/#responses + // A response has an associated URL. It is a pointer to the last URL + // in response’s URL list and null if response’s URL list is empty. + const urlList = response.urlList + const length = urlList.length + return length === 0 ? null : urlList[length - 1].toString() +} + +// https://fetch.spec.whatwg.org/#concept-response-location-url +function responseLocationURL (response, requestFragment) { + // 1. If response’s status is not a redirect status, then return null. + if (!redirectStatusSet.has(response.status)) { + return null + } + + // 2. Let location be the result of extracting header list values given + // `Location` and response’s header list. + let location = response.headersList.get('location') + + // 3. If location is a header value, then set location to the result of + // parsing location with response’s URL. + if (location !== null && isValidHeaderValue(location)) { + location = new URL(location, responseURL(response)) + } + + // 4. If location is a URL whose fragment is null, then set location’s + // fragment to requestFragment. + if (location && !location.hash) { + location.hash = requestFragment + } + + // 5. Return location. + return location +} + +/** @returns {URL} */ +function requestCurrentURL (request) { + return request.urlList[request.urlList.length - 1] +} + +function requestBadPort (request) { + // 1. Let url be request’s current URL. + const url = requestCurrentURL(request) + + // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, + // then return blocked. + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + return 'blocked' + } + + // 3. Return allowed. + return 'allowed' +} + +function isErrorLike (object) { + return object instanceof Error || ( + object?.constructor?.name === 'Error' || + object?.constructor?.name === 'DOMException' + ) +} + +// Check whether |statusText| is a ByteString and +// matches the Reason-Phrase token production. +// RFC 2616: https://tools.ietf.org/html/rfc2616 +// RFC 7230: https://tools.ietf.org/html/rfc7230 +// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" +// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 +function isValidReasonPhrase (statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i) + if ( + !( + ( + c === 0x09 || // HTAB + (c >= 0x20 && c <= 0x7e) || // SP / VCHAR + (c >= 0x80 && c <= 0xff) + ) // obs-text + ) + ) { + return false + } + } + return true +} + +/** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ +function isTokenCharCode (c) { + switch (c) { + case 0x22: + case 0x28: + case 0x29: + case 0x2c: + case 0x2f: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + case 0x40: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x7b: + case 0x7d: + // DQUOTE and "(),/:;<=>?@[\]{}" + return false + default: + // VCHAR %x21-7E + return c >= 0x21 && c <= 0x7e + } +} + +/** + * @param {string} characters + */ +function isValidHTTPToken (characters) { + if (characters.length === 0) { + return false + } + for (let i = 0; i < characters.length; ++i) { + if (!isTokenCharCode(characters.charCodeAt(i))) { + return false + } + } + return true +} + +/** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ +function isValidHeaderName (potentialValue) { + return isValidHTTPToken(potentialValue) +} + +/** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ +function isValidHeaderValue (potentialValue) { + // - Has no leading or trailing HTTP tab or space bytes. + // - Contains no 0x00 (NUL) or HTTP newline bytes. + if ( + potentialValue.startsWith('\t') || + potentialValue.startsWith(' ') || + potentialValue.endsWith('\t') || + potentialValue.endsWith(' ') + ) { + return false + } + + if ( + potentialValue.includes('\0') || + potentialValue.includes('\r') || + potentialValue.includes('\n') + ) { + return false + } + + return true +} + +// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect +function setRequestReferrerPolicyOnRedirect (request, actualResponse) { + // Given a request request and a response actualResponse, this algorithm + // updates request’s referrer policy according to the Referrer-Policy + // header (if any) in actualResponse. + + // 1. Let policy be the result of executing § 8.1 Parse a referrer policy + // from a Referrer-Policy header on actualResponse. + + // 8.1 Parse a referrer policy from a Referrer-Policy header + // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. + const { headersList } = actualResponse + // 2. Let policy be the empty string. + // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. + // 4. Return policy. + const policyHeader = (headersList.get('referrer-policy') ?? '').split(',') + + // Note: As the referrer-policy can contain multiple policies + // separated by comma, we need to loop through all of them + // and pick the first valid one. + // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy + let policy = '' + if (policyHeader.length > 0) { + // The right-most policy takes precedence. + // The left-most policy is the fallback. + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim() + if (referrerPolicyTokens.has(token)) { + policy = token + break + } + } + } + + // 2. If policy is not the empty string, then set request’s referrer policy to policy. + if (policy !== '') { + request.referrerPolicy = policy + } +} + +// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check +function crossOriginResourcePolicyCheck () { + // TODO + return 'allowed' +} + +// https://fetch.spec.whatwg.org/#concept-cors-check +function corsCheck () { + // TODO + return 'success' +} + +// https://fetch.spec.whatwg.org/#concept-tao-check +function TAOCheck () { + // TODO + return 'success' +} + +function appendFetchMetadata (httpRequest) { + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header + // TODO + + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header + + // 1. Assert: r’s url is a potentially trustworthy URL. + // TODO + + // 2. Let header be a Structured Header whose value is a token. + let header = null + + // 3. Set header’s value to r’s mode. + header = httpRequest.mode + + // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. + httpRequest.headersList.set('sec-fetch-mode', header) + + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header + // TODO + + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header + // TODO +} + +// https://fetch.spec.whatwg.org/#append-a-request-origin-header +function appendRequestOriginHeader (request) { + // 1. Let serializedOrigin be the result of byte-serializing a request origin with request. + let serializedOrigin = request.origin + + // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list. + if (request.responseTainting === 'cors' || request.mode === 'websocket') { + if (serializedOrigin) { + request.headersList.append('origin', serializedOrigin) + } + + // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: + } else if (request.method !== 'GET' && request.method !== 'HEAD') { + // 1. Switch on request’s referrer policy: + switch (request.referrerPolicy) { + case 'no-referrer': + // Set serializedOrigin to `null`. + serializedOrigin = null + break + case 'no-referrer-when-downgrade': + case 'strict-origin': + case 'strict-origin-when-cross-origin': + // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`. + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { + serializedOrigin = null + } + break + case 'same-origin': + // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`. + if (!sameOrigin(request, requestCurrentURL(request))) { + serializedOrigin = null + } + break + default: + // Do nothing. + } + + if (serializedOrigin) { + // 2. Append (`Origin`, serializedOrigin) to request’s header list. + request.headersList.append('origin', serializedOrigin) + } + } +} + +function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { + // TODO + return performance.now() +} + +// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info +function createOpaqueTimingInfo (timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + } +} + +// https://html.spec.whatwg.org/multipage/origin.html#policy-container +function makePolicyContainer () { + // Note: the fetch spec doesn't make use of embedder policy or CSP list + return { + referrerPolicy: 'strict-origin-when-cross-origin' + } +} + +// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container +function clonePolicyContainer (policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy + } +} + +// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer +function determineRequestsReferrer (request) { + // 1. Let policy be request's referrer policy. + const policy = request.referrerPolicy + + // Note: policy cannot (shouldn't) be null or an empty string. + assert(policy) + + // 2. Let environment be request’s client. + + let referrerSource = null + + // 3. Switch on request’s referrer: + if (request.referrer === 'client') { + // Note: node isn't a browser and doesn't implement document/iframes, + // so we bypass this step and replace it with our own. + + const globalOrigin = getGlobalOrigin() + + if (!globalOrigin || globalOrigin.origin === 'null') { + return 'no-referrer' + } + + // note: we need to clone it as it's mutated + referrerSource = new URL(globalOrigin) + } else if (request.referrer instanceof URL) { + // Let referrerSource be request’s referrer. + referrerSource = request.referrer + } + + // 4. Let request’s referrerURL be the result of stripping referrerSource for + // use as a referrer. + let referrerURL = stripURLForReferrer(referrerSource) + + // 5. Let referrerOrigin be the result of stripping referrerSource for use as + // a referrer, with the origin-only flag set to true. + const referrerOrigin = stripURLForReferrer(referrerSource, true) + + // 6. If the result of serializing referrerURL is a string whose length is + // greater than 4096, set referrerURL to referrerOrigin. + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin + } + + const areSameOrigin = sameOrigin(request, referrerURL) + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && + !isURLPotentiallyTrustworthy(request.url) + + // 8. Execute the switch statements corresponding to the value of policy: + switch (policy) { + case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) + case 'unsafe-url': return referrerURL + case 'same-origin': + return areSameOrigin ? referrerOrigin : 'no-referrer' + case 'origin-when-cross-origin': + return areSameOrigin ? referrerURL : referrerOrigin + case 'strict-origin-when-cross-origin': { + const currentURL = requestCurrentURL(request) + + // 1. If the origin of referrerURL and the origin of request’s current + // URL are the same, then return referrerURL. + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL + } + + // 2. If referrerURL is a potentially trustworthy URL and request’s + // current URL is not a potentially trustworthy URL, then return no + // referrer. + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return 'no-referrer' + } + + // 3. Return referrerOrigin. + return referrerOrigin + } + case 'strict-origin': // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + case 'no-referrer-when-downgrade': // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + + default: // eslint-disable-line + return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin + } +} + +/** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ +function stripURLForReferrer (url, originOnly) { + // 1. Assert: url is a URL. + assert(url instanceof URL) + + // 2. If url’s scheme is a local scheme, then return no referrer. + if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { + return 'no-referrer' + } + + // 3. Set url’s username to the empty string. + url.username = '' + + // 4. Set url’s password to the empty string. + url.password = '' + + // 5. Set url’s fragment to null. + url.hash = '' + + // 6. If the origin-only flag is true, then: + if (originOnly) { + // 1. Set url’s path to « the empty string ». + url.pathname = '' + + // 2. Set url’s query to null. + url.search = '' + } + + // 7. Return url. + return url +} + +function isURLPotentiallyTrustworthy (url) { + if (!(url instanceof URL)) { + return false + } + + // If child of about, return true + if (url.href === 'about:blank' || url.href === 'about:srcdoc') { + return true + } + + // If scheme is data, return true + if (url.protocol === 'data:') return true + + // If file, return true + if (url.protocol === 'file:') return true + + return isOriginPotentiallyTrustworthy(url.origin) + + function isOriginPotentiallyTrustworthy (origin) { + // If origin is explicitly null, return false + if (origin == null || origin === 'null') return false + + const originAsURL = new URL(origin) + + // If secure, return true + if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { + return true + } + + // If localhost or variants, return true + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || + (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || + (originAsURL.hostname.endsWith('.localhost'))) { + return true + } + + // If any other, return false + return false + } +} + +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ +function bytesMatch (bytes, metadataList) { + // If node is not built with OpenSSL support, we cannot check + // a request's integrity, so allow it by default (the spec will + // allow requests if an invalid hash is given, as precedence). + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === undefined) { + return true + } + + // 1. Let parsedMetadata be the result of parsing metadataList. + const parsedMetadata = parseMetadata(metadataList) + + // 2. If parsedMetadata is no metadata, return true. + if (parsedMetadata === 'no metadata') { + return true + } + + // 3. If response is not eligible for integrity validation, return false. + // TODO + + // 4. If parsedMetadata is the empty set, return true. + if (parsedMetadata.length === 0) { + return true + } + + // 5. Let metadata be the result of getting the strongest + // metadata from parsedMetadata. + const strongest = getStrongestMetadata(parsedMetadata) + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) + + // 6. For each item in metadata: + for (const item of metadata) { + // 1. Let algorithm be the alg component of item. + const algorithm = item.algo + + // 2. Let expectedValue be the val component of item. + const expectedValue = item.hash + + // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e + // "be liberal with padding". This is annoying, and it's not even in the spec. + + // 3. Let actualValue be the result of applying algorithm to bytes. + let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') + + if (actualValue[actualValue.length - 1] === '=') { + if (actualValue[actualValue.length - 2] === '=') { + actualValue = actualValue.slice(0, -2) + } else { + actualValue = actualValue.slice(0, -1) + } + } + + // 4. If actualValue is a case-sensitive match for expectedValue, + // return true. + if (compareBase64Mixed(actualValue, expectedValue)) { + return true + } + } + + // 7. Return false. + return false +} + +// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options +// https://www.w3.org/TR/CSP2/#source-list-syntax +// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 +const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i + +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ +function parseMetadata (metadata) { + // 1. Let result be the empty set. + /** @type {{ algo: string, hash: string }[]} */ + const result = [] + + // 2. Let empty be equal to true. + let empty = true + + // 3. For each token returned by splitting metadata on spaces: + for (const token of metadata.split(' ')) { + // 1. Set empty to false. + empty = false + + // 2. Parse token as a hash-with-options. + const parsedToken = parseHashWithOptions.exec(token) + + // 3. If token does not parse, continue to the next token. + if ( + parsedToken === null || + parsedToken.groups === undefined || + parsedToken.groups.algo === undefined + ) { + // Note: Chromium blocks the request at this point, but Firefox + // gives a warning that an invalid integrity was given. The + // correct behavior is to ignore these, and subsequently not + // check the integrity of the resource. + continue + } + + // 4. Let algorithm be the hash-algo component of token. + const algorithm = parsedToken.groups.algo.toLowerCase() + + // 5. If algorithm is a hash function recognized by the user + // agent, add the parsed token to result. + if (supportedHashes.includes(algorithm)) { + result.push(parsedToken.groups) + } + } + + // 4. Return no metadata if empty is true, otherwise return result. + if (empty === true) { + return 'no metadata' + } + + return result +} + +/** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ +function getStrongestMetadata (metadataList) { + // Let algorithm be the algo component of the first item in metadataList. + // Can be sha256 + let algorithm = metadataList[0].algo + // If the algorithm is sha512, then it is the strongest + // and we can return immediately + if (algorithm[3] === '5') { + return algorithm + } + + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i] + // If the algorithm is sha512, then it is the strongest + // and we can break the loop immediately + if (metadata.algo[3] === '5') { + algorithm = 'sha512' + break + // If the algorithm is sha384, then a potential sha256 or sha384 is ignored + } else if (algorithm[3] === '3') { + continue + // algorithm is sha256, check if algorithm is sha384 and if so, set it as + // the strongest + } else if (metadata.algo[3] === '3') { + algorithm = 'sha384' + } + } + return algorithm +} + +function filterMetadataListByAlgorithm (metadataList, algorithm) { + if (metadataList.length === 1) { + return metadataList + } + + let pos = 0 + for (let i = 0; i < metadataList.length; ++i) { + if (metadataList[i].algo === algorithm) { + metadataList[pos++] = metadataList[i] + } + } + + metadataList.length = pos + + return metadataList +} + +/** + * Compares two base64 strings, allowing for base64url + * in the second string. + * +* @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ +function compareBase64Mixed (actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) { + return false + } + for (let i = 0; i < actualValue.length; ++i) { + if (actualValue[i] !== expectedValue[i]) { + if ( + (actualValue[i] === '+' && expectedValue[i] === '-') || + (actualValue[i] === '/' && expectedValue[i] === '_') + ) { + continue + } + return false + } + } + + return true +} + +// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request +function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { + // TODO +} + +/** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ +function sameOrigin (A, B) { + // 1. If A and B are the same opaque origin, then return true. + if (A.origin === B.origin && A.origin === 'null') { + return true + } + + // 2. If A and B are both tuple origins and their schemes, + // hosts, and port are identical, then return true. + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { + return true + } + + // 3. Return false. + return false +} + +function createDeferredPromise () { + let res + let rej + const promise = new Promise((resolve, reject) => { + res = resolve + rej = reject + }) + + return { promise, resolve: res, reject: rej } +} + +function isAborted (fetchParams) { + return fetchParams.controller.state === 'aborted' +} + +function isCancelled (fetchParams) { + return fetchParams.controller.state === 'aborted' || + fetchParams.controller.state === 'terminated' +} + +const normalizeMethodRecord = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(normalizeMethodRecord, null) + +/** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ +function normalizeMethod (method) { + return normalizeMethodRecord[method.toLowerCase()] ?? method +} + +// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string +function serializeJavascriptValueToJSONString (value) { + // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). + const result = JSON.stringify(value) + + // 2. If result is undefined, then throw a TypeError. + if (result === undefined) { + throw new TypeError('Value is not JSON serializable') + } + + // 3. Assert: result is a string. + assert(typeof result === 'string') + + // 4. Return result. + return result +} + +// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object +const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) + +/** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {() => unknown[]} iterator + * @param {string} name name of the instance + * @param {'key'|'value'|'key+value'} kind + */ +function makeIterator (iterator, name, kind) { + const object = { + index: 0, + kind, + target: iterator + } + + const i = { + next () { + // 1. Let interface be the interface for which the iterator prototype object exists. + + // 2. Let thisValue be the this value. + + // 3. Let object be ? ToObject(thisValue). + + // 4. If object is a platform object, then perform a security + // check, passing: + + // 5. If object is not a default iterator object for interface, + // then throw a TypeError. + if (Object.getPrototypeOf(this) !== i) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name} Iterator.` + ) + } + + // 6. Let index be object’s index. + // 7. Let kind be object’s kind. + // 8. Let values be object’s target's value pairs to iterate over. + const { index, kind, target } = object + const values = target() + + // 9. Let len be the length of values. + const len = values.length + + // 10. If index is greater than or equal to len, then return + // CreateIterResultObject(undefined, true). + if (index >= len) { + return { value: undefined, done: true } + } + + // 11. Let pair be the entry in values at index index. + const pair = values[index] + + // 12. Set object’s index to index + 1. + object.index = index + 1 + + // 13. Return the iterator result for pair and kind. + return iteratorResult(pair, kind) + }, + // The class string of an iterator prototype object for a given interface is the + // result of concatenating the identifier of the interface and the string " Iterator". + [Symbol.toStringTag]: `${name} Iterator` + } + + // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%. + Object.setPrototypeOf(i, esIteratorPrototype) + // esIteratorPrototype needs to be the prototype of i + // which is the prototype of an empty object. Yes, it's confusing. + return Object.setPrototypeOf({}, i) +} + +// https://webidl.spec.whatwg.org/#iterator-result +function iteratorResult (pair, kind) { + let result + + // 1. Let result be a value determined by the value of kind: + switch (kind) { + case 'key': { + // 1. Let idlKey be pair’s key. + // 2. Let key be the result of converting idlKey to an + // ECMAScript value. + // 3. result is key. + result = pair[0] + break + } + case 'value': { + // 1. Let idlValue be pair’s value. + // 2. Let value be the result of converting idlValue to + // an ECMAScript value. + // 3. result is value. + result = pair[1] + break + } + case 'key+value': { + // 1. Let idlKey be pair’s key. + // 2. Let idlValue be pair’s value. + // 3. Let key be the result of converting idlKey to an + // ECMAScript value. + // 4. Let value be the result of converting idlValue to + // an ECMAScript value. + // 5. Let array be ! ArrayCreate(2). + // 6. Call ! CreateDataProperty(array, "0", key). + // 7. Call ! CreateDataProperty(array, "1", value). + // 8. result is array. + result = pair + break + } + } + + // 2. Return CreateIterResultObject(result, false). + return { value: result, done: false } +} + +/** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ +async function fullyReadBody (body, processBody, processBodyError) { + // 1. If taskDestination is null, then set taskDestination to + // the result of starting a new parallel queue. + + // 2. Let successSteps given a byte sequence bytes be to queue a + // fetch task to run processBody given bytes, with taskDestination. + const successSteps = processBody + + // 3. Let errorSteps be to queue a fetch task to run processBodyError, + // with taskDestination. + const errorSteps = processBodyError + + // 4. Let reader be the result of getting a reader for body’s stream. + // If that threw an exception, then run errorSteps with that + // exception and return. + let reader + + try { + reader = body.stream.getReader() + } catch (e) { + errorSteps(e) + return + } + + // 5. Read all bytes from reader, given successSteps and errorSteps. + try { + const result = await readAllBytes(reader) + successSteps(result) + } catch (e) { + errorSteps(e) + } +} + +/** @type {ReadableStream} */ +let ReadableStream = globalThis.ReadableStream + +function isReadableStreamLike (stream) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(5356).ReadableStream) + } + + return stream instanceof ReadableStream || ( + stream[Symbol.toStringTag] === 'ReadableStream' && + typeof stream.tee === 'function' + ) +} + +const MAXIMUM_ARGUMENT_LENGTH = 65535 + +/** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {number[]|Uint8Array} input + */ +function isomorphicDecode (input) { + // 1. To isomorphic decode a byte sequence input, return a string whose code point + // length is equal to input’s length and whose code points have the same values + // as the values of input’s bytes, in the same order. + + if (input.length < MAXIMUM_ARGUMENT_LENGTH) { + return String.fromCharCode(...input) + } + + return input.reduce((previous, current) => previous + String.fromCharCode(current), '') +} + +/** + * @param {ReadableStreamController} controller + */ +function readableStreamClose (controller) { + try { + controller.close() + } catch (err) { + // TODO: add comment explaining why this error occurs. + if (!err.message.includes('Controller is already closed')) { + throw err + } + } +} + +/** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ +function isomorphicEncode (input) { + // 1. Assert: input contains no code points greater than U+00FF. + for (let i = 0; i < input.length; i++) { + assert(input.charCodeAt(i) <= 0xFF) + } + + // 2. Return a byte sequence whose length is equal to input’s code + // point length and whose bytes have the same values as the + // values of input’s code points, in the same order + return input +} + +/** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ +async function readAllBytes (reader) { + const bytes = [] + let byteLength = 0 + + while (true) { + const { done, value: chunk } = await reader.read() + + if (done) { + // 1. Call successSteps with bytes. + return Buffer.concat(bytes, byteLength) + } + + // 1. If chunk is not a Uint8Array object, call failureSteps + // with a TypeError and abort these steps. + if (!isUint8Array(chunk)) { + throw new TypeError('Received non-Uint8Array chunk') + } + + // 2. Append the bytes represented by chunk to bytes. + bytes.push(chunk) + byteLength += chunk.length + + // 3. Read-loop given reader, bytes, successSteps, and failureSteps. + } +} + +/** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ +function urlIsLocal (url) { + assert('protocol' in url) // ensure it's a url object + + const protocol = url.protocol + + return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' +} + +/** + * @param {string|URL} url + */ +function urlHasHttpsScheme (url) { + if (typeof url === 'string') { + return url.startsWith('https:') + } + + return url.protocol === 'https:' +} + +/** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ +function urlIsHttpHttpsScheme (url) { + assert('protocol' in url) // ensure it's a url object + + const protocol = url.protocol + + return protocol === 'http:' || protocol === 'https:' +} + +/** + * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. + */ +const hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)) + +module.exports = { + isAborted, + isCancelled, + createDeferredPromise, + ReadableStreamFrom, + toUSVString, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + makeIterator, + isValidHeaderName, + isValidHeaderValue, + hasOwn, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + isomorphicDecode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + normalizeMethodRecord, + parseMetadata +} + + +/***/ }), + +/***/ 1744: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { types } = __nccwpck_require__(3837) +const { hasOwn, toUSVString } = __nccwpck_require__(2538) + +/** @type {import('../../types/webidl').Webidl} */ +const webidl = {} +webidl.converters = {} +webidl.util = {} +webidl.errors = {} + +webidl.errors.exception = function (message) { + return new TypeError(`${message.header}: ${message.message}`) +} + +webidl.errors.conversionFailed = function (context) { + const plural = context.types.length === 1 ? '' : ' one of' + const message = + `${context.argument} could not be converted to` + + `${plural}: ${context.types.join(', ')}.` + + return webidl.errors.exception({ + header: context.prefix, + message + }) +} + +webidl.errors.invalidArgument = function (context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }) +} + +// https://webidl.spec.whatwg.org/#implements +webidl.brandCheck = function (V, I, opts = undefined) { + if (opts?.strict !== false && !(V instanceof I)) { + throw new TypeError('Illegal invocation') + } else { + return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag] + } +} + +webidl.argumentLengthCheck = function ({ length }, min, ctx) { + if (length < min) { + throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? 's' : ''} required, ` + + `but${length ? ' only' : ''} ${length} found.`, + ...ctx + }) + } +} + +webidl.illegalConstructor = function () { + throw webidl.errors.exception({ + header: 'TypeError', + message: 'Illegal constructor' + }) +} + +// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values +webidl.util.Type = function (V) { + switch (typeof V) { + case 'undefined': return 'Undefined' + case 'boolean': return 'Boolean' + case 'string': return 'String' + case 'symbol': return 'Symbol' + case 'number': return 'Number' + case 'bigint': return 'BigInt' + case 'function': + case 'object': { + if (V === null) { + return 'Null' + } + + return 'Object' + } + } +} + +// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint +webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { + let upperBound + let lowerBound + + // 1. If bitLength is 64, then: + if (bitLength === 64) { + // 1. Let upperBound be 2^53 − 1. + upperBound = Math.pow(2, 53) - 1 + + // 2. If signedness is "unsigned", then let lowerBound be 0. + if (signedness === 'unsigned') { + lowerBound = 0 + } else { + // 3. Otherwise let lowerBound be −2^53 + 1. + lowerBound = Math.pow(-2, 53) + 1 + } + } else if (signedness === 'unsigned') { + // 2. Otherwise, if signedness is "unsigned", then: + + // 1. Let lowerBound be 0. + lowerBound = 0 + + // 2. Let upperBound be 2^bitLength − 1. + upperBound = Math.pow(2, bitLength) - 1 + } else { + // 3. Otherwise: + + // 1. Let lowerBound be -2^bitLength − 1. + lowerBound = Math.pow(-2, bitLength) - 1 + + // 2. Let upperBound be 2^bitLength − 1 − 1. + upperBound = Math.pow(2, bitLength - 1) - 1 + } + + // 4. Let x be ? ToNumber(V). + let x = Number(V) + + // 5. If x is −0, then set x to +0. + if (x === 0) { + x = 0 + } + + // 6. If the conversion is to an IDL type associated + // with the [EnforceRange] extended attribute, then: + if (opts.enforceRange === true) { + // 1. If x is NaN, +∞, or −∞, then throw a TypeError. + if ( + Number.isNaN(x) || + x === Number.POSITIVE_INFINITY || + x === Number.NEGATIVE_INFINITY + ) { + throw webidl.errors.exception({ + header: 'Integer conversion', + message: `Could not convert ${V} to an integer.` + }) + } + + // 2. Set x to IntegerPart(x). + x = webidl.util.IntegerPart(x) + + // 3. If x < lowerBound or x > upperBound, then + // throw a TypeError. + if (x < lowerBound || x > upperBound) { + throw webidl.errors.exception({ + header: 'Integer conversion', + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }) + } + + // 4. Return x. + return x + } + + // 7. If x is not NaN and the conversion is to an IDL + // type associated with the [Clamp] extended + // attribute, then: + if (!Number.isNaN(x) && opts.clamp === true) { + // 1. Set x to min(max(x, lowerBound), upperBound). + x = Math.min(Math.max(x, lowerBound), upperBound) + + // 2. Round x to the nearest integer, choosing the + // even integer if it lies halfway between two, + // and choosing +0 rather than −0. + if (Math.floor(x) % 2 === 0) { + x = Math.floor(x) + } else { + x = Math.ceil(x) + } + + // 3. Return x. + return x + } + + // 8. If x is NaN, +0, +∞, or −∞, then return +0. + if ( + Number.isNaN(x) || + (x === 0 && Object.is(0, x)) || + x === Number.POSITIVE_INFINITY || + x === Number.NEGATIVE_INFINITY + ) { + return 0 + } + + // 9. Set x to IntegerPart(x). + x = webidl.util.IntegerPart(x) + + // 10. Set x to x modulo 2^bitLength. + x = x % Math.pow(2, bitLength) + + // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, + // then return x − 2^bitLength. + if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { + return x - Math.pow(2, bitLength) + } + + // 12. Otherwise, return x. + return x +} + +// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart +webidl.util.IntegerPart = function (n) { + // 1. Let r be floor(abs(n)). + const r = Math.floor(Math.abs(n)) + + // 2. If n < 0, then return -1 × r. + if (n < 0) { + return -1 * r + } + + // 3. Otherwise, return r. + return r +} + +// https://webidl.spec.whatwg.org/#es-sequence +webidl.sequenceConverter = function (converter) { + return (V) => { + // 1. If Type(V) is not Object, throw a TypeError. + if (webidl.util.Type(V) !== 'Object') { + throw webidl.errors.exception({ + header: 'Sequence', + message: `Value of type ${webidl.util.Type(V)} is not an Object.` + }) + } + + // 2. Let method be ? GetMethod(V, @@iterator). + /** @type {Generator} */ + const method = V?.[Symbol.iterator]?.() + const seq = [] + + // 3. If method is undefined, throw a TypeError. + if ( + method === undefined || + typeof method.next !== 'function' + ) { + throw webidl.errors.exception({ + header: 'Sequence', + message: 'Object is not an iterator.' + }) + } + + // https://webidl.spec.whatwg.org/#create-sequence-from-iterable + while (true) { + const { done, value } = method.next() + + if (done) { + break + } + + seq.push(converter(value)) + } + + return seq + } +} + +// https://webidl.spec.whatwg.org/#es-to-record +webidl.recordConverter = function (keyConverter, valueConverter) { + return (O) => { + // 1. If Type(O) is not Object, throw a TypeError. + if (webidl.util.Type(O) !== 'Object') { + throw webidl.errors.exception({ + header: 'Record', + message: `Value of type ${webidl.util.Type(O)} is not an Object.` + }) + } + + // 2. Let result be a new empty instance of record. + const result = {} + + if (!types.isProxy(O)) { + // Object.keys only returns enumerable properties + const keys = Object.keys(O) + + for (const key of keys) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue + } + + // 5. Return result. + return result + } + + // 3. Let keys be ? O.[[OwnPropertyKeys]](). + const keys = Reflect.ownKeys(O) + + // 4. For each key of keys. + for (const key of keys) { + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const desc = Reflect.getOwnPropertyDescriptor(O, key) + + // 2. If desc is not undefined and desc.[[Enumerable]] is true: + if (desc?.enumerable) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue + } + } + + // 5. Return result. + return result + } +} + +webidl.interfaceConverter = function (i) { + return (V, opts = {}) => { + if (opts.strict !== false && !(V instanceof i)) { + throw webidl.errors.exception({ + header: i.name, + message: `Expected ${V} to be an instance of ${i.name}.` + }) + } + + return V + } +} + +webidl.dictionaryConverter = function (converters) { + return (dictionary) => { + const type = webidl.util.Type(dictionary) + const dict = {} + + if (type === 'Null' || type === 'Undefined') { + return dict + } else if (type !== 'Object') { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }) + } + + for (const options of converters) { + const { key, defaultValue, required, converter } = options + + if (required === true) { + if (!hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `Missing required key "${key}".` + }) + } + } + + let value = dictionary[key] + const hasDefault = hasOwn(options, 'defaultValue') + + // Only use defaultValue if value is undefined and + // a defaultValue options was provided. + if (hasDefault && value !== null) { + value = value ?? defaultValue + } + + // A key can be optional and have no default value. + // When this happens, do not perform a conversion, + // and do not assign the key a value. + if (required || hasDefault || value !== undefined) { + value = converter(value) + + if ( + options.allowedValues && + !options.allowedValues.includes(value) + ) { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` + }) + } + + dict[key] = value + } + } + + return dict + } +} + +webidl.nullableConverter = function (converter) { + return (V) => { + if (V === null) { + return V + } + + return converter(V) + } +} + +// https://webidl.spec.whatwg.org/#es-DOMString +webidl.converters.DOMString = function (V, opts = {}) { + // 1. If V is null and the conversion is to an IDL type + // associated with the [LegacyNullToEmptyString] + // extended attribute, then return the DOMString value + // that represents the empty string. + if (V === null && opts.legacyNullToEmptyString) { + return '' + } + + // 2. Let x be ? ToString(V). + if (typeof V === 'symbol') { + throw new TypeError('Could not convert argument of type symbol to string.') + } + + // 3. Return the IDL DOMString value that represents the + // same sequence of code units as the one the + // ECMAScript String value x represents. + return String(V) +} + +// https://webidl.spec.whatwg.org/#es-ByteString +webidl.converters.ByteString = function (V) { + // 1. Let x be ? ToString(V). + // Note: DOMString converter perform ? ToString(V) + const x = webidl.converters.DOMString(V) + + // 2. If the value of any element of x is greater than + // 255, then throw a TypeError. + for (let index = 0; index < x.length; index++) { + if (x.charCodeAt(index) > 255) { + throw new TypeError( + 'Cannot convert argument to a ByteString because the character at ' + + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` + ) + } + } + + // 3. Return an IDL ByteString value whose length is the + // length of x, and where the value of each element is + // the value of the corresponding element of x. + return x +} + +// https://webidl.spec.whatwg.org/#es-USVString +webidl.converters.USVString = toUSVString + +// https://webidl.spec.whatwg.org/#es-boolean +webidl.converters.boolean = function (V) { + // 1. Let x be the result of computing ToBoolean(V). + const x = Boolean(V) + + // 2. Return the IDL boolean value that is the one that represents + // the same truth value as the ECMAScript Boolean value x. + return x +} + +// https://webidl.spec.whatwg.org/#es-any +webidl.converters.any = function (V) { + return V +} + +// https://webidl.spec.whatwg.org/#es-long-long +webidl.converters['long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "signed"). + const x = webidl.util.ConvertToInt(V, 64, 'signed') + + // 2. Return the IDL long long value that represents + // the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#es-unsigned-long-long +webidl.converters['unsigned long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). + const x = webidl.util.ConvertToInt(V, 64, 'unsigned') + + // 2. Return the IDL unsigned long long value that + // represents the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#es-unsigned-long +webidl.converters['unsigned long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). + const x = webidl.util.ConvertToInt(V, 32, 'unsigned') + + // 2. Return the IDL unsigned long value that + // represents the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#es-unsigned-short +webidl.converters['unsigned short'] = function (V, opts) { + // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). + const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts) + + // 2. Return the IDL unsigned short value that represents + // the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#idl-ArrayBuffer +webidl.converters.ArrayBuffer = function (V, opts = {}) { + // 1. If Type(V) is not Object, or V does not have an + // [[ArrayBufferData]] internal slot, then throw a + // TypeError. + // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances + // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances + if ( + webidl.util.Type(V) !== 'Object' || + !types.isAnyArrayBuffer(V) + ) { + throw webidl.errors.conversionFailed({ + prefix: `${V}`, + argument: `${V}`, + types: ['ArrayBuffer'] + }) + } + + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V) is true, then throw a + // TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) + } + + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V) is true, then throw a + // TypeError. + // Note: resizable ArrayBuffers are currently a proposal. + + // 4. Return the IDL ArrayBuffer value that is a + // reference to the same object as V. + return V +} + +webidl.converters.TypedArray = function (V, T, opts = {}) { + // 1. Let T be the IDL type V is being converted to. + + // 2. If Type(V) is not Object, or V does not have a + // [[TypedArrayName]] internal slot with a value + // equal to T’s name, then throw a TypeError. + if ( + webidl.util.Type(V) !== 'Object' || + !types.isTypedArray(V) || + V.constructor.name !== T.name + ) { + throw webidl.errors.conversionFailed({ + prefix: `${T.name}`, + argument: `${V}`, + types: [T.name] + }) + } + + // 3. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) + } + + // 4. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + // Note: resizable array buffers are currently a proposal + + // 5. Return the IDL value of type T that is a reference + // to the same object as V. + return V +} + +webidl.converters.DataView = function (V, opts = {}) { + // 1. If Type(V) is not Object, or V does not have a + // [[DataView]] internal slot, then throw a TypeError. + if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { + throw webidl.errors.exception({ + header: 'DataView', + message: 'Object is not a DataView.' + }) + } + + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, + // then throw a TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) + } + + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + // Note: resizable ArrayBuffers are currently a proposal + + // 4. Return the IDL DataView value that is a reference + // to the same object as V. + return V +} + +// https://webidl.spec.whatwg.org/#BufferSource +webidl.converters.BufferSource = function (V, opts = {}) { + if (types.isAnyArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, opts) + } + + if (types.isTypedArray(V)) { + return webidl.converters.TypedArray(V, V.constructor) + } + + if (types.isDataView(V)) { + return webidl.converters.DataView(V, opts) + } + + throw new TypeError(`Could not convert ${V} to a BufferSource.`) +} + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.ByteString +) + +webidl.converters['sequence>'] = webidl.sequenceConverter( + webidl.converters['sequence'] +) + +webidl.converters['record'] = webidl.recordConverter( + webidl.converters.ByteString, + webidl.converters.ByteString +) + +module.exports = { + webidl +} + + +/***/ }), + +/***/ 4854: +/***/ ((module) => { + +"use strict"; + + +/** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ +function getEncoding (label) { + if (!label) { + return 'failure' + } + + // 1. Remove any leading and trailing ASCII whitespace from label. + // 2. If label is an ASCII case-insensitive match for any of the + // labels listed in the table below, then return the + // corresponding encoding; otherwise return failure. + switch (label.trim().toLowerCase()) { + case 'unicode-1-1-utf-8': + case 'unicode11utf8': + case 'unicode20utf8': + case 'utf-8': + case 'utf8': + case 'x-unicode20utf8': + return 'UTF-8' + case '866': + case 'cp866': + case 'csibm866': + case 'ibm866': + return 'IBM866' + case 'csisolatin2': + case 'iso-8859-2': + case 'iso-ir-101': + case 'iso8859-2': + case 'iso88592': + case 'iso_8859-2': + case 'iso_8859-2:1987': + case 'l2': + case 'latin2': + return 'ISO-8859-2' + case 'csisolatin3': + case 'iso-8859-3': + case 'iso-ir-109': + case 'iso8859-3': + case 'iso88593': + case 'iso_8859-3': + case 'iso_8859-3:1988': + case 'l3': + case 'latin3': + return 'ISO-8859-3' + case 'csisolatin4': + case 'iso-8859-4': + case 'iso-ir-110': + case 'iso8859-4': + case 'iso88594': + case 'iso_8859-4': + case 'iso_8859-4:1988': + case 'l4': + case 'latin4': + return 'ISO-8859-4' + case 'csisolatincyrillic': + case 'cyrillic': + case 'iso-8859-5': + case 'iso-ir-144': + case 'iso8859-5': + case 'iso88595': + case 'iso_8859-5': + case 'iso_8859-5:1988': + return 'ISO-8859-5' + case 'arabic': + case 'asmo-708': + case 'csiso88596e': + case 'csiso88596i': + case 'csisolatinarabic': + case 'ecma-114': + case 'iso-8859-6': + case 'iso-8859-6-e': + case 'iso-8859-6-i': + case 'iso-ir-127': + case 'iso8859-6': + case 'iso88596': + case 'iso_8859-6': + case 'iso_8859-6:1987': + return 'ISO-8859-6' + case 'csisolatingreek': + case 'ecma-118': + case 'elot_928': + case 'greek': + case 'greek8': + case 'iso-8859-7': + case 'iso-ir-126': + case 'iso8859-7': + case 'iso88597': + case 'iso_8859-7': + case 'iso_8859-7:1987': + case 'sun_eu_greek': + return 'ISO-8859-7' + case 'csiso88598e': + case 'csisolatinhebrew': + case 'hebrew': + case 'iso-8859-8': + case 'iso-8859-8-e': + case 'iso-ir-138': + case 'iso8859-8': + case 'iso88598': + case 'iso_8859-8': + case 'iso_8859-8:1988': + case 'visual': + return 'ISO-8859-8' + case 'csiso88598i': + case 'iso-8859-8-i': + case 'logical': + return 'ISO-8859-8-I' + case 'csisolatin6': + case 'iso-8859-10': + case 'iso-ir-157': + case 'iso8859-10': + case 'iso885910': + case 'l6': + case 'latin6': + return 'ISO-8859-10' + case 'iso-8859-13': + case 'iso8859-13': + case 'iso885913': + return 'ISO-8859-13' + case 'iso-8859-14': + case 'iso8859-14': + case 'iso885914': + return 'ISO-8859-14' + case 'csisolatin9': + case 'iso-8859-15': + case 'iso8859-15': + case 'iso885915': + case 'iso_8859-15': + case 'l9': + return 'ISO-8859-15' + case 'iso-8859-16': + return 'ISO-8859-16' + case 'cskoi8r': + case 'koi': + case 'koi8': + case 'koi8-r': + case 'koi8_r': + return 'KOI8-R' + case 'koi8-ru': + case 'koi8-u': + return 'KOI8-U' + case 'csmacintosh': + case 'mac': + case 'macintosh': + case 'x-mac-roman': + return 'macintosh' + case 'iso-8859-11': + case 'iso8859-11': + case 'iso885911': + case 'tis-620': + case 'windows-874': + return 'windows-874' + case 'cp1250': + case 'windows-1250': + case 'x-cp1250': + return 'windows-1250' + case 'cp1251': + case 'windows-1251': + case 'x-cp1251': + return 'windows-1251' + case 'ansi_x3.4-1968': + case 'ascii': + case 'cp1252': + case 'cp819': + case 'csisolatin1': + case 'ibm819': + case 'iso-8859-1': + case 'iso-ir-100': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'iso_8859-1:1987': + case 'l1': + case 'latin1': + case 'us-ascii': + case 'windows-1252': + case 'x-cp1252': + return 'windows-1252' + case 'cp1253': + case 'windows-1253': + case 'x-cp1253': + return 'windows-1253' + case 'cp1254': + case 'csisolatin5': + case 'iso-8859-9': + case 'iso-ir-148': + case 'iso8859-9': + case 'iso88599': + case 'iso_8859-9': + case 'iso_8859-9:1989': + case 'l5': + case 'latin5': + case 'windows-1254': + case 'x-cp1254': + return 'windows-1254' + case 'cp1255': + case 'windows-1255': + case 'x-cp1255': + return 'windows-1255' + case 'cp1256': + case 'windows-1256': + case 'x-cp1256': + return 'windows-1256' + case 'cp1257': + case 'windows-1257': + case 'x-cp1257': + return 'windows-1257' + case 'cp1258': + case 'windows-1258': + case 'x-cp1258': + return 'windows-1258' + case 'x-mac-cyrillic': + case 'x-mac-ukrainian': + return 'x-mac-cyrillic' + case 'chinese': + case 'csgb2312': + case 'csiso58gb231280': + case 'gb2312': + case 'gb_2312': + case 'gb_2312-80': + case 'gbk': + case 'iso-ir-58': + case 'x-gbk': + return 'GBK' + case 'gb18030': + return 'gb18030' + case 'big5': + case 'big5-hkscs': + case 'cn-big5': + case 'csbig5': + case 'x-x-big5': + return 'Big5' + case 'cseucpkdfmtjapanese': + case 'euc-jp': + case 'x-euc-jp': + return 'EUC-JP' + case 'csiso2022jp': + case 'iso-2022-jp': + return 'ISO-2022-JP' + case 'csshiftjis': + case 'ms932': + case 'ms_kanji': + case 'shift-jis': + case 'shift_jis': + case 'sjis': + case 'windows-31j': + case 'x-sjis': + return 'Shift_JIS' + case 'cseuckr': + case 'csksc56011987': + case 'euc-kr': + case 'iso-ir-149': + case 'korean': + case 'ks_c_5601-1987': + case 'ks_c_5601-1989': + case 'ksc5601': + case 'ksc_5601': + case 'windows-949': + return 'EUC-KR' + case 'csiso2022kr': + case 'hz-gb-2312': + case 'iso-2022-cn': + case 'iso-2022-cn-ext': + case 'iso-2022-kr': + case 'replacement': + return 'replacement' + case 'unicodefffe': + case 'utf-16be': + return 'UTF-16BE' + case 'csunicode': + case 'iso-10646-ucs-2': + case 'ucs-2': + case 'unicode': + case 'unicodefeff': + case 'utf-16': + case 'utf-16le': + return 'UTF-16LE' + case 'x-user-defined': + return 'x-user-defined' + default: return 'failure' + } +} + +module.exports = { + getEncoding +} + + +/***/ }), + +/***/ 1446: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent +} = __nccwpck_require__(7530) +const { + kState, + kError, + kResult, + kEvents, + kAborted +} = __nccwpck_require__(9054) +const { webidl } = __nccwpck_require__(1744) +const { kEnumerableProperty } = __nccwpck_require__(3983) + +class FileReader extends EventTarget { + constructor () { + super() + + this[kState] = 'empty' + this[kResult] = null + this[kError] = null + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + } + } + + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer (blob) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsArrayBuffer(blob) method, when invoked, + // must initiate a read operation for blob with ArrayBuffer. + readOperation(this, blob, 'ArrayBuffer') + } + + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString (blob) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsBinaryString(blob) method, when invoked, + // must initiate a read operation for blob with BinaryString. + readOperation(this, blob, 'BinaryString') + } + + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText (blob, encoding = undefined) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + if (encoding !== undefined) { + encoding = webidl.converters.DOMString(encoding) + } + + // The readAsText(blob, encoding) method, when invoked, + // must initiate a read operation for blob with Text and encoding. + readOperation(this, blob, 'Text', encoding) + } + + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL (blob) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsDataURL(blob) method, when invoked, must + // initiate a read operation for blob with DataURL. + readOperation(this, blob, 'DataURL') + } + + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort () { + // 1. If this's state is "empty" or if this's state is + // "done" set this's result to null and terminate + // this algorithm. + if (this[kState] === 'empty' || this[kState] === 'done') { + this[kResult] = null + return + } + + // 2. If this's state is "loading" set this's state to + // "done" and set this's result to null. + if (this[kState] === 'loading') { + this[kState] = 'done' + this[kResult] = null + } + + // 3. If there are any tasks from this on the file reading + // task source in an affiliated task queue, then remove + // those tasks from that task queue. + this[kAborted] = true + + // 4. Terminate the algorithm for the read method being processed. + // TODO + + // 5. Fire a progress event called abort at this. + fireAProgressEvent('abort', this) + + // 6. If this's state is not "loading", fire a progress + // event called loadend at this. + if (this[kState] !== 'loading') { + fireAProgressEvent('loadend', this) + } + } + + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState () { + webidl.brandCheck(this, FileReader) + + switch (this[kState]) { + case 'empty': return this.EMPTY + case 'loading': return this.LOADING + case 'done': return this.DONE + } + } + + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result () { + webidl.brandCheck(this, FileReader) + + // The result attribute’s getter, when invoked, must return + // this's result. + return this[kResult] + } + + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error () { + webidl.brandCheck(this, FileReader) + + // The error attribute’s getter, when invoked, must return + // this's error. + return this[kError] + } + + get onloadend () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].loadend + } + + set onloadend (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].loadend) { + this.removeEventListener('loadend', this[kEvents].loadend) + } + + if (typeof fn === 'function') { + this[kEvents].loadend = fn + this.addEventListener('loadend', fn) + } else { + this[kEvents].loadend = null + } + } + + get onerror () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].error + } + + set onerror (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].error) { + this.removeEventListener('error', this[kEvents].error) + } + + if (typeof fn === 'function') { + this[kEvents].error = fn + this.addEventListener('error', fn) + } else { + this[kEvents].error = null + } + } + + get onloadstart () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].loadstart + } + + set onloadstart (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].loadstart) { + this.removeEventListener('loadstart', this[kEvents].loadstart) + } + + if (typeof fn === 'function') { + this[kEvents].loadstart = fn + this.addEventListener('loadstart', fn) + } else { + this[kEvents].loadstart = null + } + } + + get onprogress () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].progress + } + + set onprogress (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].progress) { + this.removeEventListener('progress', this[kEvents].progress) + } + + if (typeof fn === 'function') { + this[kEvents].progress = fn + this.addEventListener('progress', fn) + } else { + this[kEvents].progress = null + } + } + + get onload () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].load + } + + set onload (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].load) { + this.removeEventListener('load', this[kEvents].load) + } + + if (typeof fn === 'function') { + this[kEvents].load = fn + this.addEventListener('load', fn) + } else { + this[kEvents].load = null + } + } + + get onabort () { + webidl.brandCheck(this, FileReader) + + return this[kEvents].abort + } + + set onabort (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].abort) { + this.removeEventListener('abort', this[kEvents].abort) + } + + if (typeof fn === 'function') { + this[kEvents].abort = fn + this.addEventListener('abort', fn) + } else { + this[kEvents].abort = null + } + } +} + +// https://w3c.github.io/FileAPI/#dom-filereader-empty +FileReader.EMPTY = FileReader.prototype.EMPTY = 0 +// https://w3c.github.io/FileAPI/#dom-filereader-loading +FileReader.LOADING = FileReader.prototype.LOADING = 1 +// https://w3c.github.io/FileAPI/#dom-filereader-done +FileReader.DONE = FileReader.prototype.DONE = 2 + +Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'FileReader', + writable: false, + enumerable: false, + configurable: true + } +}) + +Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors +}) + +module.exports = { + FileReader +} + + +/***/ }), + +/***/ 5504: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { webidl } = __nccwpck_require__(1744) + +const kState = Symbol('ProgressEvent state') + +/** + * @see https://xhr.spec.whatwg.org/#progressevent + */ +class ProgressEvent extends Event { + constructor (type, eventInitDict = {}) { + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) + + super(type, eventInitDict) + + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + } + } + + get lengthComputable () { + webidl.brandCheck(this, ProgressEvent) + + return this[kState].lengthComputable + } + + get loaded () { + webidl.brandCheck(this, ProgressEvent) + + return this[kState].loaded + } + + get total () { + webidl.brandCheck(this, ProgressEvent) + + return this[kState].total + } +} + +webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: 'lengthComputable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'loaded', + converter: webidl.converters['unsigned long long'], + defaultValue: 0 + }, + { + key: 'total', + converter: webidl.converters['unsigned long long'], + defaultValue: 0 + }, + { + key: 'bubbles', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'cancelable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'composed', + converter: webidl.converters.boolean, + defaultValue: false + } +]) + +module.exports = { + ProgressEvent +} + + +/***/ }), + +/***/ 9054: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + kState: Symbol('FileReader state'), + kResult: Symbol('FileReader result'), + kError: Symbol('FileReader error'), + kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), + kEvents: Symbol('FileReader events'), + kAborted: Symbol('FileReader aborted') +} + + +/***/ }), + +/***/ 7530: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { + kState, + kError, + kResult, + kAborted, + kLastProgressEventFired +} = __nccwpck_require__(9054) +const { ProgressEvent } = __nccwpck_require__(5504) +const { getEncoding } = __nccwpck_require__(4854) +const { DOMException } = __nccwpck_require__(1037) +const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(685) +const { types } = __nccwpck_require__(3837) +const { StringDecoder } = __nccwpck_require__(1576) +const { btoa } = __nccwpck_require__(4300) + +/** @type {PropertyDescriptor} */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +} + +/** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ +function readOperation (fr, blob, type, encodingName) { + // 1. If fr’s state is "loading", throw an InvalidStateError + // DOMException. + if (fr[kState] === 'loading') { + throw new DOMException('Invalid state', 'InvalidStateError') + } + + // 2. Set fr’s state to "loading". + fr[kState] = 'loading' + + // 3. Set fr’s result to null. + fr[kResult] = null + + // 4. Set fr’s error to null. + fr[kError] = null + + // 5. Let stream be the result of calling get stream on blob. + /** @type {import('stream/web').ReadableStream} */ + const stream = blob.stream() + + // 6. Let reader be the result of getting a reader from stream. + const reader = stream.getReader() + + // 7. Let bytes be an empty byte sequence. + /** @type {Uint8Array[]} */ + const bytes = [] + + // 8. Let chunkPromise be the result of reading a chunk from + // stream with reader. + let chunkPromise = reader.read() + + // 9. Let isFirstChunk be true. + let isFirstChunk = true + + // 10. In parallel, while true: + // Note: "In parallel" just means non-blocking + // Note 2: readOperation itself cannot be async as double + // reading the body would then reject the promise, instead + // of throwing an error. + ;(async () => { + while (!fr[kAborted]) { + // 1. Wait for chunkPromise to be fulfilled or rejected. + try { + const { done, value } = await chunkPromise + + // 2. If chunkPromise is fulfilled, and isFirstChunk is + // true, queue a task to fire a progress event called + // loadstart at fr. + if (isFirstChunk && !fr[kAborted]) { + queueMicrotask(() => { + fireAProgressEvent('loadstart', fr) + }) + } + + // 3. Set isFirstChunk to false. + isFirstChunk = false + + // 4. If chunkPromise is fulfilled with an object whose + // done property is false and whose value property is + // a Uint8Array object, run these steps: + if (!done && types.isUint8Array(value)) { + // 1. Let bs be the byte sequence represented by the + // Uint8Array object. + + // 2. Append bs to bytes. + bytes.push(value) + + // 3. If roughly 50ms have passed since these steps + // were last invoked, queue a task to fire a + // progress event called progress at fr. + if ( + ( + fr[kLastProgressEventFired] === undefined || + Date.now() - fr[kLastProgressEventFired] >= 50 + ) && + !fr[kAborted] + ) { + fr[kLastProgressEventFired] = Date.now() + queueMicrotask(() => { + fireAProgressEvent('progress', fr) + }) + } + + // 4. Set chunkPromise to the result of reading a + // chunk from stream with reader. + chunkPromise = reader.read() + } else if (done) { + // 5. Otherwise, if chunkPromise is fulfilled with an + // object whose done property is true, queue a task + // to run the following steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' + + // 2. Let result be the result of package data given + // bytes, type, blob’s type, and encodingName. + try { + const result = packageData(bytes, type, blob.type, encodingName) + + // 4. Else: + + if (fr[kAborted]) { + return + } + + // 1. Set fr’s result to result. + fr[kResult] = result + + // 2. Fire a progress event called load at the fr. + fireAProgressEvent('load', fr) + } catch (error) { + // 3. If package data threw an exception error: + + // 1. Set fr’s error to error. + fr[kError] = error + + // 2. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) + } + + // 5. If fr’s state is not "loading", fire a progress + // event called loadend at the fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) + + break + } + } catch (error) { + if (fr[kAborted]) { + return + } + + // 6. Otherwise, if chunkPromise is rejected with an + // error error, queue a task to run the following + // steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' + + // 2. Set fr’s error to error. + fr[kError] = error + + // 3. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) + + // 4. If fr’s state is not "loading", fire a progress + // event called loadend at fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) + + break + } + } + })() +} + +/** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ +function fireAProgressEvent (e, reader) { + // The progress event e does not bubble. e.bubbles must be false + // The progress event e is NOT cancelable. e.cancelable must be false + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }) + + reader.dispatchEvent(event) +} + +/** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ +function packageData (bytes, type, mimeType, encodingName) { + // 1. A Blob has an associated package data algorithm, given + // bytes, a type, a optional mimeType, and a optional + // encodingName, which switches on type and runs the + // associated steps: + + switch (type) { + case 'DataURL': { + // 1. Return bytes as a DataURL [RFC2397] subject to + // the considerations below: + // * Use mimeType as part of the Data URL if it is + // available in keeping with the Data URL + // specification [RFC2397]. + // * If mimeType is not available return a Data URL + // without a media-type. [RFC2397]. + + // https://datatracker.ietf.org/doc/html/rfc2397#section-3 + // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data + // mediatype := [ type "/" subtype ] *( ";" parameter ) + // data := *urlchar + // parameter := attribute "=" value + let dataURL = 'data:' + + const parsed = parseMIMEType(mimeType || 'application/octet-stream') + + if (parsed !== 'failure') { + dataURL += serializeAMimeType(parsed) + } + + dataURL += ';base64,' + + const decoder = new StringDecoder('latin1') + + for (const chunk of bytes) { + dataURL += btoa(decoder.write(chunk)) + } + + dataURL += btoa(decoder.end()) + + return dataURL + } + case 'Text': { + // 1. Let encoding be failure + let encoding = 'failure' + + // 2. If the encodingName is present, set encoding to the + // result of getting an encoding from encodingName. + if (encodingName) { + encoding = getEncoding(encodingName) + } + + // 3. If encoding is failure, and mimeType is present: + if (encoding === 'failure' && mimeType) { + // 1. Let type be the result of parse a MIME type + // given mimeType. + const type = parseMIMEType(mimeType) + + // 2. If type is not failure, set encoding to the result + // of getting an encoding from type’s parameters["charset"]. + if (type !== 'failure') { + encoding = getEncoding(type.parameters.get('charset')) + } + } + + // 4. If encoding is failure, then set encoding to UTF-8. + if (encoding === 'failure') { + encoding = 'UTF-8' + } + + // 5. Decode bytes using fallback encoding encoding, and + // return the result. + return decode(bytes, encoding) + } + case 'ArrayBuffer': { + // Return a new ArrayBuffer whose contents are bytes. + const sequence = combineByteSequences(bytes) + + return sequence.buffer + } + case 'BinaryString': { + // Return bytes as a binary string, in which every byte + // is represented by a code unit of equal value [0..255]. + let binaryString = '' + + const decoder = new StringDecoder('latin1') + + for (const chunk of bytes) { + binaryString += decoder.write(chunk) + } + + binaryString += decoder.end() + + return binaryString + } + } +} + +/** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ +function decode (ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue) + + // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. + const BOMEncoding = BOMSniffing(bytes) + + let slice = 0 + + // 2. If BOMEncoding is non-null: + if (BOMEncoding !== null) { + // 1. Set encoding to BOMEncoding. + encoding = BOMEncoding + + // 2. Read three bytes from ioQueue, if BOMEncoding is + // UTF-8; otherwise read two bytes. + // (Do nothing with those bytes.) + slice = BOMEncoding === 'UTF-8' ? 3 : 2 + } + + // 3. Process a queue with an instance of encoding’s + // decoder, ioQueue, output, and "replacement". + + // 4. Return output. + + const sliced = bytes.slice(slice) + return new TextDecoder(encoding).decode(sliced) +} + +/** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ +function BOMSniffing (ioQueue) { + // 1. Let BOM be the result of peeking 3 bytes from ioQueue, + // converted to a byte sequence. + const [a, b, c] = ioQueue + + // 2. For each of the rows in the table below, starting with + // the first one and going down, if BOM starts with the + // bytes given in the first column, then return the + // encoding given in the cell in the second column of that + // row. Otherwise, return null. + if (a === 0xEF && b === 0xBB && c === 0xBF) { + return 'UTF-8' + } else if (a === 0xFE && b === 0xFF) { + return 'UTF-16BE' + } else if (a === 0xFF && b === 0xFE) { + return 'UTF-16LE' + } + + return null +} + +/** + * @param {Uint8Array[]} sequences + */ +function combineByteSequences (sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength + }, 0) + + let offset = 0 + + return sequences.reduce((a, b) => { + a.set(b, offset) + offset += b.byteLength + return a + }, new Uint8Array(size)) +} + +module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent +} + + +/***/ }), + +/***/ 1892: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// We include a version number for the Dispatcher API. In case of breaking changes, +// this version number must be increased to avoid conflicts. +const globalDispatcher = Symbol.for('undici.globalDispatcher.1') +const { InvalidArgumentError } = __nccwpck_require__(8045) +const Agent = __nccwpck_require__(7890) + +if (getGlobalDispatcher() === undefined) { + setGlobalDispatcher(new Agent()) +} + +function setGlobalDispatcher (agent) { + if (!agent || typeof agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument agent must implement Agent') + } + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }) +} + +function getGlobalDispatcher () { + return globalThis[globalDispatcher] +} + +module.exports = { + setGlobalDispatcher, + getGlobalDispatcher +} + + +/***/ }), + +/***/ 6930: +/***/ ((module) => { + +"use strict"; + + +module.exports = class DecoratorHandler { + constructor (handler) { + this.handler = handler + } + + onConnect (...args) { + return this.handler.onConnect(...args) + } + + onError (...args) { + return this.handler.onError(...args) + } + + onUpgrade (...args) { + return this.handler.onUpgrade(...args) + } + + onHeaders (...args) { + return this.handler.onHeaders(...args) + } + + onData (...args) { + return this.handler.onData(...args) + } + + onComplete (...args) { + return this.handler.onComplete(...args) + } + + onBodySent (...args) { + return this.handler.onBodySent(...args) + } +} + + +/***/ }), + +/***/ 2860: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(3983) +const { kBodyUsed } = __nccwpck_require__(2785) +const assert = __nccwpck_require__(9491) +const { InvalidArgumentError } = __nccwpck_require__(8045) +const EE = __nccwpck_require__(2361) + +const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] + +const kBody = Symbol('body') + +class BodyAsyncIterable { + constructor (body) { + this[kBody] = body + this[kBodyUsed] = false + } + + async * [Symbol.asyncIterator] () { + assert(!this[kBodyUsed], 'disturbed') + this[kBodyUsed] = true + yield * this[kBody] + } +} + +class RedirectHandler { + constructor (dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError('maxRedirections must be a positive number') + } + + util.validateHandler(handler, opts.method, opts.upgrade) + + this.dispatch = dispatch + this.location = null + this.abort = null + this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy + this.maxRedirections = maxRedirections + this.handler = handler + this.history = [] + + if (util.isStream(this.opts.body)) { + // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp + // so that it can be dispatched again? + // TODO (fix): Do we need 100-expect support to provide a way to do this properly? + if (util.bodyLength(this.opts.body) === 0) { + this.opts.body + .on('data', function () { + assert(false) + }) + } + + if (typeof this.opts.body.readableDidRead !== 'boolean') { + this.opts.body[kBodyUsed] = false + EE.prototype.on.call(this.opts.body, 'data', function () { + this[kBodyUsed] = true + }) + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { + // TODO (fix): We can't access ReadableStream internal state + // to determine whether or not it has been disturbed. This is just + // a workaround. + this.opts.body = new BodyAsyncIterable(this.opts.body) + } else if ( + this.opts.body && + typeof this.opts.body !== 'string' && + !ArrayBuffer.isView(this.opts.body) && + util.isIterable(this.opts.body) + ) { + // TODO: Should we allow re-using iterable if !this.opts.idempotent + // or through some other flag? + this.opts.body = new BodyAsyncIterable(this.opts.body) + } + } + + onConnect (abort) { + this.abort = abort + this.handler.onConnect(abort, { history: this.history }) + } + + onUpgrade (statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket) + } + + onError (error) { + this.handler.onError(error) + } + + onHeaders (statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) + ? null + : parseLocation(statusCode, headers) + + if (this.opts.origin) { + this.history.push(new URL(this.opts.path, this.opts.origin)) + } + + if (!this.location) { + return this.handler.onHeaders(statusCode, headers, resume, statusText) + } + + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) + const path = search ? `${pathname}${search}` : pathname + + // Remove headers referring to the original URL. + // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. + // https://tools.ietf.org/html/rfc7231#section-6.4 + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) + this.opts.path = path + this.opts.origin = origin + this.opts.maxRedirections = 0 + this.opts.query = null + + // https://tools.ietf.org/html/rfc7231#section-6.4.4 + // In case of HTTP 303, always replace method to be either HEAD or GET + if (statusCode === 303 && this.opts.method !== 'HEAD') { + this.opts.method = 'GET' + this.opts.body = null + } + } + + onData (chunk) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 + + TLDR: undici always ignores 3xx response bodies. + + Redirection is used to serve the requested resource from another URL, so it is assumes that + no body is generated (and thus can be ignored). Even though generating a body is not prohibited. + + For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually + (which means it's optional and not mandated) contain just an hyperlink to the value of + the Location response header, so the body can be ignored safely. + + For status 300, which is "Multiple Choices", the spec mentions both generating a Location + response header AND a response body with the other possible location to follow. + Since the spec explicitily chooses not to specify a format for such body and leave it to + servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. + */ + } else { + return this.handler.onData(chunk) + } + } + + onComplete (trailers) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 + + TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections + and neither are useful if present. + + See comment on onData method above for more detailed informations. + */ + + this.location = null + this.abort = null + + this.dispatch(this.opts, this) + } else { + this.handler.onComplete(trailers) + } + } + + onBodySent (chunk) { + if (this.handler.onBodySent) { + this.handler.onBodySent(chunk) + } + } +} + +function parseLocation (statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) { + return null + } + + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].toString().toLowerCase() === 'location') { + return headers[i + 1] + } + } +} + +// https://tools.ietf.org/html/rfc7231#section-6.4.4 +function shouldRemoveHeader (header, removeContent, unknownOrigin) { + if (header.length === 4) { + return util.headerNameToString(header) === 'host' + } + if (removeContent && util.headerNameToString(header).startsWith('content-')) { + return true + } + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header) + return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' + } + return false +} + +// https://tools.ietf.org/html/rfc7231#section-6.4 +function cleanRequestHeaders (headers, removeContent, unknownOrigin) { + const ret = [] + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { + ret.push(headers[i], headers[i + 1]) + } + } + } else if (headers && typeof headers === 'object') { + for (const key of Object.keys(headers)) { + if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { + ret.push(key, headers[key]) + } + } + } else { + assert(headers == null, 'headers must be an object or an array') + } + return ret +} + +module.exports = RedirectHandler + + +/***/ }), + +/***/ 2286: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const assert = __nccwpck_require__(9491) + +const { kRetryHandlerDefaultRetry } = __nccwpck_require__(2785) +const { RequestRetryError } = __nccwpck_require__(8045) +const { isDisturbed, parseHeaders, parseRangeHeader } = __nccwpck_require__(3983) + +function calculateRetryAfterHeader (retryAfter) { + const current = Date.now() + const diff = new Date(retryAfter).getTime() - current + + return diff +} + +class RetryHandler { + constructor (opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes + } = retryOptions ?? {} + + this.dispatch = handlers.dispatch + this.handler = handlers.handler + this.opts = dispatchOpts + this.abort = null + this.aborted = false + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1000, // 30s, + timeout: minTimeout ?? 500, // .5s + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + // Indicates which errors to retry + statusCodes: statusCodes ?? [500, 502, 503, 504, 429], + // List of errors to retry + errorCodes: errorCodes ?? [ + 'ECONNRESET', + 'ECONNREFUSED', + 'ENOTFOUND', + 'ENETDOWN', + 'ENETUNREACH', + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'EPIPE' + ] + } + + this.retryCount = 0 + this.start = 0 + this.end = null + this.etag = null + this.resume = null + + // Handle possible onConnect duplication + this.handler.onConnect(reason => { + this.aborted = true + if (this.abort) { + this.abort(reason) + } else { + this.reason = reason + } + }) + } + + onRequestSent () { + if (this.handler.onRequestSent) { + this.handler.onRequestSent() + } + } + + onUpgrade (statusCode, headers, socket) { + if (this.handler.onUpgrade) { + this.handler.onUpgrade(statusCode, headers, socket) + } + } + + onConnect (abort) { + if (this.aborted) { + abort(this.reason) + } else { + this.abort = abort + } + } + + onBodySent (chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk) + } + + static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { + const { statusCode, code, headers } = err + const { method, retryOptions } = opts + const { + maxRetries, + timeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions + let { counter, currentTimeout } = state + + currentTimeout = + currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout + + // Any code that is not a Undici's originated and allowed to retry + if ( + code && + code !== 'UND_ERR_REQ_RETRY' && + code !== 'UND_ERR_SOCKET' && + !errorCodes.includes(code) + ) { + cb(err) + return + } + + // If a set of method are provided and the current method is not in the list + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err) + return + } + + // If a set of status code are provided and the current status code is not in the list + if ( + statusCode != null && + Array.isArray(statusCodes) && + !statusCodes.includes(statusCode) + ) { + cb(err) + return + } + + // If we reached the max number of retries + if (counter > maxRetries) { + cb(err) + return + } + + let retryAfterHeader = headers != null && headers['retry-after'] + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader) + retryAfterHeader = isNaN(retryAfterHeader) + ? calculateRetryAfterHeader(retryAfterHeader) + : retryAfterHeader * 1e3 // Retry-After is in seconds + } + + const retryTimeout = + retryAfterHeader > 0 + ? Math.min(retryAfterHeader, maxTimeout) + : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) + + state.currentTimeout = retryTimeout + + setTimeout(() => cb(null), retryTimeout) + } + + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders) + + this.retryCount += 1 + + if (statusCode >= 300) { + this.abort( + new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + // Checkpoint for resume from where we left it + if (this.resume != null) { + this.resume = null + + if (statusCode !== 206) { + return true + } + + const contentRange = parseRangeHeader(headers['content-range']) + // If no content range + if (!contentRange) { + this.abort( + new RequestRetryError('Content-Range mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + // Let's start with a weak etag check + if (this.etag != null && this.etag !== headers.etag) { + this.abort( + new RequestRetryError('ETag mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + const { start, size, end = size } = contentRange + + assert(this.start === start, 'content-range mismatch') + assert(this.end == null || this.end === end, 'content-range mismatch') + + this.resume = resume + return true + } + + if (this.end == null) { + if (statusCode === 206) { + // First time we receive 206 + const range = parseRangeHeader(headers['content-range']) + + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) + } + + const { start, size, end = size } = range + + assert( + start != null && Number.isFinite(start) && this.start !== start, + 'content-range mismatch' + ) + assert(Number.isFinite(start)) + assert( + end != null && Number.isFinite(end) && this.end !== end, + 'invalid content-length' + ) + + this.start = start + this.end = end + } + + // We make our best to checkpoint the body for further range headers + if (this.end == null) { + const contentLength = headers['content-length'] + this.end = contentLength != null ? Number(contentLength) : null + } + + assert(Number.isFinite(this.start)) + assert( + this.end == null || Number.isFinite(this.end), + 'invalid content-length' + ) + + this.resume = resume + this.etag = headers.etag != null ? headers.etag : null + + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) + } + + const err = new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + + this.abort(err) + + return false + } + + onData (chunk) { + this.start += chunk.length + + return this.handler.onData(chunk) + } + + onComplete (rawTrailers) { + this.retryCount = 0 + return this.handler.onComplete(rawTrailers) + } + + onError (err) { + if (this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } + + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + onRetry.bind(this) + ) + + function onRetry (err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } + + if (this.start !== 0) { + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + range: `bytes=${this.start}-${this.end ?? ''}` + } + } + } + + try { + this.dispatch(this.opts, this) + } catch (err) { + this.handler.onError(err) + } + } + } +} + +module.exports = RetryHandler + + +/***/ }), + +/***/ 8861: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const RedirectHandler = __nccwpck_require__(2860) + +function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept (opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts + + if (!maxRedirections) { + return dispatch(opts, handler) + } + + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) + opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. + return dispatch(opts, redirectHandler) + } + } +} + +module.exports = createRedirectInterceptor + + +/***/ }), + +/***/ 953: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; +const utils_1 = __nccwpck_require__(1891); +// C headers +var ERROR; +(function (ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; +})(ERROR = exports.ERROR || (exports.ERROR = {})); +var TYPE; +(function (TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; +})(TYPE = exports.TYPE || (exports.TYPE = {})); +var FLAGS; +(function (FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + // 1 << 8 is unused + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; +})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); +var LENIENT_FLAGS; +(function (LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; +})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); +var METHODS; +(function (METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + /* pathological */ + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + /* WebDAV */ + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + /* subversion */ + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + /* upnp */ + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + /* RFC-5789 */ + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + /* CalDAV */ + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + /* RFC-2068, section 19.6.1.2 */ + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + /* icecast */ + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + /* RFC-7540, section 11.6 */ + METHODS[METHODS["PRI"] = 34] = "PRI"; + /* RFC-2326 RTSP */ + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + /* RAOP */ + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; +})(METHODS = exports.METHODS || (exports.METHODS = {})); +exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS['M-SEARCH'], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + METHODS.SOURCE, +]; +exports.METHODS_ICE = [ + METHODS.SOURCE, +]; +exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + // For AirPlay + METHODS.GET, + METHODS.POST, +]; +exports.METHOD_MAP = utils_1.enumToMap(METHODS); +exports.H_METHOD_MAP = {}; +Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) { + exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + } +}); +var FINISH; +(function (FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; +})(FINISH = exports.FINISH || (exports.FINISH = {})); +exports.ALPHA = []; +for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { + // Upper case + exports.ALPHA.push(String.fromCharCode(i)); + // Lower case + exports.ALPHA.push(String.fromCharCode(i + 0x20)); +} +exports.NUM_MAP = { + 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, + 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, +}; +exports.HEX_MAP = { + 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, + 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, + A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, + a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, +}; +exports.NUM = [ + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', +]; +exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); +exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; +exports.USERINFO_CHARS = exports.ALPHANUM + .concat(exports.MARK) + .concat(['%', ';', ':', '&', '=', '+', '$', ',']); +// TODO(indutny): use RFC +exports.STRICT_URL_CHAR = [ + '!', '"', '$', '%', '&', '\'', + '(', ')', '*', '+', ',', '-', '.', '/', + ':', ';', '<', '=', '>', + '@', '[', '\\', ']', '^', '_', + '`', + '{', '|', '}', '~', +].concat(exports.ALPHANUM); +exports.URL_CHAR = exports.STRICT_URL_CHAR + .concat(['\t', '\f']); +// All characters with 0x80 bit set to 1 +for (let i = 0x80; i <= 0xff; i++) { + exports.URL_CHAR.push(i); +} +exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); +/* Tokens as defined by rfc 2616. Also lowercases them. + * token = 1* + * separators = "(" | ")" | "<" | ">" | "@" + * | "," | ";" | ":" | "\" | <"> + * | "/" | "[" | "]" | "?" | "=" + * | "{" | "}" | SP | HT + */ +exports.STRICT_TOKEN = [ + '!', '#', '$', '%', '&', '\'', + '*', '+', '-', '.', + '^', '_', '`', + '|', '~', +].concat(exports.ALPHANUM); +exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); +/* + * Verify that a char is a valid visible (printable) US-ASCII + * character or %x80-FF + */ +exports.HEADER_CHARS = ['\t']; +for (let i = 32; i <= 255; i++) { + if (i !== 127) { + exports.HEADER_CHARS.push(i); + } +} +// ',' = \x44 +exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); +exports.MAJOR = exports.NUM_MAP; +exports.MINOR = exports.MAJOR; +var HEADER_STATE; +(function (HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; +})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); +exports.SPECIAL_HEADERS = { + 'connection': HEADER_STATE.CONNECTION, + 'content-length': HEADER_STATE.CONTENT_LENGTH, + 'proxy-connection': HEADER_STATE.CONNECTION, + 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, + 'upgrade': HEADER_STATE.UPGRADE, +}; +//# sourceMappingURL=constants.js.map + +/***/ }), + +/***/ 1145: +/***/ ((module) => { + +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' + + +/***/ }), + +/***/ 5627: +/***/ ((module) => { + +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' + + +/***/ }), + +/***/ 1891: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.enumToMap = void 0; +function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === 'number') { + res[key] = value; + } + }); + return res; +} +exports.enumToMap = enumToMap; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 6771: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { kClients } = __nccwpck_require__(2785) +const Agent = __nccwpck_require__(7890) +const { + kAgent, + kMockAgentSet, + kMockAgentGet, + kDispatches, + kIsMockActive, + kNetConnect, + kGetNetConnect, + kOptions, + kFactory +} = __nccwpck_require__(4347) +const MockClient = __nccwpck_require__(8687) +const MockPool = __nccwpck_require__(6193) +const { matchValue, buildMockOptions } = __nccwpck_require__(9323) +const { InvalidArgumentError, UndiciError } = __nccwpck_require__(8045) +const Dispatcher = __nccwpck_require__(412) +const Pluralizer = __nccwpck_require__(8891) +const PendingInterceptorsFormatter = __nccwpck_require__(6823) + +class FakeWeakRef { + constructor (value) { + this.value = value + } + + deref () { + return this.value + } +} + +class MockAgent extends Dispatcher { + constructor (opts) { + super(opts) + + this[kNetConnect] = true + this[kIsMockActive] = true + + // Instantiate Agent and encapsulate + if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') + } + const agent = opts && opts.agent ? opts.agent : new Agent(opts) + this[kAgent] = agent + + this[kClients] = agent[kClients] + this[kOptions] = buildMockOptions(opts) + } + + get (origin) { + let dispatcher = this[kMockAgentGet](origin) + + if (!dispatcher) { + dispatcher = this[kFactory](origin) + this[kMockAgentSet](origin, dispatcher) + } + return dispatcher + } + + dispatch (opts, handler) { + // Call MockAgent.get to perform additional setup before dispatching as normal + this.get(opts.origin) + return this[kAgent].dispatch(opts, handler) + } + + async close () { + await this[kAgent].close() + this[kClients].clear() + } + + deactivate () { + this[kIsMockActive] = false + } + + activate () { + this[kIsMockActive] = true + } + + enableNetConnect (matcher) { + if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { + if (Array.isArray(this[kNetConnect])) { + this[kNetConnect].push(matcher) + } else { + this[kNetConnect] = [matcher] + } + } else if (typeof matcher === 'undefined') { + this[kNetConnect] = true + } else { + throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') + } + } + + disableNetConnect () { + this[kNetConnect] = false + } + + // This is required to bypass issues caused by using global symbols - see: + // https://github.com/nodejs/undici/issues/1447 + get isMockActive () { + return this[kIsMockActive] + } + + [kMockAgentSet] (origin, dispatcher) { + this[kClients].set(origin, new FakeWeakRef(dispatcher)) + } + + [kFactory] (origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]) + return this[kOptions] && this[kOptions].connections === 1 + ? new MockClient(origin, mockOptions) + : new MockPool(origin, mockOptions) + } + + [kMockAgentGet] (origin) { + // First check if we can immediately find it + const ref = this[kClients].get(origin) + if (ref) { + return ref.deref() + } + + // If the origin is not a string create a dummy parent pool and return to user + if (typeof origin !== 'string') { + const dispatcher = this[kFactory]('http://localhost:9999') + this[kMockAgentSet](origin, dispatcher) + return dispatcher + } + + // If we match, create a pool and assign the same dispatches + for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { + const nonExplicitDispatcher = nonExplicitRef.deref() + if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin) + this[kMockAgentSet](origin, dispatcher) + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] + return dispatcher + } + } + } + + [kGetNetConnect] () { + return this[kNetConnect] + } + + pendingInterceptors () { + const mockAgentClients = this[kClients] + + return Array.from(mockAgentClients.entries()) + .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin }))) + .filter(({ pending }) => pending) + } + + assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors() + + if (pending.length === 0) { + return + } + + const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) + + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()) + } +} + +module.exports = MockAgent + + +/***/ }), + +/***/ 8687: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { promisify } = __nccwpck_require__(3837) +const Client = __nccwpck_require__(3598) +const { buildMockDispatch } = __nccwpck_require__(9323) +const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected +} = __nccwpck_require__(4347) +const { MockInterceptor } = __nccwpck_require__(410) +const Symbols = __nccwpck_require__(2785) +const { InvalidArgumentError } = __nccwpck_require__(8045) + +/** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ +class MockClient extends Client { + constructor (origin, opts) { + super(origin, opts) + + if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') + } + + this[kMockAgent] = opts.agent + this[kOrigin] = origin + this[kDispatches] = [] + this[kConnected] = 1 + this[kOriginalDispatch] = this.dispatch + this[kOriginalClose] = this.close.bind(this) + + this.dispatch = buildMockDispatch.call(this) + this.close = this[kClose] + } + + get [Symbols.kConnected] () { + return this[kConnected] + } + + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept (opts) { + return new MockInterceptor(opts, this[kDispatches]) + } + + async [kClose] () { + await promisify(this[kOriginalClose])() + this[kConnected] = 0 + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) + } +} + +module.exports = MockClient + + +/***/ }), + +/***/ 888: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { UndiciError } = __nccwpck_require__(8045) + +class MockNotMatchedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, MockNotMatchedError) + this.name = 'MockNotMatchedError' + this.message = message || 'The request does not match any registered mock dispatches' + this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' + } +} + +module.exports = { + MockNotMatchedError +} + + +/***/ }), + +/***/ 410: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(9323) +const { + kDispatches, + kDispatchKey, + kDefaultHeaders, + kDefaultTrailers, + kContentLength, + kMockDispatch +} = __nccwpck_require__(4347) +const { InvalidArgumentError } = __nccwpck_require__(8045) +const { buildURL } = __nccwpck_require__(3983) + +/** + * Defines the scope API for an interceptor reply + */ +class MockScope { + constructor (mockDispatch) { + this[kMockDispatch] = mockDispatch + } + + /** + * Delay a reply by a set amount in ms. + */ + delay (waitInMs) { + if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { + throw new InvalidArgumentError('waitInMs must be a valid integer > 0') + } + + this[kMockDispatch].delay = waitInMs + return this + } + + /** + * For a defined reply, never mark as consumed. + */ + persist () { + this[kMockDispatch].persist = true + return this + } + + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times (repeatTimes) { + if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { + throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') + } + + this[kMockDispatch].times = repeatTimes + return this + } +} + +/** + * Defines an interceptor for a Mock + */ +class MockInterceptor { + constructor (opts, mockDispatches) { + if (typeof opts !== 'object') { + throw new InvalidArgumentError('opts must be an object') + } + if (typeof opts.path === 'undefined') { + throw new InvalidArgumentError('opts.path must be defined') + } + if (typeof opts.method === 'undefined') { + opts.method = 'GET' + } + // See https://github.com/nodejs/undici/issues/1245 + // As per RFC 3986, clients are not supposed to send URI + // fragments to servers when they retrieve a document, + if (typeof opts.path === 'string') { + if (opts.query) { + opts.path = buildURL(opts.path, opts.query) + } else { + // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811 + const parsedURL = new URL(opts.path, 'data://') + opts.path = parsedURL.pathname + parsedURL.search + } + } + if (typeof opts.method === 'string') { + opts.method = opts.method.toUpperCase() + } + + this[kDispatchKey] = buildKey(opts) + this[kDispatches] = mockDispatches + this[kDefaultHeaders] = {} + this[kDefaultTrailers] = {} + this[kContentLength] = false + } + + createMockScopeDispatchData (statusCode, data, responseOptions = {}) { + const responseData = getResponseData(data) + const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} + const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } + const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } + + return { statusCode, data, headers, trailers } + } + + validateReplyParameters (statusCode, data, responseOptions) { + if (typeof statusCode === 'undefined') { + throw new InvalidArgumentError('statusCode must be defined') + } + if (typeof data === 'undefined') { + throw new InvalidArgumentError('data must be defined') + } + if (typeof responseOptions !== 'object') { + throw new InvalidArgumentError('responseOptions must be an object') + } + } + + /** + * Mock an undici request with a defined reply. + */ + reply (replyData) { + // Values of reply aren't available right now as they + // can only be available when the reply callback is invoked. + if (typeof replyData === 'function') { + // We'll first wrap the provided callback in another function, + // this function will properly resolve the data from the callback + // when invoked. + const wrappedDefaultsCallback = (opts) => { + // Our reply options callback contains the parameter for statusCode, data and options. + const resolvedData = replyData(opts) + + // Check if it is in the right format + if (typeof resolvedData !== 'object') { + throw new InvalidArgumentError('reply options callback must return an object') + } + + const { statusCode, data = '', responseOptions = {} } = resolvedData + this.validateReplyParameters(statusCode, data, responseOptions) + // Since the values can be obtained immediately we return them + // from this higher order function that will be resolved later. + return { + ...this.createMockScopeDispatchData(statusCode, data, responseOptions) + } + } + + // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) + return new MockScope(newMockDispatch) + } + + // We can have either one or three parameters, if we get here, + // we should have 1-3 parameters. So we spread the arguments of + // this function to obtain the parameters, since replyData will always + // just be the statusCode. + const [statusCode, data = '', responseOptions = {}] = [...arguments] + this.validateReplyParameters(statusCode, data, responseOptions) + + // Send in-already provided data like usual + const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) + return new MockScope(newMockDispatch) + } + + /** + * Mock an undici request with a defined error. + */ + replyWithError (error) { + if (typeof error === 'undefined') { + throw new InvalidArgumentError('error must be defined') + } + + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) + return new MockScope(newMockDispatch) + } + + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders (headers) { + if (typeof headers === 'undefined') { + throw new InvalidArgumentError('headers must be defined') + } + + this[kDefaultHeaders] = headers + return this + } + + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers (trailers) { + if (typeof trailers === 'undefined') { + throw new InvalidArgumentError('trailers must be defined') + } + + this[kDefaultTrailers] = trailers + return this + } + + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength () { + this[kContentLength] = true + return this + } +} + +module.exports.MockInterceptor = MockInterceptor +module.exports.MockScope = MockScope + + +/***/ }), + +/***/ 6193: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { promisify } = __nccwpck_require__(3837) +const Pool = __nccwpck_require__(4634) +const { buildMockDispatch } = __nccwpck_require__(9323) +const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected +} = __nccwpck_require__(4347) +const { MockInterceptor } = __nccwpck_require__(410) +const Symbols = __nccwpck_require__(2785) +const { InvalidArgumentError } = __nccwpck_require__(8045) + +/** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ +class MockPool extends Pool { + constructor (origin, opts) { + super(origin, opts) + + if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') + } + + this[kMockAgent] = opts.agent + this[kOrigin] = origin + this[kDispatches] = [] + this[kConnected] = 1 + this[kOriginalDispatch] = this.dispatch + this[kOriginalClose] = this.close.bind(this) + + this.dispatch = buildMockDispatch.call(this) + this.close = this[kClose] + } + + get [Symbols.kConnected] () { + return this[kConnected] + } + + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept (opts) { + return new MockInterceptor(opts, this[kDispatches]) + } + + async [kClose] () { + await promisify(this[kOriginalClose])() + this[kConnected] = 0 + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) + } +} + +module.exports = MockPool + + +/***/ }), + +/***/ 4347: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + kAgent: Symbol('agent'), + kOptions: Symbol('options'), + kFactory: Symbol('factory'), + kDispatches: Symbol('dispatches'), + kDispatchKey: Symbol('dispatch key'), + kDefaultHeaders: Symbol('default headers'), + kDefaultTrailers: Symbol('default trailers'), + kContentLength: Symbol('content length'), + kMockAgent: Symbol('mock agent'), + kMockAgentSet: Symbol('mock agent set'), + kMockAgentGet: Symbol('mock agent get'), + kMockDispatch: Symbol('mock dispatch'), + kClose: Symbol('close'), + kOriginalClose: Symbol('original agent close'), + kOrigin: Symbol('origin'), + kIsMockActive: Symbol('is mock active'), + kNetConnect: Symbol('net connect'), + kGetNetConnect: Symbol('get net connect'), + kConnected: Symbol('connected') +} + + +/***/ }), + +/***/ 9323: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { MockNotMatchedError } = __nccwpck_require__(888) +const { + kDispatches, + kMockAgent, + kOriginalDispatch, + kOrigin, + kGetNetConnect +} = __nccwpck_require__(4347) +const { buildURL, nop } = __nccwpck_require__(3983) +const { STATUS_CODES } = __nccwpck_require__(3685) +const { + types: { + isPromise + } +} = __nccwpck_require__(3837) + +function matchValue (match, value) { + if (typeof match === 'string') { + return match === value + } + if (match instanceof RegExp) { + return match.test(value) + } + if (typeof match === 'function') { + return match(value) === true + } + return false +} + +function lowerCaseEntries (headers) { + return Object.fromEntries( + Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue] + }) + ) +} + +/** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ +function getHeaderByName (headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { + return headers[i + 1] + } + } + + return undefined + } else if (typeof headers.get === 'function') { + return headers.get(key) + } else { + return lowerCaseEntries(headers)[key.toLocaleLowerCase()] + } +} + +/** @param {string[]} headers */ +function buildHeadersFromArray (headers) { // fetch HeadersList + const clone = headers.slice() + const entries = [] + for (let index = 0; index < clone.length; index += 2) { + entries.push([clone[index], clone[index + 1]]) + } + return Object.fromEntries(entries) +} + +function matchHeaders (mockDispatch, headers) { + if (typeof mockDispatch.headers === 'function') { + if (Array.isArray(headers)) { // fetch HeadersList + headers = buildHeadersFromArray(headers) + } + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) + } + if (typeof mockDispatch.headers === 'undefined') { + return true + } + if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { + return false + } + + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { + const headerValue = getHeaderByName(headers, matchHeaderName) + + if (!matchValue(matchHeaderValue, headerValue)) { + return false + } + } + return true +} + +function safeUrl (path) { + if (typeof path !== 'string') { + return path + } + + const pathSegments = path.split('?') + + if (pathSegments.length !== 2) { + return path + } + + const qp = new URLSearchParams(pathSegments.pop()) + qp.sort() + return [...pathSegments, qp.toString()].join('?') +} + +function matchKey (mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path) + const methodMatch = matchValue(mockDispatch.method, method) + const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true + const headersMatch = matchHeaders(mockDispatch, headers) + return pathMatch && methodMatch && bodyMatch && headersMatch +} + +function getResponseData (data) { + if (Buffer.isBuffer(data)) { + return data + } else if (typeof data === 'object') { + return JSON.stringify(data) + } else { + return data.toString() + } +} + +function getMockDispatch (mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path + const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath + + // Match path + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) + } + + // Match method + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`) + } + + // Match body + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`) + } + + // Match headers + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`) + } + + return matchedMockDispatches[0] +} + +function addMockDispatch (mockDispatches, key, data) { + const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } + const replyData = typeof data === 'function' ? { callback: data } : { ...data } + const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } + mockDispatches.push(newMockDispatch) + return newMockDispatch +} + +function deleteMockDispatch (mockDispatches, key) { + const index = mockDispatches.findIndex(dispatch => { + if (!dispatch.consumed) { + return false + } + return matchKey(dispatch, key) + }) + if (index !== -1) { + mockDispatches.splice(index, 1) + } +} + +function buildKey (opts) { + const { path, method, body, headers, query } = opts + return { + path, + method, + body, + headers, + query + } +} + +function generateKeyValues (data) { + return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ + ...keyValuePairs, + Buffer.from(`${key}`), + Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`) + ], []) +} + +/** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ +function getStatusText (statusCode) { + return STATUS_CODES[statusCode] || 'unknown' +} + +async function getResponse (body) { + const buffers = [] + for await (const data of body) { + buffers.push(data) + } + return Buffer.concat(buffers).toString('utf8') +} + +/** + * Mock dispatch function used to simulate undici dispatches + */ +function mockDispatch (opts, handler) { + // Get mock dispatch from built key + const key = buildKey(opts) + const mockDispatch = getMockDispatch(this[kDispatches], key) + + mockDispatch.timesInvoked++ + + // Here's where we resolve a callback if a callback is present for the dispatch data. + if (mockDispatch.data.callback) { + mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } + } + + // Parse mockDispatch data + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch + const { timesInvoked, times } = mockDispatch + + // If it's used up and not persistent, mark as consumed + mockDispatch.consumed = !persist && timesInvoked >= times + mockDispatch.pending = timesInvoked < times + + // If specified, trigger dispatch error + if (error !== null) { + deleteMockDispatch(this[kDispatches], key) + handler.onError(error) + return true + } + + // Handle the request with a delay if necessary + if (typeof delay === 'number' && delay > 0) { + setTimeout(() => { + handleReply(this[kDispatches]) + }, delay) + } else { + handleReply(this[kDispatches]) + } + + function handleReply (mockDispatches, _data = data) { + // fetch's HeadersList is a 1D string array + const optsHeaders = Array.isArray(opts.headers) + ? buildHeadersFromArray(opts.headers) + : opts.headers + const body = typeof _data === 'function' + ? _data({ ...opts, headers: optsHeaders }) + : _data + + // util.types.isPromise is likely needed for jest. + if (isPromise(body)) { + // If handleReply is asynchronous, throwing an error + // in the callback will reject the promise, rather than + // synchronously throw the error, which breaks some tests. + // Rather, we wait for the callback to resolve if it is a + // promise, and then re-run handleReply with the new body. + body.then((newData) => handleReply(mockDispatches, newData)) + return + } + + const responseData = getResponseData(body) + const responseHeaders = generateKeyValues(headers) + const responseTrailers = generateKeyValues(trailers) + + handler.abort = nop + handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode)) + handler.onData(Buffer.from(responseData)) + handler.onComplete(responseTrailers) + deleteMockDispatch(mockDispatches, key) + } + + function resume () {} + + return true +} + +function buildMockDispatch () { + const agent = this[kMockAgent] + const origin = this[kOrigin] + const originalDispatch = this[kOriginalDispatch] + + return function dispatch (opts, handler) { + if (agent.isMockActive) { + try { + mockDispatch.call(this, opts, handler) + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect]() + if (netConnect === false) { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) + } + if (checkNetConnect(netConnect, origin)) { + originalDispatch.call(this, opts, handler) + } else { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) + } + } else { + throw error + } + } + } else { + originalDispatch.call(this, opts, handler) + } + } +} + +function checkNetConnect (netConnect, origin) { + const url = new URL(origin) + if (netConnect === true) { + return true + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + return true + } + return false +} + +function buildMockOptions (opts) { + if (opts) { + const { agent, ...mockOptions } = opts + return mockOptions + } +} + +module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName +} + + +/***/ }), + +/***/ 6823: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { Transform } = __nccwpck_require__(2781) +const { Console } = __nccwpck_require__(6206) + +/** + * Gets the output of `console.table(…)` as a string. + */ +module.exports = class PendingInterceptorsFormatter { + constructor ({ disableColors } = {}) { + this.transform = new Transform({ + transform (chunk, _enc, cb) { + cb(null, chunk) + } + }) + + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { + colors: !disableColors && !process.env.CI + } + }) + } + + format (pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map( + ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + 'Status code': statusCode, + Persistent: persist ? '✅' : '❌', + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })) + + this.logger.table(withPrettyHeaders) + return this.transform.read().toString() + } +} + + +/***/ }), + +/***/ 8891: +/***/ ((module) => { + +"use strict"; + + +const singulars = { + pronoun: 'it', + is: 'is', + was: 'was', + this: 'this' +} + +const plurals = { + pronoun: 'they', + is: 'are', + was: 'were', + this: 'these' +} + +module.exports = class Pluralizer { + constructor (singular, plural) { + this.singular = singular + this.plural = plural + } + + pluralize (count) { + const one = count === 1 + const keys = one ? singulars : plurals + const noun = one ? this.singular : this.plural + return { ...keys, count, noun } + } +} + + +/***/ }), + +/***/ 8266: +/***/ ((module) => { + +"use strict"; +/* eslint-disable */ + + + +// Extracted from node/lib/internal/fixed_queue.js + +// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. +const kSize = 2048; +const kMask = kSize - 1; + +// The FixedQueue is implemented as a singly-linked list of fixed-size +// circular buffers. It looks something like this: +// +// head tail +// | | +// v v +// +-----------+ <-----\ +-----------+ <------\ +-----------+ +// | [null] | \----- | next | \------- | next | +// +-----------+ +-----------+ +-----------+ +// | item | <-- bottom | item | <-- bottom | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | bottom --> | item | +// | item | | item | | item | +// | ... | | ... | | ... | +// | item | | item | | item | +// | item | | item | | item | +// | [empty] | <-- top | item | | item | +// | [empty] | | item | | item | +// | [empty] | | [empty] | <-- top top --> | [empty] | +// +-----------+ +-----------+ +-----------+ +// +// Or, if there is only one circular buffer, it looks something +// like either of these: +// +// head tail head tail +// | | | | +// v v v v +// +-----------+ +-----------+ +// | [null] | | [null] | +// +-----------+ +-----------+ +// | [empty] | | item | +// | [empty] | | item | +// | item | <-- bottom top --> | [empty] | +// | item | | [empty] | +// | [empty] | <-- top bottom --> | item | +// | [empty] | | item | +// +-----------+ +-----------+ +// +// Adding a value means moving `top` forward by one, removing means +// moving `bottom` forward by one. After reaching the end, the queue +// wraps around. +// +// When `top === bottom` the current queue is empty and when +// `top + 1 === bottom` it's full. This wastes a single space of storage +// but allows much quicker checks. + +class FixedCircularBuffer { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + + isEmpty() { + return this.top === this.bottom; + } + + isFull() { + return ((this.top + 1) & kMask) === this.bottom; + } + + push(data) { + this.list[this.top] = data; + this.top = (this.top + 1) & kMask; + } + + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === undefined) + return null; + this.list[this.bottom] = undefined; + this.bottom = (this.bottom + 1) & kMask; + return nextItem; + } +} + +module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + + isEmpty() { + return this.head.isEmpty(); + } + + push(data) { + if (this.head.isFull()) { + // Head is full: Creates a new queue, sets the old queue's `.next` to it, + // and sets it as the new main queue. + this.head = this.head.next = new FixedCircularBuffer(); + } + this.head.push(data); + } + + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + // If there is another queue, it forms the new tail. + this.tail = tail.next; + } + return next; + } +}; + + +/***/ }), + +/***/ 3198: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const DispatcherBase = __nccwpck_require__(4839) +const FixedQueue = __nccwpck_require__(8266) +const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(2785) +const PoolStats = __nccwpck_require__(9689) + +const kClients = Symbol('clients') +const kNeedDrain = Symbol('needDrain') +const kQueue = Symbol('queue') +const kClosedResolve = Symbol('closed resolve') +const kOnDrain = Symbol('onDrain') +const kOnConnect = Symbol('onConnect') +const kOnDisconnect = Symbol('onDisconnect') +const kOnConnectionError = Symbol('onConnectionError') +const kGetDispatcher = Symbol('get dispatcher') +const kAddClient = Symbol('add client') +const kRemoveClient = Symbol('remove client') +const kStats = Symbol('stats') + +class PoolBase extends DispatcherBase { + constructor () { + super() + + this[kQueue] = new FixedQueue() + this[kClients] = [] + this[kQueued] = 0 + + const pool = this + + this[kOnDrain] = function onDrain (origin, targets) { + const queue = pool[kQueue] + + let needDrain = false + + while (!needDrain) { + const item = queue.shift() + if (!item) { + break + } + pool[kQueued]-- + needDrain = !this.dispatch(item.opts, item.handler) + } + + this[kNeedDrain] = needDrain + + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false + pool.emit('drain', origin, [pool, ...targets]) + } + + if (pool[kClosedResolve] && queue.isEmpty()) { + Promise + .all(pool[kClients].map(c => c.close())) + .then(pool[kClosedResolve]) + } + } + + this[kOnConnect] = (origin, targets) => { + pool.emit('connect', origin, [pool, ...targets]) + } + + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit('disconnect', origin, [pool, ...targets], err) + } + + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit('connectionError', origin, [pool, ...targets], err) + } + + this[kStats] = new PoolStats(this) + } + + get [kBusy] () { + return this[kNeedDrain] + } + + get [kConnected] () { + return this[kClients].filter(client => client[kConnected]).length + } + + get [kFree] () { + return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length + } + + get [kPending] () { + let ret = this[kQueued] + for (const { [kPending]: pending } of this[kClients]) { + ret += pending + } + return ret + } + + get [kRunning] () { + let ret = 0 + for (const { [kRunning]: running } of this[kClients]) { + ret += running + } + return ret + } + + get [kSize] () { + let ret = this[kQueued] + for (const { [kSize]: size } of this[kClients]) { + ret += size + } + return ret + } + + get stats () { + return this[kStats] + } + + async [kClose] () { + if (this[kQueue].isEmpty()) { + return Promise.all(this[kClients].map(c => c.close())) + } else { + return new Promise((resolve) => { + this[kClosedResolve] = resolve + }) + } + } + + async [kDestroy] (err) { + while (true) { + const item = this[kQueue].shift() + if (!item) { + break + } + item.handler.onError(err) + } + + return Promise.all(this[kClients].map(c => c.destroy(err))) + } + + [kDispatch] (opts, handler) { + const dispatcher = this[kGetDispatcher]() + + if (!dispatcher) { + this[kNeedDrain] = true + this[kQueue].push({ opts, handler }) + this[kQueued]++ + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true + this[kNeedDrain] = !this[kGetDispatcher]() + } + + return !this[kNeedDrain] + } + + [kAddClient] (client) { + client + .on('drain', this[kOnDrain]) + .on('connect', this[kOnConnect]) + .on('disconnect', this[kOnDisconnect]) + .on('connectionError', this[kOnConnectionError]) + + this[kClients].push(client) + + if (this[kNeedDrain]) { + process.nextTick(() => { + if (this[kNeedDrain]) { + this[kOnDrain](client[kUrl], [this, client]) + } + }) + } + + return this + } + + [kRemoveClient] (client) { + client.close(() => { + const idx = this[kClients].indexOf(client) + if (idx !== -1) { + this[kClients].splice(idx, 1) + } + }) + + this[kNeedDrain] = this[kClients].some(dispatcher => ( + !dispatcher[kNeedDrain] && + dispatcher.closed !== true && + dispatcher.destroyed !== true + )) + } +} + +module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher +} + + +/***/ }), + +/***/ 9689: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(2785) +const kPool = Symbol('pool') + +class PoolStats { + constructor (pool) { + this[kPool] = pool + } + + get connected () { + return this[kPool][kConnected] + } + + get free () { + return this[kPool][kFree] + } + + get pending () { + return this[kPool][kPending] + } + + get queued () { + return this[kPool][kQueued] + } + + get running () { + return this[kPool][kRunning] + } + + get size () { + return this[kPool][kSize] + } +} + +module.exports = PoolStats + + +/***/ }), + +/***/ 4634: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher +} = __nccwpck_require__(3198) +const Client = __nccwpck_require__(3598) +const { + InvalidArgumentError +} = __nccwpck_require__(8045) +const util = __nccwpck_require__(3983) +const { kUrl, kInterceptors } = __nccwpck_require__(2785) +const buildConnector = __nccwpck_require__(2067) + +const kOptions = Symbol('options') +const kConnections = Symbol('connections') +const kFactory = Symbol('factory') + +function defaultFactory (origin, opts) { + return new Client(origin, opts) +} + +class Pool extends PoolBase { + constructor (origin, { + connections, + factory = defaultFactory, + connect, + connectTimeout, + tls, + maxCachedSessions, + socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, + ...options + } = {}) { + super() + + if (connections != null && (!Number.isFinite(connections) || connections < 0)) { + throw new InvalidArgumentError('invalid connections') + } + + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') + } + + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') + } + + if (typeof connect !== 'function') { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...connect + }) + } + + this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) + ? options.interceptors.Pool + : [] + this[kConnections] = connections || null + this[kUrl] = util.parseOrigin(origin) + this[kOptions] = { ...util.deepClone(options), connect, allowH2 } + this[kOptions].interceptors = options.interceptors + ? { ...options.interceptors } + : undefined + this[kFactory] = factory + } + + [kGetDispatcher] () { + let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain]) + + if (dispatcher) { + return dispatcher + } + + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + dispatcher = this[kFactory](this[kUrl], this[kOptions]) + this[kAddClient](dispatcher) + } + + return dispatcher + } +} + +module.exports = Pool + + +/***/ }), + +/***/ 7858: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(2785) +const { URL } = __nccwpck_require__(7310) +const Agent = __nccwpck_require__(7890) +const Pool = __nccwpck_require__(4634) +const DispatcherBase = __nccwpck_require__(4839) +const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(8045) +const buildConnector = __nccwpck_require__(2067) + +const kAgent = Symbol('proxy agent') +const kClient = Symbol('proxy client') +const kProxyHeaders = Symbol('proxy headers') +const kRequestTls = Symbol('request tls settings') +const kProxyTls = Symbol('proxy tls settings') +const kConnectEndpoint = Symbol('connect endpoint function') + +function defaultProtocolPort (protocol) { + return protocol === 'https:' ? 443 : 80 +} + +function buildProxyOptions (opts) { + if (typeof opts === 'string') { + opts = { uri: opts } + } + + if (!opts || !opts.uri) { + throw new InvalidArgumentError('Proxy opts.uri is mandatory') + } + + return { + uri: opts.uri, + protocol: opts.protocol || 'https' + } +} + +function defaultFactory (origin, opts) { + return new Pool(origin, opts) +} + +class ProxyAgent extends DispatcherBase { + constructor (opts) { + super(opts) + this[kProxy] = buildProxyOptions(opts) + this[kAgent] = new Agent(opts) + this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) + ? opts.interceptors.ProxyAgent + : [] + + if (typeof opts === 'string') { + opts = { uri: opts } + } + + if (!opts || !opts.uri) { + throw new InvalidArgumentError('Proxy opts.uri is mandatory') + } + + const { clientFactory = defaultFactory } = opts + + if (typeof clientFactory !== 'function') { + throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') + } + + this[kRequestTls] = opts.requestTls + this[kProxyTls] = opts.proxyTls + this[kProxyHeaders] = opts.headers || {} + + const resolvedUrl = new URL(opts.uri) + const { origin, port, host, username, password } = resolvedUrl + + if (opts.auth && opts.token) { + throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') + } else if (opts.auth) { + /* @deprecated in favour of opts.token */ + this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` + } else if (opts.token) { + this[kProxyHeaders]['proxy-authorization'] = opts.token + } else if (username && password) { + this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` + } + + const connect = buildConnector({ ...opts.proxyTls }) + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) + this[kClient] = clientFactory(resolvedUrl, { connect }) + this[kAgent] = new Agent({ + ...opts, + connect: async (opts, callback) => { + let requestedHost = opts.host + if (!opts.port) { + requestedHost += `:${defaultProtocolPort(opts.protocol)}` + } + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedHost, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host + } + }) + if (statusCode !== 200) { + socket.on('error', () => {}).destroy() + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) + } + if (opts.protocol !== 'https:') { + callback(null, socket) + return + } + let servername + if (this[kRequestTls]) { + servername = this[kRequestTls].servername + } else { + servername = opts.servername + } + this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) + } catch (err) { + callback(err) + } + } + }) + } + + dispatch (opts, handler) { + const { host } = new URL(opts.origin) + const headers = buildHeaders(opts.headers) + throwIfProxyAuthIsSent(headers) + return this[kAgent].dispatch( + { + ...opts, + headers: { + ...headers, + host + } + }, + handler + ) + } + + async [kClose] () { + await this[kAgent].close() + await this[kClient].close() + } + + async [kDestroy] () { + await this[kAgent].destroy() + await this[kClient].destroy() + } +} + +/** + * @param {string[] | Record} headers + * @returns {Record} + */ +function buildHeaders (headers) { + // When using undici.fetch, the headers list is stored + // as an array. + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {} + + for (let i = 0; i < headers.length; i += 2) { + headersPair[headers[i]] = headers[i + 1] + } + + return headersPair + } + + return headers +} + +/** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ +function throwIfProxyAuthIsSent (headers) { + const existProxyAuth = headers && Object.keys(headers) + .find((key) => key.toLowerCase() === 'proxy-authorization') + if (existProxyAuth) { + throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') + } +} + +module.exports = ProxyAgent + + +/***/ }), + +/***/ 9459: +/***/ ((module) => { + +"use strict"; + + +let fastNow = Date.now() +let fastNowTimeout + +const fastTimers = [] + +function onTimeout () { + fastNow = Date.now() + + let len = fastTimers.length + let idx = 0 + while (idx < len) { + const timer = fastTimers[idx] + + if (timer.state === 0) { + timer.state = fastNow + timer.delay + } else if (timer.state > 0 && fastNow >= timer.state) { + timer.state = -1 + timer.callback(timer.opaque) + } + + if (timer.state === -1) { + timer.state = -2 + if (idx !== len - 1) { + fastTimers[idx] = fastTimers.pop() + } else { + fastTimers.pop() + } + len -= 1 + } else { + idx += 1 + } + } + + if (fastTimers.length > 0) { + refreshTimeout() + } +} + +function refreshTimeout () { + if (fastNowTimeout && fastNowTimeout.refresh) { + fastNowTimeout.refresh() + } else { + clearTimeout(fastNowTimeout) + fastNowTimeout = setTimeout(onTimeout, 1e3) + if (fastNowTimeout.unref) { + fastNowTimeout.unref() + } + } +} + +class Timeout { + constructor (callback, delay, opaque) { + this.callback = callback + this.delay = delay + this.opaque = opaque + + // -2 not in timer list + // -1 in timer list but inactive + // 0 in timer list waiting for time + // > 0 in timer list waiting for time to expire + this.state = -2 + + this.refresh() + } + + refresh () { + if (this.state === -2) { + fastTimers.push(this) + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout() + } + } + + this.state = 0 + } + + clear () { + this.state = -1 + } +} + +module.exports = { + setTimeout (callback, delay, opaque) { + return delay < 1e3 + ? setTimeout(callback, delay, opaque) + : new Timeout(callback, delay, opaque) + }, + clearTimeout (timeout) { + if (timeout instanceof Timeout) { + timeout.clear() + } else { + clearTimeout(timeout) + } + } +} + + +/***/ }), + +/***/ 5354: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const diagnosticsChannel = __nccwpck_require__(7643) +const { uid, states } = __nccwpck_require__(9188) +const { + kReadyState, + kSentClose, + kByteParser, + kReceivedClose +} = __nccwpck_require__(7578) +const { fireEvent, failWebsocketConnection } = __nccwpck_require__(5515) +const { CloseEvent } = __nccwpck_require__(2611) +const { makeRequest } = __nccwpck_require__(8359) +const { fetching } = __nccwpck_require__(4881) +const { Headers } = __nccwpck_require__(554) +const { getGlobalDispatcher } = __nccwpck_require__(1892) +const { kHeadersList } = __nccwpck_require__(2785) + +const channels = {} +channels.open = diagnosticsChannel.channel('undici:websocket:open') +channels.close = diagnosticsChannel.channel('undici:websocket:close') +channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error') + +/** @type {import('crypto')} */ +let crypto +try { + crypto = __nccwpck_require__(6113) +} catch { + +} + +/** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any) => void} onEstablish + * @param {Partial} options + */ +function establishWebSocketConnection (url, protocols, ws, onEstablish, options) { + // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s + // scheme is "ws", and to "https" otherwise. + const requestURL = url + + requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' + + // 2. Let request be a new request, whose URL is requestURL, client is client, + // service-workers mode is "none", referrer is "no-referrer", mode is + // "websocket", credentials mode is "include", cache mode is "no-store" , + // and redirect mode is "error". + const request = makeRequest({ + urlList: [requestURL], + serviceWorkers: 'none', + referrer: 'no-referrer', + mode: 'websocket', + credentials: 'include', + cache: 'no-store', + redirect: 'error' + }) + + // Note: undici extension, allow setting custom headers. + if (options.headers) { + const headersList = new Headers(options.headers)[kHeadersList] + + request.headersList = headersList + } + + // 3. Append (`Upgrade`, `websocket`) to request’s header list. + // 4. Append (`Connection`, `Upgrade`) to request’s header list. + // Note: both of these are handled by undici currently. + // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 + + // 5. Let keyValue be a nonce consisting of a randomly selected + // 16-byte value that has been forgiving-base64-encoded and + // isomorphic encoded. + const keyValue = crypto.randomBytes(16).toString('base64') + + // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s + // header list. + request.headersList.append('sec-websocket-key', keyValue) + + // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s + // header list. + request.headersList.append('sec-websocket-version', '13') + + // 8. For each protocol in protocols, combine + // (`Sec-WebSocket-Protocol`, protocol) in request’s header + // list. + for (const protocol of protocols) { + request.headersList.append('sec-websocket-protocol', protocol) + } + + // 9. Let permessageDeflate be a user-agent defined + // "permessage-deflate" extension header value. + // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 + // TODO: enable once permessage-deflate is supported + const permessageDeflate = '' // 'permessage-deflate; 15' + + // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to + // request’s header list. + // request.headersList.append('sec-websocket-extensions', permessageDeflate) + + // 11. Fetch request with useParallelQueue set to true, and + // processResponse given response being these steps: + const controller = fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher ?? getGlobalDispatcher(), + processResponse (response) { + // 1. If response is a network error or its status is not 101, + // fail the WebSocket connection. + if (response.type === 'error' || response.status !== 101) { + failWebsocketConnection(ws, 'Received network error or non-101 status code.') + return + } + + // 2. If protocols is not the empty list and extracting header + // list values given `Sec-WebSocket-Protocol` and response’s + // header list results in null, failure, or the empty byte + // sequence, then fail the WebSocket connection. + if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Server did not respond with sent protocols.') + return + } + + // 3. Follow the requirements stated step 2 to step 6, inclusive, + // of the last set of steps in section 4.1 of The WebSocket + // Protocol to validate response. This either results in fail + // the WebSocket connection or the WebSocket connection is + // established. + + // 2. If the response lacks an |Upgrade| header field or the |Upgrade| + // header field contains a value that is not an ASCII case- + // insensitive match for the value "websocket", the client MUST + // _Fail the WebSocket Connection_. + if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { + failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') + return + } + + // 3. If the response lacks a |Connection| header field or the + // |Connection| header field doesn't contain a token that is an + // ASCII case-insensitive match for the value "Upgrade", the client + // MUST _Fail the WebSocket Connection_. + if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { + failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') + return + } + + // 4. If the response lacks a |Sec-WebSocket-Accept| header field or + // the |Sec-WebSocket-Accept| contains a value other than the + // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- + // Key| (as a string, not base64-decoded) with the string "258EAFA5- + // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and + // trailing whitespace, the client MUST _Fail the WebSocket + // Connection_. + const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') + const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') + if (secWSAccept !== digest) { + failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') + return + } + + // 5. If the response includes a |Sec-WebSocket-Extensions| header + // field and this header field indicates the use of an extension + // that was not present in the client's handshake (the server has + // indicated an extension not requested by the client), the client + // MUST _Fail the WebSocket Connection_. (The parsing of this + // header field to determine which extensions are requested is + // discussed in Section 9.1.) + const secExtension = response.headersList.get('Sec-WebSocket-Extensions') + + if (secExtension !== null && secExtension !== permessageDeflate) { + failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.') + return + } + + // 6. If the response includes a |Sec-WebSocket-Protocol| header field + // and this header field indicates the use of a subprotocol that was + // not present in the client's handshake (the server has indicated a + // subprotocol not requested by the client), the client MUST _Fail + // the WebSocket Connection_. + const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') + + if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') + return + } + + response.socket.on('data', onSocketData) + response.socket.on('close', onSocketClose) + response.socket.on('error', onSocketError) + + if (channels.open.hasSubscribers) { + channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }) + } + + onEstablish(response) + } + }) + + return controller +} + +/** + * @param {Buffer} chunk + */ +function onSocketData (chunk) { + if (!this.ws[kByteParser].write(chunk)) { + this.pause() + } +} + +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ +function onSocketClose () { + const { ws } = this + + // If the TCP connection was closed after the + // WebSocket closing handshake was completed, the WebSocket connection + // is said to have been closed _cleanly_. + const wasClean = ws[kSentClose] && ws[kReceivedClose] + + let code = 1005 + let reason = '' + + const result = ws[kByteParser].closingInfo + + if (result) { + code = result.code ?? 1005 + reason = result.reason + } else if (!ws[kSentClose]) { + // If _The WebSocket + // Connection is Closed_ and no Close control frame was received by the + // endpoint (such as could occur if the underlying transport connection + // is lost), _The WebSocket Connection Close Code_ is considered to be + // 1006. + code = 1006 + } + + // 1. Change the ready state to CLOSED (3). + ws[kReadyState] = states.CLOSED + + // 2. If the user agent was required to fail the WebSocket + // connection, or if the WebSocket connection was closed + // after being flagged as full, fire an event named error + // at the WebSocket object. + // TODO + + // 3. Fire an event named close at the WebSocket object, + // using CloseEvent, with the wasClean attribute + // initialized to true if the connection closed cleanly + // and false otherwise, the code attribute initialized to + // the WebSocket connection close code, and the reason + // attribute initialized to the result of applying UTF-8 + // decode without BOM to the WebSocket connection close + // reason. + fireEvent('close', ws, CloseEvent, { + wasClean, code, reason + }) + + if (channels.close.hasSubscribers) { + channels.close.publish({ + websocket: ws, + code, + reason + }) + } +} + +function onSocketError (error) { + const { ws } = this + + ws[kReadyState] = states.CLOSING + + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(error) + } + + this.destroy() +} + +module.exports = { + establishWebSocketConnection +} + + +/***/ }), + +/***/ 9188: +/***/ ((module) => { + +"use strict"; + + +// This is a Globally Unique Identifier unique used +// to validate that the endpoint accepts websocket +// connections. +// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 +const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' + +/** @type {PropertyDescriptor} */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +} + +const states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 +} + +const opcodes = { + CONTINUATION: 0x0, + TEXT: 0x1, + BINARY: 0x2, + CLOSE: 0x8, + PING: 0x9, + PONG: 0xA +} + +const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 + +const parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 +} + +const emptyBuffer = Buffer.allocUnsafe(0) + +module.exports = { + uid, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer +} + + +/***/ }), + +/***/ 2611: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { webidl } = __nccwpck_require__(1744) +const { kEnumerableProperty } = __nccwpck_require__(3983) +const { MessagePort } = __nccwpck_require__(1267) + +/** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ +class MessageEvent extends Event { + #eventInit + + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' }) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.MessageEventInit(eventInitDict) + + super(type, eventInitDict) + + this.#eventInit = eventInitDict + } + + get data () { + webidl.brandCheck(this, MessageEvent) + + return this.#eventInit.data + } + + get origin () { + webidl.brandCheck(this, MessageEvent) + + return this.#eventInit.origin + } + + get lastEventId () { + webidl.brandCheck(this, MessageEvent) + + return this.#eventInit.lastEventId + } + + get source () { + webidl.brandCheck(this, MessageEvent) + + return this.#eventInit.source + } + + get ports () { + webidl.brandCheck(this, MessageEvent) + + if (!Object.isFrozen(this.#eventInit.ports)) { + Object.freeze(this.#eventInit.ports) + } + + return this.#eventInit.ports + } + + initMessageEvent ( + type, + bubbles = false, + cancelable = false, + data = null, + origin = '', + lastEventId = '', + source = null, + ports = [] + ) { + webidl.brandCheck(this, MessageEvent) + + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' }) + + return new MessageEvent(type, { + bubbles, cancelable, data, origin, lastEventId, source, ports + }) + } +} + +/** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ +class CloseEvent extends Event { + #eventInit + + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' }) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.CloseEventInit(eventInitDict) + + super(type, eventInitDict) + + this.#eventInit = eventInitDict + } + + get wasClean () { + webidl.brandCheck(this, CloseEvent) + + return this.#eventInit.wasClean + } + + get code () { + webidl.brandCheck(this, CloseEvent) + + return this.#eventInit.code + } + + get reason () { + webidl.brandCheck(this, CloseEvent) + + return this.#eventInit.reason + } +} + +// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface +class ErrorEvent extends Event { + #eventInit + + constructor (type, eventInitDict) { + webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' }) + + super(type, eventInitDict) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) + + this.#eventInit = eventInitDict + } + + get message () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.message + } + + get filename () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.filename + } + + get lineno () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.lineno + } + + get colno () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.colno + } + + get error () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.error + } +} + +Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: 'MessageEvent', + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty +}) + +Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: 'CloseEvent', + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty +}) + +Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: 'ErrorEvent', + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty +}) + +webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.MessagePort +) + +const eventInit = [ + { + key: 'bubbles', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'cancelable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'composed', + converter: webidl.converters.boolean, + defaultValue: false + } +] + +webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'data', + converter: webidl.converters.any, + defaultValue: null + }, + { + key: 'origin', + converter: webidl.converters.USVString, + defaultValue: '' + }, + { + key: 'lastEventId', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'source', + // Node doesn't implement WindowProxy or ServiceWorker, so the only + // valid value for source is a MessagePort. + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: null + }, + { + key: 'ports', + converter: webidl.converters['sequence'], + get defaultValue () { + return [] + } + } +]) + +webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'wasClean', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'code', + converter: webidl.converters['unsigned short'], + defaultValue: 0 + }, + { + key: 'reason', + converter: webidl.converters.USVString, + defaultValue: '' + } +]) + +webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'message', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'filename', + converter: webidl.converters.USVString, + defaultValue: '' + }, + { + key: 'lineno', + converter: webidl.converters['unsigned long'], + defaultValue: 0 + }, + { + key: 'colno', + converter: webidl.converters['unsigned long'], + defaultValue: 0 + }, + { + key: 'error', + converter: webidl.converters.any + } +]) + +module.exports = { + MessageEvent, + CloseEvent, + ErrorEvent +} + + +/***/ }), + +/***/ 5444: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { maxUnsigned16Bit } = __nccwpck_require__(9188) + +/** @type {import('crypto')} */ +let crypto +try { + crypto = __nccwpck_require__(6113) +} catch { + +} + +class WebsocketFrameSend { + /** + * @param {Buffer|undefined} data + */ + constructor (data) { + this.frameData = data + this.maskKey = crypto.randomBytes(4) + } + + createFrame (opcode) { + const bodyLength = this.frameData?.byteLength ?? 0 + + /** @type {number} */ + let payloadLength = bodyLength // 0-125 + let offset = 6 + + if (bodyLength > maxUnsigned16Bit) { + offset += 8 // payload length is next 8 bytes + payloadLength = 127 + } else if (bodyLength > 125) { + offset += 2 // payload length is next 2 bytes + payloadLength = 126 + } + + const buffer = Buffer.allocUnsafe(bodyLength + offset) + + // Clear first 2 bytes, everything else is overwritten + buffer[0] = buffer[1] = 0 + buffer[0] |= 0x80 // FIN + buffer[0] = (buffer[0] & 0xF0) + opcode // opcode + + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = this.maskKey[0] + buffer[offset - 3] = this.maskKey[1] + buffer[offset - 2] = this.maskKey[2] + buffer[offset - 1] = this.maskKey[3] + + buffer[1] = payloadLength + + if (payloadLength === 126) { + buffer.writeUInt16BE(bodyLength, 2) + } else if (payloadLength === 127) { + // Clear extended payload length + buffer[2] = buffer[3] = 0 + buffer.writeUIntBE(bodyLength, 4, 6) + } + + buffer[1] |= 0x80 // MASK + + // mask body + for (let i = 0; i < bodyLength; i++) { + buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] + } + + return buffer + } +} + +module.exports = { + WebsocketFrameSend +} + + +/***/ }), + +/***/ 1688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { Writable } = __nccwpck_require__(2781) +const diagnosticsChannel = __nccwpck_require__(7643) +const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(9188) +const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(7578) +const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = __nccwpck_require__(5515) +const { WebsocketFrameSend } = __nccwpck_require__(5444) + +// This code was influenced by ws released under the MIT license. +// Copyright (c) 2011 Einar Otto Stangvik +// Copyright (c) 2013 Arnout Kazemier and contributors +// Copyright (c) 2016 Luigi Pinca and contributors + +const channels = {} +channels.ping = diagnosticsChannel.channel('undici:websocket:ping') +channels.pong = diagnosticsChannel.channel('undici:websocket:pong') + +class ByteParser extends Writable { + #buffers = [] + #byteOffset = 0 + + #state = parserStates.INFO + + #info = {} + #fragments = [] + + constructor (ws) { + super() + + this.ws = ws + } + + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write (chunk, _, callback) { + this.#buffers.push(chunk) + this.#byteOffset += chunk.length + + this.run(callback) + } + + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run (callback) { + while (true) { + if (this.#state === parserStates.INFO) { + // If there aren't enough bytes to parse the payload length, etc. + if (this.#byteOffset < 2) { + return callback() + } + + const buffer = this.consume(2) + + this.#info.fin = (buffer[0] & 0x80) !== 0 + this.#info.opcode = buffer[0] & 0x0F + + // If we receive a fragmented message, we use the type of the first + // frame to parse the full message as binary/text, when it's terminated + this.#info.originalOpcode ??= this.#info.opcode + + this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION + + if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { + // Only text and binary frames can be fragmented + failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') + return + } + + const payloadLength = buffer[1] & 0x7F + + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength + this.#state = parserStates.READ_DATA + } else if (payloadLength === 126) { + this.#state = parserStates.PAYLOADLENGTH_16 + } else if (payloadLength === 127) { + this.#state = parserStates.PAYLOADLENGTH_64 + } + + if (this.#info.fragmented && payloadLength > 125) { + // A fragmented frame can't be fragmented itself + failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') + return + } else if ( + (this.#info.opcode === opcodes.PING || + this.#info.opcode === opcodes.PONG || + this.#info.opcode === opcodes.CLOSE) && + payloadLength > 125 + ) { + // Control frames can have a payload length of 125 bytes MAX + failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.') + return + } else if (this.#info.opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') + return + } + + const body = this.consume(payloadLength) + + this.#info.closeInfo = this.parseCloseBody(false, body) + + if (!this.ws[kSentClose]) { + // If an endpoint receives a Close frame and did not previously send a + // Close frame, the endpoint MUST send a Close frame in response. (When + // sending a Close frame in response, the endpoint typically echos the + // status code it received.) + const body = Buffer.allocUnsafe(2) + body.writeUInt16BE(this.#info.closeInfo.code, 0) + const closeFrame = new WebsocketFrameSend(body) + + this.ws[kResponse].socket.write( + closeFrame.createFrame(opcodes.CLOSE), + (err) => { + if (!err) { + this.ws[kSentClose] = true + } + } + ) + } + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this.ws[kReadyState] = states.CLOSING + this.ws[kReceivedClose] = true + + this.end() + + return + } else if (this.#info.opcode === opcodes.PING) { + // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in + // response, unless it already received a Close frame. + // A Pong frame sent in response to a Ping frame must have identical + // "Application data" + + const body = this.consume(payloadLength) + + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body) + + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) + + if (channels.ping.hasSubscribers) { + channels.ping.publish({ + payload: body + }) + } + } + + this.#state = parserStates.INFO + + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } else if (this.#info.opcode === opcodes.PONG) { + // A Pong frame MAY be sent unsolicited. This serves as a + // unidirectional heartbeat. A response to an unsolicited Pong frame is + // not expected. + + const body = this.consume(payloadLength) + + if (channels.pong.hasSubscribers) { + channels.pong.publish({ + payload: body + }) + } + + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) { + return callback() + } + + const buffer = this.consume(2) + + this.#info.payloadLength = buffer.readUInt16BE(0) + this.#state = parserStates.READ_DATA + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) { + return callback() + } + + const buffer = this.consume(8) + const upper = buffer.readUInt32BE(0) + + // 2^31 is the maxinimum bytes an arraybuffer can contain + // on 32-bit systems. Although, on 64-bit systems, this is + // 2^53-1 bytes. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e + if (upper > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') + return + } + + const lower = buffer.readUInt32BE(4) + + this.#info.payloadLength = (upper << 8) + lower + this.#state = parserStates.READ_DATA + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) { + // If there is still more data in this chunk that needs to be read + return callback() + } else if (this.#byteOffset >= this.#info.payloadLength) { + // If the server sent multiple frames in a single chunk + + const body = this.consume(this.#info.payloadLength) + + this.#fragments.push(body) + + // If the frame is unfragmented, or a fragmented frame was terminated, + // a message was received + if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) { + const fullMessage = Buffer.concat(this.#fragments) + + websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage) + + this.#info = {} + this.#fragments.length = 0 + } + + this.#state = parserStates.INFO + } + } + + if (this.#byteOffset > 0) { + continue + } else { + callback() + break + } + } + } + + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer|null} + */ + consume (n) { + if (n > this.#byteOffset) { + return null + } else if (n === 0) { + return emptyBuffer + } + + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length + return this.#buffers.shift() + } + + const buffer = Buffer.allocUnsafe(n) + let offset = 0 + + while (offset !== n) { + const next = this.#buffers[0] + const { length } = next + + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset) + break + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset) + this.#buffers[0] = next.subarray(n - offset) + break + } else { + buffer.set(this.#buffers.shift(), offset) + offset += next.length + } + } + + this.#byteOffset -= n + + return buffer + } + + parseCloseBody (onlyCode, data) { + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 + /** @type {number|undefined} */ + let code + + if (data.length >= 2) { + // _The WebSocket Connection Close Code_ is + // defined as the status code (Section 7.4) contained in the first Close + // control frame received by the application + code = data.readUInt16BE(0) + } + + if (onlyCode) { + if (!isValidStatusCode(code)) { + return null + } + + return { code } + } + + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 + /** @type {Buffer} */ + let reason = data.subarray(2) + + // Remove BOM + if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { + reason = reason.subarray(3) + } + + if (code !== undefined && !isValidStatusCode(code)) { + return null + } + + try { + // TODO: optimize this + reason = new TextDecoder('utf-8', { fatal: true }).decode(reason) + } catch { + return null + } + + return { code, reason } + } + + get closingInfo () { + return this.#info.closeInfo + } +} + +module.exports = { + ByteParser +} + + +/***/ }), + +/***/ 7578: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + kWebSocketURL: Symbol('url'), + kReadyState: Symbol('ready state'), + kController: Symbol('controller'), + kResponse: Symbol('response'), + kBinaryType: Symbol('binary type'), + kSentClose: Symbol('sent close'), + kReceivedClose: Symbol('received close'), + kByteParser: Symbol('byte parser') +} + + +/***/ }), + +/***/ 5515: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(7578) +const { states, opcodes } = __nccwpck_require__(9188) +const { MessageEvent, ErrorEvent } = __nccwpck_require__(2611) + +/* globals Blob */ + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isEstablished (ws) { + // If the server's response is validated as provided for above, it is + // said that _The WebSocket Connection is Established_ and that the + // WebSocket Connection is in the OPEN state. + return ws[kReadyState] === states.OPEN +} + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosing (ws) { + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + return ws[kReadyState] === states.CLOSING +} + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosed (ws) { + return ws[kReadyState] === states.CLOSED +} + +/** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {EventInit | undefined} eventInitDict + */ +function fireEvent (e, target, eventConstructor = Event, eventInitDict) { + // 1. If eventConstructor is not given, then let eventConstructor be Event. + + // 2. Let event be the result of creating an event given eventConstructor, + // in the relevant realm of target. + // 3. Initialize event’s type attribute to e. + const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap + + // 4. Initialize any other IDL attributes of event as described in the + // invocation of this algorithm. + + // 5. Return the result of dispatching event at target, with legacy target + // override flag set if set. + target.dispatchEvent(event) +} + +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ +function websocketMessageReceived (ws, type, data) { + // 1. If ready state is not OPEN (1), then return. + if (ws[kReadyState] !== states.OPEN) { + return + } + + // 2. Let dataForEvent be determined by switching on type and binary type: + let dataForEvent + + if (type === opcodes.TEXT) { + // -> type indicates that the data is Text + // a new DOMString containing data + try { + dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data) + } catch { + failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') + return + } + } else if (type === opcodes.BINARY) { + if (ws[kBinaryType] === 'blob') { + // -> type indicates that the data is Binary and binary type is "blob" + // a new Blob object, created in the relevant Realm of the WebSocket + // object, that represents data as its raw data + dataForEvent = new Blob([data]) + } else { + // -> type indicates that the data is Binary and binary type is "arraybuffer" + // a new ArrayBuffer object, created in the relevant Realm of the + // WebSocket object, whose contents are data + dataForEvent = new Uint8Array(data).buffer + } + } + + // 3. Fire an event named message at the WebSocket object, using MessageEvent, + // with the origin attribute initialized to the serialization of the WebSocket + // object’s url's origin, and the data attribute initialized to dataForEvent. + fireEvent('message', ws, MessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }) +} + +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ +function isValidSubprotocol (protocol) { + // If present, this value indicates one + // or more comma-separated subprotocol the client wishes to speak, + // ordered by preference. The elements that comprise this value + // MUST be non-empty strings with characters in the range U+0021 to + // U+007E not including separator characters as defined in + // [RFC2616] and MUST all be unique strings. + if (protocol.length === 0) { + return false + } + + for (const char of protocol) { + const code = char.charCodeAt(0) + + if ( + code < 0x21 || + code > 0x7E || + char === '(' || + char === ')' || + char === '<' || + char === '>' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' || + code === 32 || // SP + code === 9 // HT + ) { + return false + } + } + + return true +} + +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ +function isValidStatusCode (code) { + if (code >= 1000 && code < 1015) { + return ( + code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006 // "MUST NOT be set as a status code" + ) + } + + return code >= 3000 && code <= 4999 +} + +/** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ +function failWebsocketConnection (ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws + + controller.abort() + + if (response?.socket && !response.socket.destroyed) { + response.socket.destroy() + } + + if (reason) { + fireEvent('error', ws, ErrorEvent, { + error: new Error(reason) + }) + } +} + +module.exports = { + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived +} + + +/***/ }), + +/***/ 4284: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { webidl } = __nccwpck_require__(1744) +const { DOMException } = __nccwpck_require__(1037) +const { URLSerializer } = __nccwpck_require__(685) +const { getGlobalOrigin } = __nccwpck_require__(1246) +const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(9188) +const { + kWebSocketURL, + kReadyState, + kController, + kBinaryType, + kResponse, + kSentClose, + kByteParser +} = __nccwpck_require__(7578) +const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = __nccwpck_require__(5515) +const { establishWebSocketConnection } = __nccwpck_require__(5354) +const { WebsocketFrameSend } = __nccwpck_require__(5444) +const { ByteParser } = __nccwpck_require__(1688) +const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(3983) +const { getGlobalDispatcher } = __nccwpck_require__(1892) +const { types } = __nccwpck_require__(3837) + +let experimentalWarned = false + +// https://websockets.spec.whatwg.org/#interface-definition +class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + } + + #bufferedAmount = 0 + #protocol = '' + #extensions = '' + + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor (url, protocols = []) { + super() + + webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' }) + + if (!experimentalWarned) { + experimentalWarned = true + process.emitWarning('WebSockets are experimental, expect them to change at any time.', { + code: 'UNDICI-WS' + }) + } + + const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols) + + url = webidl.converters.USVString(url) + protocols = options.protocols + + // 1. Let baseURL be this's relevant settings object's API base URL. + const baseURL = getGlobalOrigin() + + // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. + let urlRecord + + try { + urlRecord = new URL(url, baseURL) + } catch (e) { + // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. + throw new DOMException(e, 'SyntaxError') + } + + // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". + if (urlRecord.protocol === 'http:') { + urlRecord.protocol = 'ws:' + } else if (urlRecord.protocol === 'https:') { + // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". + urlRecord.protocol = 'wss:' + } + + // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. + if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { + throw new DOMException( + `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, + 'SyntaxError' + ) + } + + // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" + // DOMException. + if (urlRecord.hash || urlRecord.href.endsWith('#')) { + throw new DOMException('Got fragment', 'SyntaxError') + } + + // 8. If protocols is a string, set protocols to a sequence consisting + // of just that string. + if (typeof protocols === 'string') { + protocols = [protocols] + } + + // 9. If any of the values in protocols occur more than once or otherwise + // fail to match the requirements for elements that comprise the value + // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket + // protocol, then throw a "SyntaxError" DOMException. + if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { + throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + } + + if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { + throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + } + + // 10. Set this's url to urlRecord. + this[kWebSocketURL] = new URL(urlRecord.href) + + // 11. Let client be this's relevant settings object. + + // 12. Run this step in parallel: + + // 1. Establish a WebSocket connection given urlRecord, protocols, + // and client. + this[kController] = establishWebSocketConnection( + urlRecord, + protocols, + this, + (response) => this.#onConnectionEstablished(response), + options + ) + + // Each WebSocket object has an associated ready state, which is a + // number representing the state of the connection. Initially it must + // be CONNECTING (0). + this[kReadyState] = WebSocket.CONNECTING + + // The extensions attribute must initially return the empty string. + + // The protocol attribute must initially return the empty string. + + // Each WebSocket object has an associated binary type, which is a + // BinaryType. Initially it must be "blob". + this[kBinaryType] = 'blob' + } + + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close (code = undefined, reason = undefined) { + webidl.brandCheck(this, WebSocket) + + if (code !== undefined) { + code = webidl.converters['unsigned short'](code, { clamp: true }) + } + + if (reason !== undefined) { + reason = webidl.converters.USVString(reason) + } + + // 1. If code is present, but is neither an integer equal to 1000 nor an + // integer in the range 3000 to 4999, inclusive, throw an + // "InvalidAccessError" DOMException. + if (code !== undefined) { + if (code !== 1000 && (code < 3000 || code > 4999)) { + throw new DOMException('invalid code', 'InvalidAccessError') + } + } + + let reasonByteLength = 0 + + // 2. If reason is present, then run these substeps: + if (reason !== undefined) { + // 1. Let reasonBytes be the result of encoding reason. + // 2. If reasonBytes is longer than 123 bytes, then throw a + // "SyntaxError" DOMException. + reasonByteLength = Buffer.byteLength(reason) + + if (reasonByteLength > 123) { + throw new DOMException( + `Reason must be less than 123 bytes; received ${reasonByteLength}`, + 'SyntaxError' + ) + } + } + + // 3. Run the first matching steps from the following list: + if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) { + // If this's ready state is CLOSING (2) or CLOSED (3) + // Do nothing. + } else if (!isEstablished(this)) { + // If the WebSocket connection is not yet established + // Fail the WebSocket connection and set this's ready state + // to CLOSING (2). + failWebsocketConnection(this, 'Connection was closed before it was established.') + this[kReadyState] = WebSocket.CLOSING + } else if (!isClosing(this)) { + // If the WebSocket closing handshake has not yet been started + // Start the WebSocket closing handshake and set this's ready + // state to CLOSING (2). + // - If neither code nor reason is present, the WebSocket Close + // message must not have a body. + // - If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + // - If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + + const frame = new WebsocketFrameSend() + + // If neither code nor reason is present, the WebSocket Close + // message must not have a body. + + // If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + if (code !== undefined && reason === undefined) { + frame.frameData = Buffer.allocUnsafe(2) + frame.frameData.writeUInt16BE(code, 0) + } else if (code !== undefined && reason !== undefined) { + // If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) + frame.frameData.writeUInt16BE(code, 0) + // the body MAY contain UTF-8-encoded data with value /reason/ + frame.frameData.write(reason, 2, 'utf-8') + } else { + frame.frameData = emptyBuffer + } + + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket + + socket.write(frame.createFrame(opcodes.CLOSE), (err) => { + if (!err) { + this[kSentClose] = true + } + }) + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this[kReadyState] = states.CLOSING + } else { + // Otherwise + // Set this's ready state to CLOSING (2). + this[kReadyState] = WebSocket.CLOSING + } + } + + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send (data) { + webidl.brandCheck(this, WebSocket) + + webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' }) + + data = webidl.converters.WebSocketSendData(data) + + // 1. If this's ready state is CONNECTING, then throw an + // "InvalidStateError" DOMException. + if (this[kReadyState] === WebSocket.CONNECTING) { + throw new DOMException('Sent before connected.', 'InvalidStateError') + } + + // 2. Run the appropriate set of steps from the following list: + // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 + // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 + + if (!isEstablished(this) || isClosing(this)) { + return + } + + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket + + // If data is a string + if (typeof data === 'string') { + // If the WebSocket connection is established and the WebSocket + // closing handshake has not yet started, then the user agent + // must send a WebSocket Message comprised of the data argument + // using a text frame opcode; if the data cannot be sent, e.g. + // because it would need to be buffered but the buffer is full, + // the user agent must flag the WebSocket as full and then close + // the WebSocket connection. Any invocation of this method with a + // string argument that does not throw an exception must increase + // the bufferedAmount attribute by the number of bytes needed to + // express the argument as UTF-8. + + const value = Buffer.from(data) + const frame = new WebsocketFrameSend(value) + const buffer = frame.createFrame(opcodes.TEXT) + + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + } else if (types.isArrayBuffer(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need + // to be buffered but the buffer is full, the user agent must flag + // the WebSocket as full and then close the WebSocket connection. + // The data to be sent is the data stored in the buffer described + // by the ArrayBuffer object. Any invocation of this method with an + // ArrayBuffer argument that does not throw an exception must + // increase the bufferedAmount attribute by the length of the + // ArrayBuffer in bytes. + + const value = Buffer.from(data) + const frame = new WebsocketFrameSend(value) + const buffer = frame.createFrame(opcodes.BINARY) + + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + } else if (ArrayBuffer.isView(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The + // data to be sent is the data stored in the section of the buffer + // described by the ArrayBuffer object that data references. Any + // invocation of this method with this kind of argument that does + // not throw an exception must increase the bufferedAmount attribute + // by the length of data’s buffer in bytes. + + const ab = Buffer.from(data, data.byteOffset, data.byteLength) + + const frame = new WebsocketFrameSend(ab) + const buffer = frame.createFrame(opcodes.BINARY) + + this.#bufferedAmount += ab.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= ab.byteLength + }) + } else if (isBlobLike(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The data + // to be sent is the raw data represented by the Blob object. Any + // invocation of this method with a Blob argument that does not throw + // an exception must increase the bufferedAmount attribute by the size + // of the Blob object’s raw data, in bytes. + + const frame = new WebsocketFrameSend() + + data.arrayBuffer().then((ab) => { + const value = Buffer.from(ab) + frame.frameData = value + const buffer = frame.createFrame(opcodes.BINARY) + + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + }) + } + } + + get readyState () { + webidl.brandCheck(this, WebSocket) + + // The readyState getter steps are to return this's ready state. + return this[kReadyState] + } + + get bufferedAmount () { + webidl.brandCheck(this, WebSocket) + + return this.#bufferedAmount + } + + get url () { + webidl.brandCheck(this, WebSocket) + + // The url getter steps are to return this's url, serialized. + return URLSerializer(this[kWebSocketURL]) + } + + get extensions () { + webidl.brandCheck(this, WebSocket) + + return this.#extensions + } + + get protocol () { + webidl.brandCheck(this, WebSocket) + + return this.#protocol + } + + get onopen () { + webidl.brandCheck(this, WebSocket) + + return this.#events.open + } + + set onopen (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.open) { + this.removeEventListener('open', this.#events.open) + } + + if (typeof fn === 'function') { + this.#events.open = fn + this.addEventListener('open', fn) + } else { + this.#events.open = null + } + } + + get onerror () { + webidl.brandCheck(this, WebSocket) + + return this.#events.error + } + + set onerror (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.error) { + this.removeEventListener('error', this.#events.error) + } + + if (typeof fn === 'function') { + this.#events.error = fn + this.addEventListener('error', fn) + } else { + this.#events.error = null + } + } + + get onclose () { + webidl.brandCheck(this, WebSocket) + + return this.#events.close + } + + set onclose (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.close) { + this.removeEventListener('close', this.#events.close) + } + + if (typeof fn === 'function') { + this.#events.close = fn + this.addEventListener('close', fn) + } else { + this.#events.close = null + } + } + + get onmessage () { + webidl.brandCheck(this, WebSocket) + + return this.#events.message + } + + set onmessage (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.message) { + this.removeEventListener('message', this.#events.message) + } + + if (typeof fn === 'function') { + this.#events.message = fn + this.addEventListener('message', fn) + } else { + this.#events.message = null + } + } + + get binaryType () { + webidl.brandCheck(this, WebSocket) + + return this[kBinaryType] + } + + set binaryType (type) { + webidl.brandCheck(this, WebSocket) + + if (type !== 'blob' && type !== 'arraybuffer') { + this[kBinaryType] = 'blob' + } else { + this[kBinaryType] = type + } + } + + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished (response) { + // processResponse is called when the "response’s header list has been received and initialized." + // once this happens, the connection is open + this[kResponse] = response + + const parser = new ByteParser(this) + parser.on('drain', function onParserDrain () { + this.ws[kResponse].socket.resume() + }) + + response.socket.ws = this + this[kByteParser] = parser + + // 1. Change the ready state to OPEN (1). + this[kReadyState] = states.OPEN + + // 2. Change the extensions attribute’s value to the extensions in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 + const extensions = response.headersList.get('sec-websocket-extensions') + + if (extensions !== null) { + this.#extensions = extensions + } + + // 3. Change the protocol attribute’s value to the subprotocol in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 + const protocol = response.headersList.get('sec-websocket-protocol') + + if (protocol !== null) { + this.#protocol = protocol + } + + // 4. Fire an event named open at the WebSocket object. + fireEvent('open', this) + } +} + +// https://websockets.spec.whatwg.org/#dom-websocket-connecting +WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING +// https://websockets.spec.whatwg.org/#dom-websocket-open +WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN +// https://websockets.spec.whatwg.org/#dom-websocket-closing +WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING +// https://websockets.spec.whatwg.org/#dom-websocket-closed +WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED + +Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'WebSocket', + writable: false, + enumerable: false, + configurable: true + } +}) + +Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors +}) + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.DOMString +) + +webidl.converters['DOMString or sequence'] = function (V) { + if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { + return webidl.converters['sequence'](V) + } + + return webidl.converters.DOMString(V) +} + +// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 +webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: 'protocols', + converter: webidl.converters['DOMString or sequence'], + get defaultValue () { + return [] + } + }, + { + key: 'dispatcher', + converter: (V) => V, + get defaultValue () { + return getGlobalDispatcher() + } + }, + { + key: 'headers', + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } +]) + +webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { + if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { + return webidl.converters.WebSocketInit(V) + } + + return { protocols: webidl.converters['DOMString or sequence'](V) } +} + +webidl.converters.WebSocketSendData = function (V) { + if (webidl.util.Type(V) === 'Object') { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) + } + + if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { + return webidl.converters.BufferSource(V) + } + } + + return webidl.converters.USVString(V) +} + +module.exports = { + WebSocket +} + + +/***/ }), + +/***/ 5030: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } + + if (typeof process === "object" && "version" in process) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } + + return ""; +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 5840: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); + +var _v = _interopRequireDefault(__nccwpck_require__(8628)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(6409)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(5122)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(9120)); + +var _nil = _interopRequireDefault(__nccwpck_require__(5332)); + +var _version = _interopRequireDefault(__nccwpck_require__(1595)); + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +var _parse = _interopRequireDefault(__nccwpck_require__(2746)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +/***/ 4569: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports["default"] = _default; + +/***/ }), + +/***/ 5332: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +/***/ 2746: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 814: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +/***/ 807: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} + +/***/ }), + +/***/ 5274: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports["default"] = _default; + +/***/ }), + +/***/ 8950: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 8628: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(807)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); +} + +var _default = v1; +exports["default"] = _default; + +/***/ }), + +/***/ 6409: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(5998)); + +var _md = _interopRequireDefault(__nccwpck_require__(4569)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +/***/ 5998: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +var _parse = _interopRequireDefault(__nccwpck_require__(2746)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), + +/***/ 5122: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(807)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // 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) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +/***/ 9120: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(5998)); + +var _sha = _interopRequireDefault(__nccwpck_require__(5274)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +/***/ 6900: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(814)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +/***/ 1595: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports["default"] = _default; + +/***/ }), + +/***/ 2940: +/***/ ((module) => { + +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} + + +/***/ }), + +/***/ 4800: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AccessToCodeService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +class AccessToCodeService { + static async setAccessToCodeFindings(octokit, owner, repo) { + try { + console.log('--- Access To CodeService Control ---'); + // https://www.npmjs.com/package/octokit#pagination + const iterator = octokit.paginate.iterator(octokit.repos.listCollaborators, { + owner: owner, + repo: repo, + per_page: 100, + affiliation: 'all', + }); + let numberOfAdmins = 0; + let numberOfWriters = 0; + let numberOfReaders = 0; + for await (const { data: page } of iterator) { + for (const user of page) { + if (user.permissions.admin) { + numberOfAdmins++; + } + else if (user.permissions.maintain) { + numberOfWriters++; + } + else if (user.permissions.push) { + numberOfWriters++; + } + else if (user.permissions.triage) { + numberOfReaders++; + } + else if (user.permissions.pull) { + numberOfReaders++; + } + } + } + console.log('numberOfAdmins: ' + numberOfAdmins); + console.log('numberOfWriters: ' + numberOfWriters); + console.log('numberOfReaders: ' + numberOfReaders); + core.exportVariable('numberOfCodeAdmins', numberOfAdmins); + core.exportVariable('numberOfCodeWriters', numberOfWriters); + core.exportVariable('numberOfCodeReaders', numberOfReaders); + } + catch (error) { + core.info('Failed to fetch access to code for repo'); + if (error.status === 401 || error.status === 403) { + // Removes link to REST API endpoint + const errorMessage = error.message.split('-')[0].trim(); + core.warning(errorMessage, { + title: 'Failed to fetch acces to code for repo', + }); + } + else { + core.info(error.message); + } + } + console.log(); + } +} +exports.AccessToCodeService = AccessToCodeService; + + +/***/ }), + +/***/ 6275: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureDevOpsBoardService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const AzureDevOpsConnection_1 = __nccwpck_require__(5547); +const PentestTickets_1 = __nccwpck_require__(4209); +const ThreatModelingTickets_1 = __nccwpck_require__(9502); +class AzureDevOpsBoardService { + static async getStateOfAzureDevOpsBoards(cydigConfig) { + if (cydigConfig.azureDevOps.boards) { + try { + console.log('--- Azure DevOps Boards control ---'); + const azureDevOpsConnection = new AzureDevOpsConnection_1.AzureDevOpsConnection(cydigConfig.azureDevOps.boards.organizationName, core.getInput('accessTokenAzureDevOps')); + const pentestTagInput = process.env.pentestTag; + const threatModelingTagInput = process.env.threatModelingTag; + let pentestTag = cydigConfig.pentest.boardsTag; + if (pentestTagInput !== undefined && pentestTagInput !== '') { + pentestTag = pentestTagInput; + } + let threatModelingTag = cydigConfig.threatModeling.boardsTag; + if (threatModelingTagInput !== undefined && threatModelingTagInput !== '') { + threatModelingTag = threatModelingTagInput; + } + const board = { + nameOfBoards: cydigConfig.azureDevOps.boards.nameOfBoard, + pentestTag: pentestTag, + threatModelingTag: threatModelingTag, + projectId: cydigConfig.azureDevOps.boards.projectName, + }; + if (process.env.pentestDate && process.env.pentestDate != 'not specified') { + await PentestTickets_1.PentestTickets.setPentestTickets(azureDevOpsConnection, board); + } + if (process.env.threatModelingDate && process.env.threatModelingDate != 'not specified') { + await ThreatModelingTickets_1.ThreatModelingTickets.setThreatModelingTickets(azureDevOpsConnection, board); + } + } + catch (error) { + core.warning('Error getting tickets for Azure DevOps Board!'); + console.log('There is probably somethine wrong with your token, check that it has not expired or been revoked. Please check that you have the correct permissions (Work items: Read)'); + } + console.log(); + } + } +} +exports.AzureDevOpsBoardService = AzureDevOpsBoardService; + + +/***/ }), + +/***/ 3278: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PenetrationTestTicketService = void 0; +class PenetrationTestTicketService { + connection; + projectId; + tag; + constructor(azureDevOpsConnection, projectId, tag) { + this.connection = azureDevOpsConnection; + this.projectId = projectId; + this.tag = this.setTag(tag); + } + setTag(tag) { + if (!tag) { + return 'PT'; + } + return tag; + } + async getPenetrationTestTickets(nameOfBoards) { + const areaPaths = await this.getAreaPaths(nameOfBoards); + const workItems = await this.getWorkItems(areaPaths); + const numberOfTickets = await this.getNumberOfActiveAndClosedTickets(workItems); + return numberOfTickets; + } + async getAreaPaths(nameOfBoards) { + if (!nameOfBoards || nameOfBoards.toLocaleLowerCase() === null || nameOfBoards === 'not specified') { + console.log('No board specified, looking through all boards in project'); + return []; + } + let nameOfBoardsArray = []; + if (nameOfBoards.length > 0) { + nameOfBoardsArray = nameOfBoards.split(', '); + console.log(`Boards: ${nameOfBoardsArray}`); + } + const areaPaths = []; + for (const board of nameOfBoardsArray) { + const areaPath = (await (await this.connection.getWorkApi()).getTeamFieldValues({ + team: board, + project: this.projectId, + })).defaultValue; + if (areaPath) { + areaPaths.push(areaPath); + } + } + if (areaPaths.length == 0) { + throw new Error('Found no board with the specified name'); + } + return areaPaths; + } + async getWorkItems(areaPaths) { + const witApi = await this.connection.getWorkItemTrackingApi(); + let queryStringAreaPath = ''; + if (areaPaths.length > 0) { + queryStringAreaPath = this.getQueryStringAreaPath(areaPaths); + } + const workItemsResponse = await witApi.queryByWiql({ + query: `SELECT [System.Id] FROM WorkItems WHERE ${queryStringAreaPath} [System.TeamProject] = '${this.projectId}' AND [System.Tags] CONTAINS '${this.tag}'`, + }); + const workItems = workItemsResponse.workItems; + return workItems; + } + getQueryStringAreaPath(areaPaths) { + let queryStringAreaPath = '('; + areaPaths.forEach((areaPath) => { + if (areaPath === areaPaths[areaPaths.length - 1]) { + queryStringAreaPath = queryStringAreaPath.concat(`[System.AreaPath] = '${areaPath}') AND`); + } + else { + queryStringAreaPath = queryStringAreaPath.concat(`[System.AreaPath] = '${areaPath}' OR `); + } + }); + return queryStringAreaPath; + } + async getNumberOfActiveAndClosedTickets(workItems) { + const witApi = await this.connection.getWorkItemTrackingApi(); + let numberOfClosedTickets = 0; + let numberOfActiveTickets = 0; + for (const workItem of workItems) { + const workItemFetched = await witApi.getWorkItem(workItem.id); + const state = await workItemFetched.fields['System.State']; + if (state === 'Closed' || state === 'Done') { + numberOfClosedTickets++; + } + else { + numberOfActiveTickets++; + } + } + return { + numberOfActiveTickets: numberOfActiveTickets, + numberOfClosedTickets: numberOfClosedTickets, + }; + } +} +exports.PenetrationTestTicketService = PenetrationTestTicketService; + + +/***/ }), + +/***/ 4209: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PentestTickets = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const PenetrationTestTicketService_1 = __nccwpck_require__(3278); +class PentestTickets { + static async setPentestTickets(azureDevOpsConnection, board) { + console.log('Getting penetration test tickets'); + const penetrationTestTicketService = new PenetrationTestTicketService_1.PenetrationTestTicketService(azureDevOpsConnection.getConnection(), board.projectId, board.pentestTag); + const numberOfTickets = await penetrationTestTicketService.getPenetrationTestTickets(board.nameOfBoards); + console.log('Active penetration test tickets: ' + numberOfTickets.numberOfActiveTickets); + console.log('Closed penetration test tickets : ' + numberOfTickets.numberOfClosedTickets); + core.exportVariable('ptNumberOfActiveTickets', numberOfTickets.numberOfActiveTickets.toString()); + core.exportVariable('ptNumberOfClosedTickets', numberOfTickets.numberOfClosedTickets.toString()); + return; + } +} +exports.PentestTickets = PentestTickets; + + +/***/ }), + +/***/ 756: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ThreatModelingTicketService = void 0; +class ThreatModelingTicketService { + connection; + projectId; + tag; + constructor(azureDevOpsConnection, projectId, tag) { + this.connection = azureDevOpsConnection; + this.projectId = projectId; + this.tag = this.setTag(tag); + } + setTag(tag) { + if (!tag || tag === 'not specified') { + return 'TM'; + } + return tag; + } + async getThreatModelingTickets(nameOfBoards) { + const areaPaths = await this.getAreaPaths(nameOfBoards); + const workItems = await this.getWorkItems(areaPaths); + const numberOfTickets = await this.getNumberOfActiveAndClosedTickets(workItems); + return numberOfTickets; + } + async getAreaPaths(nameOfBoards) { + if (!nameOfBoards || nameOfBoards.toLocaleLowerCase() === null || nameOfBoards === 'not specified') { + console.log('No board specified, looking through all boards in project'); + return []; + } + let nameOfBoardsArray = []; + if (nameOfBoards.length > 0) { + nameOfBoardsArray = nameOfBoards.split(', '); + console.log(`Boards: ${nameOfBoardsArray}`); + } + const areaPaths = []; + for (const board of nameOfBoardsArray) { + const areaPath = (await (await this.connection.getWorkApi()).getTeamFieldValues({ + team: board, + project: this.projectId, + })).defaultValue; + if (areaPath) { + areaPaths.push(areaPath); + } + } + if (areaPaths.length == 0) { + throw new Error('Found no board with the specified name'); + } + return areaPaths; + } + async getWorkItems(areaPaths) { + const witApi = await this.connection.getWorkItemTrackingApi(); + let queryStringAreaPath = ''; + if (areaPaths.length > 0) { + queryStringAreaPath = this.getQueryStringAreaPath(areaPaths); + } + const workItemsResponse = await witApi.queryByWiql({ + query: `SELECT [System.Id] FROM WorkItems WHERE ${queryStringAreaPath} [System.TeamProject] = '${this.projectId}' AND [System.Tags] CONTAINS '${this.tag}'`, + }); + const workItems = workItemsResponse.workItems; + return workItems; + } + getQueryStringAreaPath(areaPaths) { + let queryStringAreaPath = '('; + areaPaths.forEach((areaPath) => { + if (areaPath === areaPaths[areaPaths.length - 1]) { + queryStringAreaPath = queryStringAreaPath.concat(`[System.AreaPath] = '${areaPath}') AND`); + } + else { + queryStringAreaPath = queryStringAreaPath.concat(`[System.AreaPath] = '${areaPath}' OR `); + } + }); + return queryStringAreaPath; + } + async getNumberOfActiveAndClosedTickets(workItems) { + const witApi = await this.connection.getWorkItemTrackingApi(); + let numberOfClosedTickets = 0; + let numberOfActiveTickets = 0; + for (const workItem of workItems) { + const workItemFetched = await witApi.getWorkItem(workItem.id); + const state = await workItemFetched.fields['System.State']; + if (state === 'Closed' || state === 'Done') { + numberOfClosedTickets++; + } + else { + numberOfActiveTickets++; + } + } + return { + numberOfActiveTickets: numberOfActiveTickets, + numberOfClosedTickets: numberOfClosedTickets, + }; + } +} +exports.ThreatModelingTicketService = ThreatModelingTicketService; + + +/***/ }), + +/***/ 9502: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ThreatModelingTickets = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const ThreatModelingTicketService_1 = __nccwpck_require__(756); +class ThreatModelingTickets { + static async setThreatModelingTickets(azureDevOpsConnection, board) { + console.log('Getting threat modeling tickets'); + const threatModelingTicketService = new ThreatModelingTicketService_1.ThreatModelingTicketService(azureDevOpsConnection.getConnection(), board.projectId, board.threatModelingTag); + const numberOfTickets = await threatModelingTicketService.getThreatModelingTickets(board.nameOfBoards); + console.log('Active threat modeling tickets: ' + numberOfTickets.numberOfActiveTickets); + console.log('Closed threat modeling tickets : ' + numberOfTickets.numberOfClosedTickets); + core.exportVariable('tmNumberOfActiveTickets', numberOfTickets.numberOfActiveTickets.toString()); + core.exportVariable('tmNumberOfClosedTickets', numberOfTickets.numberOfClosedTickets.toString()); + return; + } +} +exports.ThreatModelingTickets = ThreatModelingTickets; + + +/***/ }), + +/***/ 2843: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BranchProtectionService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +class BranchProtectionService { + static async getStateOfBranchProtection(octokit, owner, repo) { + try { + console.log('--- Branch protection control ---'); + const response = await octokit.rest.repos.getBranchProtection({ + owner, + repo, + branch: 'main', + }); + if (response.data.enforce_admins?.enabled === false) { + core.warning('Branch protection can be overridden by admins and is therefore counted as not enabled'); + } + let numberOfReviewers = 0; + if (response.data.enforce_admins?.enabled === true && + response.data.required_pull_request_reviews?.required_approving_review_count) { + numberOfReviewers = response.data.required_pull_request_reviews?.required_approving_review_count; + console.log('Branch protection is enabled, number of reviewers:', numberOfReviewers); + } + else { + console.log('Branch protection is not enabled for repository:', repo); + } + core.exportVariable('numberOfReviewers', numberOfReviewers); + } + catch (error) { + const errorMessage = error.message.split('-')[0].trim(); + if (error.status === 401) { + core.info('Failed to get branch protection'); + // Removes link to REST API endpoint + core.warning(errorMessage, { + title: 'Branch protection control failed', + }); + } + else if (error.status === 404) { + if (errorMessage === 'Branch not protected') { + core.notice(errorMessage, { + title: 'Branch protection control', + }); + core.exportVariable('numberOfReviewers', 0); + } + else { + core.info('Failed to get branch protection'); + core.warning('Credentials probably lack necessary permissions', { + title: 'Branch protection control failed', + }); + } + } + else { + switch (errorMessage) { + case 'Upgrade to GitHub Pro or make this repository public to enable this feature.': + console.log('Branch protection is not enabled for repository:', repo); + core.exportVariable('numberOfReviewers', 0); + break; + default: + core.info('Failed to get branch protection'); + core.notice(errorMessage, { + title: 'Branch protection control failed', + }); + break; + } + } + } + console.log(); + } +} +exports.BranchProtectionService = BranchProtectionService; + + +/***/ }), + +/***/ 1408: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CodeQualityService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +class CodeQualityService { + static async getStateOfCodeQualityTool(codeQualityTool) { + console.log('--- Code Quality control ---'); + if (process.env.codeQualityTool) { + console.log(`Tool:`, `${process.env.codeQualityTool}`); + core.exportVariable('codeQualityTool', process.env.codeQualityTool); + } + else { + if (!codeQualityTool.nameOfTool || codeQualityTool.nameOfTool === 'name-of-tool') { + core.warning('Code Quality Tool is not set!'); + return; + } + console.log(`Tool:`, `${codeQualityTool.nameOfTool}`); + core.exportVariable('codeQualityTool', codeQualityTool.nameOfTool); + } + console.log(); + } +} +exports.CodeQualityService = CodeQualityService; + + +/***/ }), + +/***/ 5547: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureDevOpsConnection = void 0; +const nodeApi = __importStar(__nccwpck_require__(7967)); +class AzureDevOpsConnection { + accessToken; + orgUrlDevOps; + orgName; + constructor(orgName, accessToken) { + this.accessToken = this.isNullOrUndefined(accessToken); + this.orgName = orgName; + this.orgUrlDevOps = `https://dev.azure.com/${orgName}/`; + } + isNullOrUndefined(value) { + if (!value) { + throw new Error('Input values cannot be null or undefined'); + } + return value; + } + getConnection() { + const authHandler = nodeApi.getPersonalAccessTokenHandler(this.accessToken); + const connection = new nodeApi.WebApi(this.orgUrlDevOps, authHandler); + return connection; + } + getOrgName() { + return this.orgName; + } +} +exports.AzureDevOpsConnection = AzureDevOpsConnection; + + +/***/ }), + +/***/ 2254: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getContentOfFile = void 0; +const fs = __importStar(__nccwpck_require__(7147)); +const path = __importStar(__nccwpck_require__(1017)); +function getContentOfFile(jsonPath) { + const jsonFilePath = path.resolve(__dirname, path.relative(__dirname, path.normalize(jsonPath).replace(/^(\.\.(\/|\\|$))+/, ''))); + const fileContent = fs.readFileSync(jsonFilePath, { encoding: 'utf-8' }); + const cydigConfig = JSON.parse(fileContent); + return cydigConfig; +} +exports.getContentOfFile = getContentOfFile; + + +/***/ }), + +/***/ 2046: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PentestService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +class PentestService { + static async getStateOfPentest(pentest) { + console.log('--- Pentest control ---'); + if (process.env.pentestDate) { + console.log('Pentest date was found'); + core.exportVariable('pentestDate', process.env.pentestDate); + } + else { + if (!pentest.date || pentest.date === 'date-of-pentest') { + core.warning('Pentest Date is not set!'); + return; + } + console.log('Pentest date was found'); + core.exportVariable('pentestDate', pentest.date); + } + console.log(); + } +} +exports.PentestService = PentestService; + + +/***/ }), + +/***/ 3941: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CodeQLService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const GithubToolSeverityLevel_1 = __importDefault(__nccwpck_require__(6217)); +class CodeQLService { + static async setCodeQLFindings(nameOfTool, octokit, owner, repo) { + try { + // https://www.npmjs.com/package/octokit#pagination + const iterator = octokit.paginate.iterator(octokit.codeScanning.listAlertsForRepo, { + owner: owner, + repo: repo, + per_page: 100, + state: 'open', + tool_name: 'CodeQL', + }); + let sastNumberOfSeverity1 = 0; + let sastNumberOfSeverity2 = 0; + let sastNumberOfSeverity3 = 0; + let sastNumberOfSeverity4 = 0; + for await (const { data: alerts } of iterator) { + for (const alert of alerts) { + switch (alert.rule.security_severity_level) { + case GithubToolSeverityLevel_1.default.LOW: + sastNumberOfSeverity1++; + break; + case GithubToolSeverityLevel_1.default.MEDIUM: + sastNumberOfSeverity2++; + break; + case GithubToolSeverityLevel_1.default.HIGH: + sastNumberOfSeverity3++; + break; + case GithubToolSeverityLevel_1.default.CRITICAL: + sastNumberOfSeverity4++; + break; + default: + break; + } + } + } + console.log('Low: ' + sastNumberOfSeverity1); + console.log('Medium: ' + sastNumberOfSeverity2); + console.log('High: ' + sastNumberOfSeverity3); + console.log('Critical: ' + sastNumberOfSeverity4); + core.exportVariable('sastTool', nameOfTool); + core.exportVariable('SASTnumberOfSeverity1', sastNumberOfSeverity1); + core.exportVariable('SASTnumberOfSeverity2', sastNumberOfSeverity2); + core.exportVariable('SASTnumberOfSeverity3', sastNumberOfSeverity3); + core.exportVariable('SASTnumberOfSeverity4', sastNumberOfSeverity4); + } + catch (error) { + core.info('Failed to get CodeQL severities'); + if (error.status === 401 || error.status === 403 || error.status === 404) { + // Removes link to REST API endpoint + const errorMessage = error.message.split('-')[0].trim(); + core.warning(errorMessage, { + title: 'SAST tool control failed', + }); + } + else { + core.notice(error.message, { + title: 'SAST tool control failed', + }); + } + } + } +} +exports.CodeQLService = CodeQLService; + + +/***/ }), + +/***/ 124: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SastService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const CodeQLService_1 = __nccwpck_require__(3941); +const GitHubTools_1 = __importDefault(__nccwpck_require__(5775)); +class SastService { + static async getStateOfSastTool(nameOfTool, octokit, owner, repo) { + console.log('--- SAST control ---'); + let sast = nameOfTool; + if (process.env.sastTool) { + sast = process.env.sastTool; + } + if (!sast || sast === '' || sast === 'name-of-tool') { + core.warning('SAST Tool is not set!'); + return; + } + console.log(`Tool:`, `${sast}`); + switch (sast.toLowerCase()) { + case GitHubTools_1.default.CODEQL.toLowerCase(): + await CodeQLService_1.CodeQLService.setCodeQLFindings(sast, octokit, owner, repo); + break; + default: + core.exportVariable('sastTool', sast); + break; + } + console.log(); + } +} +exports.SastService = SastService; + + +/***/ }), + +/***/ 1162: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DependabotService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const GithubToolSeverityLevel_1 = __importDefault(__nccwpck_require__(6217)); +class DependabotService { + static async setDependabotFindings(nameOfTool, octokit, owner, repo) { + try { + // https://www.npmjs.com/package/octokit#pagination + const iterator = octokit.paginate.iterator(octokit.dependabot.listAlertsForRepo, { + owner: owner, + repo: repo, + per_page: 100, + state: 'open', + }); + let scaNumberOfSeverity1 = 0; + let scaNumberOfSeverity2 = 0; + let scaNumberOfSeverity3 = 0; + let scaNumberOfSeverity4 = 0; + for await (const { data: alerts } of iterator) { + for (const alert of alerts) { + switch (alert.security_vulnerability.severity) { + case GithubToolSeverityLevel_1.default.LOW: + scaNumberOfSeverity1++; + break; + case GithubToolSeverityLevel_1.default.MEDIUM: + scaNumberOfSeverity2++; + break; + case GithubToolSeverityLevel_1.default.HIGH: + scaNumberOfSeverity3++; + break; + case GithubToolSeverityLevel_1.default.CRITICAL: + scaNumberOfSeverity4++; + break; + } + } + } + console.log('Low: ' + scaNumberOfSeverity1); + console.log('Medium: ' + scaNumberOfSeverity2); + console.log('High: ' + scaNumberOfSeverity3); + console.log('Critical: ' + scaNumberOfSeverity4); + core.exportVariable('scaTool', nameOfTool); + core.exportVariable('SCAnumberOfSeverity1', scaNumberOfSeverity1); + core.exportVariable('SCAnumberOfSeverity2', scaNumberOfSeverity2); + core.exportVariable('SCAnumberOfSeverity3', scaNumberOfSeverity3); + core.exportVariable('SCAnumberOfSeverity4', scaNumberOfSeverity4); + } + catch (error) { + core.info('Failed to get Dependabot severities'); + if (error.status === 401 || error.status === 403 || error.status === 404) { + // Removes link to REST API endpoint + const errorMessage = error.message.split('-')[0].trim(); + core.warning(errorMessage, { + title: 'SCA tool control failed', + }); + } + else { + core.notice(error.message, { + title: 'SCA tool control failed', + }); + } + } + } +} +exports.DependabotService = DependabotService; + + +/***/ }), + +/***/ 4351: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ScaService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const DependabotService_1 = __nccwpck_require__(1162); +const GitHubTools_1 = __importDefault(__nccwpck_require__(5775)); +class ScaService { + static async getStateOfScaTool(nameOfTool, octokit, owner, repo) { + console.log('--- SCA control ---'); + let sca = nameOfTool; + if (process.env.scaTool) { + sca = process.env.scaTool; + } + if (!sca || sca === '' || sca === 'name-of-tool') { + core.warning('SCA Tool is not set!'); + return; + } + console.log(`Tool:`, `${sca}`); + switch (sca.toLowerCase()) { + case GitHubTools_1.default.DEPENDABOT.toLowerCase(): + await DependabotService_1.DependabotService.setDependabotFindings(sca, octokit, owner, repo); + break; + default: + core.exportVariable('scaTool', sca); + break; + } + console.log(); + } +} +exports.ScaService = ScaService; + + +/***/ }), + +/***/ 6455: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GithubSecretScanningService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const GitHubTools_1 = __importDefault(__nccwpck_require__(5775)); +class GithubSecretScanningService { + static async getStateOfExposedSecrets(octokit, owner, repo) { + try { + console.log('Tool: Github Secret Scanning'); + // https://www.npmjs.com/package/octokit#pagination + const iterator = octokit.paginate.iterator(octokit.secretScanning.listAlertsForRepo, { + owner: owner, + repo: repo, + per_page: 100, + state: 'open', + }); + let numberOfExposedSecrets = 0; + for await (const { data: alerts } of iterator) { + numberOfExposedSecrets += alerts.length; + } + console.log('Exposed secrets:', numberOfExposedSecrets); + core.exportVariable('secretScanningTool', GitHubTools_1.default.GitHub_SECRET_SCANNING); + core.exportVariable('numberOfExposedSecrets', numberOfExposedSecrets); + } + catch (error) { + core.info('Failed to get number of exposed secrets'); + // Removes link to REST API endpoint + const errorMessage = error.message.split('-')[0].trim(); + if (error.status === 401) { + core.warning(errorMessage, { + title: 'Number of exposed secrets control failed', + }); + } + else if (error.status === 404) { + switch (errorMessage) { + case 'Secret scanning is disabled on this repository.': + core.warning(errorMessage, { + title: 'Number of exposed secrets control failed', + }); + break; + default: + console.log(error); + core.warning('Credentials probably lack necessary permissions', { + title: 'Number of exposed secrets control failed', + }); + break; + } + } + else { + core.notice(error.message, { + title: 'Number of exposed secrets control failed', + }); + } + } + console.log(); + } +} +exports.GithubSecretScanningService = GithubSecretScanningService; + + +/***/ }), + +/***/ 341: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SecretScanningService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const GitHubTools_1 = __importDefault(__nccwpck_require__(5775)); +const GithubSecretScanningService_1 = __nccwpck_require__(6455); +class SecretScanningService { + static async getStateOfExposedSecrets(nameOfTool, octokit, owner, repo) { + console.log('--- Secret Scanning control ---'); + if (nameOfTool === null || nameOfTool === undefined || nameOfTool === 'name-of-tool') { + core.warning('Secret Scanning Tool is not set! Will continue with GitHub Secret Scanning tool:'); + await GithubSecretScanningService_1.GithubSecretScanningService.getStateOfExposedSecrets(octokit, owner, repo); + return; + } + switch (nameOfTool.toLowerCase()) { + case GitHubTools_1.default.GitHub_SECRET_SCANNING.toLowerCase(): + await GithubSecretScanningService_1.GithubSecretScanningService.getStateOfExposedSecrets(octokit, owner, repo); + break; + default: + core.notice('Given secret scanning tool is not implemented: ' + nameOfTool, { + title: 'Number of exposed secrets control failed', + }); + core.exportVariable('secretScanningTool', nameOfTool); + break; + } + console.log(); + } +} +exports.SecretScanningService = SecretScanningService; + + +/***/ }), + +/***/ 6121: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ThreatModelingService = void 0; +const core = __importStar(__nccwpck_require__(2186)); +class ThreatModelingService { + static async getStateOfThreatModeling(threatModeling) { + console.log('--- Threat Modeling control ---'); + if (process.env.threatModelingDate) { + console.log('Threat Modeling date was found'); + core.exportVariable('threatModelingDate', process.env.threatModelingDate); + } + else { + if (!threatModeling.date || threatModeling.date === 'date-of-threat-modeling') { + core.warning('Threat Modeling Date is not set!'); + return; + } + console.log('Threat Modeling date was found'); + core.exportVariable('threatModelingDate', threatModeling.date); + } + console.log(); + } +} +exports.ThreatModelingService = ThreatModelingService; + + +/***/ }), + +/***/ 5775: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var GitHub_Tools; +(function (GitHub_Tools) { + GitHub_Tools["DEPENDABOT"] = "Dependabot"; + GitHub_Tools["CODEQL"] = "CodeQL"; + GitHub_Tools["GitHub_SECRET_SCANNING"] = "GitHub"; +})(GitHub_Tools || (GitHub_Tools = {})); +exports["default"] = GitHub_Tools; + + +/***/ }), + +/***/ 6217: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var GitHub_Tool_Severity_Level; +(function (GitHub_Tool_Severity_Level) { + GitHub_Tool_Severity_Level["LOW"] = "low"; + GitHub_Tool_Severity_Level["MEDIUM"] = "medium"; + GitHub_Tool_Severity_Level["HIGH"] = "high"; + GitHub_Tool_Severity_Level["CRITICAL"] = "critical"; +})(GitHub_Tool_Severity_Level || (GitHub_Tool_Severity_Level = {})); +exports["default"] = GitHub_Tool_Severity_Level; + + +/***/ }), + +/***/ 9491: +/***/ ((module) => { + +"use strict"; +module.exports = require("assert"); + +/***/ }), + +/***/ 852: +/***/ ((module) => { + +"use strict"; +module.exports = require("async_hooks"); + +/***/ }), + +/***/ 4300: +/***/ ((module) => { + +"use strict"; +module.exports = require("buffer"); + +/***/ }), + +/***/ 6206: +/***/ ((module) => { + +"use strict"; +module.exports = require("console"); + +/***/ }), + +/***/ 6113: +/***/ ((module) => { + +"use strict"; +module.exports = require("crypto"); + +/***/ }), + +/***/ 7643: +/***/ ((module) => { + +"use strict"; +module.exports = require("diagnostics_channel"); + +/***/ }), + +/***/ 2361: +/***/ ((module) => { + +"use strict"; +module.exports = require("events"); + +/***/ }), + +/***/ 7147: +/***/ ((module) => { + +"use strict"; +module.exports = require("fs"); + +/***/ }), + +/***/ 3685: +/***/ ((module) => { + +"use strict"; +module.exports = require("http"); + +/***/ }), + +/***/ 5158: +/***/ ((module) => { + +"use strict"; +module.exports = require("http2"); + +/***/ }), + +/***/ 5687: +/***/ ((module) => { + +"use strict"; +module.exports = require("https"); + +/***/ }), + +/***/ 1808: +/***/ ((module) => { + +"use strict"; +module.exports = require("net"); + +/***/ }), + +/***/ 5673: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:events"); + +/***/ }), + +/***/ 4492: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:stream"); + +/***/ }), + +/***/ 7261: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:util"); + +/***/ }), + +/***/ 2037: +/***/ ((module) => { + +"use strict"; +module.exports = require("os"); + +/***/ }), + +/***/ 1017: +/***/ ((module) => { + +"use strict"; +module.exports = require("path"); + +/***/ }), + +/***/ 4074: +/***/ ((module) => { + +"use strict"; +module.exports = require("perf_hooks"); + +/***/ }), + +/***/ 3477: +/***/ ((module) => { + +"use strict"; +module.exports = require("querystring"); + +/***/ }), + +/***/ 2781: +/***/ ((module) => { + +"use strict"; +module.exports = require("stream"); + +/***/ }), + +/***/ 5356: +/***/ ((module) => { + +"use strict"; +module.exports = require("stream/web"); + +/***/ }), + +/***/ 1576: +/***/ ((module) => { + +"use strict"; +module.exports = require("string_decoder"); + +/***/ }), + +/***/ 4404: +/***/ ((module) => { + +"use strict"; +module.exports = require("tls"); + +/***/ }), + +/***/ 7310: +/***/ ((module) => { + +"use strict"; +module.exports = require("url"); + +/***/ }), + +/***/ 3837: +/***/ ((module) => { + +"use strict"; +module.exports = require("util"); + +/***/ }), + +/***/ 9830: +/***/ ((module) => { + +"use strict"; +module.exports = require("util/types"); + +/***/ }), + +/***/ 1267: +/***/ ((module) => { + +"use strict"; +module.exports = require("worker_threads"); + +/***/ }), + +/***/ 9796: +/***/ ((module) => { + +"use strict"; +module.exports = require("zlib"); + +/***/ }), + +/***/ 2960: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const WritableStream = (__nccwpck_require__(4492).Writable) +const inherits = (__nccwpck_require__(7261).inherits) + +const StreamSearch = __nccwpck_require__(1142) + +const PartStream = __nccwpck_require__(1620) +const HeaderParser = __nccwpck_require__(2032) + +const DASH = 45 +const B_ONEDASH = Buffer.from('-') +const B_CRLF = Buffer.from('\r\n') +const EMPTY_FN = function () {} + +function Dicer (cfg) { + if (!(this instanceof Dicer)) { return new Dicer(cfg) } + WritableStream.call(this, cfg) + + if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } + + if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } + + this._headerFirst = cfg.headerFirst + + this._dashes = 0 + this._parts = 0 + this._finished = false + this._realFinish = false + this._isPreamble = true + this._justMatched = false + this._firstWrite = true + this._inHeader = true + this._part = undefined + this._cb = undefined + this._ignoreData = false + this._partOpts = { highWaterMark: cfg.partHwm } + this._pause = false + + const self = this + this._hparser = new HeaderParser(cfg) + this._hparser.on('header', function (header) { + self._inHeader = false + self._part.emit('header', header) + }) +} +inherits(Dicer, WritableStream) + +Dicer.prototype.emit = function (ev) { + if (ev === 'finish' && !this._realFinish) { + if (!this._finished) { + const self = this + process.nextTick(function () { + self.emit('error', new Error('Unexpected end of multipart data')) + if (self._part && !self._ignoreData) { + const type = (self._isPreamble ? 'Preamble' : 'Part') + self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) + self._part.push(null) + process.nextTick(function () { + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + return + } + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + } + } else { WritableStream.prototype.emit.apply(this, arguments) } +} + +Dicer.prototype._write = function (data, encoding, cb) { + // ignore unexpected data (e.g. extra trailer data after finished) + if (!this._hparser && !this._bparser) { return cb() } + + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts) + if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() } + } + const r = this._hparser.push(data) + if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } + } + + // allows for "easier" testing + if (this._firstWrite) { + this._bparser.push(B_CRLF) + this._firstWrite = false + } + + this._bparser.push(data) + + if (this._pause) { this._cb = cb } else { cb() } +} + +Dicer.prototype.reset = function () { + this._part = undefined + this._bparser = undefined + this._hparser = undefined +} + +Dicer.prototype.setBoundary = function (boundary) { + const self = this + this._bparser = new StreamSearch('\r\n--' + boundary) + this._bparser.on('info', function (isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end) + }) +} + +Dicer.prototype._ignore = function () { + if (this._part && !this._ignoreData) { + this._ignoreData = true + this._part.on('error', EMPTY_FN) + // we must perform some kind of read on the stream even though we are + // ignoring the data, otherwise node's Readable stream will not emit 'end' + // after pushing null to the stream + this._part.resume() + } +} + +Dicer.prototype._oninfo = function (isMatch, data, start, end) { + let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && (start + i) < end) { + if (data[start + i] === DASH) { + ++i + ++this._dashes + } else { + if (this._dashes) { buf = B_ONEDASH } + this._dashes = 0 + break + } + } + if (this._dashes === 2) { + if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) } + this.reset() + this._finished = true + // no more parts will be added + if (self._parts === 0) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } + } + if (this._dashes) { return } + } + if (this._justMatched) { this._justMatched = false } + if (!this._part) { + this._part = new PartStream(this._partOpts) + this._part._read = function (n) { + self._unpause() + } + if (this._isPreamble && this.listenerCount('preamble') !== 0) { + this.emit('preamble', this._part) + } else if (this._isPreamble !== true && this.listenerCount('part') !== 0) { + this.emit('part', this._part) + } else { + this._ignore() + } + if (!this._isPreamble) { this._inHeader = true } + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { shouldWriteMore = this._part.push(buf) } + shouldWriteMore = this._part.push(data.slice(start, end)) + if (!shouldWriteMore) { this._pause = true } + } else if (!this._isPreamble && this._inHeader) { + if (buf) { this._hparser.push(buf) } + r = this._hparser.push(data.slice(start, end)) + if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + } + } + if (isMatch) { + this._hparser.reset() + if (this._isPreamble) { this._isPreamble = false } else { + if (start !== end) { + ++this._parts + this._part.on('end', function () { + if (--self._parts === 0) { + if (self._finished) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } else { + self._unpause() + } + } + }) + } + } + this._part.push(null) + this._part = undefined + this._ignoreData = false + this._justMatched = true + this._dashes = 0 + } +} + +Dicer.prototype._unpause = function () { + if (!this._pause) { return } + + this._pause = false + if (this._cb) { + const cb = this._cb + this._cb = undefined + cb() + } +} + +module.exports = Dicer + + +/***/ }), + +/***/ 2032: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const EventEmitter = (__nccwpck_require__(5673).EventEmitter) +const inherits = (__nccwpck_require__(7261).inherits) +const getLimit = __nccwpck_require__(1467) + +const StreamSearch = __nccwpck_require__(1142) + +const B_DCRLF = Buffer.from('\r\n\r\n') +const RE_CRLF = /\r\n/g +const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + +function HeaderParser (cfg) { + EventEmitter.call(this) + + cfg = cfg || {} + const self = this + this.nread = 0 + this.maxed = false + this.npairs = 0 + this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) + this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) + this.buffer = '' + this.header = {} + this.finished = false + this.ss = new StreamSearch(B_DCRLF) + this.ss.on('info', function (isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start + self.nread = self.maxHeaderSize + self.maxed = true + } else { self.nread += (end - start) } + + self.buffer += data.toString('binary', start, end) + } + if (isMatch) { self._finish() } + }) +} +inherits(HeaderParser, EventEmitter) + +HeaderParser.prototype.push = function (data) { + const r = this.ss.push(data) + if (this.finished) { return r } +} + +HeaderParser.prototype.reset = function () { + this.finished = false + this.buffer = '' + this.header = {} + this.ss.reset() +} + +HeaderParser.prototype._finish = function () { + if (this.buffer) { this._parseHeader() } + this.ss.matches = this.ss.maxMatches + const header = this.header + this.header = {} + this.buffer = '' + this.finished = true + this.nread = this.npairs = 0 + this.maxed = false + this.emit('header', header) +} + +HeaderParser.prototype._parseHeader = function () { + if (this.npairs === this.maxHeaderPairs) { return } + + const lines = this.buffer.split(RE_CRLF) + const len = lines.length + let m, h + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (lines[i].length === 0) { continue } + if (lines[i][0] === '\t' || lines[i][0] === ' ') { + // folded header content + // RFC2822 says to just remove the CRLF and not the whitespace following + // it, so we follow the RFC and include the leading whitespace ... + if (h) { + this.header[h][this.header[h].length - 1] += lines[i] + continue + } + } + + const posColon = lines[i].indexOf(':') + if ( + posColon === -1 || + posColon === 0 + ) { + return + } + m = RE_HDR.exec(lines[i]) + h = m[1].toLowerCase() + this.header[h] = this.header[h] || [] + this.header[h].push((m[2] || '')) + if (++this.npairs === this.maxHeaderPairs) { break } + } +} + +module.exports = HeaderParser + + +/***/ }), + +/***/ 1620: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const inherits = (__nccwpck_require__(7261).inherits) +const ReadableStream = (__nccwpck_require__(4492).Readable) + +function PartStream (opts) { + ReadableStream.call(this, opts) +} +inherits(PartStream, ReadableStream) + +PartStream.prototype._read = function (n) {} + +module.exports = PartStream + + +/***/ }), + +/***/ 1142: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/** + * Copyright Brian White. All rights reserved. + * + * @see https://github.com/mscdex/streamsearch + * + * 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. + * + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + */ +const EventEmitter = (__nccwpck_require__(5673).EventEmitter) +const inherits = (__nccwpck_require__(7261).inherits) + +function SBMH (needle) { + if (typeof needle === 'string') { + needle = Buffer.from(needle) + } + + if (!Buffer.isBuffer(needle)) { + throw new TypeError('The needle has to be a String or a Buffer.') + } + + const needleLength = needle.length + + if (needleLength === 0) { + throw new Error('The needle cannot be an empty String/Buffer.') + } + + if (needleLength > 256) { + throw new Error('The needle cannot have a length bigger than 256.') + } + + this.maxMatches = Infinity + this.matches = 0 + + this._occ = new Array(256) + .fill(needleLength) // Initialize occurrence table. + this._lookbehind_size = 0 + this._needle = needle + this._bufpos = 0 + + this._lookbehind = Buffer.alloc(needleLength) + + // Populate occurrence table with analysis of the needle, + // ignoring last letter. + for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var + this._occ[needle[i]] = needleLength - 1 - i + } +} +inherits(SBMH, EventEmitter) + +SBMH.prototype.reset = function () { + this._lookbehind_size = 0 + this.matches = 0 + this._bufpos = 0 +} + +SBMH.prototype.push = function (chunk, pos) { + if (!Buffer.isBuffer(chunk)) { + chunk = Buffer.from(chunk, 'binary') + } + const chlen = chunk.length + this._bufpos = pos || 0 + let r + while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } + return r +} + +SBMH.prototype._sbmh_feed = function (data) { + const len = data.length + const needle = this._needle + const needleLength = needle.length + const lastNeedleChar = needle[needleLength - 1] + + // Positive: points to a position in `data` + // pos == 3 points to data[3] + // Negative: points to a position in the lookbehind buffer + // pos == -2 points to lookbehind[lookbehind_size - 2] + let pos = -this._lookbehind_size + let ch + + if (pos < 0) { + // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool + // search with character lookup code that considers both the + // lookbehind buffer and the current round's haystack data. + // + // Loop until + // there is a match. + // or until + // we've moved past the position that requires the + // lookbehind buffer. In this case we switch to the + // optimized loop. + // or until + // the character to look at lies outside the haystack. + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1) + + if ( + ch === lastNeedleChar && + this._sbmh_memcmp(data, pos, needleLength - 1) + ) { + this._lookbehind_size = 0 + ++this.matches + this.emit('info', true) + + return (this._bufpos = pos + needleLength) + } + pos += this._occ[ch] + } + + // No match. + + if (pos < 0) { + // There's too few data for Boyer-Moore-Horspool to run, + // so let's use a different algorithm to skip as much as + // we can. + // Forward pos until + // the trailing part of lookbehind + data + // looks like the beginning of the needle + // or until + // pos == 0 + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } + } + + if (pos >= 0) { + // Discard lookbehind buffer. + this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) + this._lookbehind_size = 0 + } else { + // Cut off part of the lookbehind buffer that has + // been processed and append the entire haystack + // into it. + const bytesToCutOff = this._lookbehind_size + pos + if (bytesToCutOff > 0) { + // The cut off data is guaranteed not to contain the needle. + this.emit('info', false, this._lookbehind, 0, bytesToCutOff) + } + + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, + this._lookbehind_size - bytesToCutOff) + this._lookbehind_size -= bytesToCutOff + + data.copy(this._lookbehind, this._lookbehind_size) + this._lookbehind_size += len + + this._bufpos = len + return len + } + } + + pos += (pos >= 0) * this._bufpos + + // Lookbehind buffer is now empty. We only need to check if the + // needle is in the haystack. + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos) + ++this.matches + if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } + + return (this._bufpos = pos + needleLength) + } else { + pos = len - needleLength + } + + // There was no match. If there's trailing haystack data that we cannot + // match yet using the Boyer-Moore-Horspool algorithm (because the trailing + // data is less than the needle size) then match using a modified + // algorithm that starts matching from the beginning instead of the end. + // Whatever trailing data is left after running this algorithm is added to + // the lookbehind buffer. + while ( + pos < len && + ( + data[pos] !== needle[0] || + ( + (Buffer.compare( + data.subarray(pos, pos + len - pos), + needle.subarray(0, len - pos) + ) !== 0) + ) + ) + ) { + ++pos + } + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)) + this._lookbehind_size = len - pos + } + + // Everything until pos is guaranteed not to contain needle data. + if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } + + this._bufpos = len + return len +} + +SBMH.prototype._sbmh_lookup_char = function (data, pos) { + return (pos < 0) + ? this._lookbehind[this._lookbehind_size + pos] + : data[pos] +} + +SBMH.prototype._sbmh_memcmp = function (data, pos, len) { + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } + } + return true +} + +module.exports = SBMH + + +/***/ }), + +/***/ 727: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const WritableStream = (__nccwpck_require__(4492).Writable) +const { inherits } = __nccwpck_require__(7261) +const Dicer = __nccwpck_require__(2960) + +const MultipartParser = __nccwpck_require__(2183) +const UrlencodedParser = __nccwpck_require__(8306) +const parseParams = __nccwpck_require__(1854) + +function Busboy (opts) { + if (!(this instanceof Busboy)) { return new Busboy(opts) } + + if (typeof opts !== 'object') { + throw new TypeError('Busboy expected an options-Object.') + } + if (typeof opts.headers !== 'object') { + throw new TypeError('Busboy expected an options-Object with headers-attribute.') + } + if (typeof opts.headers['content-type'] !== 'string') { + throw new TypeError('Missing Content-Type-header.') + } + + const { + headers, + ...streamOptions + } = opts + + this.opts = { + autoDestroy: false, + ...streamOptions + } + WritableStream.call(this, this.opts) + + this._done = false + this._parser = this.getParserByHeaders(headers) + this._finished = false +} +inherits(Busboy, WritableStream) + +Busboy.prototype.emit = function (ev) { + if (ev === 'finish') { + if (!this._done) { + this._parser?.end() + return + } else if (this._finished) { + return + } + this._finished = true + } + WritableStream.prototype.emit.apply(this, arguments) +} + +Busboy.prototype.getParserByHeaders = function (headers) { + const parsed = parseParams(headers['content-type']) + + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + } + + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg) + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg) + } + throw new Error('Unsupported Content-Type.') +} + +Busboy.prototype._write = function (chunk, encoding, cb) { + this._parser.write(chunk, cb) +} + +module.exports = Busboy +module.exports["default"] = Busboy +module.exports.Busboy = Busboy + +module.exports.Dicer = Dicer + + +/***/ }), + +/***/ 2183: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// TODO: +// * support 1 nested multipart level +// (see second multipart example here: +// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) +// * support limits.fieldNameSize +// -- this will require modifications to utils.parseParams + +const { Readable } = __nccwpck_require__(4492) +const { inherits } = __nccwpck_require__(7261) + +const Dicer = __nccwpck_require__(2960) + +const parseParams = __nccwpck_require__(1854) +const decodeText = __nccwpck_require__(4619) +const basename = __nccwpck_require__(8647) +const getLimit = __nccwpck_require__(1467) + +const RE_BOUNDARY = /^boundary$/i +const RE_FIELD = /^form-data$/i +const RE_CHARSET = /^charset$/i +const RE_FILENAME = /^filename$/i +const RE_NAME = /^name$/i + +Multipart.detect = /^multipart\/form-data/i +function Multipart (boy, cfg) { + let i + let len + const self = this + let boundary + const limits = cfg.limits + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) + const parsedConType = cfg.parsedConType || [] + const defCharset = cfg.defCharset || 'utf8' + const preservePath = cfg.preservePath + const fileOpts = { highWaterMark: cfg.fileHwm } + + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && + RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1] + break + } + } + + function checkFinished () { + if (nends === 0 && finished && !boy._done) { + finished = false + self.end() + } + } + + if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } + + const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) + const filesLimit = getLimit(limits, 'files', Infinity) + const fieldsLimit = getLimit(limits, 'fields', Infinity) + const partsLimit = getLimit(limits, 'parts', Infinity) + const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) + const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) + + let nfiles = 0 + let nfields = 0 + let nends = 0 + let curFile + let curField + let finished = false + + this._needDrain = false + this._pause = false + this._cb = undefined + this._nparts = 0 + this._boy = boy + + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + } + + this.parser = new Dicer(parserCfg) + this.parser.on('drain', function () { + self._needDrain = false + if (self._cb && !self._pause) { + const cb = self._cb + self._cb = undefined + cb() + } + }).on('part', function onPart (part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener('part', onPart) + self.parser.on('part', skipPart) + boy.hitPartsLimit = true + boy.emit('partsLimit') + return skipPart(part) + } + + // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let + // us emit 'end' early since we know the part has ended if we are already + // seeing the next part + if (curField) { + const field = curField + field.emit('end') + field.removeAllListeners('end') + } + + part.on('header', function (header) { + let contype + let fieldname + let parsed + let charset + let encoding + let filename + let nsize = 0 + + if (header['content-type']) { + parsed = parseParams(header['content-type'][0]) + if (parsed[0]) { + contype = parsed[0].toLowerCase() + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase() + break + } + } + } + } + + if (contype === undefined) { contype = 'text/plain' } + if (charset === undefined) { charset = defCharset } + + if (header['content-disposition']) { + parsed = parseParams(header['content-disposition'][0]) + if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1] + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1] + if (!preservePath) { filename = basename(filename) } + } + } + } else { return skipPart(part) } + + if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } + + let onData, + onEnd + + if (isPartAFile(fieldname, contype, filename)) { + // file/binary field + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true + boy.emit('filesLimit') + } + return skipPart(part) + } + + ++nfiles + + if (boy.listenerCount('file') === 0) { + self.parser._ignore() + return + } + + ++nends + const file = new FileStream(fileOpts) + curFile = file + file.on('end', function () { + --nends + self._pause = false + checkFinished() + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + }) + file._read = function (n) { + if (!self._pause) { return } + self._pause = false + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + } + boy.emit('file', fieldname, file, filename, encoding, contype) + + onData = function (data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length + if (extralen > 0) { file.push(data.slice(0, extralen)) } + file.truncated = true + file.bytesRead = fileSizeLimit + part.removeAllListeners('data') + file.emit('limit') + return + } else if (!file.push(data)) { self._pause = true } + + file.bytesRead = nsize + } + + onEnd = function () { + curFile = undefined + file.push(null) + } + } else { + // non-file field + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true + boy.emit('fieldsLimit') + } + return skipPart(part) + } + + ++nfields + ++nends + let buffer = '' + let truncated = false + curField = part + + onData = function (data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = (fieldSizeLimit - (nsize - data.length)) + buffer += data.toString('binary', 0, extralen) + truncated = true + part.removeAllListeners('data') + } else { buffer += data.toString('binary') } + } + + onEnd = function () { + curField = undefined + if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } + boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) + --nends + checkFinished() + } + } + + /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become + broken. Streams2/streams3 is a huge black box of confusion, but + somehow overriding the sync state seems to fix things again (and still + seems to work for previous node versions). + */ + part._readableState.sync = false + + part.on('data', onData) + part.on('end', onEnd) + }).on('error', function (err) { + if (curFile) { curFile.emit('error', err) } + }) + }).on('error', function (err) { + boy.emit('error', err) + }).on('finish', function () { + finished = true + checkFinished() + }) +} + +Multipart.prototype.write = function (chunk, cb) { + const r = this.parser.write(chunk) + if (r && !this._pause) { + cb() + } else { + this._needDrain = !r + this._cb = cb + } +} + +Multipart.prototype.end = function () { + const self = this + + if (self.parser.writable) { + self.parser.end() + } else if (!self._boy._done) { + process.nextTick(function () { + self._boy._done = true + self._boy.emit('finish') + }) + } +} + +function skipPart (part) { + part.resume() +} + +function FileStream (opts) { + Readable.call(this, opts) + + this.bytesRead = 0 + + this.truncated = false +} + +inherits(FileStream, Readable) + +FileStream.prototype._read = function (n) {} + +module.exports = Multipart + + +/***/ }), + +/***/ 8306: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const Decoder = __nccwpck_require__(7100) +const decodeText = __nccwpck_require__(4619) +const getLimit = __nccwpck_require__(1467) + +const RE_CHARSET = /^charset$/i + +UrlEncoded.detect = /^application\/x-www-form-urlencoded/i +function UrlEncoded (boy, cfg) { + const limits = cfg.limits + const parsedConType = cfg.parsedConType + this.boy = boy + + this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) + this.fieldsLimit = getLimit(limits, 'fields', Infinity) + + let charset + for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var + if (Array.isArray(parsedConType[i]) && + RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase() + break + } + } + + if (charset === undefined) { charset = cfg.defCharset || 'utf8' } + + this.decoder = new Decoder() + this.charset = charset + this._fields = 0 + this._state = 'key' + this._checkingBytes = true + this._bytesKey = 0 + this._bytesVal = 0 + this._key = '' + this._val = '' + this._keyTrunc = false + this._valTrunc = false + this._hitLimit = false +} + +UrlEncoded.prototype.write = function (data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true + this.boy.emit('fieldsLimit') + } + return cb() + } + + let idxeq; let idxamp; let i; let p = 0; const len = data.length + + while (p < len) { + if (this._state === 'key') { + idxeq = idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x3D/* = */) { + idxeq = i + break + } else if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesKey } + } + + if (idxeq !== undefined) { + // key with assignment + if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } + this._state = 'val' + + this._hitLimit = false + this._checkingBytes = true + this._val = '' + this._bytesVal = 0 + this._valTrunc = false + this.decoder.reset() + + p = idxeq + 1 + } else if (idxamp !== undefined) { + // key with no assignment + ++this._fields + let key; const keyTrunc = this._keyTrunc + if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + if (key.length) { + this.boy.emit('field', decodeText(key, 'binary', this.charset), + '', + keyTrunc, + false) + } + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._keyTrunc = true + } + } else { + if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } + p = len + } + } else { + idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesVal } + } + + if (idxamp !== undefined) { + ++this._fields + if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + this._state = 'key' + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._val === '' && this.fieldSizeLimit === 0) || + (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._valTrunc = true + } + } else { + if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } + p = len + } + } + } + cb() +} + +UrlEncoded.prototype.end = function () { + if (this.boy._done) { return } + + if (this._state === 'key' && this._key.length > 0) { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + '', + this._keyTrunc, + false) + } else if (this._state === 'val') { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + } + this.boy._done = true + this.boy.emit('finish') +} + +module.exports = UrlEncoded + + +/***/ }), + +/***/ 7100: +/***/ ((module) => { + +"use strict"; + + +const RE_PLUS = /\+/g + +const HEX = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 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, 1, 1, 1, 1, 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 +] + +function Decoder () { + this.buffer = undefined +} +Decoder.prototype.write = function (str) { + // Replace '+' with ' ' before decoding + str = str.replace(RE_PLUS, ' ') + let res = '' + let i = 0; let p = 0; const len = str.length + for (; i < len; ++i) { + if (this.buffer !== undefined) { + if (!HEX[str.charCodeAt(i)]) { + res += '%' + this.buffer + this.buffer = undefined + --i // retry character + } else { + this.buffer += str[i] + ++p + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)) + this.buffer = undefined + } + } + } else if (str[i] === '%') { + if (i > p) { + res += str.substring(p, i) + p = i + } + this.buffer = '' + ++p + } + } + if (p < len && this.buffer === undefined) { res += str.substring(p) } + return res +} +Decoder.prototype.reset = function () { + this.buffer = undefined +} + +module.exports = Decoder + + +/***/ }), + +/***/ 8647: +/***/ ((module) => { + +"use strict"; + + +module.exports = function basename (path) { + if (typeof path !== 'string') { return '' } + for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1) + return (path === '..' || path === '.' ? '' : path) + } + } + return (path === '..' || path === '.' ? '' : path) +} + + +/***/ }), + +/***/ 4619: +/***/ (function(module) { + +"use strict"; + + +// Node has always utf-8 +const utf8Decoder = new TextDecoder('utf-8') +const textDecoders = new Map([ + ['utf-8', utf8Decoder], + ['utf8', utf8Decoder] +]) + +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, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.utf8Slice(0, data.length) + }, + + latin1: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + return data + } + return data.latin1Slice(0, data.length) + }, + + utf16le: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.ucs2Slice(0, data.length) + }, + + base64: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.base64Slice(0, data.length) + }, + + other: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + + if (textDecoders.has(this.toString())) { + try { + return textDecoders.get(this).decode(data) + } catch {} + } + return typeof data === 'string' + ? data + : data.toString() + } +} + +function decodeText (text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding) + } + return text +} + +module.exports = decodeText + + +/***/ }), + +/***/ 1467: +/***/ ((module) => { + +"use strict"; + + +module.exports = function getLimit (limits, name, defaultLimit) { + if ( + !limits || + limits[name] === undefined || + limits[name] === null + ) { return defaultLimit } + + if ( + typeof limits[name] !== 'number' || + isNaN(limits[name]) + ) { throw new TypeError('Limit ' + name + ' is not a valid number') } + + return limits[name] +} + + +/***/ }), + +/***/ 1854: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/* eslint-disable object-property-newline */ + + +const decodeText = __nccwpck_require__(4619) + +const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g + +const EncodedLookup = { + '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', + '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', + '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', + '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', + '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', + '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', + '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', + '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', + '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', + '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', + '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', + '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', + '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', + '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', + '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', + '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', + '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', + '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', + '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', + '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', + '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', + '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', + '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', + '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', + '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', + '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', + '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', + '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', + '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', + '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', + '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', + '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', + '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', + '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', + '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', + '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', + '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', + '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', + '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', + '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', + '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', + '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', + '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', + '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', + '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', + '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', + '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', + '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', + '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', + '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', + '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', + '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', + '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', + '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', + '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', + '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', + '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', + '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', + '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', + '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', + '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', + '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', + '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', + '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', + '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', + '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', + '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', + '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', + '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', + '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', + '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', + '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', + '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', + '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', + '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', + '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', + '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', + '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', + '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', + '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', + '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', + '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', + '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', + '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', + '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', + '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', + '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', + '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', + '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', + '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', + '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', + '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', + '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', + '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', + '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', + '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', + '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' +} + +function encodedReplacer (match) { + return EncodedLookup[match] +} + +const STATE_KEY = 0 +const STATE_VALUE = 1 +const STATE_CHARSET = 2 +const STATE_LANG = 3 + +function parseParams (str) { + const res = [] + let state = STATE_KEY + let charset = '' + let inquote = false + let escaping = false + let p = 0 + let tmp = '' + const len = str.length + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + const char = str[i] + if (char === '\\' && inquote) { + if (escaping) { escaping = false } else { + escaping = true + continue + } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false + state = STATE_KEY + } else { inquote = true } + continue + } else { escaping = false } + } else { + if (escaping && inquote) { tmp += '\\' } + escaping = false + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG + charset = tmp.substring(1) + } else { state = STATE_VALUE } + tmp = '' + continue + } else if (state === STATE_KEY && + (char === '*' || char === '=') && + res.length) { + state = char === '*' + ? STATE_CHARSET + : STATE_VALUE + res[p] = [tmp, undefined] + tmp = '' + continue + } else if (!inquote && char === ';') { + state = STATE_KEY + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } + charset = '' + } else if (tmp.length) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } + tmp = '' + ++p + continue + } else if (!inquote && (char === ' ' || char === '\t')) { continue } + } + tmp += char + } + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } else if (tmp) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + + if (res[p] === undefined) { + if (tmp) { res[p] = tmp } + } else { res[p][1] = tmp } + + return res +} + +module.exports = parseParams + + +/***/ }), + +/***/ 6717: +/***/ ((__unused_webpack_module, exports) => { + +// Underscore.js 1.13.6 +// https://underscorejs.org +// (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +// Current version. +var VERSION = '1.13.6'; + +// Establish the root object, `window` (`self`) in the browser, `global` +// on the server, or `this` in some virtual machines. We use `self` +// instead of `window` for `WebWorker` support. +var root = (typeof self == 'object' && self.self === self && self) || + (typeof global == 'object' && global.global === global && global) || + Function('return this')() || + {}; + +// Save bytes in the minified (but not gzipped) version: +var ArrayProto = Array.prototype, ObjProto = Object.prototype; +var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; + +// Create quick reference variables for speed access to core prototypes. +var push = ArrayProto.push, + slice = ArrayProto.slice, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + +// Modern feature detection. +var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined', + supportsDataView = typeof DataView !== 'undefined'; + +// All **ECMAScript 5+** native function implementations that we hope to use +// are declared here. +var nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeCreate = Object.create, + nativeIsView = supportsArrayBuffer && ArrayBuffer.isView; + +// Create references to these builtin functions because we override them. +var _isNaN = isNaN, + _isFinite = isFinite; + +// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. +var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); +var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', + 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; + +// The largest integer that can be represented exactly. +var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; + +// Some functions take a variable number of arguments, or a few expected +// arguments at the beginning and then a variable number of values to operate +// on. This helper accumulates all remaining arguments past the function’s +// argument length (or an explicit `startIndex`), into an array that becomes +// the last argument. Similar to ES6’s "rest parameter". +function restArguments(func, startIndex) { + startIndex = startIndex == null ? func.length - 1 : +startIndex; + return function() { + var length = Math.max(arguments.length - startIndex, 0), + rest = Array(length), + index = 0; + for (; index < length; index++) { + rest[index] = arguments[index + startIndex]; + } + switch (startIndex) { + case 0: return func.call(this, rest); + case 1: return func.call(this, arguments[0], rest); + case 2: return func.call(this, arguments[0], arguments[1], rest); + } + var args = Array(startIndex + 1); + for (index = 0; index < startIndex; index++) { + args[index] = arguments[index]; + } + args[startIndex] = rest; + return func.apply(this, args); + }; +} + +// Is a given variable an object? +function isObject(obj) { + var type = typeof obj; + return type === 'function' || (type === 'object' && !!obj); +} + +// Is a given value equal to null? +function isNull(obj) { + return obj === null; +} + +// Is a given variable undefined? +function isUndefined(obj) { + return obj === void 0; +} + +// Is a given value a boolean? +function isBoolean(obj) { + return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; +} + +// Is a given value a DOM element? +function isElement(obj) { + return !!(obj && obj.nodeType === 1); +} + +// Internal function for creating a `toString`-based type tester. +function tagTester(name) { + var tag = '[object ' + name + ']'; + return function(obj) { + return toString.call(obj) === tag; + }; +} + +var isString = tagTester('String'); + +var isNumber = tagTester('Number'); + +var isDate = tagTester('Date'); + +var isRegExp = tagTester('RegExp'); + +var isError = tagTester('Error'); + +var isSymbol = tagTester('Symbol'); + +var isArrayBuffer = tagTester('ArrayBuffer'); + +var isFunction = tagTester('Function'); + +// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old +// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). +var nodelist = root.document && root.document.childNodes; +if ( true && typeof Int8Array != 'object' && typeof nodelist != 'function') { + isFunction = function(obj) { + return typeof obj == 'function' || false; + }; +} + +var isFunction$1 = isFunction; + +var hasObjectTag = tagTester('Object'); + +// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`. +// In IE 11, the most common among them, this problem also applies to +// `Map`, `WeakMap` and `Set`. +var hasStringTagBug = ( + supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8))) + ), + isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map)); + +var isDataView = tagTester('DataView'); + +// In IE 10 - Edge 13, we need a different heuristic +// to determine whether an object is a `DataView`. +function ie10IsDataView(obj) { + return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer); +} + +var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView); + +// Is a given value an array? +// Delegates to ECMA5's native `Array.isArray`. +var isArray = nativeIsArray || tagTester('Array'); + +// Internal function to check whether `key` is an own property name of `obj`. +function has$1(obj, key) { + return obj != null && hasOwnProperty.call(obj, key); +} + +var isArguments = tagTester('Arguments'); + +// Define a fallback version of the method in browsers (ahem, IE < 9), where +// there isn't any inspectable "Arguments" type. +(function() { + if (!isArguments(arguments)) { + isArguments = function(obj) { + return has$1(obj, 'callee'); + }; + } +}()); + +var isArguments$1 = isArguments; + +// Is a given object a finite number? +function isFinite$1(obj) { + return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj)); +} + +// Is the given value `NaN`? +function isNaN$1(obj) { + return isNumber(obj) && _isNaN(obj); +} + +// Predicate-generating function. Often useful outside of Underscore. +function constant(value) { + return function() { + return value; + }; +} + +// Common internal logic for `isArrayLike` and `isBufferLike`. +function createSizePropertyCheck(getSizeProperty) { + return function(collection) { + var sizeProperty = getSizeProperty(collection); + return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX; + } +} + +// Internal helper to generate a function to obtain property `key` from `obj`. +function shallowProperty(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; +} + +// Internal helper to obtain the `byteLength` property of an object. +var getByteLength = shallowProperty('byteLength'); + +// Internal helper to determine whether we should spend extensive checks against +// `ArrayBuffer` et al. +var isBufferLike = createSizePropertyCheck(getByteLength); + +// Is a given value a typed array? +var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; +function isTypedArray(obj) { + // `ArrayBuffer.isView` is the most future-proof, so use it when available. + // Otherwise, fall back on the above regular expression. + return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) : + isBufferLike(obj) && typedArrayPattern.test(toString.call(obj)); +} + +var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false); + +// Internal helper to obtain the `length` property of an object. +var getLength = shallowProperty('length'); + +// Internal helper to create a simple lookup structure. +// `collectNonEnumProps` used to depend on `_.contains`, but this led to +// circular imports. `emulatedSet` is a one-off solution that only works for +// arrays of strings. +function emulatedSet(keys) { + var hash = {}; + for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true; + return { + contains: function(key) { return hash[key] === true; }, + push: function(key) { + hash[key] = true; + return keys.push(key); + } + }; +} + +// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't +// be iterated by `for key in ...` and thus missed. Extends `keys` in place if +// needed. +function collectNonEnumProps(obj, keys) { + keys = emulatedSet(keys); + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto; + + // Constructor is a special case. + var prop = 'constructor'; + if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop); + + while (nonEnumIdx--) { + prop = nonEnumerableProps[nonEnumIdx]; + if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) { + keys.push(prop); + } + } +} + +// Retrieve the names of an object's own properties. +// Delegates to **ECMAScript 5**'s native `Object.keys`. +function keys(obj) { + if (!isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (has$1(obj, key)) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; +} + +// Is a given array, string, or object empty? +// An "empty" object has no enumerable own-properties. +function isEmpty(obj) { + if (obj == null) return true; + // Skip the more expensive `toString`-based type checks if `obj` has no + // `.length`. + var length = getLength(obj); + if (typeof length == 'number' && ( + isArray(obj) || isString(obj) || isArguments$1(obj) + )) return length === 0; + return getLength(keys(obj)) === 0; +} + +// Returns whether an object has a given set of `key:value` pairs. +function isMatch(object, attrs) { + var _keys = keys(attrs), length = _keys.length; + if (object == null) return !length; + var obj = Object(object); + for (var i = 0; i < length; i++) { + var key = _keys[i]; + if (attrs[key] !== obj[key] || !(key in obj)) return false; + } + return true; +} + +// If Underscore is called as a function, it returns a wrapped object that can +// be used OO-style. This wrapper holds altered versions of all functions added +// through `_.mixin`. Wrapped objects may be chained. +function _$1(obj) { + if (obj instanceof _$1) return obj; + if (!(this instanceof _$1)) return new _$1(obj); + this._wrapped = obj; +} + +_$1.VERSION = VERSION; + +// Extracts the result from a wrapped and chained object. +_$1.prototype.value = function() { + return this._wrapped; +}; + +// Provide unwrapping proxies for some methods used in engine operations +// such as arithmetic and JSON stringification. +_$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value; + +_$1.prototype.toString = function() { + return String(this._wrapped); +}; + +// Internal function to wrap or shallow-copy an ArrayBuffer, +// typed array or DataView to a new view, reusing the buffer. +function toBufferView(bufferSource) { + return new Uint8Array( + bufferSource.buffer || bufferSource, + bufferSource.byteOffset || 0, + getByteLength(bufferSource) + ); +} + +// We use this string twice, so give it a name for minification. +var tagDataView = '[object DataView]'; + +// Internal recursive comparison function for `_.isEqual`. +function eq(a, b, aStack, bStack) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal). + if (a === b) return a !== 0 || 1 / a === 1 / b; + // `null` or `undefined` only equal to itself (strict comparison). + if (a == null || b == null) return false; + // `NaN`s are equivalent, but non-reflexive. + if (a !== a) return b !== b; + // Exhaust primitive checks + var type = typeof a; + if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; + return deepEq(a, b, aStack, bStack); +} + +// Internal recursive comparison function for `_.isEqual`. +function deepEq(a, b, aStack, bStack) { + // Unwrap any wrapped objects. + if (a instanceof _$1) a = a._wrapped; + if (b instanceof _$1) b = b._wrapped; + // Compare `[[Class]]` names. + var className = toString.call(a); + if (className !== toString.call(b)) return false; + // Work around a bug in IE 10 - Edge 13. + if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) { + if (!isDataView$1(b)) return false; + className = tagDataView; + } + switch (className) { + // These types are compared by value. + case '[object RegExp]': + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') + case '[object String]': + // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is + // equivalent to `new String("5")`. + return '' + a === '' + b; + case '[object Number]': + // `NaN`s are equivalent, but non-reflexive. + // Object(NaN) is equivalent to NaN. + if (+a !== +a) return +b !== +b; + // An `egal` comparison is performed for other numeric values. + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + // Coerce dates and booleans to numeric primitive values. Dates are compared by their + // millisecond representations. Note that invalid dates with millisecond representations + // of `NaN` are not equivalent. + return +a === +b; + case '[object Symbol]': + return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); + case '[object ArrayBuffer]': + case tagDataView: + // Coerce to typed array so we can fall through. + return deepEq(toBufferView(a), toBufferView(b), aStack, bStack); + } + + var areArrays = className === '[object Array]'; + if (!areArrays && isTypedArray$1(a)) { + var byteLength = getByteLength(a); + if (byteLength !== getByteLength(b)) return false; + if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true; + areArrays = true; + } + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false; + + // Objects with different constructors are not equivalent, but `Object`s or `Array`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && + isFunction$1(bCtor) && bCtor instanceof bCtor) + && ('constructor' in a && 'constructor' in b)) { + return false; + } + } + // Assume equality for cyclic structures. The algorithm for detecting cyclic + // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + + // Initializing stack of traversed objects. + // It's done here since we only need them for objects and arrays comparison. + aStack = aStack || []; + bStack = bStack || []; + var length = aStack.length; + while (length--) { + // Linear search. Performance is inversely proportional to the number of + // unique nested structures. + if (aStack[length] === a) return bStack[length] === b; + } + + // Add the first object to the stack of traversed objects. + aStack.push(a); + bStack.push(b); + + // Recursively compare objects and arrays. + if (areArrays) { + // Compare array lengths to determine if a deep comparison is necessary. + length = a.length; + if (length !== b.length) return false; + // Deep compare the contents, ignoring non-numeric properties. + while (length--) { + if (!eq(a[length], b[length], aStack, bStack)) return false; + } + } else { + // Deep compare objects. + var _keys = keys(a), key; + length = _keys.length; + // Ensure that both objects contain the same number of properties before comparing deep equality. + if (keys(b).length !== length) return false; + while (length--) { + // Deep compare each member + key = _keys[length]; + if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false; + } + } + // Remove the first object from the stack of traversed objects. + aStack.pop(); + bStack.pop(); + return true; +} + +// Perform a deep comparison to check if two objects are equal. +function isEqual(a, b) { + return eq(a, b); +} + +// Retrieve all the enumerable property names of an object. +function allKeys(obj) { + if (!isObject(obj)) return []; + var keys = []; + for (var key in obj) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; +} + +// Since the regular `Object.prototype.toString` type tests don't work for +// some types in IE 11, we use a fingerprinting heuristic instead, based +// on the methods. It's not great, but it's the best we got. +// The fingerprint method lists are defined below. +function ie11fingerprint(methods) { + var length = getLength(methods); + return function(obj) { + if (obj == null) return false; + // `Map`, `WeakMap` and `Set` have no enumerable keys. + var keys = allKeys(obj); + if (getLength(keys)) return false; + for (var i = 0; i < length; i++) { + if (!isFunction$1(obj[methods[i]])) return false; + } + // If we are testing against `WeakMap`, we need to ensure that + // `obj` doesn't have a `forEach` method in order to distinguish + // it from a regular `Map`. + return methods !== weakMapMethods || !isFunction$1(obj[forEachName]); + }; +} + +// In the interest of compact minification, we write +// each string in the fingerprints only once. +var forEachName = 'forEach', + hasName = 'has', + commonInit = ['clear', 'delete'], + mapTail = ['get', hasName, 'set']; + +// `Map`, `WeakMap` and `Set` each have slightly different +// combinations of the above sublists. +var mapMethods = commonInit.concat(forEachName, mapTail), + weakMapMethods = commonInit.concat(mapTail), + setMethods = ['add'].concat(commonInit, forEachName, hasName); + +var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map'); + +var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap'); + +var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set'); + +var isWeakSet = tagTester('WeakSet'); + +// Retrieve the values of an object's properties. +function values(obj) { + var _keys = keys(obj); + var length = _keys.length; + var values = Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[_keys[i]]; + } + return values; +} + +// Convert an object into a list of `[key, value]` pairs. +// The opposite of `_.object` with one argument. +function pairs(obj) { + var _keys = keys(obj); + var length = _keys.length; + var pairs = Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [_keys[i], obj[_keys[i]]]; + } + return pairs; +} + +// Invert the keys and values of an object. The values must be serializable. +function invert(obj) { + var result = {}; + var _keys = keys(obj); + for (var i = 0, length = _keys.length; i < length; i++) { + result[obj[_keys[i]]] = _keys[i]; + } + return result; +} + +// Return a sorted list of the function names available on the object. +function functions(obj) { + var names = []; + for (var key in obj) { + if (isFunction$1(obj[key])) names.push(key); + } + return names.sort(); +} + +// An internal function for creating assigner functions. +function createAssigner(keysFunc, defaults) { + return function(obj) { + var length = arguments.length; + if (defaults) obj = Object(obj); + if (length < 2 || obj == null) return obj; + for (var index = 1; index < length; index++) { + var source = arguments[index], + keys = keysFunc(source), + l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (!defaults || obj[key] === void 0) obj[key] = source[key]; + } + } + return obj; + }; +} + +// Extend a given object with all the properties in passed-in object(s). +var extend = createAssigner(allKeys); + +// Assigns a given object with all the own properties in the passed-in +// object(s). +// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) +var extendOwn = createAssigner(keys); + +// Fill in a given object with default properties. +var defaults = createAssigner(allKeys, true); + +// Create a naked function reference for surrogate-prototype-swapping. +function ctor() { + return function(){}; +} + +// An internal function for creating a new object that inherits from another. +function baseCreate(prototype) { + if (!isObject(prototype)) return {}; + if (nativeCreate) return nativeCreate(prototype); + var Ctor = ctor(); + Ctor.prototype = prototype; + var result = new Ctor; + Ctor.prototype = null; + return result; +} + +// Creates an object that inherits from the given prototype object. +// If additional properties are provided then they will be added to the +// created object. +function create(prototype, props) { + var result = baseCreate(prototype); + if (props) extendOwn(result, props); + return result; +} + +// Create a (shallow-cloned) duplicate of an object. +function clone(obj) { + if (!isObject(obj)) return obj; + return isArray(obj) ? obj.slice() : extend({}, obj); +} + +// Invokes `interceptor` with the `obj` and then returns `obj`. +// The primary purpose of this method is to "tap into" a method chain, in +// order to perform operations on intermediate results within the chain. +function tap(obj, interceptor) { + interceptor(obj); + return obj; +} + +// Normalize a (deep) property `path` to array. +// Like `_.iteratee`, this function can be customized. +function toPath$1(path) { + return isArray(path) ? path : [path]; +} +_$1.toPath = toPath$1; + +// Internal wrapper for `_.toPath` to enable minification. +// Similar to `cb` for `_.iteratee`. +function toPath(path) { + return _$1.toPath(path); +} + +// Internal function to obtain a nested property in `obj` along `path`. +function deepGet(obj, path) { + var length = path.length; + for (var i = 0; i < length; i++) { + if (obj == null) return void 0; + obj = obj[path[i]]; + } + return length ? obj : void 0; +} + +// Get the value of the (deep) property on `path` from `object`. +// If any property in `path` does not exist or if the value is +// `undefined`, return `defaultValue` instead. +// The `path` is normalized through `_.toPath`. +function get(object, path, defaultValue) { + var value = deepGet(object, toPath(path)); + return isUndefined(value) ? defaultValue : value; +} + +// Shortcut function for checking if an object has a given property directly on +// itself (in other words, not on a prototype). Unlike the internal `has` +// function, this public version can also traverse nested properties. +function has(obj, path) { + path = toPath(path); + var length = path.length; + for (var i = 0; i < length; i++) { + var key = path[i]; + if (!has$1(obj, key)) return false; + obj = obj[key]; + } + return !!length; +} + +// Keep the identity function around for default iteratees. +function identity(value) { + return value; +} + +// Returns a predicate for checking whether an object has a given set of +// `key:value` pairs. +function matcher(attrs) { + attrs = extendOwn({}, attrs); + return function(obj) { + return isMatch(obj, attrs); + }; +} + +// Creates a function that, when passed an object, will traverse that object’s +// properties down the given `path`, specified as an array of keys or indices. +function property(path) { + path = toPath(path); + return function(obj) { + return deepGet(obj, path); + }; +} + +// Internal function that returns an efficient (for current engines) version +// of the passed-in callback, to be repeatedly applied in other Underscore +// functions. +function optimizeCb(func, context, argCount) { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return function(value) { + return func.call(context, value); + }; + // The 2-argument case is omitted because we’re not using it. + case 3: return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; +} + +// An internal function to generate callbacks that can be applied to each +// element in a collection, returning the desired result — either `_.identity`, +// an arbitrary callback, a property matcher, or a property accessor. +function baseIteratee(value, context, argCount) { + if (value == null) return identity; + if (isFunction$1(value)) return optimizeCb(value, context, argCount); + if (isObject(value) && !isArray(value)) return matcher(value); + return property(value); +} + +// External wrapper for our callback generator. Users may customize +// `_.iteratee` if they want additional predicate/iteratee shorthand styles. +// This abstraction hides the internal-only `argCount` argument. +function iteratee(value, context) { + return baseIteratee(value, context, Infinity); +} +_$1.iteratee = iteratee; + +// The function we call internally to generate a callback. It invokes +// `_.iteratee` if overridden, otherwise `baseIteratee`. +function cb(value, context, argCount) { + if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context); + return baseIteratee(value, context, argCount); +} + +// Returns the results of applying the `iteratee` to each element of `obj`. +// In contrast to `_.map` it returns an object. +function mapObject(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var _keys = keys(obj), + length = _keys.length, + results = {}; + for (var index = 0; index < length; index++) { + var currentKey = _keys[index]; + results[currentKey] = iteratee(obj[currentKey], currentKey, obj); + } + return results; +} + +// Predicate-generating function. Often useful outside of Underscore. +function noop(){} + +// Generates a function for a given object that returns a given property. +function propertyOf(obj) { + if (obj == null) return noop; + return function(path) { + return get(obj, path); + }; +} + +// Run a function **n** times. +function times(n, iteratee, context) { + var accum = Array(Math.max(0, n)); + iteratee = optimizeCb(iteratee, context, 1); + for (var i = 0; i < n; i++) accum[i] = iteratee(i); + return accum; +} + +// Return a random integer between `min` and `max` (inclusive). +function random(min, max) { + if (max == null) { + max = min; + min = 0; + } + return min + Math.floor(Math.random() * (max - min + 1)); +} + +// A (possibly faster) way to get the current timestamp as an integer. +var now = Date.now || function() { + return new Date().getTime(); +}; + +// Internal helper to generate functions for escaping and unescaping strings +// to/from HTML interpolation. +function createEscaper(map) { + var escaper = function(match) { + return map[match]; + }; + // Regexes for identifying a key that needs to be escaped. + var source = '(?:' + keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function(string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; +} + +// Internal list of HTML entities for escaping. +var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' +}; + +// Function for escaping strings to HTML interpolation. +var _escape = createEscaper(escapeMap); + +// Internal list of HTML entities for unescaping. +var unescapeMap = invert(escapeMap); + +// Function for unescaping strings from HTML interpolation. +var _unescape = createEscaper(unescapeMap); + +// By default, Underscore uses ERB-style template delimiters. Change the +// following template settings to use alternative delimiters. +var templateSettings = _$1.templateSettings = { + evaluate: /<%([\s\S]+?)%>/g, + interpolate: /<%=([\s\S]+?)%>/g, + escape: /<%-([\s\S]+?)%>/g +}; + +// When customizing `_.templateSettings`, if you don't want to define an +// interpolation, evaluation or escaping regex, we need one that is +// guaranteed not to match. +var noMatch = /(.)^/; + +// Certain characters need to be escaped so that they can be put into a +// string literal. +var escapes = { + "'": "'", + '\\': '\\', + '\r': 'r', + '\n': 'n', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; + +function escapeChar(match) { + return '\\' + escapes[match]; +} + +// In order to prevent third-party code injection through +// `_.templateSettings.variable`, we test it against the following regular +// expression. It is intentionally a bit more liberal than just matching valid +// identifiers, but still prevents possible loopholes through defaults or +// destructuring assignment. +var bareIdentifier = /^\s*(\w|\$)+\s*$/; + +// JavaScript micro-templating, similar to John Resig's implementation. +// Underscore templating handles arbitrary delimiters, preserves whitespace, +// and correctly escapes quotes within interpolated code. +// NB: `oldSettings` only exists for backwards compatibility. +function template(text, settings, oldSettings) { + if (!settings && oldSettings) settings = oldSettings; + settings = defaults({}, settings, _$1.templateSettings); + + // Combine delimiters into one regular expression via alternation. + var matcher = RegExp([ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source + ].join('|') + '|$', 'g'); + + // Compile the template source, escaping string literals appropriately. + var index = 0; + var source = "__p+='"; + text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escapeRegExp, escapeChar); + index = offset + match.length; + + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + + // Adobe VMs need the match returned to produce the correct offset. + return match; + }); + source += "';\n"; + + var argument = settings.variable; + if (argument) { + // Insure against third-party code injection. (CVE-2021-23358) + if (!bareIdentifier.test(argument)) throw new Error( + 'variable is not a bare identifier: ' + argument + ); + } else { + // If a variable is not specified, place data values in local scope. + source = 'with(obj||{}){\n' + source + '}\n'; + argument = 'obj'; + } + + source = "var __t,__p='',__j=Array.prototype.join," + + "print=function(){__p+=__j.call(arguments,'');};\n" + + source + 'return __p;\n'; + + var render; + try { + render = new Function(argument, '_', source); + } catch (e) { + e.source = source; + throw e; + } + + var template = function(data) { + return render.call(this, data, _$1); + }; + + // Provide the compiled source as a convenience for precompilation. + template.source = 'function(' + argument + '){\n' + source + '}'; + + return template; +} + +// Traverses the children of `obj` along `path`. If a child is a function, it +// is invoked with its parent as context. Returns the value of the final +// child, or `fallback` if any child is undefined. +function result(obj, path, fallback) { + path = toPath(path); + var length = path.length; + if (!length) { + return isFunction$1(fallback) ? fallback.call(obj) : fallback; + } + for (var i = 0; i < length; i++) { + var prop = obj == null ? void 0 : obj[path[i]]; + if (prop === void 0) { + prop = fallback; + i = length; // Ensure we don't continue iterating. + } + obj = isFunction$1(prop) ? prop.call(obj) : prop; + } + return obj; +} + +// Generate a unique integer id (unique within the entire client session). +// Useful for temporary DOM ids. +var idCounter = 0; +function uniqueId(prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; +} + +// Start chaining a wrapped Underscore object. +function chain(obj) { + var instance = _$1(obj); + instance._chain = true; + return instance; +} + +// Internal function to execute `sourceFunc` bound to `context` with optional +// `args`. Determines whether to execute a function as a constructor or as a +// normal function. +function executeBound(sourceFunc, boundFunc, context, callingContext, args) { + if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); + var self = baseCreate(sourceFunc.prototype); + var result = sourceFunc.apply(self, args); + if (isObject(result)) return result; + return self; +} + +// Partially apply a function by creating a version that has had some of its +// arguments pre-filled, without changing its dynamic `this` context. `_` acts +// as a placeholder by default, allowing any combination of arguments to be +// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. +var partial = restArguments(function(func, boundArgs) { + var placeholder = partial.placeholder; + var bound = function() { + var position = 0, length = boundArgs.length; + var args = Array(length); + for (var i = 0; i < length; i++) { + args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; + } + while (position < arguments.length) args.push(arguments[position++]); + return executeBound(func, bound, this, this, args); + }; + return bound; +}); + +partial.placeholder = _$1; + +// Create a function bound to a given object (assigning `this`, and arguments, +// optionally). +var bind = restArguments(function(func, context, args) { + if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function'); + var bound = restArguments(function(callArgs) { + return executeBound(func, bound, context, this, args.concat(callArgs)); + }); + return bound; +}); + +// Internal helper for collection methods to determine whether a collection +// should be iterated as an array or as an object. +// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength +// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 +var isArrayLike = createSizePropertyCheck(getLength); + +// Internal implementation of a recursive `flatten` function. +function flatten$1(input, depth, strict, output) { + output = output || []; + if (!depth && depth !== 0) { + depth = Infinity; + } else if (depth <= 0) { + return output.concat(input); + } + var idx = output.length; + for (var i = 0, length = getLength(input); i < length; i++) { + var value = input[i]; + if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) { + // Flatten current level of array or arguments object. + if (depth > 1) { + flatten$1(value, depth - 1, strict, output); + idx = output.length; + } else { + var j = 0, len = value.length; + while (j < len) output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; + } + } + return output; +} + +// Bind a number of an object's methods to that object. Remaining arguments +// are the method names to be bound. Useful for ensuring that all callbacks +// defined on an object belong to it. +var bindAll = restArguments(function(obj, keys) { + keys = flatten$1(keys, false, false); + var index = keys.length; + if (index < 1) throw new Error('bindAll must be passed function names'); + while (index--) { + var key = keys[index]; + obj[key] = bind(obj[key], obj); + } + return obj; +}); + +// Memoize an expensive function by storing its results. +function memoize(func, hasher) { + var memoize = function(key) { + var cache = memoize.cache; + var address = '' + (hasher ? hasher.apply(this, arguments) : key); + if (!has$1(cache, address)) cache[address] = func.apply(this, arguments); + return cache[address]; + }; + memoize.cache = {}; + return memoize; +} + +// Delays a function for the given number of milliseconds, and then calls +// it with the arguments supplied. +var delay = restArguments(function(func, wait, args) { + return setTimeout(function() { + return func.apply(null, args); + }, wait); +}); + +// Defers a function, scheduling it to run after the current call stack has +// cleared. +var defer = partial(delay, _$1, 1); + +// Returns a function, that, when invoked, will only be triggered at most once +// during a given window of time. Normally, the throttled function will run +// as much as it can, without ever going more than once per `wait` duration; +// but if you'd like to disable the execution on the leading edge, pass +// `{leading: false}`. To disable execution on the trailing edge, ditto. +function throttle(func, wait, options) { + var timeout, context, args, result; + var previous = 0; + if (!options) options = {}; + + var later = function() { + previous = options.leading === false ? 0 : now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + + var throttled = function() { + var _now = now(); + if (!previous && options.leading === false) previous = _now; + var remaining = wait - (_now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = _now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + + throttled.cancel = function() { + clearTimeout(timeout); + previous = 0; + timeout = context = args = null; + }; + + return throttled; +} + +// When a sequence of calls of the returned function ends, the argument +// function is triggered. The end of a sequence is defined by the `wait` +// parameter. If `immediate` is passed, the argument function will be +// triggered at the beginning of the sequence instead of at the end. +function debounce(func, wait, immediate) { + var timeout, previous, args, result, context; + + var later = function() { + var passed = now() - previous; + if (wait > passed) { + timeout = setTimeout(later, wait - passed); + } else { + timeout = null; + if (!immediate) result = func.apply(context, args); + // This check is needed because `func` can recursively invoke `debounced`. + if (!timeout) args = context = null; + } + }; + + var debounced = restArguments(function(_args) { + context = this; + args = _args; + previous = now(); + if (!timeout) { + timeout = setTimeout(later, wait); + if (immediate) result = func.apply(context, args); + } + return result; + }); + + debounced.cancel = function() { + clearTimeout(timeout); + timeout = args = context = null; + }; + + return debounced; +} + +// Returns the first function passed as an argument to the second, +// allowing you to adjust arguments, run code before and after, and +// conditionally execute the original function. +function wrap(func, wrapper) { + return partial(wrapper, func); +} + +// Returns a negated version of the passed-in predicate. +function negate(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; +} + +// Returns a function that is the composition of a list of functions, each +// consuming the return value of the function that follows. +function compose() { + var args = arguments; + var start = args.length - 1; + return function() { + var i = start; + var result = args[start].apply(this, arguments); + while (i--) result = args[i].call(this, result); + return result; + }; +} + +// Returns a function that will only be executed on and after the Nth call. +function after(times, func) { + return function() { + if (--times < 1) { + return func.apply(this, arguments); + } + }; +} + +// Returns a function that will only be executed up to (but not including) the +// Nth call. +function before(times, func) { + var memo; + return function() { + if (--times > 0) { + memo = func.apply(this, arguments); + } + if (times <= 1) func = null; + return memo; + }; +} + +// Returns a function that will be executed at most one time, no matter how +// often you call it. Useful for lazy initialization. +var once = partial(before, 2); + +// Returns the first key on an object that passes a truth test. +function findKey(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = keys(obj), key; + for (var i = 0, length = _keys.length; i < length; i++) { + key = _keys[i]; + if (predicate(obj[key], key, obj)) return key; + } +} + +// Internal function to generate `_.findIndex` and `_.findLastIndex`. +function createPredicateIndexFinder(dir) { + return function(array, predicate, context) { + predicate = cb(predicate, context); + var length = getLength(array); + var index = dir > 0 ? 0 : length - 1; + for (; index >= 0 && index < length; index += dir) { + if (predicate(array[index], index, array)) return index; + } + return -1; + }; +} + +// Returns the first index on an array-like that passes a truth test. +var findIndex = createPredicateIndexFinder(1); + +// Returns the last index on an array-like that passes a truth test. +var findLastIndex = createPredicateIndexFinder(-1); + +// Use a comparator function to figure out the smallest index at which +// an object should be inserted so as to maintain order. Uses binary search. +function sortedIndex(array, obj, iteratee, context) { + iteratee = cb(iteratee, context, 1); + var value = iteratee(obj); + var low = 0, high = getLength(array); + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; + } + return low; +} + +// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions. +function createIndexFinder(dir, predicateFind, sortedIndex) { + return function(array, item, idx) { + var i = 0, length = getLength(array); + if (typeof idx == 'number') { + if (dir > 0) { + i = idx >= 0 ? idx : Math.max(idx + length, i); + } else { + length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; + } + } else if (sortedIndex && idx && length) { + idx = sortedIndex(array, item); + return array[idx] === item ? idx : -1; + } + if (item !== item) { + idx = predicateFind(slice.call(array, i, length), isNaN$1); + return idx >= 0 ? idx + i : -1; + } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { + if (array[idx] === item) return idx; + } + return -1; + }; +} + +// Return the position of the first occurrence of an item in an array, +// or -1 if the item is not included in the array. +// If the array is large and already in sort order, pass `true` +// for **isSorted** to use binary search. +var indexOf = createIndexFinder(1, findIndex, sortedIndex); + +// Return the position of the last occurrence of an item in an array, +// or -1 if the item is not included in the array. +var lastIndexOf = createIndexFinder(-1, findLastIndex); + +// Return the first value which passes a truth test. +function find(obj, predicate, context) { + var keyFinder = isArrayLike(obj) ? findIndex : findKey; + var key = keyFinder(obj, predicate, context); + if (key !== void 0 && key !== -1) return obj[key]; +} + +// Convenience version of a common use case of `_.find`: getting the first +// object containing specific `key:value` pairs. +function findWhere(obj, attrs) { + return find(obj, matcher(attrs)); +} + +// The cornerstone for collection functions, an `each` +// implementation, aka `forEach`. +// Handles raw objects in addition to array-likes. Treats all +// sparse array-likes as if they were dense. +function each(obj, iteratee, context) { + iteratee = optimizeCb(iteratee, context); + var i, length; + if (isArrayLike(obj)) { + for (i = 0, length = obj.length; i < length; i++) { + iteratee(obj[i], i, obj); + } + } else { + var _keys = keys(obj); + for (i = 0, length = _keys.length; i < length; i++) { + iteratee(obj[_keys[i]], _keys[i], obj); + } + } + return obj; +} + +// Return the results of applying the iteratee to each element. +function map(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length, + results = Array(length); + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + results[index] = iteratee(obj[currentKey], currentKey, obj); + } + return results; +} + +// Internal helper to create a reducing function, iterating left or right. +function createReduce(dir) { + // Wrap code that reassigns argument variables in a separate function than + // the one that accesses `arguments.length` to avoid a perf hit. (#1991) + var reducer = function(obj, iteratee, memo, initial) { + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length, + index = dir > 0 ? 0 : length - 1; + if (!initial) { + memo = obj[_keys ? _keys[index] : index]; + index += dir; + } + for (; index >= 0 && index < length; index += dir) { + var currentKey = _keys ? _keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + }; + + return function(obj, iteratee, memo, context) { + var initial = arguments.length >= 3; + return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); + }; +} + +// **Reduce** builds up a single result from a list of values, aka `inject`, +// or `foldl`. +var reduce = createReduce(1); + +// The right-associative version of reduce, also known as `foldr`. +var reduceRight = createReduce(-1); + +// Return all the elements that pass a truth test. +function filter(obj, predicate, context) { + var results = []; + predicate = cb(predicate, context); + each(obj, function(value, index, list) { + if (predicate(value, index, list)) results.push(value); + }); + return results; +} + +// Return all the elements for which a truth test fails. +function reject(obj, predicate, context) { + return filter(obj, negate(cb(predicate)), context); +} + +// Determine whether all of the elements pass a truth test. +function every(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) return false; + } + return true; +} + +// Determine if at least one element in the object passes a truth test. +function some(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = !isArrayLike(obj) && keys(obj), + length = (_keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) return true; + } + return false; +} + +// Determine if the array or object contains a given item (using `===`). +function contains(obj, item, fromIndex, guard) { + if (!isArrayLike(obj)) obj = values(obj); + if (typeof fromIndex != 'number' || guard) fromIndex = 0; + return indexOf(obj, item, fromIndex) >= 0; +} + +// Invoke a method (with arguments) on every item in a collection. +var invoke = restArguments(function(obj, path, args) { + var contextPath, func; + if (isFunction$1(path)) { + func = path; + } else { + path = toPath(path); + contextPath = path.slice(0, -1); + path = path[path.length - 1]; + } + return map(obj, function(context) { + var method = func; + if (!method) { + if (contextPath && contextPath.length) { + context = deepGet(context, contextPath); + } + if (context == null) return void 0; + method = context[path]; + } + return method == null ? method : method.apply(context, args); + }); +}); + +// Convenience version of a common use case of `_.map`: fetching a property. +function pluck(obj, key) { + return map(obj, property(key)); +} + +// Convenience version of a common use case of `_.filter`: selecting only +// objects containing specific `key:value` pairs. +function where(obj, attrs) { + return filter(obj, matcher(attrs)); +} + +// Return the maximum element (or element-based computation). +function max(obj, iteratee, context) { + var result = -Infinity, lastComputed = -Infinity, + value, computed; + if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) { + obj = isArrayLike(obj) ? obj : values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value != null && value > result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + each(obj, function(v, index, list) { + computed = iteratee(v, index, list); + if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) { + result = v; + lastComputed = computed; + } + }); + } + return result; +} + +// Return the minimum element (or element-based computation). +function min(obj, iteratee, context) { + var result = Infinity, lastComputed = Infinity, + value, computed; + if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) { + obj = isArrayLike(obj) ? obj : values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value != null && value < result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + each(obj, function(v, index, list) { + computed = iteratee(v, index, list); + if (computed < lastComputed || (computed === Infinity && result === Infinity)) { + result = v; + lastComputed = computed; + } + }); + } + return result; +} + +// Safely create a real, live array from anything iterable. +var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; +function toArray(obj) { + if (!obj) return []; + if (isArray(obj)) return slice.call(obj); + if (isString(obj)) { + // Keep surrogate pair characters together. + return obj.match(reStrSymbol); + } + if (isArrayLike(obj)) return map(obj, identity); + return values(obj); +} + +// Sample **n** random values from a collection using the modern version of the +// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). +// If **n** is not specified, returns a single random element. +// The internal `guard` argument allows it to work with `_.map`. +function sample(obj, n, guard) { + if (n == null || guard) { + if (!isArrayLike(obj)) obj = values(obj); + return obj[random(obj.length - 1)]; + } + var sample = toArray(obj); + var length = getLength(sample); + n = Math.max(Math.min(n, length), 0); + var last = length - 1; + for (var index = 0; index < n; index++) { + var rand = random(index, last); + var temp = sample[index]; + sample[index] = sample[rand]; + sample[rand] = temp; + } + return sample.slice(0, n); +} + +// Shuffle a collection. +function shuffle(obj) { + return sample(obj, Infinity); +} + +// Sort the object's values by a criterion produced by an iteratee. +function sortBy(obj, iteratee, context) { + var index = 0; + iteratee = cb(iteratee, context); + return pluck(map(obj, function(value, key, list) { + return { + value: value, + index: index++, + criteria: iteratee(value, key, list) + }; + }).sort(function(left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) return 1; + if (a < b || b === void 0) return -1; + } + return left.index - right.index; + }), 'value'); +} + +// An internal function used for aggregate "group by" operations. +function group(behavior, partition) { + return function(obj, iteratee, context) { + var result = partition ? [[], []] : {}; + iteratee = cb(iteratee, context); + each(obj, function(value, index) { + var key = iteratee(value, index, obj); + behavior(result, value, key); + }); + return result; + }; +} + +// Groups the object's values by a criterion. Pass either a string attribute +// to group by, or a function that returns the criterion. +var groupBy = group(function(result, value, key) { + if (has$1(result, key)) result[key].push(value); else result[key] = [value]; +}); + +// Indexes the object's values by a criterion, similar to `_.groupBy`, but for +// when you know that your index values will be unique. +var indexBy = group(function(result, value, key) { + result[key] = value; +}); + +// Counts instances of an object that group by a certain criterion. Pass +// either a string attribute to count by, or a function that returns the +// criterion. +var countBy = group(function(result, value, key) { + if (has$1(result, key)) result[key]++; else result[key] = 1; +}); + +// Split a collection into two arrays: one whose elements all pass the given +// truth test, and one whose elements all do not pass the truth test. +var partition = group(function(result, value, pass) { + result[pass ? 0 : 1].push(value); +}, true); + +// Return the number of elements in a collection. +function size(obj) { + if (obj == null) return 0; + return isArrayLike(obj) ? obj.length : keys(obj).length; +} + +// Internal `_.pick` helper function to determine whether `key` is an enumerable +// property name of `obj`. +function keyInObj(value, key, obj) { + return key in obj; +} + +// Return a copy of the object only containing the allowed properties. +var pick = restArguments(function(obj, keys) { + var result = {}, iteratee = keys[0]; + if (obj == null) return result; + if (isFunction$1(iteratee)) { + if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); + keys = allKeys(obj); + } else { + iteratee = keyInObj; + keys = flatten$1(keys, false, false); + obj = Object(obj); + } + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + var value = obj[key]; + if (iteratee(value, key, obj)) result[key] = value; + } + return result; +}); + +// Return a copy of the object without the disallowed properties. +var omit = restArguments(function(obj, keys) { + var iteratee = keys[0], context; + if (isFunction$1(iteratee)) { + iteratee = negate(iteratee); + if (keys.length > 1) context = keys[1]; + } else { + keys = map(flatten$1(keys, false, false), String); + iteratee = function(value, key) { + return !contains(keys, key); + }; + } + return pick(obj, iteratee, context); +}); + +// Returns everything but the last entry of the array. Especially useful on +// the arguments object. Passing **n** will return all the values in +// the array, excluding the last N. +function initial(array, n, guard) { + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); +} + +// Get the first element of an array. Passing **n** will return the first N +// values in the array. The **guard** check allows it to work with `_.map`. +function first(array, n, guard) { + if (array == null || array.length < 1) return n == null || guard ? void 0 : []; + if (n == null || guard) return array[0]; + return initial(array, array.length - n); +} + +// Returns everything but the first entry of the `array`. Especially useful on +// the `arguments` object. Passing an **n** will return the rest N values in the +// `array`. +function rest(array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); +} + +// Get the last element of an array. Passing **n** will return the last N +// values in the array. +function last(array, n, guard) { + if (array == null || array.length < 1) return n == null || guard ? void 0 : []; + if (n == null || guard) return array[array.length - 1]; + return rest(array, Math.max(0, array.length - n)); +} + +// Trim out all falsy values from an array. +function compact(array) { + return filter(array, Boolean); +} + +// Flatten out an array, either recursively (by default), or up to `depth`. +// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively. +function flatten(array, depth) { + return flatten$1(array, depth, false); +} + +// Take the difference between one array and a number of other arrays. +// Only the elements present in just the first array will remain. +var difference = restArguments(function(array, rest) { + rest = flatten$1(rest, true, true); + return filter(array, function(value){ + return !contains(rest, value); + }); +}); + +// Return a version of the array that does not contain the specified value(s). +var without = restArguments(function(array, otherArrays) { + return difference(array, otherArrays); +}); + +// Produce a duplicate-free version of the array. If the array has already +// been sorted, you have the option of using a faster algorithm. +// The faster algorithm will not work with an iteratee if the iteratee +// is not a one-to-one function, so providing an iteratee will disable +// the faster algorithm. +function uniq(array, isSorted, iteratee, context) { + if (!isBoolean(isSorted)) { + context = iteratee; + iteratee = isSorted; + isSorted = false; + } + if (iteratee != null) iteratee = cb(iteratee, context); + var result = []; + var seen = []; + for (var i = 0, length = getLength(array); i < length; i++) { + var value = array[i], + computed = iteratee ? iteratee(value, i, array) : value; + if (isSorted && !iteratee) { + if (!i || seen !== computed) result.push(value); + seen = computed; + } else if (iteratee) { + if (!contains(seen, computed)) { + seen.push(computed); + result.push(value); + } + } else if (!contains(result, value)) { + result.push(value); + } + } + return result; +} + +// Produce an array that contains the union: each distinct element from all of +// the passed-in arrays. +var union = restArguments(function(arrays) { + return uniq(flatten$1(arrays, true, true)); +}); + +// Produce an array that contains every item shared between all the +// passed-in arrays. +function intersection(array) { + var result = []; + var argsLength = arguments.length; + for (var i = 0, length = getLength(array); i < length; i++) { + var item = array[i]; + if (contains(result, item)) continue; + var j; + for (j = 1; j < argsLength; j++) { + if (!contains(arguments[j], item)) break; + } + if (j === argsLength) result.push(item); + } + return result; +} + +// Complement of zip. Unzip accepts an array of arrays and groups +// each array's elements on shared indices. +function unzip(array) { + var length = (array && max(array, getLength).length) || 0; + var result = Array(length); + + for (var index = 0; index < length; index++) { + result[index] = pluck(array, index); + } + return result; +} + +// Zip together multiple lists into a single array -- elements that share +// an index go together. +var zip = restArguments(unzip); + +// Converts lists into objects. Pass either a single array of `[key, value]` +// pairs, or two parallel arrays of the same length -- one of keys, and one of +// the corresponding values. Passing by pairs is the reverse of `_.pairs`. +function object(list, values) { + var result = {}; + for (var i = 0, length = getLength(list); i < length; i++) { + if (values) { + result[list[i]] = values[i]; + } else { + result[list[i][0]] = list[i][1]; + } + } + return result; +} + +// Generate an integer Array containing an arithmetic progression. A port of +// the native Python `range()` function. See +// [the Python documentation](https://docs.python.org/library/functions.html#range). +function range(start, stop, step) { + if (stop == null) { + stop = start || 0; + start = 0; + } + if (!step) { + step = stop < start ? -1 : 1; + } + + var length = Math.max(Math.ceil((stop - start) / step), 0); + var range = Array(length); + + for (var idx = 0; idx < length; idx++, start += step) { + range[idx] = start; + } + + return range; +} + +// Chunk a single array into multiple arrays, each containing `count` or fewer +// items. +function chunk(array, count) { + if (count == null || count < 1) return []; + var result = []; + var i = 0, length = array.length; + while (i < length) { + result.push(slice.call(array, i, i += count)); + } + return result; +} + +// Helper function to continue chaining intermediate results. +function chainResult(instance, obj) { + return instance._chain ? _$1(obj).chain() : obj; +} + +// Add your own custom functions to the Underscore object. +function mixin(obj) { + each(functions(obj), function(name) { + var func = _$1[name] = obj[name]; + _$1.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return chainResult(this, func.apply(_$1, args)); + }; + }); + return _$1; +} + +// Add all mutator `Array` functions to the wrapper. +each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + var method = ArrayProto[name]; + _$1.prototype[name] = function() { + var obj = this._wrapped; + if (obj != null) { + method.apply(obj, arguments); + if ((name === 'shift' || name === 'splice') && obj.length === 0) { + delete obj[0]; + } + } + return chainResult(this, obj); + }; +}); + +// Add all accessor `Array` functions to the wrapper. +each(['concat', 'join', 'slice'], function(name) { + var method = ArrayProto[name]; + _$1.prototype[name] = function() { + var obj = this._wrapped; + if (obj != null) obj = method.apply(obj, arguments); + return chainResult(this, obj); + }; +}); + +// Named Exports + +var allExports = { + __proto__: null, + VERSION: VERSION, + restArguments: restArguments, + isObject: isObject, + isNull: isNull, + isUndefined: isUndefined, + isBoolean: isBoolean, + isElement: isElement, + isString: isString, + isNumber: isNumber, + isDate: isDate, + isRegExp: isRegExp, + isError: isError, + isSymbol: isSymbol, + isArrayBuffer: isArrayBuffer, + isDataView: isDataView$1, + isArray: isArray, + isFunction: isFunction$1, + isArguments: isArguments$1, + isFinite: isFinite$1, + isNaN: isNaN$1, + isTypedArray: isTypedArray$1, + isEmpty: isEmpty, + isMatch: isMatch, + isEqual: isEqual, + isMap: isMap, + isWeakMap: isWeakMap, + isSet: isSet, + isWeakSet: isWeakSet, + keys: keys, + allKeys: allKeys, + values: values, + pairs: pairs, + invert: invert, + functions: functions, + methods: functions, + extend: extend, + extendOwn: extendOwn, + assign: extendOwn, + defaults: defaults, + create: create, + clone: clone, + tap: tap, + get: get, + has: has, + mapObject: mapObject, + identity: identity, + constant: constant, + noop: noop, + toPath: toPath$1, + property: property, + propertyOf: propertyOf, + matcher: matcher, + matches: matcher, + times: times, + random: random, + now: now, + escape: _escape, + unescape: _unescape, + templateSettings: templateSettings, + template: template, + result: result, + uniqueId: uniqueId, + chain: chain, + iteratee: iteratee, + partial: partial, + bind: bind, + bindAll: bindAll, + memoize: memoize, + delay: delay, + defer: defer, + throttle: throttle, + debounce: debounce, + wrap: wrap, + negate: negate, + compose: compose, + after: after, + before: before, + once: once, + findKey: findKey, + findIndex: findIndex, + findLastIndex: findLastIndex, + sortedIndex: sortedIndex, + indexOf: indexOf, + lastIndexOf: lastIndexOf, + find: find, + detect: find, + findWhere: findWhere, + each: each, + forEach: each, + map: map, + collect: map, + reduce: reduce, + foldl: reduce, + inject: reduce, + reduceRight: reduceRight, + foldr: reduceRight, + filter: filter, + select: filter, + reject: reject, + every: every, + all: every, + some: some, + any: some, + contains: contains, + includes: contains, + include: contains, + invoke: invoke, + pluck: pluck, + where: where, + max: max, + min: min, + shuffle: shuffle, + sample: sample, + sortBy: sortBy, + groupBy: groupBy, + indexBy: indexBy, + countBy: countBy, + partition: partition, + toArray: toArray, + size: size, + pick: pick, + omit: omit, + first: first, + head: first, + take: first, + initial: initial, + last: last, + rest: rest, + tail: rest, + drop: rest, + compact: compact, + flatten: flatten, + without: without, + uniq: uniq, + unique: uniq, + union: union, + intersection: intersection, + difference: difference, + unzip: unzip, + transpose: unzip, + zip: zip, + object: object, + range: range, + chunk: chunk, + mixin: mixin, + 'default': _$1 +}; + +// Default Export + +// Add all of the Underscore functions to the wrapper object. +var _ = mixin(allExports); +// Legacy Node.js API. +_._ = _; + +exports.VERSION = VERSION; +exports._ = _; +exports._escape = _escape; +exports._unescape = _unescape; +exports.after = after; +exports.allKeys = allKeys; +exports.before = before; +exports.bind = bind; +exports.bindAll = bindAll; +exports.chain = chain; +exports.chunk = chunk; +exports.clone = clone; +exports.compact = compact; +exports.compose = compose; +exports.constant = constant; +exports.contains = contains; +exports.countBy = countBy; +exports.create = create; +exports.debounce = debounce; +exports.defaults = defaults; +exports.defer = defer; +exports.delay = delay; +exports.difference = difference; +exports.each = each; +exports.every = every; +exports.extend = extend; +exports.extendOwn = extendOwn; +exports.filter = filter; +exports.find = find; +exports.findIndex = findIndex; +exports.findKey = findKey; +exports.findLastIndex = findLastIndex; +exports.findWhere = findWhere; +exports.first = first; +exports.flatten = flatten; +exports.functions = functions; +exports.get = get; +exports.groupBy = groupBy; +exports.has = has; +exports.identity = identity; +exports.indexBy = indexBy; +exports.indexOf = indexOf; +exports.initial = initial; +exports.intersection = intersection; +exports.invert = invert; +exports.invoke = invoke; +exports.isArguments = isArguments$1; +exports.isArray = isArray; +exports.isArrayBuffer = isArrayBuffer; +exports.isBoolean = isBoolean; +exports.isDataView = isDataView$1; +exports.isDate = isDate; +exports.isElement = isElement; +exports.isEmpty = isEmpty; +exports.isEqual = isEqual; +exports.isError = isError; +exports.isFinite = isFinite$1; +exports.isFunction = isFunction$1; +exports.isMap = isMap; +exports.isMatch = isMatch; +exports.isNaN = isNaN$1; +exports.isNull = isNull; +exports.isNumber = isNumber; +exports.isObject = isObject; +exports.isRegExp = isRegExp; +exports.isSet = isSet; +exports.isString = isString; +exports.isSymbol = isSymbol; +exports.isTypedArray = isTypedArray$1; +exports.isUndefined = isUndefined; +exports.isWeakMap = isWeakMap; +exports.isWeakSet = isWeakSet; +exports.iteratee = iteratee; +exports.keys = keys; +exports.last = last; +exports.lastIndexOf = lastIndexOf; +exports.map = map; +exports.mapObject = mapObject; +exports.matcher = matcher; +exports.max = max; +exports.memoize = memoize; +exports.min = min; +exports.mixin = mixin; +exports.negate = negate; +exports.noop = noop; +exports.now = now; +exports.object = object; +exports.omit = omit; +exports.once = once; +exports.pairs = pairs; +exports.partial = partial; +exports.partition = partition; +exports.pick = pick; +exports.pluck = pluck; +exports.property = property; +exports.propertyOf = propertyOf; +exports.random = random; +exports.range = range; +exports.reduce = reduce; +exports.reduceRight = reduceRight; +exports.reject = reject; +exports.rest = rest; +exports.restArguments = restArguments; +exports.result = result; +exports.sample = sample; +exports.shuffle = shuffle; +exports.size = size; +exports.some = some; +exports.sortBy = sortBy; +exports.sortedIndex = sortedIndex; +exports.tap = tap; +exports.template = template; +exports.templateSettings = templateSettings; +exports.throttle = throttle; +exports.times = times; +exports.toArray = toArray; +exports.toPath = toPath$1; +exports.union = union; +exports.uniq = uniq; +exports.uniqueId = uniqueId; +exports.unzip = unzip; +exports.values = values; +exports.where = where; +exports.without = without; +exports.wrap = wrap; +exports.zip = zip; +//# sourceMappingURL=underscore-node-f.cjs.map + + +/***/ }), + +/***/ 5067: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Underscore.js 1.13.6 +// https://underscorejs.org +// (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. + +var underscoreNodeF = __nccwpck_require__(6717); + + + +module.exports = underscoreNodeF._; +//# sourceMappingURL=underscore-node.cjs.map + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be in strict mode. +(() => { +"use strict"; +var exports = __webpack_exports__; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.run = void 0; +const core_1 = __nccwpck_require__(2186); +const github_1 = __nccwpck_require__(5438); +const plugin_retry_1 = __nccwpck_require__(6298); +const rest_1 = __nccwpck_require__(5375); +const AzureDevOpsBoardService_1 = __nccwpck_require__(6275); +const BranchProtectionService_1 = __nccwpck_require__(2843); +const CodeQualityService_1 = __nccwpck_require__(1408); +const JsonService_1 = __nccwpck_require__(2254); +const PentestService_1 = __nccwpck_require__(2046); +const SastService_1 = __nccwpck_require__(124); +const ScaService_1 = __nccwpck_require__(4351); +const SecretScanningService_1 = __nccwpck_require__(341); +const AccessToCodeService_1 = __nccwpck_require__(4800); +const ThreatModelingService_1 = __nccwpck_require__(6121); +/** + * The main function for the action. + * @returns {Promise} Resolves when the action is complete. + */ +async function run() { + try { + console.log('Running compliance controls \n'); + const cydigConfig = (0, JsonService_1.getContentOfFile)((0, core_1.getInput)('cydigConfigPath')); + const { owner, repo } = github_1.context.repo; + const token = (0, core_1.getInput)('PAT-token'); + // eslint-disable-next-line + const OctokitRetry = rest_1.Octokit.plugin(plugin_retry_1.retry); + const octokit = new OctokitRetry({ + auth: token, + }); + await CodeQualityService_1.CodeQualityService.getStateOfCodeQualityTool(cydigConfig.codeQualityTool); + await SastService_1.SastService.getStateOfSastTool(cydigConfig.sastTool.nameOfTool, octokit, owner, repo); + await ScaService_1.ScaService.getStateOfScaTool(cydigConfig.scaTool.nameOfTool, octokit, owner, repo); + await SecretScanningService_1.SecretScanningService.getStateOfExposedSecrets(cydigConfig.secretScanningTool?.nameOfTool, octokit, owner, repo); + await BranchProtectionService_1.BranchProtectionService.getStateOfBranchProtection(octokit, owner, repo); + await AccessToCodeService_1.AccessToCodeService.setAccessToCodeFindings(octokit, owner, repo); + await PentestService_1.PentestService.getStateOfPentest(cydigConfig.pentest); + await ThreatModelingService_1.ThreatModelingService.getStateOfThreatModeling(cydigConfig.threatModeling); + await AzureDevOpsBoardService_1.AzureDevOpsBoardService.getStateOfAzureDevOpsBoards(cydigConfig); + } + catch (error) { + // Fail the workflow run if an error occurs + if (error instanceof Error) + (0, core_1.setFailed)(error.message); + } +} +exports.run = run; +// eslint-disable-next-line @typescript-eslint/no-floating-promises +run(); + +})(); + +module.exports = __webpack_exports__; +/******/ })() +; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index d0895ae5..00000000 --- a/package-lock.json +++ /dev/null @@ -1,2887 +0,0 @@ -{ - "name": "cydig-compliance-action", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "cydig-compliance-action", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "@actions/core": "^1.10.0", - "@actions/github": "^6.0.0", - "@octokit/plugin-retry": "^6.0.1", - "@octokit/rest": "^20.1.0", - "@vercel/ncc": "^0.36.1", - "azure-devops-node-api": "^13.0.0" - }, - "devDependencies": { - "@octokit/types": "^13.5.0", - "@types/chai": "^4.3.6", - "@types/mocha": "^10.0.6", - "@types/node": "^20.14.5", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.12", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", - "chai": "^4.4.1", - "eslint": "^8.49.0", - "husky": "^8.0.3", - "mocha": "^10.3.0", - "prettier": "^2.8.8", - "sinon": "^18.0.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.4.5" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@actions/core": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", - "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", - "dependencies": { - "@actions/http-client": "^2.0.1", - "uuid": "^8.3.2" - } - }, - "node_modules/@actions/github": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", - "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", - "dependencies": { - "@actions/http-client": "^2.2.0", - "@octokit/core": "^5.0.1", - "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/plugin-rest-endpoint-methods": "^10.0.0" - } - }, - "node_modules/@actions/http-client": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.1.tgz", - "integrity": "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==", - "dependencies": { - "tunnel": "^0.0.6", - "undici": "^5.25.4" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.2.tgz", - "integrity": "sha512-0MGxAVt1m/ZK+LTJp/j0qF7Hz97D9O/FH9Ms3ltnyIdDD57cbb1ACIQTkbHvNXtWDv5TPq7w5Kq56+cNukbo7g==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", - "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@octokit/auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", - "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz", - "integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==", - "dependencies": { - "@octokit/auth-token": "^4.0.0", - "@octokit/graphql": "^7.1.0", - "@octokit/request": "^8.3.1", - "@octokit/request-error": "^5.1.0", - "@octokit/types": "^13.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/endpoint": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.5.tgz", - "integrity": "sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==", - "dependencies": { - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz", - "integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==", - "dependencies": { - "@octokit/request": "^8.3.0", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/openapi-types": { - "version": "22.2.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz", - "integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==" - }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz", - "integrity": "sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==", - "dependencies": { - "@octokit/types": "^12.6.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" - } - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "dependencies": { - "@octokit/openapi-types": "^20.0.0" - } - }, - "node_modules/@octokit/plugin-request-log": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz", - "integrity": "sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==", - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz", - "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==", - "dependencies": { - "@octokit/types": "^12.6.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "dependencies": { - "@octokit/openapi-types": "^20.0.0" - } - }, - "node_modules/@octokit/plugin-retry": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-6.0.1.tgz", - "integrity": "sha512-SKs+Tz9oj0g4p28qkZwl/topGcb0k0qPNX/i7vBKmDsjoeqnVfFUquqrE/O9oJY7+oLzdCtkiWSXLpLjvl6uog==", - "dependencies": { - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0", - "bottleneck": "^2.15.3" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": ">=5" - } - }, - "node_modules/@octokit/plugin-retry/node_modules/@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" - }, - "node_modules/@octokit/plugin-retry/node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "dependencies": { - "@octokit/openapi-types": "^20.0.0" - } - }, - "node_modules/@octokit/request": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz", - "integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==", - "dependencies": { - "@octokit/endpoint": "^9.0.1", - "@octokit/request-error": "^5.1.0", - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/request-error": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.0.tgz", - "integrity": "sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==", - "dependencies": { - "@octokit/types": "^13.1.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/rest": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-20.1.0.tgz", - "integrity": "sha512-STVO3itHQLrp80lvcYB2UIKoeil5Ctsgd2s1AM+du3HqZIR35ZH7WE9HLwUOLXH0myA0y3AGNPo8gZtcgIbw0g==", - "dependencies": { - "@octokit/core": "^5.0.2", - "@octokit/plugin-paginate-rest": "^9.1.5", - "@octokit/plugin-request-log": "^4.0.0", - "@octokit/plugin-rest-endpoint-methods": "^10.2.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/types": { - "version": "13.5.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz", - "integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==", - "dependencies": { - "@octokit/openapi-types": "^22.2.0" - } - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", - "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", - "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^2.0.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", - "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", - "dev": true - }, - "node_modules/@types/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", - "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", - "dev": true - }, - "node_modules/@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.14.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.5.tgz", - "integrity": "sha512-aoRR+fJkZT2l0aGOJhuA8frnCSoNX6W7U2mpNq63+BxBIj5BQFt8rHy627kijCmm63ijdSdwvGgpUsU6MBsZZA==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", - "dev": true - }, - "node_modules/@types/sinon": { - "version": "10.0.17", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz", - "integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==", - "dev": true, - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinon-chai": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", - "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", - "dev": true, - "dependencies": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.3.tgz", - "integrity": "sha512-4g+2YyWe0Ve+LBh+WUm1697PD0Kdi6coG1eU0YjQbwx61AZ8XbEpL1zIT6WjuUKrCMCROpEaYQPDjBnDouBVAQ==", - "dev": true - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@vercel/ncc": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz", - "integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==", - "bin": { - "ncc": "dist/ncc/cli.js" - } - }, - "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/azure-devops-node-api": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-13.0.0.tgz", - "integrity": "sha512-T/i3pt2Dxb2//1+TJT05Ff5heUmQEWKwa8sdguIhdRYT3Zge9FYw98zpfFvCD7CZsz6AN74SKGgqF3ISVN2TGg==", - "dependencies": { - "tunnel": "0.0.6", - "typed-rest-client": "^1.8.4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/bottleneck": { - "version": "2.19.5", - "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", - "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/call-bind": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz", - "integrity": "sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", - "set-function-length": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.0.8" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/define-data-property": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz", - "integrity": "sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.2", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", - "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.50.0", - "@humanwhocodes/config-array": "^0.11.11", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", - "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", - "dev": true, - "dependencies": { - "flatted": "^3.2.7", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.22.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", - "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", - "dependencies": { - "get-intrinsic": "^1.2.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", - "dev": true, - "bin": { - "husky": "lib/bin.js" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/just-extend": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", - "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", - "dev": true - }, - "node_modules/keyv": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", - "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.0" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", - "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, - "node_modules/nise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-6.0.0.tgz", - "integrity": "sha512-K8ePqo9BFvN31HXwEtTNGzgrPpmvgciDsFz8aztFjt4LqKO/JeFD8tBOeuDiCMXrIl/m1YvfH8auSpxfaD09wg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^11.2.2", - "@sinonjs/text-encoding": "^0.7.2", - "just-extend": "^6.2.0", - "path-to-regexp": "^6.2.1" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-to-regexp": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", - "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", - "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", - "dependencies": { - "define-data-property": "^1.1.2", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", - "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/sinon": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.0.tgz", - "integrity": "sha512-+dXDXzD1sBO6HlmZDd7mXZCR/y5ECiEiGCBSGuFD/kZ0bDTofPYc6JaeGmPSF+1j1MejGUWkORbYOLDyvqCWpA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^11.2.2", - "@sinonjs/samsam": "^8.0.0", - "diff": "^5.2.0", - "nise": "^6.0.0", - "supports-color": "^7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/sinon-chai": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", - "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", - "dev": true, - "peerDependencies": { - "chai": "^4.0.0", - "sinon": ">=4.0.0" - } - }, - "node_modules/sinon/node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-rest-client": { - "version": "1.8.11", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", - "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", - "dependencies": { - "qs": "^6.9.1", - "tunnel": "0.0.6", - "underscore": "^1.12.1" - } - }, - "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" - }, - "node_modules/undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, - "node_modules/universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index dbe80e51..00000000 --- a/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "cydig-compliance-action", - "description": "Action for cydig compliance controls", - "version": "1.0.0", - "author": "", - "keywords": [], - "exports": { - ".": "./dist/index.js" - }, - "engines": { - "node": ">=16" - }, - "main": "dist/index.js", - "scripts": { - "build": "ncc build src/index.ts", - "test": "tsc && mocha dist/tests/", - "testScript": "tsc && mocha dist/tests/ --reporter xunit --reporter-option output=ResultsFile.xml", - "prepare": "husky install", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --fix --ext .ts", - "format:write": "npx prettier -w .", - "format:check": "npx prettier -c ." - }, - "license": "MIT", - "dependencies": { - "@actions/core": "^1.10.0", - "@actions/github": "^6.0.0", - "@octokit/plugin-retry": "^6.0.1", - "@octokit/rest": "^20.1.0", - "@vercel/ncc": "^0.36.1", - "azure-devops-node-api": "^13.0.0" - }, - "devDependencies": { - "@octokit/types": "^13.5.0", - "@types/chai": "^4.3.6", - "@types/mocha": "^10.0.6", - "@types/node": "^20.14.5", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.12", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", - "chai": "^4.4.1", - "eslint": "^8.49.0", - "husky": "^8.0.3", - "mocha": "^10.3.0", - "prettier": "^2.8.8", - "sinon": "^18.0.0", - "sinon-chai": "^3.7.0", - "typescript": "^5.4.5" - } -} diff --git a/src/AccessToCode/AccessToCodeService.ts b/src/AccessToCode/AccessToCodeService.ts deleted file mode 100644 index fd4c3ff5..00000000 --- a/src/AccessToCode/AccessToCodeService.ts +++ /dev/null @@ -1,62 +0,0 @@ -import * as core from '@actions/core'; -import { Octokit } from '@octokit/rest'; -import { GetResponseDataTypeFromEndpointMethod, OctokitResponse } from '@octokit/types'; - -export class AccessToCodeService { - public static async setAccessToCodeFindings(octokit: Octokit, owner: string, repo: string): Promise { - try { - console.log('--- Access To CodeService Control ---'); - - type listCollaboratorsForRepoResponseDataType = GetResponseDataTypeFromEndpointMethod< - typeof octokit.repos.listCollaborators - >; - - // https://www.npmjs.com/package/octokit#pagination - const iterator: AsyncIterableIterator> = - octokit.paginate.iterator(octokit.repos.listCollaborators, { - owner: owner, - repo: repo, - per_page: 100, - affiliation: 'all', - }); - - let numberOfAdmins: number = 0; - let numberOfWriters: number = 0; - let numberOfReaders: number = 0; - - for await (const { data: page } of iterator) { - for (const user of page) { - if (user.permissions!.admin) { - numberOfAdmins++; - } else if (user.permissions!.maintain!) { - numberOfWriters++; - } else if (user.permissions!.push!) { - numberOfWriters++; - } else if (user.permissions!.triage!) { - numberOfReaders++; - } else if (user.permissions!.pull!) { - numberOfReaders++; - } - } - } - console.log('numberOfAdmins: ' + numberOfAdmins); - console.log('numberOfWriters: ' + numberOfWriters); - console.log('numberOfReaders: ' + numberOfReaders); - core.exportVariable('numberOfCodeAdmins', numberOfAdmins); - core.exportVariable('numberOfCodeWriters', numberOfWriters); - core.exportVariable('numberOfCodeReaders', numberOfReaders); - } catch (error) { - core.info('Failed to fetch access to code for repo'); - if (error.status === 401 || error.status === 403) { - // Removes link to REST API endpoint - const errorMessage: string = error.message.split('-')[0].trim(); - core.warning(errorMessage, { - title: 'Failed to fetch acces to code for repo', - }); - } else { - core.info(error.message); - } - } - console.log(); - } -} diff --git a/src/azuredevopsboard/AzureDevOpsBoardService.ts b/src/azuredevopsboard/AzureDevOpsBoardService.ts deleted file mode 100644 index 569e5b0c..00000000 --- a/src/azuredevopsboard/AzureDevOpsBoardService.ts +++ /dev/null @@ -1,54 +0,0 @@ -import * as core from '@actions/core'; -import { AzureDevOpsConnection } from '../helpfunctions/AzureDevOpsConnection'; -import { CyDigConfig } from '../types/CyDigConfig'; -import { DevOpsBoard } from '../types/DevOpsBoard'; -import { PentestTickets } from './PentestTickets'; -import { ThreatModelingTickets } from './ThreatModelingTickets'; - -export class AzureDevOpsBoardService { - public static async getStateOfAzureDevOpsBoards(cydigConfig: CyDigConfig): Promise { - if (cydigConfig.azureDevOps.boards) { - try { - console.log('--- Azure DevOps Boards control ---'); - const azureDevOpsConnection: AzureDevOpsConnection = new AzureDevOpsConnection( - cydigConfig.azureDevOps.boards.organizationName, - core.getInput('accessTokenAzureDevOps') - ); - - const pentestTagInput: string | undefined = process.env.pentestTag; - const threatModelingTagInput: string | undefined = process.env.threatModelingTag; - - let pentestTag: string = cydigConfig.pentest.boardsTag; - if (pentestTagInput !== undefined && pentestTagInput !== '') { - pentestTag = pentestTagInput; - } - - let threatModelingTag: string = cydigConfig.threatModeling.boardsTag; - if (threatModelingTagInput !== undefined && threatModelingTagInput !== '') { - threatModelingTag = threatModelingTagInput; - } - - const board: DevOpsBoard = { - nameOfBoards: cydigConfig.azureDevOps.boards.nameOfBoard, - pentestTag: pentestTag, - threatModelingTag: threatModelingTag, - projectId: cydigConfig.azureDevOps.boards.projectName, - }; - - if (process.env.pentestDate && process.env.pentestDate != 'not specified') { - await PentestTickets.setPentestTickets(azureDevOpsConnection, board); - } - - if (process.env.threatModelingDate && process.env.threatModelingDate != 'not specified') { - await ThreatModelingTickets.setThreatModelingTickets(azureDevOpsConnection, board); - } - } catch (error) { - core.warning('Error getting tickets for Azure DevOps Board!'); - console.log( - 'There is probably somethine wrong with your token, check that it has not expired or been revoked. Please check that you have the correct permissions (Work items: Read)' - ); - } - console.log(); - } - } -} diff --git a/src/azuredevopsboard/PenetrationTestTicketService.ts b/src/azuredevopsboard/PenetrationTestTicketService.ts deleted file mode 100644 index 56cbb1de..00000000 --- a/src/azuredevopsboard/PenetrationTestTicketService.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { WebApi } from 'azure-devops-node-api'; -import { - WorkItem, - WorkItemQueryResult, - WorkItemReference, -} from 'azure-devops-node-api/interfaces/WorkItemTrackingInterfaces'; -import { IWorkItemTrackingApi } from 'azure-devops-node-api/WorkItemTrackingApi'; - -export class PenetrationTestTicketService { - private connection: WebApi; - private projectId: string; - private tag: string; - - constructor(azureDevOpsConnection: WebApi, projectId: string, tag: string) { - this.connection = azureDevOpsConnection; - this.projectId = projectId; - this.tag = this.setTag(tag); - } - - private setTag(tag: string): string { - if (!tag) { - return 'PT'; - } - return tag; - } - - public async getPenetrationTestTickets(nameOfBoards: string): Promise<{ - numberOfActiveTickets: number; - numberOfClosedTickets: number; - }> { - const areaPaths: string[] = await this.getAreaPaths(nameOfBoards); - const workItems: WorkItemReference[] = await this.getWorkItems(areaPaths); - const numberOfTickets: { - numberOfActiveTickets: number; - numberOfClosedTickets: number; - } = await this.getNumberOfActiveAndClosedTickets(workItems); - return numberOfTickets; - } - - private async getAreaPaths(nameOfBoards: string): Promise { - if (!nameOfBoards || nameOfBoards.toLocaleLowerCase() === null || nameOfBoards === 'not specified') { - console.log('No board specified, looking through all boards in project'); - return []; - } - - let nameOfBoardsArray: string[] = []; - if (nameOfBoards.length > 0) { - nameOfBoardsArray = nameOfBoards.split(', '); - console.log(`Boards: ${nameOfBoardsArray}`); - } - - const areaPaths: string[] = []; - for (const board of nameOfBoardsArray) { - const areaPath: string | undefined = ( - await ( - await this.connection.getWorkApi() - ).getTeamFieldValues({ - team: board, - project: this.projectId, - }) - ).defaultValue; - - if (areaPath) { - areaPaths.push(areaPath); - } - } - - if (areaPaths.length == 0) { - throw new Error('Found no board with the specified name'); - } - - return areaPaths; - } - - private async getWorkItems(areaPaths: string[]): Promise { - const witApi: IWorkItemTrackingApi = await this.connection.getWorkItemTrackingApi(); - let queryStringAreaPath: string = ''; - if (areaPaths.length > 0) { - queryStringAreaPath = this.getQueryStringAreaPath(areaPaths); - } - - const workItemsResponse: WorkItemQueryResult = await witApi.queryByWiql({ - query: `SELECT [System.Id] FROM WorkItems WHERE ${queryStringAreaPath} [System.TeamProject] = '${this.projectId}' AND [System.Tags] CONTAINS '${this.tag}'`, - }); - - const workItems: WorkItemReference[] | undefined = workItemsResponse.workItems; - - return workItems!; - } - - private getQueryStringAreaPath(areaPaths: string[]): string { - let queryStringAreaPath: string = '('; - areaPaths.forEach((areaPath: string) => { - if (areaPath === areaPaths[areaPaths.length - 1]) { - queryStringAreaPath = queryStringAreaPath.concat(`[System.AreaPath] = '${areaPath}') AND`); - } else { - queryStringAreaPath = queryStringAreaPath.concat(`[System.AreaPath] = '${areaPath}' OR `); - } - }); - return queryStringAreaPath; - } - - private async getNumberOfActiveAndClosedTickets(workItems: WorkItemReference[]): Promise<{ - numberOfActiveTickets: number; - numberOfClosedTickets: number; - }> { - const witApi: IWorkItemTrackingApi = await this.connection.getWorkItemTrackingApi(); - let numberOfClosedTickets: number = 0; - let numberOfActiveTickets: number = 0; - - for (const workItem of workItems) { - const workItemFetched: WorkItem = await witApi.getWorkItem(workItem.id!); - const state: string = await workItemFetched.fields!['System.State']; - if (state === 'Closed' || state === 'Done') { - numberOfClosedTickets++; - } else { - numberOfActiveTickets++; - } - } - return { - numberOfActiveTickets: numberOfActiveTickets, - numberOfClosedTickets: numberOfClosedTickets, - }; - } -} diff --git a/src/azuredevopsboard/PentestTickets.ts b/src/azuredevopsboard/PentestTickets.ts deleted file mode 100644 index e545cdea..00000000 --- a/src/azuredevopsboard/PentestTickets.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as core from '@actions/core'; -import { AzureDevOpsConnection } from '../helpfunctions/AzureDevOpsConnection'; -import { PenetrationTestTicketService } from './PenetrationTestTicketService'; -import { DevOpsBoard } from '../types/DevOpsBoard'; - -export class PentestTickets { - static async setPentestTickets(azureDevOpsConnection: AzureDevOpsConnection, board: DevOpsBoard): Promise { - console.log('Getting penetration test tickets'); - const penetrationTestTicketService: PenetrationTestTicketService = new PenetrationTestTicketService( - azureDevOpsConnection.getConnection(), - board.projectId, - board.pentestTag - ); - const numberOfTickets: { - numberOfActiveTickets: number; - numberOfClosedTickets: number; - } = await penetrationTestTicketService.getPenetrationTestTickets(board.nameOfBoards); - - console.log('Active penetration test tickets: ' + numberOfTickets.numberOfActiveTickets); - console.log('Closed penetration test tickets : ' + numberOfTickets.numberOfClosedTickets); - - core.exportVariable('ptNumberOfActiveTickets', numberOfTickets.numberOfActiveTickets.toString()); - core.exportVariable('ptNumberOfClosedTickets', numberOfTickets.numberOfClosedTickets.toString()); - return; - } -} diff --git a/src/azuredevopsboard/ThreatModelingTicketService.ts b/src/azuredevopsboard/ThreatModelingTicketService.ts deleted file mode 100644 index c234895e..00000000 --- a/src/azuredevopsboard/ThreatModelingTicketService.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { WebApi } from 'azure-devops-node-api'; -import { - WorkItem, - WorkItemQueryResult, - WorkItemReference, -} from 'azure-devops-node-api/interfaces/WorkItemTrackingInterfaces'; -import { IWorkItemTrackingApi } from 'azure-devops-node-api/WorkItemTrackingApi'; - -export class ThreatModelingTicketService { - private connection: WebApi; - private projectId: string; - private tag: string; - - constructor(azureDevOpsConnection: WebApi, projectId: string, tag: string) { - this.connection = azureDevOpsConnection; - this.projectId = projectId; - this.tag = this.setTag(tag); - } - - private setTag(tag: string): string { - if (!tag || tag === 'not specified') { - return 'TM'; - } - return tag; - } - - public async getThreatModelingTickets(nameOfBoards: string): Promise<{ - numberOfActiveTickets: number; - numberOfClosedTickets: number; - }> { - const areaPaths: string[] = await this.getAreaPaths(nameOfBoards); - const workItems: WorkItemReference[] = await this.getWorkItems(areaPaths); - const numberOfTickets: { - numberOfActiveTickets: number; - numberOfClosedTickets: number; - } = await this.getNumberOfActiveAndClosedTickets(workItems); - return numberOfTickets; - } - - private async getAreaPaths(nameOfBoards: string): Promise { - if (!nameOfBoards || nameOfBoards.toLocaleLowerCase() === null || nameOfBoards === 'not specified') { - console.log('No board specified, looking through all boards in project'); - return []; - } - - let nameOfBoardsArray: string[] = []; - if (nameOfBoards.length > 0) { - nameOfBoardsArray = nameOfBoards.split(', '); - console.log(`Boards: ${nameOfBoardsArray}`); - } - - const areaPaths: string[] = []; - for (const board of nameOfBoardsArray) { - const areaPath: string | undefined = ( - await ( - await this.connection.getWorkApi() - ).getTeamFieldValues({ - team: board, - project: this.projectId, - }) - ).defaultValue; - - if (areaPath) { - areaPaths.push(areaPath); - } - } - - if (areaPaths.length == 0) { - throw new Error('Found no board with the specified name'); - } - - return areaPaths; - } - - private async getWorkItems(areaPaths: string[]): Promise { - const witApi: IWorkItemTrackingApi = await this.connection.getWorkItemTrackingApi(); - let queryStringAreaPath: string = ''; - if (areaPaths.length > 0) { - queryStringAreaPath = this.getQueryStringAreaPath(areaPaths); - } - - const workItemsResponse: WorkItemQueryResult = await witApi.queryByWiql({ - query: `SELECT [System.Id] FROM WorkItems WHERE ${queryStringAreaPath} [System.TeamProject] = '${this.projectId}' AND [System.Tags] CONTAINS '${this.tag}'`, - }); - - const workItems: WorkItemReference[] | undefined = workItemsResponse.workItems; - - return workItems!; - } - - private getQueryStringAreaPath(areaPaths: string[]): string { - let queryStringAreaPath: string = '('; - areaPaths.forEach((areaPath: string) => { - if (areaPath === areaPaths[areaPaths.length - 1]) { - queryStringAreaPath = queryStringAreaPath.concat(`[System.AreaPath] = '${areaPath}') AND`); - } else { - queryStringAreaPath = queryStringAreaPath.concat(`[System.AreaPath] = '${areaPath}' OR `); - } - }); - return queryStringAreaPath; - } - - private async getNumberOfActiveAndClosedTickets(workItems: WorkItemReference[]): Promise<{ - numberOfActiveTickets: number; - numberOfClosedTickets: number; - }> { - const witApi: IWorkItemTrackingApi = await this.connection.getWorkItemTrackingApi(); - let numberOfClosedTickets: number = 0; - let numberOfActiveTickets: number = 0; - - for (const workItem of workItems) { - const workItemFetched: WorkItem = await witApi.getWorkItem(workItem.id!); - const state: string = await workItemFetched.fields!['System.State']; - if (state === 'Closed' || state === 'Done') { - numberOfClosedTickets++; - } else { - numberOfActiveTickets++; - } - } - return { - numberOfActiveTickets: numberOfActiveTickets, - numberOfClosedTickets: numberOfClosedTickets, - }; - } -} diff --git a/src/azuredevopsboard/ThreatModelingTickets.ts b/src/azuredevopsboard/ThreatModelingTickets.ts deleted file mode 100644 index e7d3bc87..00000000 --- a/src/azuredevopsboard/ThreatModelingTickets.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as core from '@actions/core'; -import { AzureDevOpsConnection } from '../helpfunctions/AzureDevOpsConnection'; -import { ThreatModelingTicketService } from './ThreatModelingTicketService'; -import { DevOpsBoard } from '../types/DevOpsBoard'; - -export class ThreatModelingTickets { - static async setThreatModelingTickets( - azureDevOpsConnection: AzureDevOpsConnection, - board: DevOpsBoard - ): Promise { - console.log('Getting threat modeling tickets'); - const threatModelingTicketService: ThreatModelingTicketService = new ThreatModelingTicketService( - azureDevOpsConnection.getConnection(), - board.projectId, - board.threatModelingTag - ); - const numberOfTickets: { - numberOfActiveTickets: number; - numberOfClosedTickets: number; - } = await threatModelingTicketService.getThreatModelingTickets(board.nameOfBoards); - - console.log('Active threat modeling tickets: ' + numberOfTickets.numberOfActiveTickets); - console.log('Closed threat modeling tickets : ' + numberOfTickets.numberOfClosedTickets); - - core.exportVariable('tmNumberOfActiveTickets', numberOfTickets.numberOfActiveTickets.toString()); - core.exportVariable('tmNumberOfClosedTickets', numberOfTickets.numberOfClosedTickets.toString()); - return; - } -} diff --git a/src/branchprotection/BranchProtectionService.ts b/src/branchprotection/BranchProtectionService.ts deleted file mode 100644 index 4d143855..00000000 --- a/src/branchprotection/BranchProtectionService.ts +++ /dev/null @@ -1,69 +0,0 @@ -import * as core from '@actions/core'; -import { Octokit } from '@octokit/rest'; -import { BranchProtectionForRepoResponseDataType } from '../types/OctokitResponses'; - -export class BranchProtectionService { - public static async getStateOfBranchProtection(octokit: Octokit, owner: string, repo: string): Promise { - try { - console.log('--- Branch protection control ---'); - - const response: BranchProtectionForRepoResponseDataType = await octokit.rest.repos.getBranchProtection({ - owner, - repo, - branch: 'main', - }); - - if (response.data.enforce_admins?.enabled === false) { - core.warning('Branch protection can be overridden by admins and is therefore counted as not enabled'); - } - let numberOfReviewers: number = 0; - if ( - response.data.enforce_admins?.enabled === true && - response.data.required_pull_request_reviews?.required_approving_review_count - ) { - numberOfReviewers = response.data.required_pull_request_reviews?.required_approving_review_count; - console.log('Branch protection is enabled, number of reviewers:', numberOfReviewers); - } else { - console.log('Branch protection is not enabled for repository:', repo); - } - - core.exportVariable('numberOfReviewers', numberOfReviewers); - } catch (error) { - const errorMessage: string = error.message.split('-')[0].trim(); - if (error.status === 401) { - core.info('Failed to get branch protection'); - // Removes link to REST API endpoint - core.warning(errorMessage, { - title: 'Branch protection control failed', - }); - } else if (error.status === 404) { - if (errorMessage === 'Branch not protected') { - core.notice(errorMessage, { - title: 'Branch protection control', - }); - core.exportVariable('numberOfReviewers', 0); - } else { - core.info('Failed to get branch protection'); - core.warning('Credentials probably lack necessary permissions', { - title: 'Branch protection control failed', - }); - } - } else { - switch (errorMessage) { - case 'Upgrade to GitHub Pro or make this repository public to enable this feature.': - console.log('Branch protection is not enabled for repository:', repo); - core.exportVariable('numberOfReviewers', 0); - break; - - default: - core.info('Failed to get branch protection'); - core.notice(errorMessage, { - title: 'Branch protection control failed', - }); - break; - } - } - } - console.log(); - } -} diff --git a/src/codequalitytools/CodeQualityService.ts b/src/codequalitytools/CodeQualityService.ts deleted file mode 100644 index b4f9f386..00000000 --- a/src/codequalitytools/CodeQualityService.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as core from '@actions/core'; - -export class CodeQualityService { - public static async getStateOfCodeQualityTool(codeQualityTool: { nameOfTool: string }): Promise { - console.log('--- Code Quality control ---'); - if (process.env.codeQualityTool) { - console.log(`Tool:`, `${process.env.codeQualityTool}`); - core.exportVariable('codeQualityTool', process.env.codeQualityTool); - } else { - if (!codeQualityTool.nameOfTool || codeQualityTool.nameOfTool === 'name-of-tool') { - core.warning('Code Quality Tool is not set!'); - return; - } - console.log(`Tool:`, `${codeQualityTool.nameOfTool}`); - core.exportVariable('codeQualityTool', codeQualityTool.nameOfTool); - } - console.log(); - } -} diff --git a/src/cydigConfig.json b/src/cydigConfig.json deleted file mode 100644 index ca48c823..00000000 --- a/src/cydigConfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "teamName": "CyDig", - "usingAzure": true, - "threatModeling": { - "date": "2024-01-01", - "boardsTag": "TM" - }, - "pentest": { - "date": "2023-01-01", - "boardsTag": "PT" - }, - "azureDevOps": { - "usingBoards": true, - "boards": { - "organizationName": "CyDig", - "projectName": "CyDig", - "nameOfBoard": "not specified" - } - }, - "scaTool": { - "nameOfTool": "dependabot" - }, - "sastTool": { - "nameOfTool": "SEMGREP" - }, - "codeQualityTool": { - "nameOfTool": "not specified" - } -} diff --git a/src/helpfunctions/AzureDevOpsConnection.ts b/src/helpfunctions/AzureDevOpsConnection.ts deleted file mode 100644 index 60f5fa67..00000000 --- a/src/helpfunctions/AzureDevOpsConnection.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as nodeApi from 'azure-devops-node-api'; -import { IRequestHandler } from 'azure-devops-node-api/interfaces/common/VsoBaseInterfaces'; - -export class AzureDevOpsConnection { - private accessToken: string; - private orgUrlDevOps: string; - private orgName: string; - - constructor(orgName: string, accessToken: string) { - this.accessToken = this.isNullOrUndefined(accessToken); - this.orgName = orgName; - this.orgUrlDevOps = `https://dev.azure.com/${orgName}/`; - } - - private isNullOrUndefined(value: string): string { - if (!value) { - throw new Error('Input values cannot be null or undefined'); - } - return value; - } - - public getConnection(): nodeApi.WebApi { - const authHandler: IRequestHandler = nodeApi.getPersonalAccessTokenHandler(this.accessToken); - const connection: nodeApi.WebApi = new nodeApi.WebApi(this.orgUrlDevOps, authHandler); - return connection; - } - - public getOrgName(): string { - return this.orgName; - } -} diff --git a/src/helpfunctions/JsonService.ts b/src/helpfunctions/JsonService.ts deleted file mode 100644 index da69c7f2..00000000 --- a/src/helpfunctions/JsonService.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { CyDigConfig } from '../types/CyDigConfig'; - -export function getContentOfFile(jsonPath: string): CyDigConfig { - const jsonFilePath: string = path.resolve( - __dirname, - path.relative(__dirname, path.normalize(jsonPath).replace(/^(\.\.(\/|\\|$))+/, '')) - ); - const fileContent: string = fs.readFileSync(jsonFilePath, { encoding: 'utf-8' }); - - const cydigConfig: CyDigConfig = JSON.parse(fileContent); - - return cydigConfig; -} diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index eeca892a..00000000 --- a/src/index.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { getInput, setFailed } from '@actions/core'; -import { context } from '@actions/github'; -import { retry } from '@octokit/plugin-retry'; -import { Octokit } from '@octokit/rest'; -import { AzureDevOpsBoardService } from './azuredevopsboard/AzureDevOpsBoardService'; -import { BranchProtectionService } from './branchprotection/BranchProtectionService'; -import { CodeQualityService } from './codequalitytools/CodeQualityService'; -import { getContentOfFile } from './helpfunctions/JsonService'; -import { PentestService } from './pentest/PentestService'; -import { SastService } from './sasttools/SastService'; -import { ScaService } from './scatools/ScaService'; -import { SecretScanningService } from './secretscanning/SecretScanningService'; -import { AccessToCodeService } from './AccessToCode/AccessToCodeService'; -import { ThreatModelingService } from './threatmodeling/ThreatModelingService'; -import { CyDigConfig } from './types/CyDigConfig'; - -/** - * The main function for the action. - * @returns {Promise} Resolves when the action is complete. - */ -export async function run(): Promise { - try { - console.log('Running compliance controls \n'); - const cydigConfig: CyDigConfig = getContentOfFile(getInput('cydigConfigPath')); - const { owner, repo }: { owner: string; repo: string } = context.repo; - const token: string = getInput('PAT-token'); - // eslint-disable-next-line - const OctokitRetry = Octokit.plugin(retry); - const octokit: Octokit = new OctokitRetry({ - auth: token, - }); - - await CodeQualityService.getStateOfCodeQualityTool(cydigConfig.codeQualityTool); - await SastService.getStateOfSastTool(cydigConfig.sastTool.nameOfTool, octokit, owner, repo); - await ScaService.getStateOfScaTool(cydigConfig.scaTool.nameOfTool, octokit, owner, repo); - await SecretScanningService.getStateOfExposedSecrets( - cydigConfig.secretScanningTool?.nameOfTool, - octokit, - owner, - repo - ); - await BranchProtectionService.getStateOfBranchProtection(octokit, owner, repo); - await AccessToCodeService.setAccessToCodeFindings(octokit, owner, repo); - await PentestService.getStateOfPentest(cydigConfig.pentest); - await ThreatModelingService.getStateOfThreatModeling(cydigConfig.threatModeling); - await AzureDevOpsBoardService.getStateOfAzureDevOpsBoards(cydigConfig); - } catch (error) { - // Fail the workflow run if an error occurs - if (error instanceof Error) setFailed(error.message); - } -} - -// eslint-disable-next-line @typescript-eslint/no-floating-promises -run(); diff --git a/src/pentest/PentestService.ts b/src/pentest/PentestService.ts deleted file mode 100644 index 64c2e7db..00000000 --- a/src/pentest/PentestService.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as core from '@actions/core'; - -export class PentestService { - public static async getStateOfPentest(pentest: { date: string; boardsTag?: string }): Promise { - console.log('--- Pentest control ---'); - if (process.env.pentestDate) { - console.log('Pentest date was found'); - core.exportVariable('pentestDate', process.env.pentestDate); - } else { - if (!pentest.date || pentest.date === 'date-of-pentest') { - core.warning('Pentest Date is not set!'); - return; - } - console.log('Pentest date was found'); - core.exportVariable('pentestDate', pentest.date); - } - console.log(); - } -} diff --git a/src/sasttools/CodeQLService.ts b/src/sasttools/CodeQLService.ts deleted file mode 100644 index ec11ba70..00000000 --- a/src/sasttools/CodeQLService.ts +++ /dev/null @@ -1,77 +0,0 @@ -import * as core from '@actions/core'; -import { Octokit } from '@octokit/rest'; -import GitHub_Tool_Severity_Level from '../types/GithubToolSeverityLevel'; -import { CodeScanningAlertsForRepoResponseDataType } from '../types/OctokitResponses'; - -export class CodeQLService { - public static async setCodeQLFindings( - nameOfTool: string, - octokit: Octokit, - owner: string, - repo: string - ): Promise { - try { - // https://www.npmjs.com/package/octokit#pagination - const iterator: AsyncIterableIterator = octokit.paginate.iterator( - octokit.codeScanning.listAlertsForRepo, - { - owner: owner, - repo: repo, - per_page: 100, - state: 'open', - tool_name: 'CodeQL', - } - ); - - let sastNumberOfSeverity1: number = 0; - let sastNumberOfSeverity2: number = 0; - let sastNumberOfSeverity3: number = 0; - let sastNumberOfSeverity4: number = 0; - - for await (const { data: alerts } of iterator) { - for (const alert of alerts) { - switch (alert.rule.security_severity_level) { - case GitHub_Tool_Severity_Level.LOW: - sastNumberOfSeverity1++; - break; - case GitHub_Tool_Severity_Level.MEDIUM: - sastNumberOfSeverity2++; - break; - case GitHub_Tool_Severity_Level.HIGH: - sastNumberOfSeverity3++; - break; - case GitHub_Tool_Severity_Level.CRITICAL: - sastNumberOfSeverity4++; - break; - default: - break; - } - } - } - - console.log('Low: ' + sastNumberOfSeverity1); - console.log('Medium: ' + sastNumberOfSeverity2); - console.log('High: ' + sastNumberOfSeverity3); - console.log('Critical: ' + sastNumberOfSeverity4); - - core.exportVariable('sastTool', nameOfTool); - core.exportVariable('SASTnumberOfSeverity1', sastNumberOfSeverity1); - core.exportVariable('SASTnumberOfSeverity2', sastNumberOfSeverity2); - core.exportVariable('SASTnumberOfSeverity3', sastNumberOfSeverity3); - core.exportVariable('SASTnumberOfSeverity4', sastNumberOfSeverity4); - } catch (error) { - core.info('Failed to get CodeQL severities'); - if (error.status === 401 || error.status === 403 || error.status === 404) { - // Removes link to REST API endpoint - const errorMessage: string = error.message.split('-')[0].trim(); - core.warning(errorMessage, { - title: 'SAST tool control failed', - }); - } else { - core.notice(error.message, { - title: 'SAST tool control failed', - }); - } - } - } -} diff --git a/src/sasttools/SastService.ts b/src/sasttools/SastService.ts deleted file mode 100644 index b92ac464..00000000 --- a/src/sasttools/SastService.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as core from '@actions/core'; -import { Octokit } from '@octokit/rest'; -import { CodeQLService } from './CodeQLService'; -import GitHub_Tools from '../types/GitHubTools'; - -export class SastService { - public static async getStateOfSastTool( - nameOfTool: string, - octokit: Octokit, - owner: string, - repo: string - ): Promise { - console.log('--- SAST control ---'); - let sast: string = nameOfTool; - if (process.env.sastTool) { - sast = process.env.sastTool; - } - if (!sast || sast === '' || sast === 'name-of-tool') { - core.warning('SAST Tool is not set!'); - return; - } - console.log(`Tool:`, `${sast}`); - switch (sast.toLowerCase()) { - case GitHub_Tools.CODEQL.toLowerCase(): - await CodeQLService.setCodeQLFindings(sast, octokit, owner, repo); - break; - default: - core.exportVariable('sastTool', sast); - break; - } - console.log(); - } -} diff --git a/src/scatools/DependabotService.ts b/src/scatools/DependabotService.ts deleted file mode 100644 index 80a4f6b4..00000000 --- a/src/scatools/DependabotService.ts +++ /dev/null @@ -1,74 +0,0 @@ -import * as core from '@actions/core'; -import { Octokit } from '@octokit/rest'; -import GitHub_Tool_Severity_Level from '../types/GithubToolSeverityLevel'; -import { DependabotAlertsForRepoResponseDataType } from '../types/OctokitResponses'; - -export class DependabotService { - public static async setDependabotFindings( - nameOfTool: string, - octokit: Octokit, - owner: string, - repo: string - ): Promise { - try { - // https://www.npmjs.com/package/octokit#pagination - const iterator: AsyncIterableIterator = octokit.paginate.iterator( - octokit.dependabot.listAlertsForRepo, - { - owner: owner, - repo: repo, - per_page: 100, - state: 'open', - } - ); - - let scaNumberOfSeverity1: number = 0; - let scaNumberOfSeverity2: number = 0; - let scaNumberOfSeverity3: number = 0; - let scaNumberOfSeverity4: number = 0; - - for await (const { data: alerts } of iterator) { - for (const alert of alerts) { - switch (alert.security_vulnerability.severity) { - case GitHub_Tool_Severity_Level.LOW: - scaNumberOfSeverity1++; - break; - case GitHub_Tool_Severity_Level.MEDIUM: - scaNumberOfSeverity2++; - break; - case GitHub_Tool_Severity_Level.HIGH: - scaNumberOfSeverity3++; - break; - case GitHub_Tool_Severity_Level.CRITICAL: - scaNumberOfSeverity4++; - break; - } - } - } - - console.log('Low: ' + scaNumberOfSeverity1); - console.log('Medium: ' + scaNumberOfSeverity2); - console.log('High: ' + scaNumberOfSeverity3); - console.log('Critical: ' + scaNumberOfSeverity4); - - core.exportVariable('scaTool', nameOfTool); - core.exportVariable('SCAnumberOfSeverity1', scaNumberOfSeverity1); - core.exportVariable('SCAnumberOfSeverity2', scaNumberOfSeverity2); - core.exportVariable('SCAnumberOfSeverity3', scaNumberOfSeverity3); - core.exportVariable('SCAnumberOfSeverity4', scaNumberOfSeverity4); - } catch (error) { - core.info('Failed to get Dependabot severities'); - if (error.status === 401 || error.status === 403 || error.status === 404) { - // Removes link to REST API endpoint - const errorMessage: string = error.message.split('-')[0].trim(); - core.warning(errorMessage, { - title: 'SCA tool control failed', - }); - } else { - core.notice(error.message, { - title: 'SCA tool control failed', - }); - } - } - } -} diff --git a/src/scatools/ScaService.ts b/src/scatools/ScaService.ts deleted file mode 100644 index f83a58b5..00000000 --- a/src/scatools/ScaService.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as core from '@actions/core'; -import { Octokit } from '@octokit/rest'; -import { DependabotService } from './DependabotService'; -import GitHub_Tools from '../types/GitHubTools'; - -export class ScaService { - public static async getStateOfScaTool( - nameOfTool: string, - octokit: Octokit, - owner: string, - repo: string - ): Promise { - console.log('--- SCA control ---'); - let sca: string = nameOfTool; - if (process.env.scaTool) { - sca = process.env.scaTool; - } - if (!sca || sca === '' || sca === 'name-of-tool') { - core.warning('SCA Tool is not set!'); - return; - } - console.log(`Tool:`, `${sca}`); - switch (sca.toLowerCase()) { - case GitHub_Tools.DEPENDABOT.toLowerCase(): - await DependabotService.setDependabotFindings(sca, octokit, owner, repo); - break; - default: - core.exportVariable('scaTool', sca); - break; - } - console.log(); - } -} diff --git a/src/secretscanning/GithubSecretScanningService.ts b/src/secretscanning/GithubSecretScanningService.ts deleted file mode 100644 index cb75be84..00000000 --- a/src/secretscanning/GithubSecretScanningService.ts +++ /dev/null @@ -1,62 +0,0 @@ -import * as core from '@actions/core'; -import { Octokit } from '@octokit/rest'; -import { SecretAlertsForRepoResponseDataType } from '../types/OctokitResponses'; -import GitHub_Tools from '../types/GitHubTools'; - -export class GithubSecretScanningService { - public static async getStateOfExposedSecrets(octokit: Octokit, owner: string, repo: string): Promise { - try { - console.log('Tool: Github Secret Scanning'); - - // https://www.npmjs.com/package/octokit#pagination - const iterator: AsyncIterableIterator = octokit.paginate.iterator( - octokit.secretScanning.listAlertsForRepo, - { - owner: owner, - repo: repo, - per_page: 100, - state: 'open', - } - ); - - let numberOfExposedSecrets: number = 0; - - for await (const { data: alerts } of iterator) { - numberOfExposedSecrets += alerts.length; - } - - console.log('Exposed secrets:', numberOfExposedSecrets); - core.exportVariable('secretScanningTool', GitHub_Tools.GitHub_SECRET_SCANNING); - core.exportVariable('numberOfExposedSecrets', numberOfExposedSecrets); - } catch (error) { - core.info('Failed to get number of exposed secrets'); - // Removes link to REST API endpoint - const errorMessage: string = error.message.split('-')[0].trim(); - if (error.status === 401) { - core.warning(errorMessage, { - title: 'Number of exposed secrets control failed', - }); - } else if (error.status === 404) { - switch (errorMessage) { - case 'Secret scanning is disabled on this repository.': - core.warning(errorMessage, { - title: 'Number of exposed secrets control failed', - }); - break; - - default: - console.log(error); - core.warning('Credentials probably lack necessary permissions', { - title: 'Number of exposed secrets control failed', - }); - break; - } - } else { - core.notice(error.message, { - title: 'Number of exposed secrets control failed', - }); - } - } - console.log(); - } -} diff --git a/src/secretscanning/SecretScanningService.ts b/src/secretscanning/SecretScanningService.ts deleted file mode 100644 index 415025f9..00000000 --- a/src/secretscanning/SecretScanningService.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as core from '@actions/core'; -import { Octokit } from '@octokit/rest'; -import GitHub_Tools from '../types/GitHubTools'; -import { GithubSecretScanningService } from './GithubSecretScanningService'; - -export class SecretScanningService { - public static async getStateOfExposedSecrets( - nameOfTool: string, - octokit: Octokit, - owner: string, - repo: string - ): Promise { - console.log('--- Secret Scanning control ---'); - - if (nameOfTool === null || nameOfTool === undefined || nameOfTool === 'name-of-tool') { - core.warning('Secret Scanning Tool is not set! Will continue with GitHub Secret Scanning tool:'); - await GithubSecretScanningService.getStateOfExposedSecrets(octokit, owner, repo); - return; - } - - switch (nameOfTool.toLowerCase()) { - case GitHub_Tools.GitHub_SECRET_SCANNING.toLowerCase(): - await GithubSecretScanningService.getStateOfExposedSecrets(octokit, owner, repo); - break; - default: - core.notice('Given secret scanning tool is not implemented: ' + nameOfTool, { - title: 'Number of exposed secrets control failed', - }); - core.exportVariable('secretScanningTool', nameOfTool); - break; - } - - console.log(); - } -} diff --git a/src/threatmodeling/ThreatModelingService.ts b/src/threatmodeling/ThreatModelingService.ts deleted file mode 100644 index 9f0308f2..00000000 --- a/src/threatmodeling/ThreatModelingService.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as core from '@actions/core'; -export class ThreatModelingService { - public static async getStateOfThreatModeling(threatModeling: { date: string; boardsTag?: string }): Promise { - console.log('--- Threat Modeling control ---'); - if (process.env.threatModelingDate) { - console.log('Threat Modeling date was found'); - core.exportVariable('threatModelingDate', process.env.threatModelingDate); - } else { - if (!threatModeling.date || threatModeling.date === 'date-of-threat-modeling') { - core.warning('Threat Modeling Date is not set!'); - return; - } - console.log('Threat Modeling date was found'); - core.exportVariable('threatModelingDate', threatModeling.date); - } - console.log(); - } -} diff --git a/src/types/CyDigConfig.ts b/src/types/CyDigConfig.ts deleted file mode 100644 index 4c41d8ac..00000000 --- a/src/types/CyDigConfig.ts +++ /dev/null @@ -1,32 +0,0 @@ -export type CyDigConfig = { - teamName: string; - usingAzure: boolean; - threatModeling: { - date: string; - boardsTag: string; - }; - secretScanningTool: { - nameOfTool: string; - }; - pentest: { - date: string; - boardsTag: string; - }; - azureDevOps: { - usingBoards: boolean; - boards: { - organizationName: string; - projectName: string; - nameOfBoard: string; - }; - }; - scaTool: { - nameOfTool: string; - }; - sastTool: { - nameOfTool: string; - }; - codeQualityTool: { - nameOfTool: string; - }; -}; diff --git a/src/types/DevOpsBoard.ts b/src/types/DevOpsBoard.ts deleted file mode 100644 index 87d7b000..00000000 --- a/src/types/DevOpsBoard.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type DevOpsBoard = { - nameOfBoards: string; - pentestTag: string; - threatModelingTag: string; - projectId: string; -}; diff --git a/src/types/GitHubTools.ts b/src/types/GitHubTools.ts deleted file mode 100644 index 2d745a98..00000000 --- a/src/types/GitHubTools.ts +++ /dev/null @@ -1,7 +0,0 @@ -enum GitHub_Tools { - DEPENDABOT = 'Dependabot', - CODEQL = 'CodeQL', - GitHub_SECRET_SCANNING = 'GitHub', -} - -export default GitHub_Tools; diff --git a/src/types/GithubToolSeverityLevel.ts b/src/types/GithubToolSeverityLevel.ts deleted file mode 100644 index dc0202e7..00000000 --- a/src/types/GithubToolSeverityLevel.ts +++ /dev/null @@ -1,8 +0,0 @@ -enum GitHub_Tool_Severity_Level { - LOW = 'low', - MEDIUM = 'medium', - HIGH = 'high', - CRITICAL = 'critical', -} - -export default GitHub_Tool_Severity_Level; diff --git a/src/types/OctokitResponses.ts b/src/types/OctokitResponses.ts deleted file mode 100644 index e3a66377..00000000 --- a/src/types/OctokitResponses.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Endpoints } from '@octokit/types'; - -export type DependabotAlertsForRepoResponseDataType = - Endpoints['GET /repos/{owner}/{repo}/dependabot/alerts']['response']; - -export type CodeScanningAlertsForRepoResponseDataType = - Endpoints['GET /repos/{owner}/{repo}/code-scanning/alerts']['response']; - -export type SecretAlertsForRepoResponseDataType = - Endpoints['GET /repos/{owner}/{repo}/secret-scanning/alerts']['response']; - -export type BranchProtectionForRepoResponseDataType = - Endpoints['GET /repos/{owner}/{repo}/branches/{branch}/protection']['response']; diff --git a/tests/BranchProtectionService.test.ts b/tests/BranchProtectionService.test.ts deleted file mode 100644 index 7cafb8ab..00000000 --- a/tests/BranchProtectionService.test.ts +++ /dev/null @@ -1,104 +0,0 @@ -import * as core from '@actions/core'; -import sinon, { SinonStub } from 'sinon'; -import { BranchProtectionService } from '../src/branchprotection/BranchProtectionService'; - -describe('BranchProtectionService', function () { - let warningStub: SinonStub; - let noticeStub: SinonStub; - let infoStub: SinonStub; - let exportVariableStub: SinonStub; - let logStub: SinonStub; - let getBranchProtectionStub: SinonStub; - const octokitMock: any = { - rest: { - repos: { - getBranchProtection() { - return; - }, - }, - }, - }; - - beforeEach(function () { - warningStub = sinon.stub(core, 'warning'); - noticeStub = sinon.stub(core, 'notice'); - infoStub = sinon.stub(core, 'info'); - exportVariableStub = sinon.stub(core, 'exportVariable'); - logStub = sinon.stub(console, 'log'); - getBranchProtectionStub = sinon.stub(octokitMock.rest.repos, 'getBranchProtection'); - }); - - afterEach(function () { - sinon.restore(); - }); - - it('should handle successful branch protection retrieval', async function () { - getBranchProtectionStub.returns({ - data: { - enforce_admins: { enabled: true }, - required_pull_request_reviews: { required_approving_review_count: 1 }, - }, - }); - - await BranchProtectionService.getStateOfBranchProtection(octokitMock, 'owner', 'repo'); - sinon.assert.calledOnceWithExactly(exportVariableStub, 'numberOfReviewers', 1); - sinon.assert.notCalled(warningStub); - }); - - it('should warn when admins can bypass branch protection rules', async function () { - getBranchProtectionStub.returns({ - data: { - enforce_admins: { enabled: false }, - required_pull_request_reviews: { required_approving_review_count: 1 }, - }, - }); - - await BranchProtectionService.getStateOfBranchProtection(octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - sinon.assert.calledOnceWithExactly(exportVariableStub, 'numberOfReviewers', 0); - }); - - it('should handle a 401 error', async function () { - getBranchProtectionStub.rejects({ - status: 401, - message: '401 error message', - }); - - await BranchProtectionService.getStateOfBranchProtection(octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - sinon.assert.notCalled(exportVariableStub); - }); - - it('should handle a 404 error (caused by branch protection not enabled)', async function () { - getBranchProtectionStub.rejects({ - status: 404, - message: 'Branch not protected', - }); - - await BranchProtectionService.getStateOfBranchProtection(octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(noticeStub); - sinon.assert.calledOnceWithExactly(exportVariableStub, 'numberOfReviewers', 0); - }); - - it('should handle a normal 404 error', async function () { - getBranchProtectionStub.rejects({ - status: 404, - message: 'Regular 404 error message', - }); - - await BranchProtectionService.getStateOfBranchProtection(octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - sinon.assert.notCalled(exportVariableStub); - }); - - it('should call warning when branch protection is enabled but receives 404 (status = 404)', async function () { - getBranchProtectionStub.rejects({ - status: 500, - message: 'Default error case', - }); - - await BranchProtectionService.getStateOfBranchProtection(octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(noticeStub); - sinon.assert.notCalled(exportVariableStub); - }); -}); diff --git a/tests/CodeQLService.test.ts b/tests/CodeQLService.test.ts deleted file mode 100644 index 318dda3b..00000000 --- a/tests/CodeQLService.test.ts +++ /dev/null @@ -1,115 +0,0 @@ -import * as core from '@actions/core'; -import sinon, { SinonStub } from 'sinon'; -import { CodeQLService } from '../src/sasttools/CodeQLService'; -import GitHub_Tools from '../src/types/GitHubTools'; - -describe('CodeQLService', function () { - let warningStub: SinonStub; - let noticeStub: SinonStub; - let infoStub: SinonStub; - let exportVariableStub: SinonStub; - let logStub: SinonStub; - let iteratorStub: SinonStub; - const octokitMock: any = { - paginate: { - iterator() { - return; - }, - }, - codeScanning: { - listAlertsForRepo: '', - }, - }; - - beforeEach(() => { - warningStub = sinon.stub(core, 'warning'); - noticeStub = sinon.stub(core, 'notice'); - infoStub = sinon.stub(core, 'info'); - exportVariableStub = sinon.stub(core, 'exportVariable'); - logStub = sinon.stub(console, 'log'); - iteratorStub = sinon.stub(octokitMock.paginate, 'iterator'); - }); - - afterEach(() => { - sinon.restore(); - }); - - it('should handle successful code scanning retrieval', async function () { - iteratorStub.returns([ - { - data: [ - { - rule: { - security_severity_level: 'low', - }, - }, - { - rule: { - security_severity_level: 'medium', - }, - }, - { - rule: { - security_severity_level: 'high', - }, - }, - { - rule: { - security_severity_level: 'critical', - }, - }, - ], - }, - ]); - - await CodeQLService.setCodeQLFindings(GitHub_Tools.CODEQL, octokitMock, 'owner', 'repo'); - sinon.assert.callCount(exportVariableStub, 5); - sinon.assert.calledWithExactly(exportVariableStub, 'sastTool', GitHub_Tools.CODEQL); - sinon.assert.calledWithExactly(exportVariableStub, 'SASTnumberOfSeverity1', 1); - sinon.assert.calledWithExactly(exportVariableStub, 'SASTnumberOfSeverity2', 1); - sinon.assert.calledWithExactly(exportVariableStub, 'SASTnumberOfSeverity3', 1); - sinon.assert.calledWithExactly(exportVariableStub, 'SASTnumberOfSeverity4', 1); - sinon.assert.notCalled(warningStub); - }); - - it('should handle a 401 error', async function () { - iteratorStub.throws({ - status: 401, - message: '401 error message', - }); - - await CodeQLService.setCodeQLFindings(GitHub_Tools.CODEQL, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - }); - - it('should handle a 403 error', async function () { - iteratorStub.throws({ - status: 403, - message: '403 error message', - }); - - await CodeQLService.setCodeQLFindings(GitHub_Tools.CODEQL, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - }); - - it('should handle a 404 error', async function () { - iteratorStub.throws({ - status: 404, - message: '404 error message', - }); - - await CodeQLService.setCodeQLFindings(GitHub_Tools.CODEQL, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - }); - - it('should handle error other than 401, 403, 404', async function () { - iteratorStub.throws({ - status: 500, - message: 'Default error case', - }); - - await CodeQLService.setCodeQLFindings(GitHub_Tools.CODEQL, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(noticeStub); - sinon.assert.notCalled(warningStub); - }); -}); diff --git a/tests/DependabotService.test.ts b/tests/DependabotService.test.ts deleted file mode 100644 index af9ab84a..00000000 --- a/tests/DependabotService.test.ts +++ /dev/null @@ -1,115 +0,0 @@ -import * as core from '@actions/core'; -import sinon, { SinonStub } from 'sinon'; -import { DependabotService } from '../src/scatools/DependabotService'; -import GitHub_Tools from '../src/types/GitHubTools'; - -describe('CodeQLService', function () { - let warningStub: SinonStub; - let noticeStub: SinonStub; - let infoStub: SinonStub; - let exportVariableStub: SinonStub; - let logStub: SinonStub; - let iteratorStub: SinonStub; - const octokitMock: any = { - paginate: { - iterator() { - return; - }, - }, - dependabot: { - listAlertsForRepo: '', - }, - }; - - beforeEach(function () { - warningStub = sinon.stub(core, 'warning'); - noticeStub = sinon.stub(core, 'notice'); - infoStub = sinon.stub(core, 'info'); - exportVariableStub = sinon.stub(core, 'exportVariable'); - logStub = sinon.stub(console, 'log'); - iteratorStub = sinon.stub(octokitMock.paginate, 'iterator'); - }); - - afterEach(function () { - sinon.restore(); - }); - - it('should handle successful Dependabot alerts retrieval', async function () { - iteratorStub.returns([ - { - data: [ - { - security_vulnerability: { - severity: 'low', - }, - }, - { - security_vulnerability: { - severity: 'medium', - }, - }, - { - security_vulnerability: { - severity: 'high', - }, - }, - { - security_vulnerability: { - severity: 'critical', - }, - }, - ], - }, - ]); - - await DependabotService.setDependabotFindings(GitHub_Tools.DEPENDABOT, octokitMock, 'owner', 'repo'); - sinon.assert.callCount(exportVariableStub, 5); - sinon.assert.calledWithExactly(exportVariableStub, 'scaTool', GitHub_Tools.DEPENDABOT); - sinon.assert.calledWithExactly(exportVariableStub, 'SCAnumberOfSeverity1', 1); - sinon.assert.calledWithExactly(exportVariableStub, 'SCAnumberOfSeverity1', 1); - sinon.assert.calledWithExactly(exportVariableStub, 'SCAnumberOfSeverity1', 1); - sinon.assert.calledWithExactly(exportVariableStub, 'SCAnumberOfSeverity1', 1); - sinon.assert.notCalled(warningStub); - }); - - it('should handle a 401 error', async function () { - iteratorStub.throws({ - status: 401, - message: '401 error message', - }); - - await DependabotService.setDependabotFindings(GitHub_Tools.DEPENDABOT, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - }); - - it('should handle a 403 error', async function () { - iteratorStub.throws({ - status: 403, - message: '403 error message', - }); - - await DependabotService.setDependabotFindings(GitHub_Tools.DEPENDABOT, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - }); - - it('should handle a 404 error', async function () { - iteratorStub.throws({ - status: 404, - message: '404 error message', - }); - - await DependabotService.setDependabotFindings(GitHub_Tools.DEPENDABOT, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(warningStub); - }); - - it('should handle error other than 401, 403, 404', async function () { - iteratorStub.throws({ - status: 500, - message: 'Default error case', - }); - - await DependabotService.setDependabotFindings(GitHub_Tools.DEPENDABOT, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(noticeStub); - sinon.assert.notCalled(warningStub); - }); -}); diff --git a/tests/SastService.test.ts b/tests/SastService.test.ts deleted file mode 100644 index caa25d74..00000000 --- a/tests/SastService.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import * as core from '@actions/core'; -import sinon, { SinonStub } from 'sinon'; -import { CodeQLService } from '../src/sasttools/CodeQLService'; -import { SastService } from '../src/sasttools/SastService'; -import GitHub_Tools from '../src/types/GitHubTools'; - -describe('SastService', function () { - let warningStub: SinonStub; - let noticeStub: SinonStub; - let infoStub: SinonStub; - let exportVariableStub: SinonStub; - let logStub: SinonStub; - let setCodeQLFindingsStub: SinonStub; - const octokitMock: any = {}; - - beforeEach(function () { - warningStub = sinon.stub(core, 'warning'); - noticeStub = sinon.stub(core, 'notice'); - infoStub = sinon.stub(core, 'info'); - exportVariableStub = sinon.stub(core, 'exportVariable'); - logStub = sinon.stub(console, 'log'); - setCodeQLFindingsStub = sinon.stub(CodeQLService, 'setCodeQLFindings'); - }); - - afterEach(function () { - sinon.restore(); - }); - - it('should run CodeQL suite if toolName is "CodeQl"', async function () { - await SastService.getStateOfSastTool(GitHub_Tools.CODEQL, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(setCodeQLFindingsStub); - }); - - it('should only export variable "sastTool" if tool is not supported', async function () { - await SastService.getStateOfSastTool('unsupported tool', octokitMock, 'owner', 'repo'); - sinon.assert.calledOnceWithExactly(exportVariableStub, 'sastTool', 'unsupported tool'); - }); -}); diff --git a/tests/ScaService.test.ts b/tests/ScaService.test.ts deleted file mode 100644 index 41c4731c..00000000 --- a/tests/ScaService.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import * as core from '@actions/core'; -import sinon, { SinonStub } from 'sinon'; -import { DependabotService } from '../src/scatools/DependabotService'; -import { ScaService } from '../src/scatools/ScaService'; -import GitHub_Tools from '../src/types/GitHubTools'; - -describe('DependabotService', function () { - let warningStub: SinonStub; - let noticeStub: SinonStub; - let infoStub: SinonStub; - let exportVariableStub: SinonStub; - let logStub: SinonStub; - let setDependabotFindingsStub: SinonStub; - const octokitMock: any = {}; - - beforeEach(function () { - warningStub = sinon.stub(core, 'warning'); - noticeStub = sinon.stub(core, 'notice'); - infoStub = sinon.stub(core, 'info'); - exportVariableStub = sinon.stub(core, 'exportVariable'); - logStub = sinon.stub(console, 'log'); - setDependabotFindingsStub = sinon.stub(DependabotService, 'setDependabotFindings'); - }); - - afterEach(function () { - sinon.restore(); - }); - - it('should run Dependabot suite if toolName is "Dependabot"', async function () { - await ScaService.getStateOfScaTool(GitHub_Tools.DEPENDABOT, octokitMock, 'owner', 'repo'); - sinon.assert.calledOnce(setDependabotFindingsStub); - }); - - it('should only export variable "scaTool" if tool is not supported', async function () { - await ScaService.getStateOfScaTool('unsupported tool', octokitMock, 'owner', 'repo'); - sinon.assert.calledOnceWithExactly(exportVariableStub, 'scaTool', 'unsupported tool'); - }); -}); diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 81bc24e4..00000000 --- a/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "target": "ES2022", - "module": "nodenext", - "rootDir": "./", - "moduleResolution": "nodenext", - "baseUrl": "./", - "sourceMap": true, - "outDir": "./dist", - "noImplicitAny": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "skipLibCheck": true, - "newLine": "lf" - }, - "exclude": ["./dist", "./node_modules", "./src"] -}