From f7a0336ee11861e6d6231468e95f2fa301bd2e80 Mon Sep 17 00:00:00 2001 From: mshriver Date: Fri, 31 Oct 2025 17:16:45 +0100 Subject: [PATCH 01/13] Add eslint and pretter and tsconfig --- .eslintrc.json | 33 +++++ .gitignore | 41 +++++- .prettierrc.json | 9 ++ package.json | 71 ++++++----- regenerate-client.sh | 288 +++++++++++++++++++++++++++---------------- tsconfig.esm.json | 17 +++ tsconfig.json | 41 ++++++ 7 files changed, 363 insertions(+), 137 deletions(-) create mode 100644 .eslintrc.json create mode 100644 .prettierrc.json create mode 100644 tsconfig.esm.json create mode 100644 tsconfig.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..1954278 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2020, + "sourceType": "module", + "project": "./tsconfig.json" + }, + "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "prettier" + ], + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/restrict-template-expressions": "off", + "@typescript-eslint/no-redundant-type-constituents": "off" + }, + "env": { + "node": true, + "es6": true + }, + "ignorePatterns": ["dist/", "node_modules/", "*.js", "*.d.ts"] +} + diff --git a/.gitignore b/.gitignore index 3c3629e..cb9539b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,40 @@ -node_modules +# Dependencies +node_modules/ +package-lock.json +yarn.lock +pnpm-lock.yaml + +# Build outputs +dist/ +*.tsbuildinfo +*.js.map +*.d.ts.map + +# Logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +generate.log + +# Testing +coverage/ +.nyc_output/ + +# Temporary files +tmp/ +temp/ +*.tmp + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store + +# Environment +.env +.env.local +.env.*.local diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..621b6f3 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,9 @@ +{ + "semi": true, + "trailingComma": "es5", + "singleQuote": true, + "printWidth": 100, + "tabWidth": 2, + "arrowParens": "always" +} + diff --git a/package.json b/package.json index 8330349..5a646e4 100644 --- a/package.json +++ b/package.json @@ -1,50 +1,57 @@ { "name": "@ibutsu/client", "version": "1.0.0", - "description": "A Javascript client for the Ibutsu API", + "description": "A TypeScript client for the Ibutsu API", "license": "MIT", "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + }, "scripts": { - "build": "babel src -d dist", + "build": "tsc && tsc -p tsconfig.esm.json", "prepack": "npm run build", - "test": "mocha --require @babel/register --recursive" + "test": "jest", + "lint": "eslint src/**/*.ts", + "format": "prettier --write \"src/**/*.ts\"", + "format:check": "prettier --check \"src/**/*.ts\"" }, "repository": { "type": "git", "url": "https://github.com/ibutsu/ibutsu-client-javascript.git" }, - "browser": { - "fs": false - }, + "keywords": [ + "ibutsu", + "testing", + "test-results", + "api-client", + "typescript" + ], "dependencies": { - "@babel/cli": "^7.0.0", - "superagent": "3.7.0" + "portable-fetch": "^3.0.0" }, "devDependencies": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-decorators": "^7.0.0", - "@babel/plugin-proposal-do-expressions": "^7.0.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-export-namespace-from": "^7.0.0", - "@babel/plugin-proposal-function-bind": "^7.0.0", - "@babel/plugin-proposal-function-sent": "^7.0.0", - "@babel/plugin-proposal-json-strings": "^7.0.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-proposal-pipeline-operator": "^7.0.0", - "@babel/plugin-proposal-throw-expressions": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-import-meta": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/register": "^7.0.0", - "expect.js": "^0.3.1", - "mocha": "^5.2.0", - "sinon": "^7.2.0" + "@types/node": "^20.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.0.0", + "eslint-config-prettier": "^9.0.0", + "jest": "^29.0.0", + "prettier": "^3.0.0", + "typescript": "^5.3.0" }, "files": [ - "dist" - ] + "dist", + "src", + "README.md", + "LICENSE" + ], + "engines": { + "node": ">=18.0.0" + } } diff --git a/regenerate-client.sh b/regenerate-client.sh index 8058f1c..daba279 100755 --- a/regenerate-client.sh +++ b/regenerate-client.sh @@ -1,53 +1,74 @@ #!/usr/bin/env bash +set -euo pipefail #### # Re-generate the client based on the spec +# Configuration +OPENAPI_GENERATOR_VERSION="7.16.0" CLIENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +TEMP_DIR="${CLIENT_DIR}/tmp/client" OPENAPI_FILE="" -CAN_COMMIT=false -CAN_PUSH=false -CAN_DELETE=false -CURRENT_VERSION=`cat package.json | grep 'version' | cut -d\" -f4` -NEW_VERSION="${CURRENT_VERSION%.*}.$((${CURRENT_VERSION##*.}+1))" -TRAVIS_DIFF='diff --git a/.travis.yml b/.travis.yml -index 0968f7a..db4dc1d 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -1,5 +1,4 @@ - language: node_js - cache: npm - node_js: -- - "6" -- - "6.1" -+ - "node" -' -PACKAGE_DIFF='diff --git a/package.json b/package.json -index e8693bd..8330349 100644 ---- a/package.json -+++ b/package.json -@@ -9,6 +9,10 @@ - "prepack": "npm run build", - "test": "mocha --require @babel/register --recursive" - }, -+ "repository": { -+ "type": "git", -+ "url": "https://github.com/ibutsu/ibutsu-client-javascript.git" -+ }, - "browser": { - "fs": false - }, -' + +# Version extraction function +get_versions() { + # Extract version from package.json + if ! command -v node >/dev/null 2>&1; then + echo "Error: Node.js is required to read the project version" + echo "Please install Node.js from https://nodejs.org/" + exit 1 + fi + + CURRENT_VERSION=$(node -p "require('${CLIENT_DIR}/package.json').version" 2>/dev/null) + if [[ $? -ne 0 ]] || [[ -z "$CURRENT_VERSION" ]]; then + echo "Error: Failed to read version from package.json" + exit 1 + fi + + if [[ "${NEW_VERSION:-}" == "" ]]; then + # If there's no new version defined externally (e.g., via --target-version), generate a new version + # Handle version formats like "1.0.0" or "1.0.0-beta.1" + if [[ "$CURRENT_VERSION" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then + BASE_VERSION="${BASH_REMATCH[1]}" + PATCH_VERSION="${BASE_VERSION##*.}" + NEW_PATCH=$((PATCH_VERSION + 1)) + NEW_VERSION="${BASE_VERSION%.*}.$NEW_PATCH" + else + echo "Error: Unexpected version format: $CURRENT_VERSION" + exit 1 + fi + else + # Validate the provided target version format + if ! [[ "$NEW_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Error: Invalid version format '$NEW_VERSION'. Expected format: X.Y.Z (e.g., 2.0.0)" + exit 1 + fi + echo "Using specified target version: $NEW_VERSION" + fi +} + +# Check dependencies +function check_dependencies() { + if ! command -v podman >/dev/null 2>&1; then + echo "Error: Podman is required for consistent OpenAPI generation" + echo "Please install Podman from https://podman.io/getting-started/installation" + exit 1 + fi +} function print_usage() { - echo "Usage: regenerate-client.sh [-h|--help] [-c|--commit] [-p|--push] [-d|--delete] OPENAPI_FILE" + echo "Usage: regenerate-client.sh [-h|--help] [-v|--version] [--target-version VERSION] OPENAPI_FILE" echo "" echo "optional arguments:" - echo " -h, --help show this help message" - echo " -v, --version show the prospective new version number" - echo " -c, --commit create a new branch and commit all the changes" - echo " -p, --push push the branch up to origin after commit" - echo " -d, --delete delete the branch after pushing" + echo " -h, --help show this help message" + echo " -v, --version show the prospective new version number" + echo " --target-version VERSION specify a target version (e.g., 2.0.0)" + echo "" + echo "This script regenerates the client on the current branch and leaves" + echo "uncommitted changes in the working tree after running formatting." echo "" + echo "Requirements:" + echo " - Podman (for consistent OpenAPI generation)" + echo " - Node.js (required for version management)" } # Check if there were no arguments @@ -58,80 +79,139 @@ if [[ $# -eq 0 ]]; then fi # Parse the arguments -for ARG in $*; do - if [[ "$ARG" == "-c" ]] || [[ "$ARG" == "--commit" ]]; then - CAN_COMMIT=true - elif [[ "$ARG" == "-p" ]] || [[ "$ARG" == "--push" ]]; then - CAN_PUSH=true - elif [[ "$ARG" == "-d" ]] || [[ "$ARG" == "--delete" ]]; then - CAN_DELETE=true - elif [[ "$ARG" == "-v" ]] || [[ "$ARG" == "--version" ]]; then - echo "Prospective version number: $NEW_VERSION" - exit 0 - elif [[ "$ARG" == "-h" ]] || [[ "$ARG" == "--help" ]]; then - print_usage - exit 0 - else - OPENAPI_FILE=$ARG - fi +while (( "$#" )); do + case "$1" in + -h|--help) + print_usage + exit 0 + ;; + -v|--version) + get_versions + echo "Current version: $CURRENT_VERSION" + echo "Prospective version number: $NEW_VERSION" + exit 0 + ;; + --target-version) + if [[ -n "$2" && "$2" != -* ]]; then + NEW_VERSION="$2" + shift 2 + else + echo "Error: --target-version requires a version number argument" >&2 + exit 1 + fi + ;; + -*|--*) + echo "Error: unsupported option $1" >&2 + exit 1 + ;; + *) + OPENAPI_FILE=$1 + shift + ;; + esac done -# Check if the files exist +# Initialize versions +get_versions + +# Check dependencies +check_dependencies + +# Check if the OpenAPI file exists if [[ ! $OPENAPI_FILE == http* ]] && [[ ! -f "$OPENAPI_FILE" ]]; then echo "Error: No OpenAPI file or incorrect path to file" exit 1 fi -if [[ ! -x "$(command -v openapi-generator-cli)" ]]; then - echo "Error: openapi-generator-cli is not installed. Please see https://openapi-generator.tech/" - exit 2 -fi -# Clean up the current directory -rm -fr node_modules +# Generate the client using Podman +echo "Generating client with OpenAPI Generator v${OPENAPI_GENERATOR_VERSION}..." +mkdir -p "$(dirname "${TEMP_DIR}")" + +podman run --rm \ + -v "${CLIENT_DIR}:/local:Z" \ + "openapitools/openapi-generator-cli:v${OPENAPI_GENERATOR_VERSION}" \ + generate \ + -i "/local/${OPENAPI_FILE}" \ + -g typescript-fetch \ + -o "/local/tmp/client" \ + --global-property skipFormModel=true \ + -p npmName=@ibutsu/client \ + -p npmVersion="${NEW_VERSION}" \ + -p npmRepository=https://github.com/ibutsu/ibutsu-client-javascript \ + -p supportsES6=true \ + -p useSingleRequestParameter=true \ + -p withInterfaces=true \ + -p typescriptThreePlus=true \ + > "${CLIENT_DIR}/generate.log" 2>&1 -# Generate the client -echo -n "Generating client..." -openapi-generator-cli generate -o /tmp/client -g javascript --package-name @ibutsu/client \ - -p licenseName=MIT -p projectVersion=$NEW_VERSION -p projectName=@ibutsu/client \ - -p projectDescription="A Javascript client for the Ibutsu API" -p usePromises=true \ - -p moduleName=ibutsu -i $OPENAPI_FILE > $CLIENT_DIR/generate.log 2>&1 if [ $? -ne 0 ]; then - echo "error" - echo "Error: Generating client failed. Please see generate.log for errors" + echo "Error: Client generation failed. Please see ${CLIENT_DIR}/generate.log for details" exit 3 fi -echo "done" - -# Modify various files -rm /tmp/client/git_push.sh -echo "$TRAVIS_DIFF" | patch -p 1 -d /tmp/client -echo "$PACKAGE_DIFF" | patch -p 1 -d /tmp/client - -# Copy all the files -find $CLIENT_DIR -not -path $CLIENT_DIR -not -path "$CLIENT_DIR/.git/*" \ - -not -name '.git' -not -path "$CLIENT_DIR/.github/*" -not -name '.github' \ - -not -name '.gitignore' -not -name 'regenerate-client.sh' -not -name 'LICENSE' \ - -exec rm -fr {} + -cp -r /tmp/client/. $CLIENT_DIR - -# Clean up afterward -rm -fr /tmp/client - -# Commit everything -if [[ "$CAN_COMMIT" = true ]]; then - echo -n "Committing code..." - BRANCH_NAME="regenerate-$NEW_VERSION" - git checkout -b $BRANCH_NAME > /dev/null 2>&1 - git add . > /dev/null 2>&1 - git commit -q -m "Regenerated client" - echo "done, new branch created: $BRANCH_NAME" - if [[ "$CAN_PUSH" = true ]]; then - echo -n "Pushing up to origin/$BRANCH_NAME..." - git push -q origin $BRANCH_NAME - git checkout master - if [[ "$CAN_DELETE" = true ]]; then - git branch -D $BRANCH_NAME - echo "Deleted branch $BRANCH_NAME" - fi - fi +echo "Client generation completed successfully" + +# Clean up and modify generated files +echo "Processing generated files..." + +# Remove unwanted generated files +rm -f "${TEMP_DIR}/git_push.sh" +rm -f "${TEMP_DIR}/.travis.yml" +rm -f "${TEMP_DIR}/.gitignore" +rm -f "${TEMP_DIR}/.npmignore" +rm -f "${TEMP_DIR}/.openapi-generator-ignore" + +# Copy generated files while preserving important directories +echo "Copying generated files..." + +# Only remove and update the specific directories that contain generated content +echo "Removing old generated content..." +rm -rf "${CLIENT_DIR}/src" +rm -rf "${CLIENT_DIR}/docs" + +# Copy only the generated content directories we want to update +echo "Copying new generated content..." +if [[ -d "${TEMP_DIR}/src" ]]; then + cp -r "${TEMP_DIR}/src" "${CLIENT_DIR}/" fi +if [[ -d "${TEMP_DIR}/docs" ]]; then + cp -r "${TEMP_DIR}/docs" "${CLIENT_DIR}/" +fi + +# Note: We only copy the specific directories we need (src, docs) +# All packaging files (README.md, package.json, LICENSE) are preserved +# We do NOT copy any CI/CD files, setup files, or other generated project files + +# Update the version in package.json +echo "Updating version in package.json to ${NEW_VERSION}..." +if command -v node >/dev/null 2>&1; then + node -e " + const fs = require('fs'); + const pkg = require('${CLIENT_DIR}/package.json'); + pkg.version = '${NEW_VERSION}'; + fs.writeFileSync('${CLIENT_DIR}/package.json', JSON.stringify(pkg, null, 2) + '\n'); + " +fi + +# Clean up temporary directory +rm -rf "${CLIENT_DIR}/tmp" +echo "File processing completed" + +# Post-processing: run formatting and linting if available +echo "Running post-processing..." +if command -v npm >/dev/null 2>&1; then + echo "Installing dependencies..." + cd "${CLIENT_DIR}" + npm install > /dev/null 2>&1 || echo "npm install had some issues, continuing..." + + echo "Running code formatting and linting..." + npm run format 2>&1 || echo "Formatting completed with some issues (normal for generated code)" + npm run lint -- --fix 2>&1 || echo "Linting completed with some issues (normal for generated code)" +else + echo "npm not available, skipping code formatting and linting" +fi + +echo "" +echo "Client regeneration completed successfully!" +echo " Version: $NEW_VERSION" +echo " OpenAPI Generator: v$OPENAPI_GENERATOR_VERSION" +echo " Working tree contains uncommitted changes for review" diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 0000000..55893f4 --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "./dist", + "outFile": undefined, + "declaration": false, + "declarationMap": false + }, + "exclude": [ + "node_modules", + "dist", + "test", + "**/*.spec.ts" + ] +} + diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..32f0386 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,41 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["ES2020"], + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./dist", + "rootDir": "./src", + "removeComments": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictBindCallApply": true, + "strictPropertyInitialization": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "node_modules", + "dist", + "test", + "**/*.spec.ts" + ] +} + From 6a09be58a8f6dc5acaffb987dcb5f02f49c644de Mon Sep 17 00:00:00 2001 From: mshriver Date: Fri, 31 Oct 2025 17:25:34 +0100 Subject: [PATCH 02/13] Generate TS client with openapi gen 7 --- .gitignore | 2 + docs/Artifact.md | 12 - docs/ArtifactApi.md | 280 ----------- docs/ArtifactList.md | 10 - docs/Group.md | 10 - docs/GroupApi.md | 186 -------- docs/GroupList.md | 10 - docs/Health.md | 10 - docs/HealthApi.md | 125 ----- docs/HealthInfo.md | 11 - docs/ImportApi.md | 94 ---- docs/InlineObject.md | 12 - docs/InlineObject1.md | 9 - docs/InlineResponse200.md | 10 - docs/ModelImport.md | 13 - docs/Pagination.md | 12 - docs/Project.md | 13 - docs/ProjectApi.md | 192 -------- docs/ProjectList.md | 10 - docs/Report.md | 16 - docs/ReportApi.md | 315 ------------- docs/ReportList.md | 10 - docs/ReportParameters.md | 11 - docs/Result.md | 31 -- docs/ResultApi.md | 196 -------- docs/ResultList.md | 10 - docs/Run.md | 15 - docs/RunApi.md | 192 -------- docs/RunList.md | 10 - docs/WidgetApi.md | 94 ---- docs/WidgetConfig.md | 15 - docs/WidgetConfigApi.md | 237 ---------- docs/WidgetConfigList.md | 10 - docs/WidgetParam.md | 11 - docs/WidgetType.md | 12 - docs/WidgetTypeList.md | 10 - package.json | 2 +- src/ApiClient.js | 654 -------------------------- src/api/ArtifactApi.js | 340 ------------- src/api/GroupApi.js | 230 --------- src/api/HealthApi.js | 156 ------ src/api/ImportApi.js | 130 ----- src/api/ProjectApi.js | 235 --------- src/api/ReportApi.js | 374 --------------- src/api/ResultApi.js | 236 ---------- src/api/RunApi.js | 234 --------- src/api/WidgetApi.js | 129 ----- src/api/WidgetConfigApi.js | 279 ----------- src/apis/AdminProjectManagementApi.ts | 369 +++++++++++++++ src/apis/AdminUserManagementApi.ts | 369 +++++++++++++++ src/apis/ArtifactApi.ts | 490 +++++++++++++++++++ src/apis/DashboardApi.ts | 381 +++++++++++++++ src/apis/GroupApi.ts | 300 ++++++++++++ src/apis/HealthApi.ts | 187 ++++++++ src/apis/ImportApi.ts | 205 ++++++++ src/apis/LoginApi.ts | 438 +++++++++++++++++ src/apis/ProjectApi.ts | 382 +++++++++++++++ src/apis/ResultApi.ts | 315 +++++++++++++ src/apis/RunApi.ts | 389 +++++++++++++++ src/apis/TaskApi.ts | 96 ++++ src/apis/UserApi.ts | 402 ++++++++++++++++ src/apis/WidgetApi.ts | 172 +++++++ src/apis/WidgetConfigApi.ts | 372 +++++++++++++++ src/apis/index.ts | 17 + src/index.js | 300 ------------ src/index.ts | 5 + src/model/Artifact.js | 99 ---- src/model/ArtifactList.js | 81 ---- src/model/Group.js | 81 ---- src/model/GroupList.js | 81 ---- src/model/Health.js | 81 ---- src/model/HealthInfo.js | 90 ---- src/model/InlineObject.js | 105 ----- src/model/InlineObject1.js | 74 --- src/model/InlineResponse200.js | 81 ---- src/model/ModelImport.js | 108 ----- src/model/Pagination.js | 99 ---- src/model/Project.js | 108 ----- src/model/ProjectList.js | 81 ---- src/model/Report.js | 135 ------ src/model/ReportList.js | 81 ---- src/model/ReportParameters.js | 90 ---- src/model/Result.js | 166 ------- src/model/ResultList.js | 81 ---- src/model/Run.js | 126 ----- src/model/RunList.js | 81 ---- src/model/WidgetConfig.js | 126 ----- src/model/WidgetConfigList.js | 81 ---- src/model/WidgetParam.js | 90 ---- src/model/WidgetType.js | 100 ---- src/model/WidgetTypeList.js | 81 ---- src/models/AccountRecovery.ts | 66 +++ src/models/AccountRegistration.ts | 75 +++ src/models/AccountReset.ts | 75 +++ src/models/Artifact.ts | 105 +++++ src/models/ArtifactList.ts | 88 ++++ src/models/CreateToken.ts | 75 +++ src/models/Credentials.ts | 75 +++ src/models/Dashboard.ts | 105 +++++ src/models/DashboardList.ts | 88 ++++ src/models/Group.ts | 73 +++ src/models/GroupList.ts | 88 ++++ src/models/Health.ts | 73 +++ src/models/HealthInfo.ts | 81 ++++ src/models/Import.ts | 97 ++++ src/models/LoginConfig.ts | 81 ++++ src/models/LoginError.ts | 73 +++ src/models/LoginSupport.ts | 105 +++++ src/models/LoginToken.ts | 65 +++ src/models/Pagination.ts | 89 ++++ src/models/Project.ts | 97 ++++ src/models/ProjectList.ts | 88 ++++ src/models/Result.ts | 170 +++++++ src/models/ResultList.ts | 88 ++++ src/models/Run.ts | 137 ++++++ src/models/RunList.ts | 88 ++++ src/models/Token.ts | 101 ++++ src/models/TokenList.ts | 88 ++++ src/models/UpdateRun.ts | 65 +++ src/models/User.ts | 106 +++++ src/models/UserList.ts | 88 ++++ src/models/WidgetConfig.ts | 113 +++++ src/models/WidgetConfigList.ts | 88 ++++ src/models/WidgetParam.ts | 81 ++++ src/models/WidgetType.ts | 105 +++++ src/models/WidgetTypeList.ts | 88 ++++ src/models/index.ts | 37 ++ src/runtime.ts | 432 +++++++++++++++++ 128 files changed, 8529 insertions(+), 7919 deletions(-) delete mode 100644 docs/Artifact.md delete mode 100644 docs/ArtifactApi.md delete mode 100644 docs/ArtifactList.md delete mode 100644 docs/Group.md delete mode 100644 docs/GroupApi.md delete mode 100644 docs/GroupList.md delete mode 100644 docs/Health.md delete mode 100644 docs/HealthApi.md delete mode 100644 docs/HealthInfo.md delete mode 100644 docs/ImportApi.md delete mode 100644 docs/InlineObject.md delete mode 100644 docs/InlineObject1.md delete mode 100644 docs/InlineResponse200.md delete mode 100644 docs/ModelImport.md delete mode 100644 docs/Pagination.md delete mode 100644 docs/Project.md delete mode 100644 docs/ProjectApi.md delete mode 100644 docs/ProjectList.md delete mode 100644 docs/Report.md delete mode 100644 docs/ReportApi.md delete mode 100644 docs/ReportList.md delete mode 100644 docs/ReportParameters.md delete mode 100644 docs/Result.md delete mode 100644 docs/ResultApi.md delete mode 100644 docs/ResultList.md delete mode 100644 docs/Run.md delete mode 100644 docs/RunApi.md delete mode 100644 docs/RunList.md delete mode 100644 docs/WidgetApi.md delete mode 100644 docs/WidgetConfig.md delete mode 100644 docs/WidgetConfigApi.md delete mode 100644 docs/WidgetConfigList.md delete mode 100644 docs/WidgetParam.md delete mode 100644 docs/WidgetType.md delete mode 100644 docs/WidgetTypeList.md delete mode 100644 src/ApiClient.js delete mode 100644 src/api/ArtifactApi.js delete mode 100644 src/api/GroupApi.js delete mode 100644 src/api/HealthApi.js delete mode 100644 src/api/ImportApi.js delete mode 100644 src/api/ProjectApi.js delete mode 100644 src/api/ReportApi.js delete mode 100644 src/api/ResultApi.js delete mode 100644 src/api/RunApi.js delete mode 100644 src/api/WidgetApi.js delete mode 100644 src/api/WidgetConfigApi.js create mode 100644 src/apis/AdminProjectManagementApi.ts create mode 100644 src/apis/AdminUserManagementApi.ts create mode 100644 src/apis/ArtifactApi.ts create mode 100644 src/apis/DashboardApi.ts create mode 100644 src/apis/GroupApi.ts create mode 100644 src/apis/HealthApi.ts create mode 100644 src/apis/ImportApi.ts create mode 100644 src/apis/LoginApi.ts create mode 100644 src/apis/ProjectApi.ts create mode 100644 src/apis/ResultApi.ts create mode 100644 src/apis/RunApi.ts create mode 100644 src/apis/TaskApi.ts create mode 100644 src/apis/UserApi.ts create mode 100644 src/apis/WidgetApi.ts create mode 100644 src/apis/WidgetConfigApi.ts create mode 100644 src/apis/index.ts delete mode 100644 src/index.js create mode 100644 src/index.ts delete mode 100644 src/model/Artifact.js delete mode 100644 src/model/ArtifactList.js delete mode 100644 src/model/Group.js delete mode 100644 src/model/GroupList.js delete mode 100644 src/model/Health.js delete mode 100644 src/model/HealthInfo.js delete mode 100644 src/model/InlineObject.js delete mode 100644 src/model/InlineObject1.js delete mode 100644 src/model/InlineResponse200.js delete mode 100644 src/model/ModelImport.js delete mode 100644 src/model/Pagination.js delete mode 100644 src/model/Project.js delete mode 100644 src/model/ProjectList.js delete mode 100644 src/model/Report.js delete mode 100644 src/model/ReportList.js delete mode 100644 src/model/ReportParameters.js delete mode 100644 src/model/Result.js delete mode 100644 src/model/ResultList.js delete mode 100644 src/model/Run.js delete mode 100644 src/model/RunList.js delete mode 100644 src/model/WidgetConfig.js delete mode 100644 src/model/WidgetConfigList.js delete mode 100644 src/model/WidgetParam.js delete mode 100644 src/model/WidgetType.js delete mode 100644 src/model/WidgetTypeList.js create mode 100644 src/models/AccountRecovery.ts create mode 100644 src/models/AccountRegistration.ts create mode 100644 src/models/AccountReset.ts create mode 100644 src/models/Artifact.ts create mode 100644 src/models/ArtifactList.ts create mode 100644 src/models/CreateToken.ts create mode 100644 src/models/Credentials.ts create mode 100644 src/models/Dashboard.ts create mode 100644 src/models/DashboardList.ts create mode 100644 src/models/Group.ts create mode 100644 src/models/GroupList.ts create mode 100644 src/models/Health.ts create mode 100644 src/models/HealthInfo.ts create mode 100644 src/models/Import.ts create mode 100644 src/models/LoginConfig.ts create mode 100644 src/models/LoginError.ts create mode 100644 src/models/LoginSupport.ts create mode 100644 src/models/LoginToken.ts create mode 100644 src/models/Pagination.ts create mode 100644 src/models/Project.ts create mode 100644 src/models/ProjectList.ts create mode 100644 src/models/Result.ts create mode 100644 src/models/ResultList.ts create mode 100644 src/models/Run.ts create mode 100644 src/models/RunList.ts create mode 100644 src/models/Token.ts create mode 100644 src/models/TokenList.ts create mode 100644 src/models/UpdateRun.ts create mode 100644 src/models/User.ts create mode 100644 src/models/UserList.ts create mode 100644 src/models/WidgetConfig.ts create mode 100644 src/models/WidgetConfigList.ts create mode 100644 src/models/WidgetParam.ts create mode 100644 src/models/WidgetType.ts create mode 100644 src/models/WidgetTypeList.ts create mode 100644 src/models/index.ts create mode 100644 src/runtime.ts diff --git a/.gitignore b/.gitignore index cb9539b..ea7643c 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ temp/ .env .env.local .env.*.local + +openapi.yaml diff --git a/docs/Artifact.md b/docs/Artifact.md deleted file mode 100644 index 6591593..0000000 --- a/docs/Artifact.md +++ /dev/null @@ -1,12 +0,0 @@ -# ibutsu.Artifact - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Unique ID of the artifact | [optional] -**resultId** | **String** | ID of test result to attach artifact to | [optional] -**filename** | **String** | ID of pet to update | [optional] -**additionalMetadata** | [**Object**](.md) | Additional data to pass to server | [optional] - - diff --git a/docs/ArtifactApi.md b/docs/ArtifactApi.md deleted file mode 100644 index 87e7f88..0000000 --- a/docs/ArtifactApi.md +++ /dev/null @@ -1,280 +0,0 @@ -# ibutsu.ArtifactApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteArtifact**](ArtifactApi.md#deleteArtifact) | **DELETE** /artifact/{id} | Delete an artifact -[**downloadArtifact**](ArtifactApi.md#downloadArtifact) | **GET** /artifact/{id}/download | Download an artifact -[**getArtifact**](ArtifactApi.md#getArtifact) | **GET** /artifact/{id} | Get a single artifact -[**getArtifactList**](ArtifactApi.md#getArtifactList) | **GET** /artifact | Get a (filtered) list of artifacts -[**uploadArtifact**](ArtifactApi.md#uploadArtifact) | **POST** /artifact | Uploads a test run artifact -[**viewArtifact**](ArtifactApi.md#viewArtifact) | **GET** /artifact/{id}/view | Stream an artifact directly to the client/browser - - - -## deleteArtifact - -> deleteArtifact(id) - -Delete an artifact - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ArtifactApi(); -let id = "id_example"; // String | ID of artifact to delete -apiInstance.deleteArtifact(id).then(() => { - console.log('API called successfully.'); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of artifact to delete | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -## downloadArtifact - -> File downloadArtifact(id) - -Download an artifact - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ArtifactApi(); -let id = "id_example"; // String | ID of artifact to return -apiInstance.downloadArtifact(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of artifact to return | - -### Return type - -**File** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain, image/jpeg, image/png, image/gif, application/octet-stream - - -## getArtifact - -> Artifact getArtifact(id) - -Get a single artifact - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ArtifactApi(); -let id = "id_example"; // String | ID of artifact to return -apiInstance.getArtifact(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of artifact to return | - -### Return type - -[**Artifact**](Artifact.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getArtifactList - -> ArtifactList getArtifactList(opts) - -Get a (filtered) list of artifacts - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ArtifactApi(); -let opts = { - 'resultId': "resultId_example", // String | The result ID to filter by - 'page': 56, // Number | Set the page of items to return, defaults to 1 - 'pageSize': 56 // Number | Set the number of items per page, defaults to 25 -}; -apiInstance.getArtifactList(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **resultId** | **String**| The result ID to filter by | [optional] - **page** | **Number**| Set the page of items to return, defaults to 1 | [optional] - **pageSize** | **Number**| Set the number of items per page, defaults to 25 | [optional] - -### Return type - -[**ArtifactList**](ArtifactList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## uploadArtifact - -> Artifact uploadArtifact(resultId, filename, file, opts) - -Uploads a test run artifact - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ArtifactApi(); -let resultId = "resultId_example"; // String | ID of result to attach artifact to -let filename = "filename_example"; // String | ID of pet to update -let file = "/path/to/file"; // File | file to upload -let opts = { - 'additionalMetadata': null // Object | Additional data to pass to server -}; -apiInstance.uploadArtifact(resultId, filename, file, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **resultId** | **String**| ID of result to attach artifact to | - **filename** | **String**| ID of pet to update | - **file** | **File**| file to upload | - **additionalMetadata** | [**Object**](Object.md)| Additional data to pass to server | [optional] - -### Return type - -[**Artifact**](Artifact.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - - -## viewArtifact - -> File viewArtifact(id) - -Stream an artifact directly to the client/browser - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ArtifactApi(); -let id = "id_example"; // String | ID of artifact to return -apiInstance.viewArtifact(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of artifact to return | - -### Return type - -**File** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain, image/jpeg, image/png, image/gif, application/octet-stream - diff --git a/docs/ArtifactList.md b/docs/ArtifactList.md deleted file mode 100644 index 5f1d4e1..0000000 --- a/docs/ArtifactList.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.ArtifactList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**artifacts** | [**[Artifact]**](Artifact.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - - diff --git a/docs/Group.md b/docs/Group.md deleted file mode 100644 index 0553d3f..0000000 --- a/docs/Group.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.Group - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Unique ID of the project | [optional] -**name** | **String** | The name of the group | [optional] - - diff --git a/docs/GroupApi.md b/docs/GroupApi.md deleted file mode 100644 index 3b43c1a..0000000 --- a/docs/GroupApi.md +++ /dev/null @@ -1,186 +0,0 @@ -# ibutsu.GroupApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addGroup**](GroupApi.md#addGroup) | **POST** /group | Create a new group -[**getGroup**](GroupApi.md#getGroup) | **GET** /group/{id} | Get a group -[**getGroupList**](GroupApi.md#getGroupList) | **GET** /group | Get a list of groups -[**updateGroup**](GroupApi.md#updateGroup) | **PUT** /group/{id} | Update a group - - - -## addGroup - -> Group addGroup(group) - -Create a new group - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.GroupApi(); -let group = new ibutsu.Group(); // Group | The group -apiInstance.addGroup(group).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **group** | [**Group**](Group.md)| The group | - -### Return type - -[**Group**](Group.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## getGroup - -> Group getGroup(id) - -Get a group - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.GroupApi(); -let id = "id_example"; // String | The ID of the group -apiInstance.getGroup(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the group | - -### Return type - -[**Group**](Group.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getGroupList - -> GroupList getGroupList(opts) - -Get a list of groups - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.GroupApi(); -let opts = { - 'page': 56, // Number | Set the page of items to return, defaults to 1 - 'pageSize': 56 // Number | Set the number of items per page, defaults to 25 -}; -apiInstance.getGroupList(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **Number**| Set the page of items to return, defaults to 1 | [optional] - **pageSize** | **Number**| Set the number of items per page, defaults to 25 | [optional] - -### Return type - -[**GroupList**](GroupList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## updateGroup - -> Group updateGroup(id, group) - -Update a group - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.GroupApi(); -let id = "id_example"; // String | The ID of the group -let group = new ibutsu.Group(); // Group | The updated group -apiInstance.updateGroup(id, group).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the group | - **group** | [**Group**](Group.md)| The updated group | - -### Return type - -[**Group**](Group.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/GroupList.md b/docs/GroupList.md deleted file mode 100644 index 3a650a7..0000000 --- a/docs/GroupList.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.GroupList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**groups** | [**[Group]**](Group.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - - diff --git a/docs/Health.md b/docs/Health.md deleted file mode 100644 index e14cf92..0000000 --- a/docs/Health.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.Health - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **String** | The status of the database, one of \"OK\", \"Error\", \"Pending\" | [optional] -**message** | **String** | A message to explain the current status | [optional] - - diff --git a/docs/HealthApi.md b/docs/HealthApi.md deleted file mode 100644 index 6b82ff9..0000000 --- a/docs/HealthApi.md +++ /dev/null @@ -1,125 +0,0 @@ -# ibutsu.HealthApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getDatabaseHealth**](HealthApi.md#getDatabaseHealth) | **GET** /health/database | Get a health report for the database -[**getHealth**](HealthApi.md#getHealth) | **GET** /health | Get a general health report -[**getHealthInfo**](HealthApi.md#getHealthInfo) | **GET** /health/info | Get information about the server - - - -## getDatabaseHealth - -> Health getDatabaseHealth() - -Get a health report for the database - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.HealthApi(); -apiInstance.getDatabaseHealth().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Health**](Health.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getHealth - -> Health getHealth() - -Get a general health report - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.HealthApi(); -apiInstance.getHealth().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Health**](Health.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getHealthInfo - -> HealthInfo getHealthInfo() - -Get information about the server - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.HealthApi(); -apiInstance.getHealthInfo().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**HealthInfo**](HealthInfo.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - diff --git a/docs/HealthInfo.md b/docs/HealthInfo.md deleted file mode 100644 index 55df80b..0000000 --- a/docs/HealthInfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# ibutsu.HealthInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend** | **String** | The URL of the frontend | [optional] -**backend** | **String** | The URL of the backend | [optional] -**apiUi** | **String** | The URL to the UI for the API | [optional] - - diff --git a/docs/ImportApi.md b/docs/ImportApi.md deleted file mode 100644 index 80973dd..0000000 --- a/docs/ImportApi.md +++ /dev/null @@ -1,94 +0,0 @@ -# ibutsu.ImportApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addImport**](ImportApi.md#addImport) | **POST** /import | Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive -[**getImport**](ImportApi.md#getImport) | **GET** /import/{id} | Get the status of an import - - - -## addImport - -> ModelImport addImport(importFile) - -Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ImportApi(); -let importFile = "/path/to/file"; // File | The file to import -apiInstance.addImport(importFile).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **importFile** | **File**| The file to import | - -### Return type - -[**ModelImport**](ModelImport.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - - -## getImport - -> ModelImport getImport(id) - -Get the status of an import - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ImportApi(); -let id = "id_example"; // String | The ID of the import -apiInstance.getImport(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the import | - -### Return type - -[**ModelImport**](ModelImport.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - diff --git a/docs/InlineObject.md b/docs/InlineObject.md deleted file mode 100644 index 6b923a3..0000000 --- a/docs/InlineObject.md +++ /dev/null @@ -1,12 +0,0 @@ -# ibutsu.InlineObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**resultId** | **String** | ID of result to attach artifact to | -**filename** | **String** | ID of pet to update | -**file** | **File** | file to upload | -**additionalMetadata** | [**Object**](.md) | Additional data to pass to server | [optional] - - diff --git a/docs/InlineObject1.md b/docs/InlineObject1.md deleted file mode 100644 index db23aaf..0000000 --- a/docs/InlineObject1.md +++ /dev/null @@ -1,9 +0,0 @@ -# ibutsu.InlineObject1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**importFile** | **File** | The file to import | - - diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md deleted file mode 100644 index ee16ce9..0000000 --- a/docs/InlineResponse200.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.InlineResponse200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | The machine-readable name of report type | [optional] -**name** | **String** | The human-readable name of report type | [optional] - - diff --git a/docs/ModelImport.md b/docs/ModelImport.md deleted file mode 100644 index cb24d6f..0000000 --- a/docs/ModelImport.md +++ /dev/null @@ -1,13 +0,0 @@ -# ibutsu.ModelImport - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | The database ID of the import | [optional] -**status** | **String** | The current status of the import, can be one of \"pending\", \"running\", \"done\" | [optional] -**filename** | **String** | The name of the file that was uploaded | [optional] -**format** | **String** | The format of the file uploaded | [optional] -**runId** | **String** | The ID of the run from the import | [optional] - - diff --git a/docs/Pagination.md b/docs/Pagination.md deleted file mode 100644 index d318dba..0000000 --- a/docs/Pagination.md +++ /dev/null @@ -1,12 +0,0 @@ -# ibutsu.Pagination - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | **Number** | The current page number | [optional] -**pageSize** | **Number** | The number of items per page | [optional] -**totalPages** | **Number** | The total number of pages | [optional] -**totalItems** | **Number** | The total number of items for this query | [optional] - - diff --git a/docs/Project.md b/docs/Project.md deleted file mode 100644 index ed82c2b..0000000 --- a/docs/Project.md +++ /dev/null @@ -1,13 +0,0 @@ -# ibutsu.Project - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Unique ID of the project | [optional] -**name** | **String** | The machine name of the project | [optional] -**title** | **String** | The human-readable title of the project | [optional] -**ownerId** | **String** | The ID of the owner of this project | [optional] -**groupId** | **String** | The ID of the group of this project | [optional] - - diff --git a/docs/ProjectApi.md b/docs/ProjectApi.md deleted file mode 100644 index e691463..0000000 --- a/docs/ProjectApi.md +++ /dev/null @@ -1,192 +0,0 @@ -# ibutsu.ProjectApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addProject**](ProjectApi.md#addProject) | **POST** /project | Create a project -[**getProject**](ProjectApi.md#getProject) | **GET** /project/{id} | Get a single project by ID -[**getProjectList**](ProjectApi.md#getProjectList) | **GET** /project | Get a list of projects -[**updateProject**](ProjectApi.md#updateProject) | **PUT** /project/{id} | Update a project - - - -## addProject - -> Project addProject(project) - -Create a project - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ProjectApi(); -let project = new ibutsu.Project(); // Project | Project -apiInstance.addProject(project).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project** | [**Project**](Project.md)| Project | - -### Return type - -[**Project**](Project.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## getProject - -> Project getProject(id) - -Get a single project by ID - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ProjectApi(); -let id = "id_example"; // String | ID of test project -apiInstance.getProject(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of test project | - -### Return type - -[**Project**](Project.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getProjectList - -> ProjectList getProjectList(opts) - -Get a list of projects - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ProjectApi(); -let opts = { - 'ownerId': "ownerId_example", // String | Filter projects by owner ID - 'groupId': "groupId_example", // String | Filter projects by group ID - 'page': 56, // Number | Set the page of items to return, defaults to 1 - 'pageSize': 56 // Number | Set the number of items per page, defaults to 25 -}; -apiInstance.getProjectList(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ownerId** | **String**| Filter projects by owner ID | [optional] - **groupId** | **String**| Filter projects by group ID | [optional] - **page** | **Number**| Set the page of items to return, defaults to 1 | [optional] - **pageSize** | **Number**| Set the number of items per page, defaults to 25 | [optional] - -### Return type - -[**ProjectList**](ProjectList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## updateProject - -> Project updateProject(id, opts) - -Update a project - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ProjectApi(); -let id = "id_example"; // String | ID of test project -let opts = { - 'project': new ibutsu.Project() // Project | Project -}; -apiInstance.updateProject(id, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of test project | - **project** | [**Project**](Project.md)| Project | [optional] - -### Return type - -[**Project**](Project.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/ProjectList.md b/docs/ProjectList.md deleted file mode 100644 index c7cafa7..0000000 --- a/docs/ProjectList.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.ProjectList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**projects** | [**[Project]**](Project.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - - diff --git a/docs/Report.md b/docs/Report.md deleted file mode 100644 index 935351d..0000000 --- a/docs/Report.md +++ /dev/null @@ -1,16 +0,0 @@ -# ibutsu.Report - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Unique ID of the project | [optional] -**filename** | **String** | The filename of the report | [optional] -**mimetype** | **String** | The mime type of the downloadable file | [optional] -**url** | **String** | The URL to the downloadable report (deprecated) | [optional] -**downloadUrl** | **String** | The URL to the downloadable report | [optional] -**viewUrl** | **String** | The URL to the viewable report | [optional] -**parameters** | [**ReportParameters**](ReportParameters.md) | | [optional] -**status** | **String** | The status of the report, one of \"pending\", \"running\", \"done\" | [optional] - - diff --git a/docs/ReportApi.md b/docs/ReportApi.md deleted file mode 100644 index 49343ab..0000000 --- a/docs/ReportApi.md +++ /dev/null @@ -1,315 +0,0 @@ -# ibutsu.ReportApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addReport**](ReportApi.md#addReport) | **POST** /report | Create a new report -[**deleteReport**](ReportApi.md#deleteReport) | **DELETE** /report/{id} | Delete a report -[**downloadReport**](ReportApi.md#downloadReport) | **GET** /report/{id}/download/{filename} | Download a report -[**getReport**](ReportApi.md#getReport) | **GET** /report/{id} | Get a report -[**getReportList**](ReportApi.md#getReportList) | **GET** /report | Get a list of reports -[**getReportTypes**](ReportApi.md#getReportTypes) | **GET** /report/types | Get a list of report types -[**viewReport**](ReportApi.md#viewReport) | **GET** /report/{id}/view/{filename} | View a report - - - -## addReport - -> Report addReport(reportParameters) - -Create a new report - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ReportApi(); -let reportParameters = new ibutsu.ReportParameters(); // ReportParameters | The parameters for the report -apiInstance.addReport(reportParameters).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **reportParameters** | [**ReportParameters**](ReportParameters.md)| The parameters for the report | - -### Return type - -[**Report**](Report.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## deleteReport - -> deleteReport(id) - -Delete a report - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ReportApi(); -let id = "id_example"; // String | ID of report to delete -apiInstance.deleteReport(id).then(() => { - console.log('API called successfully.'); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of report to delete | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -## downloadReport - -> File downloadReport(id, filename) - -Download a report - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ReportApi(); -let id = "id_example"; // String | The ID of the report -let filename = "filename_example"; // String | The file name of the downloadable report -apiInstance.downloadReport(id, filename).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the report | - **filename** | **String**| The file name of the downloadable report | - -### Return type - -**File** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain, application/csv, application/json, text/html, application/zip - - -## getReport - -> Report getReport(id) - -Get a report - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ReportApi(); -let id = "id_example"; // String | The ID of the report -apiInstance.getReport(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the report | - -### Return type - -[**Report**](Report.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getReportList - -> ReportList getReportList(opts) - -Get a list of reports - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ReportApi(); -let opts = { - 'page': 56, // Number | Set the page of items to return, defaults to 1 - 'pageSize': 56, // Number | Set the number of items per page, defaults to 25 - 'project': "project_example" // String | Filter reports by project ID -}; -apiInstance.getReportList(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **page** | **Number**| Set the page of items to return, defaults to 1 | [optional] - **pageSize** | **Number**| Set the number of items per page, defaults to 25 | [optional] - **project** | **String**| Filter reports by project ID | [optional] - -### Return type - -[**ReportList**](ReportList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getReportTypes - -> [InlineResponse200] getReportTypes() - -Get a list of report types - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ReportApi(); -apiInstance.getReportTypes().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**[InlineResponse200]**](InlineResponse200.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## viewReport - -> File viewReport(id, filename) - -View a report - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ReportApi(); -let id = "id_example"; // String | The ID of the report -let filename = "filename_example"; // String | The file name of the downloadable report -apiInstance.viewReport(id, filename).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the report | - **filename** | **String**| The file name of the downloadable report | - -### Return type - -**File** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain, application/csv, application/json, text/html, application/zip - diff --git a/docs/ReportList.md b/docs/ReportList.md deleted file mode 100644 index 0ea5890..0000000 --- a/docs/ReportList.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.ReportList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reports** | [**[Report]**](Report.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - - diff --git a/docs/ReportParameters.md b/docs/ReportParameters.md deleted file mode 100644 index 3c14801..0000000 --- a/docs/ReportParameters.md +++ /dev/null @@ -1,11 +0,0 @@ -# ibutsu.ReportParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | The type of report to generate | [optional] -**filter** | **String** | A regular expression to filter test results by | [optional] -**source** | **String** | The source of the test results | [optional] - - diff --git a/docs/Result.md b/docs/Result.md deleted file mode 100644 index dbeba70..0000000 --- a/docs/Result.md +++ /dev/null @@ -1,31 +0,0 @@ -# ibutsu.Result - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Unique ID of the test result | [optional] -**testId** | **String** | Unique id | [optional] -**startTime** | **Number** | Timestamp of starttime. | [optional] -**duration** | **Number** | Duration of test in seconds. | [optional] -**result** | **String** | Status of result. | [optional] -**metadata** | [**Object**](.md) | | [optional] -**params** | [**Object**](.md) | | [optional] -**source** | **String** | Where the data came from (useful for filtering) | [optional] - - - -## Enum: ResultEnum - - -* `passed` (value: `"passed"`) - -* `failed` (value: `"failed"`) - -* `error` (value: `"error"`) - -* `skipped` (value: `"skipped"`) - - - - diff --git a/docs/ResultApi.md b/docs/ResultApi.md deleted file mode 100644 index ee9e4bb..0000000 --- a/docs/ResultApi.md +++ /dev/null @@ -1,196 +0,0 @@ -# ibutsu.ResultApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addResult**](ResultApi.md#addResult) | **POST** /result | Create a test result -[**getResult**](ResultApi.md#getResult) | **GET** /result/{id} | Get a single result -[**getResultList**](ResultApi.md#getResultList) | **GET** /result | Get the list of results. -[**updateResult**](ResultApi.md#updateResult) | **PUT** /result/{id} | Updates a single result - - - -## addResult - -> Result addResult(opts) - -Create a test result - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ResultApi(); -let opts = { - 'result': new ibutsu.Result() // Result | Result item -}; -apiInstance.addResult(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **result** | [**Result**](Result.md)| Result item | [optional] - -### Return type - -[**Result**](Result.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## getResult - -> Result getResult(id) - -Get a single result - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ResultApi(); -let id = "id_example"; // String | ID of pet to return -apiInstance.getResult(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of pet to return | - -### Return type - -[**Result**](Result.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getResultList - -> ResultList getResultList(opts) - -Get the list of results. - -The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ResultApi(); -let opts = { - 'filter': ["null"], // [String] | Fields to filter by - 'applyMax': true, // Boolean | Use a max to limit documents returned - 'page': 56, // Number | Set the page of items to return, defaults to 1 - 'pageSize': 56 // Number | Set the number of items per page, defaults to 25 -}; -apiInstance.getResultList(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **filter** | [**[String]**](String.md)| Fields to filter by | [optional] - **applyMax** | **Boolean**| Use a max to limit documents returned | [optional] - **page** | **Number**| Set the page of items to return, defaults to 1 | [optional] - **pageSize** | **Number**| Set the number of items per page, defaults to 25 | [optional] - -### Return type - -[**ResultList**](ResultList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## updateResult - -> Result updateResult(id, opts) - -Updates a single result - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.ResultApi(); -let id = "id_example"; // String | ID of result to update -let opts = { - 'result': new ibutsu.Result() // Result | Result item -}; -apiInstance.updateResult(id, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of result to update | - **result** | [**Result**](Result.md)| Result item | [optional] - -### Return type - -[**Result**](Result.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/ResultList.md b/docs/ResultList.md deleted file mode 100644 index 8d4cd73..0000000 --- a/docs/ResultList.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.ResultList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**[Result]**](Result.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - - diff --git a/docs/Run.md b/docs/Run.md deleted file mode 100644 index b04893f..0000000 --- a/docs/Run.md +++ /dev/null @@ -1,15 +0,0 @@ -# ibutsu.Run - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | Unique ID of the test run | [optional] -**created** | **String** | The time this record was created | [optional] -**duration** | **Number** | Duration of tests in seconds | [optional] -**source** | **String** | A source for this test run | [optional] -**startTime** | **Number** | The time the test run started | [optional] -**summary** | [**Object**](.md) | A summary of the test results | [optional] -**metadata** | [**Object**](.md) | Extra data for this run | [optional] - - diff --git a/docs/RunApi.md b/docs/RunApi.md deleted file mode 100644 index a38a55e..0000000 --- a/docs/RunApi.md +++ /dev/null @@ -1,192 +0,0 @@ -# ibutsu.RunApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addRun**](RunApi.md#addRun) | **POST** /run | Create a run -[**getRun**](RunApi.md#getRun) | **GET** /run/{id} | Get a single run by ID -[**getRunList**](RunApi.md#getRunList) | **GET** /run | Get a list of the test runs -[**updateRun**](RunApi.md#updateRun) | **PUT** /run/{id} | Update a single run - - - -## addRun - -> Run addRun(opts) - -Create a run - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.RunApi(); -let opts = { - 'run': new ibutsu.Run() // Run | Run item -}; -apiInstance.addRun(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **run** | [**Run**](Run.md)| Run item | [optional] - -### Return type - -[**Run**](Run.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## getRun - -> Run getRun(id) - -Get a single run by ID - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.RunApi(); -let id = "id_example"; // String | ID of test run -apiInstance.getRun(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of test run | - -### Return type - -[**Run**](Run.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getRunList - -> RunList getRunList(opts) - -Get a list of the test runs - -The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.RunApi(); -let opts = { - 'filter': ["null"], // [String] | Fields to filter by - 'page': 56, // Number | Set the page of items to return, defaults to 1 - 'pageSize': 56 // Number | Set the number of items per page, defaults to 25 -}; -apiInstance.getRunList(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **filter** | [**[String]**](String.md)| Fields to filter by | [optional] - **page** | **Number**| Set the page of items to return, defaults to 1 | [optional] - **pageSize** | **Number**| Set the number of items per page, defaults to 25 | [optional] - -### Return type - -[**RunList**](RunList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## updateRun - -> Run updateRun(id, run) - -Update a single run - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.RunApi(); -let id = "id_example"; // String | ID of the test run -let run = new ibutsu.Run(); // Run | The updated test run -apiInstance.updateRun(id, run).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of the test run | - **run** | [**Run**](Run.md)| The updated test run | - -### Return type - -[**Run**](Run.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/RunList.md b/docs/RunList.md deleted file mode 100644 index 4ea3bf3..0000000 --- a/docs/RunList.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.RunList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**runs** | [**[Run]**](Run.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - - diff --git a/docs/WidgetApi.md b/docs/WidgetApi.md deleted file mode 100644 index b31e06d..0000000 --- a/docs/WidgetApi.md +++ /dev/null @@ -1,94 +0,0 @@ -# ibutsu.WidgetApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getWidget**](WidgetApi.md#getWidget) | **GET** /widget/{id} | Generate data for a dashboard widget -[**getWidgetTypes**](WidgetApi.md#getWidgetTypes) | **GET** /widget/types | Get a list of widget types - - - -## getWidget - -> Object getWidget(id, opts) - -Generate data for a dashboard widget - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.WidgetApi(); -let id = "id_example"; // String | The widget identifier -let opts = { - 'params': null // Object | The parameters for the widget -}; -apiInstance.getWidget(id, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The widget identifier | - **params** | [**Object**](.md)| The parameters for the widget | [optional] - -### Return type - -**Object** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getWidgetTypes - -> WidgetTypeList getWidgetTypes() - -Get a list of widget types - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.WidgetApi(); -apiInstance.getWidgetTypes().then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**WidgetTypeList**](WidgetTypeList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - diff --git a/docs/WidgetConfig.md b/docs/WidgetConfig.md deleted file mode 100644 index 868ef11..0000000 --- a/docs/WidgetConfig.md +++ /dev/null @@ -1,15 +0,0 @@ -# ibutsu.WidgetConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | The internal ID of the WidgetConfig | [optional] -**type** | **String** | The type of widget, one of either \"widget\" or \"view\" | [optional] -**widget** | **String** | The widget to render, from the list at /widget/types | [optional] -**project** | **String** | The project for which the widget is designed | [optional] -**weight** | **Number** | The weighting for the widget, lower weight means it will display first | [optional] -**params** | [**Object**](.md) | A dictionary of parameters to send to the widget | [optional] -**title** | **String** | The title shown on the widget or page | [optional] - - diff --git a/docs/WidgetConfigApi.md b/docs/WidgetConfigApi.md deleted file mode 100644 index 7178541..0000000 --- a/docs/WidgetConfigApi.md +++ /dev/null @@ -1,237 +0,0 @@ -# ibutsu.WidgetConfigApi - -All URIs are relative to *http://localhost/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addWidgetConfig**](WidgetConfigApi.md#addWidgetConfig) | **POST** /widget-config | Create a widget configuration -[**deleteWidgetConfig**](WidgetConfigApi.md#deleteWidgetConfig) | **DELETE** /widget-config/{id} | Delete a widget configuration -[**getWidgetConfig**](WidgetConfigApi.md#getWidgetConfig) | **GET** /widget-config/{id} | Get a single widget configuration -[**getWidgetConfigList**](WidgetConfigApi.md#getWidgetConfigList) | **GET** /widget-config | Get the list of widget configurations -[**updateWidgetConfig**](WidgetConfigApi.md#updateWidgetConfig) | **PUT** /widget-config/{id} | Updates a single widget configuration - - - -## addWidgetConfig - -> WidgetConfig addWidgetConfig(opts) - -Create a widget configuration - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.WidgetConfigApi(); -let opts = { - 'widgetConfig': new ibutsu.WidgetConfig() // WidgetConfig | Widget configuration -}; -apiInstance.addWidgetConfig(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **widgetConfig** | [**WidgetConfig**](WidgetConfig.md)| Widget configuration | [optional] - -### Return type - -[**WidgetConfig**](WidgetConfig.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## deleteWidgetConfig - -> deleteWidgetConfig(id) - -Delete a widget configuration - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.WidgetConfigApi(); -let id = "id_example"; // String | ID of widget configuration to delete -apiInstance.deleteWidgetConfig(id).then(() => { - console.log('API called successfully.'); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of widget configuration to delete | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -## getWidgetConfig - -> WidgetConfig getWidgetConfig(id) - -Get a single widget configuration - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.WidgetConfigApi(); -let id = "id_example"; // String | ID of widget config to return -apiInstance.getWidgetConfig(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of widget config to return | - -### Return type - -[**WidgetConfig**](WidgetConfig.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getWidgetConfigList - -> WidgetConfigList getWidgetConfigList(opts) - -Get the list of widget configurations - -A list of widget configurations - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.WidgetConfigApi(); -let opts = { - 'filter': ["null"], // [String] | Fields to filter by - 'page': 56, // Number | Set the page of items to return, defaults to 1 - 'pageSize': 56 // Number | Set the number of items per page, defaults to 25 -}; -apiInstance.getWidgetConfigList(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **filter** | [**[String]**](String.md)| Fields to filter by | [optional] - **page** | **Number**| Set the page of items to return, defaults to 1 | [optional] - **pageSize** | **Number**| Set the number of items per page, defaults to 25 | [optional] - -### Return type - -[**WidgetConfigList**](WidgetConfigList.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## updateWidgetConfig - -> WidgetConfig updateWidgetConfig(id, opts) - -Updates a single widget configuration - -### Example - -```javascript -import ibutsu from '@ibutsu/client'; - -let apiInstance = new ibutsu.WidgetConfigApi(); -let id = "id_example"; // String | ID of widget configuration to update -let opts = { - 'widgetConfig': new ibutsu.WidgetConfig() // WidgetConfig | Widget configuration -}; -apiInstance.updateWidgetConfig(id, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| ID of widget configuration to update | - **widgetConfig** | [**WidgetConfig**](WidgetConfig.md)| Widget configuration | [optional] - -### Return type - -[**WidgetConfig**](WidgetConfig.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/WidgetConfigList.md b/docs/WidgetConfigList.md deleted file mode 100644 index 8b29b4a..0000000 --- a/docs/WidgetConfigList.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.WidgetConfigList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**widgets** | [**[WidgetConfig]**](WidgetConfig.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - - diff --git a/docs/WidgetParam.md b/docs/WidgetParam.md deleted file mode 100644 index 206d1da..0000000 --- a/docs/WidgetParam.md +++ /dev/null @@ -1,11 +0,0 @@ -# ibutsu.WidgetParam - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | The name of the parameter to supply to the widget | [optional] -**description** | **String** | A friendly description of the parameter | [optional] -**type** | **String** | The type of parameter (string, integer, etc) | [optional] - - diff --git a/docs/WidgetType.md b/docs/WidgetType.md deleted file mode 100644 index 6a388cf..0000000 --- a/docs/WidgetType.md +++ /dev/null @@ -1,12 +0,0 @@ -# ibutsu.WidgetType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | A unique identifier for this widget type | [optional] -**title** | **String** | The title of the widget, for users to see | [optional] -**description** | **String** | A helpful description of this widget type | [optional] -**params** | [**[WidgetParam]**](WidgetParam.md) | A dictionary or map of parameters to values | [optional] - - diff --git a/docs/WidgetTypeList.md b/docs/WidgetTypeList.md deleted file mode 100644 index 8d08e91..0000000 --- a/docs/WidgetTypeList.md +++ /dev/null @@ -1,10 +0,0 @@ -# ibutsu.WidgetTypeList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**types** | [**[WidgetType]**](WidgetType.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - - diff --git a/package.json b/package.json index 5a646e4..0d2d835 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ibutsu/client", - "version": "1.0.0", + "version": "1.0.1", "description": "A TypeScript client for the Ibutsu API", "license": "MIT", "main": "dist/index.js", diff --git a/src/ApiClient.js b/src/ApiClient.js deleted file mode 100644 index b3e43e2..0000000 --- a/src/ApiClient.js +++ /dev/null @@ -1,654 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import superagent from "superagent"; -import querystring from "querystring"; - -/** -* @module ApiClient -* @version 1.0.0 -*/ - -/** -* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an -* application to use this class directly - the *Api and model classes provide the public API for the service. The -* contents of this file should be regarded as internal but are documented for completeness. -* @alias module:ApiClient -* @class -*/ -class ApiClient { - constructor() { - /** - * The base URL against which to resolve every API call's (relative) path. - * @type {String} - * @default http://localhost/api - */ - this.basePath = 'http://localhost/api'.replace(/\/+$/, ''); - - /** - * The authentication methods to be included for all API calls. - * @type {Array.} - */ - this.authentications = { - 'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'} - } - - /** - * The default HTTP headers to be included for all API calls. - * @type {Array.} - * @default {} - */ - this.defaultHeaders = {}; - - /** - * The default HTTP timeout for all API calls. - * @type {Number} - * @default 60000 - */ - this.timeout = 60000; - - /** - * If set to false an additional timestamp parameter is added to all API GET calls to - * prevent browser caching - * @type {Boolean} - * @default true - */ - this.cache = true; - - /** - * If set to true, the client will save the cookies from each server - * response, and return them in the next request. - * @default false - */ - this.enableCookies = false; - - /* - * Used to save and return cookies in a node.js (non-browser) setting, - * if this.enableCookies is set to true. - */ - if (typeof window === 'undefined') { - this.agent = new superagent.agent(); - } - - /* - * Allow user to override superagent agent - */ - this.requestAgent = null; - - /* - * Allow user to add superagent plugins - */ - this.plugins = null; - - } - - /** - * Returns a string representation for an actual parameter. - * @param param The actual parameter. - * @returns {String} The string representation of param. - */ - paramToString(param) { - if (param == undefined || param == null) { - return ''; - } - if (param instanceof Date) { - return param.toJSON(); - } - - return param.toString(); - } - - /** - * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. - * NOTE: query parameters are not handled here. - * @param {String} path The path to append to the base URL. - * @param {Object} pathParams The parameter values to append. - * @param {String} apiBasePath Base path defined in the path, operation level to override the default one - * @returns {String} The encoded path with parameter values substituted. - */ - buildUrl(path, pathParams, apiBasePath) { - if (!path.match(/^\//)) { - path = '/' + path; - } - - var url = this.basePath + path; - - // use API (operation, path) base path if defined - if (apiBasePath !== null && apiBasePath !== undefined) { - url = apiBasePath + path; - } - - url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { - var value; - if (pathParams.hasOwnProperty(key)) { - value = this.paramToString(pathParams[key]); - } else { - value = fullMatch; - } - - return encodeURIComponent(value); - }); - - return url; - } - - /** - * Checks whether the given content type represents JSON.
- * JSON content type examples:
- *
    - *
  • application/json
  • - *
  • application/json; charset=UTF8
  • - *
  • APPLICATION/JSON
  • - *
- * @param {String} contentType The MIME content type to check. - * @returns {Boolean} true if contentType represents JSON, otherwise false. - */ - isJsonMime(contentType) { - return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); - } - - /** - * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. - * @param {Array.} contentTypes - * @returns {String} The chosen content type, preferring JSON. - */ - jsonPreferredMime(contentTypes) { - for (var i = 0; i < contentTypes.length; i++) { - if (this.isJsonMime(contentTypes[i])) { - return contentTypes[i]; - } - } - - return contentTypes[0]; - } - - /** - * Checks whether the given parameter value represents file-like content. - * @param param The parameter to check. - * @returns {Boolean} true if param represents a file. - */ - isFileParam(param) { - // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) - if (typeof require === 'function') { - let fs; - try { - fs = require('fs'); - } catch (err) {} - if (fs && fs.ReadStream && param instanceof fs.ReadStream) { - return true; - } - } - - // Buffer in Node.js - if (typeof Buffer === 'function' && param instanceof Buffer) { - return true; - } - - // Blob in browser - if (typeof Blob === 'function' && param instanceof Blob) { - return true; - } - - // File in browser (it seems File object is also instance of Blob, but keep this for safe) - if (typeof File === 'function' && param instanceof File) { - return true; - } - - return false; - } - - /** - * Normalizes parameter values: - *
    - *
  • remove nils
  • - *
  • keep files and arrays
  • - *
  • format to string with `paramToString` for other cases
  • - *
- * @param {Object.} params The parameters as object properties. - * @returns {Object.} normalized parameters. - */ - normalizeParams(params) { - var newParams = {}; - for (var key in params) { - if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { - var value = params[key]; - if (this.isFileParam(value) || Array.isArray(value)) { - newParams[key] = value; - } else { - newParams[key] = this.paramToString(value); - } - } - } - - return newParams; - } - - /** - * Builds a string representation of an array-type actual parameter, according to the given collection format. - * @param {Array} param An array parameter. - * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. - * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns - * param as is if collectionFormat is multi. - */ - buildCollectionParam(param, collectionFormat) { - if (param == null) { - return null; - } - switch (collectionFormat) { - case 'csv': - return param.map(this.paramToString).join(','); - case 'ssv': - return param.map(this.paramToString).join(' '); - case 'tsv': - return param.map(this.paramToString).join('\t'); - case 'pipes': - return param.map(this.paramToString).join('|'); - case 'multi': - //return the array directly as SuperAgent will handle it as expected - return param.map(this.paramToString); - default: - throw new Error('Unknown collection format: ' + collectionFormat); - } - } - - /** - * Applies authentication headers to the request. - * @param {Object} request The request object created by a superagent() call. - * @param {Array.} authNames An array of authentication method names. - */ - applyAuthToRequest(request, authNames) { - authNames.forEach((authName) => { - var auth = this.authentications[authName]; - switch (auth.type) { - case 'basic': - if (auth.username || auth.password) { - request.auth(auth.username || '', auth.password || ''); - } - - break; - case 'bearer': - if (auth.accessToken) { - request.set({'Authorization': 'Bearer ' + auth.accessToken}); - } - - break; - case 'apiKey': - if (auth.apiKey) { - var data = {}; - if (auth.apiKeyPrefix) { - data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; - } else { - data[auth.name] = auth.apiKey; - } - - if (auth['in'] === 'header') { - request.set(data); - } else { - request.query(data); - } - } - - break; - case 'oauth2': - if (auth.accessToken) { - request.set({'Authorization': 'Bearer ' + auth.accessToken}); - } - - break; - default: - throw new Error('Unknown authentication type: ' + auth.type); - } - }); - } - - /** - * Deserializes an HTTP response body into a value of the specified type. - * @param {Object} response A SuperAgent response object. - * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns A value of the specified type. - */ - deserialize(response, returnType) { - if (response == null || returnType == null || response.status == 204) { - return null; - } - - // Rely on SuperAgent for parsing response body. - // See http://visionmedia.github.io/superagent/#parsing-response-bodies - var data = response.body; - if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) { - // SuperAgent does not always produce a body; use the unparsed response as a fallback - data = response.text; - } - - return ApiClient.convertToType(data, returnType); - } - - - /** - * Invokes the REST service using the supplied settings and parameters. - * @param {String} path The base URL to invoke. - * @param {String} httpMethod The HTTP method to use. - * @param {Object.} pathParams A map of path parameters and their values. - * @param {Object.} queryParams A map of query parameters and their values. - * @param {Object.} headerParams A map of header parameters and their values. - * @param {Object.} formParams A map of form parameters and their values. - * @param {Object} bodyParam The value to pass as the request body. - * @param {Array.} authNames An array of authentication type names. - * @param {Array.} contentTypes An array of request MIME types. - * @param {Array.} accepts An array of acceptable response MIME types. - * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the - * constructor for a complex type. - * @param {String} apiBasePath base path defined in the operation/path level to override the default one - * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object. - */ - callApi(path, httpMethod, pathParams, - queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, - returnType, apiBasePath) { - - var url = this.buildUrl(path, pathParams, apiBasePath); - var request = superagent(httpMethod, url); - - if (this.plugins !== null) { - for (var index in this.plugins) { - if (this.plugins.hasOwnProperty(index)) { - request.use(this.plugins[index]) - } - } - } - - // apply authentications - this.applyAuthToRequest(request, authNames); - - // set query parameters - if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { - queryParams['_'] = new Date().getTime(); - } - - request.query(this.normalizeParams(queryParams)); - - // set header parameters - request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - - // set requestAgent if it is set by user - if (this.requestAgent) { - request.agent(this.requestAgent); - } - - // set request timeout - request.timeout(this.timeout); - - var contentType = this.jsonPreferredMime(contentTypes); - if (contentType) { - // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) - if(contentType != 'multipart/form-data') { - request.type(contentType); - } - } - - if (contentType === 'application/x-www-form-urlencoded') { - request.send(querystring.stringify(this.normalizeParams(formParams))); - } else if (contentType == 'multipart/form-data') { - var _formParams = this.normalizeParams(formParams); - for (var key in _formParams) { - if (_formParams.hasOwnProperty(key)) { - if (this.isFileParam(_formParams[key])) { - // file field - request.attach(key, _formParams[key]); - } else { - request.field(key, _formParams[key]); - } - } - } - } else if (bodyParam !== null && bodyParam !== undefined) { - if (!request.header['Content-Type']) { - request.type('application/json'); - } - request.send(bodyParam); - } - - var accept = this.jsonPreferredMime(accepts); - if (accept) { - request.accept(accept); - } - - if (returnType === 'Blob') { - request.responseType('blob'); - } else if (returnType === 'String') { - request.responseType('string'); - } - - // Attach previously saved cookies, if enabled - if (this.enableCookies){ - if (typeof window === 'undefined') { - this.agent._attachCookies(request); - } - else { - request.withCredentials(); - } - } - - return new Promise((resolve, reject) => { - request.end((error, response) => { - if (error) { - var err = {}; - if (response) { - err.status = response.status; - err.statusText = response.statusText; - err.body = response.body; - err.response = response; - } - err.error = error; - - reject(err); - } else { - try { - var data = this.deserialize(response, returnType); - if (this.enableCookies && typeof window === 'undefined'){ - this.agent._saveCookies(response); - } - - resolve({data, response}); - } catch (err) { - reject(err); - } - } - }); - }); - - } - - /** - * Parses an ISO-8601 string representation of a date value. - * @param {String} str The date value as a string. - * @returns {Date} The parsed date object. - */ - static parseDate(str) { - return new Date(str); - } - - /** - * Converts a value to the specified type. - * @param {(String|Object)} data The data to convert, as a string or object. - * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns An instance of the specified type or null or undefined if data is null or undefined. - */ - static convertToType(data, type) { - if (data === null || data === undefined) - return data - - switch (type) { - case 'Boolean': - return Boolean(data); - case 'Integer': - return parseInt(data, 10); - case 'Number': - return parseFloat(data); - case 'String': - return String(data); - case 'Date': - return ApiClient.parseDate(String(data)); - case 'Blob': - return data; - default: - if (type === Object) { - // generic object, return directly - return data; - } else if (typeof type.constructFromObject === 'function') { - // for model type like User and enum class - return type.constructFromObject(data); - } else if (Array.isArray(type)) { - // for array type like: ['String'] - var itemType = type[0]; - - return data.map((item) => { - return ApiClient.convertToType(item, itemType); - }); - } else if (typeof type === 'object') { - // for plain object type like: {'String': 'Integer'} - var keyType, valueType; - for (var k in type) { - if (type.hasOwnProperty(k)) { - keyType = k; - valueType = type[k]; - break; - } - } - - var result = {}; - for (var k in data) { - if (data.hasOwnProperty(k)) { - var key = ApiClient.convertToType(k, keyType); - var value = ApiClient.convertToType(data[k], valueType); - result[key] = value; - } - } - - return result; - } else { - // for unknown type, return the data directly - return data; - } - } - } - - /** - * Gets an array of host settings - * @returns An array of host settings - */ - hostSettings() { - return [ - { - 'url': "/api", - 'description': "No description provided", - } - ]; - } - - getBasePathFromSettings(index, variables={}) { - var servers = this.hostSettings(); - - // check array index out of bound - if (index < 0 || index >= servers.length) { - throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length); - } - - var server = servers[index]; - var url = server['url']; - - // go through variable and assign a value - for (var variable_name in server['variables']) { - if (variable_name in variables) { - let variable = server['variables'][variable_name]; - if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) { - url = url.replace("{" + variable_name + "}", variables[variable_name]); - } else { - throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + "."); - } - } else { - // use default value - url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']) - } - } - return url; - } - - /** - * Constructs a new map or array model from REST data. - * @param data {Object|Array} The REST data. - * @param obj {Object|Array} The target object or array. - */ - static constructFromObject(data, obj, itemType) { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - if (data.hasOwnProperty(i)) - obj[i] = ApiClient.convertToType(data[i], itemType); - } - } else { - for (var k in data) { - if (data.hasOwnProperty(k)) - obj[k] = ApiClient.convertToType(data[k], itemType); - } - } - }; -} - -/** - * Enumeration of collection format separator strategies. - * @enum {String} - * @readonly - */ -ApiClient.CollectionFormatEnum = { - /** - * Comma-separated values. Value: csv - * @const - */ - CSV: ',', - - /** - * Space-separated values. Value: ssv - * @const - */ - SSV: ' ', - - /** - * Tab-separated values. Value: tsv - * @const - */ - TSV: '\t', - - /** - * Pipe(|)-separated values. Value: pipes - * @const - */ - PIPES: '|', - - /** - * Native array. Value: multi - * @const - */ - MULTI: 'multi' -}; - -/** -* The default API client implementation. -* @type {module:ApiClient} -*/ -ApiClient.instance = new ApiClient(); -export default ApiClient; diff --git a/src/api/ArtifactApi.js b/src/api/ArtifactApi.js deleted file mode 100644 index 396c93a..0000000 --- a/src/api/ArtifactApi.js +++ /dev/null @@ -1,340 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import Artifact from '../model/Artifact'; -import ArtifactList from '../model/ArtifactList'; - -/** -* Artifact service. -* @module api/ArtifactApi -* @version 1.0.0 -*/ -export default class ArtifactApi { - - /** - * Constructs a new ArtifactApi. - * @alias module:api/ArtifactApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Delete an artifact - * @param {String} id ID of artifact to delete - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response - */ - deleteArtifactWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteArtifact"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = []; - let returnType = null; - return this.apiClient.callApi( - '/artifact/{id}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Delete an artifact - * @param {String} id ID of artifact to delete - * @return {Promise} a {@link https://www.promisejs.org/|Promise} - */ - deleteArtifact(id) { - return this.deleteArtifactWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Download an artifact - * @param {String} id ID of artifact to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response - */ - downloadArtifactWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling downloadArtifact"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['text/plain', 'image/jpeg', 'image/png', 'image/gif', 'application/octet-stream']; - let returnType = File; - return this.apiClient.callApi( - '/artifact/{id}/download', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Download an artifact - * @param {String} id ID of artifact to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File} - */ - downloadArtifact(id) { - return this.downloadArtifactWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a single artifact - * @param {String} id ID of artifact to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Artifact} and HTTP response - */ - getArtifactWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getArtifact"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Artifact; - return this.apiClient.callApi( - '/artifact/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a single artifact - * @param {String} id ID of artifact to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Artifact} - */ - getArtifact(id) { - return this.getArtifactWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a (filtered) list of artifacts - * @param {Object} opts Optional parameters - * @param {String} opts.resultId The result ID to filter by - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArtifactList} and HTTP response - */ - getArtifactListWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'resultId': opts['resultId'], - 'page': opts['page'], - 'pageSize': opts['pageSize'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ArtifactList; - return this.apiClient.callApi( - '/artifact', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a (filtered) list of artifacts - * @param {Object} opts Optional parameters - * @param {String} opts.resultId The result ID to filter by - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArtifactList} - */ - getArtifactList(opts) { - return this.getArtifactListWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Uploads a test run artifact - * @param {String} resultId ID of result to attach artifact to - * @param {String} filename ID of pet to update - * @param {File} file file to upload - * @param {Object} opts Optional parameters - * @param {Object} opts.additionalMetadata Additional data to pass to server - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Artifact} and HTTP response - */ - uploadArtifactWithHttpInfo(resultId, filename, file, opts) { - opts = opts || {}; - let postBody = null; - // verify the required parameter 'resultId' is set - if (resultId === undefined || resultId === null) { - throw new Error("Missing the required parameter 'resultId' when calling uploadArtifact"); - } - // verify the required parameter 'filename' is set - if (filename === undefined || filename === null) { - throw new Error("Missing the required parameter 'filename' when calling uploadArtifact"); - } - // verify the required parameter 'file' is set - if (file === undefined || file === null) { - throw new Error("Missing the required parameter 'file' when calling uploadArtifact"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - 'resultId': resultId, - 'filename': filename, - 'file': file, - 'additionalMetadata': opts['additionalMetadata'] - }; - - let authNames = []; - let contentTypes = ['multipart/form-data']; - let accepts = ['application/json']; - let returnType = Artifact; - return this.apiClient.callApi( - '/artifact', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Uploads a test run artifact - * @param {String} resultId ID of result to attach artifact to - * @param {String} filename ID of pet to update - * @param {File} file file to upload - * @param {Object} opts Optional parameters - * @param {Object} opts.additionalMetadata Additional data to pass to server - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Artifact} - */ - uploadArtifact(resultId, filename, file, opts) { - return this.uploadArtifactWithHttpInfo(resultId, filename, file, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Stream an artifact directly to the client/browser - * @param {String} id ID of artifact to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response - */ - viewArtifactWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling viewArtifact"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['text/plain', 'image/jpeg', 'image/png', 'image/gif', 'application/octet-stream']; - let returnType = File; - return this.apiClient.callApi( - '/artifact/{id}/view', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Stream an artifact directly to the client/browser - * @param {String} id ID of artifact to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File} - */ - viewArtifact(id) { - return this.viewArtifactWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/GroupApi.js b/src/api/GroupApi.js deleted file mode 100644 index b9ac4d3..0000000 --- a/src/api/GroupApi.js +++ /dev/null @@ -1,230 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import Group from '../model/Group'; -import GroupList from '../model/GroupList'; - -/** -* Group service. -* @module api/GroupApi -* @version 1.0.0 -*/ -export default class GroupApi { - - /** - * Constructs a new GroupApi. - * @alias module:api/GroupApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Create a new group - * @param {module:model/Group} group The group - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Group} and HTTP response - */ - addGroupWithHttpInfo(group) { - let postBody = group; - // verify the required parameter 'group' is set - if (group === undefined || group === null) { - throw new Error("Missing the required parameter 'group' when calling addGroup"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Group; - return this.apiClient.callApi( - '/group', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Create a new group - * @param {module:model/Group} group The group - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Group} - */ - addGroup(group) { - return this.addGroupWithHttpInfo(group) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a group - * @param {String} id The ID of the group - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Group} and HTTP response - */ - getGroupWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getGroup"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Group; - return this.apiClient.callApi( - '/group/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a group - * @param {String} id The ID of the group - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Group} - */ - getGroup(id) { - return this.getGroupWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a list of groups - * @param {Object} opts Optional parameters - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupList} and HTTP response - */ - getGroupListWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'page': opts['page'], - 'pageSize': opts['pageSize'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = GroupList; - return this.apiClient.callApi( - '/group', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a list of groups - * @param {Object} opts Optional parameters - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupList} - */ - getGroupList(opts) { - return this.getGroupListWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Update a group - * @param {String} id The ID of the group - * @param {module:model/Group} group The updated group - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Group} and HTTP response - */ - updateGroupWithHttpInfo(id, group) { - let postBody = group; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling updateGroup"); - } - // verify the required parameter 'group' is set - if (group === undefined || group === null) { - throw new Error("Missing the required parameter 'group' when calling updateGroup"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Group; - return this.apiClient.callApi( - '/group/{id}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Update a group - * @param {String} id The ID of the group - * @param {module:model/Group} group The updated group - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Group} - */ - updateGroup(id, group) { - return this.updateGroupWithHttpInfo(id, group) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/HealthApi.js b/src/api/HealthApi.js deleted file mode 100644 index e6dcdcc..0000000 --- a/src/api/HealthApi.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import Health from '../model/Health'; -import HealthInfo from '../model/HealthInfo'; - -/** -* Health service. -* @module api/HealthApi -* @version 1.0.0 -*/ -export default class HealthApi { - - /** - * Constructs a new HealthApi. - * @alias module:api/HealthApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Get a health report for the database - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Health} and HTTP response - */ - getDatabaseHealthWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Health; - return this.apiClient.callApi( - '/health/database', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a health report for the database - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Health} - */ - getDatabaseHealth() { - return this.getDatabaseHealthWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a general health report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Health} and HTTP response - */ - getHealthWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Health; - return this.apiClient.callApi( - '/health', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a general health report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Health} - */ - getHealth() { - return this.getHealthWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get information about the server - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/HealthInfo} and HTTP response - */ - getHealthInfoWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = HealthInfo; - return this.apiClient.callApi( - '/health/info', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get information about the server - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/HealthInfo} - */ - getHealthInfo() { - return this.getHealthInfoWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/ImportApi.js b/src/api/ImportApi.js deleted file mode 100644 index 02b008f..0000000 --- a/src/api/ImportApi.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import ModelImport from '../model/ModelImport'; - -/** -* Import service. -* @module api/ImportApi -* @version 1.0.0 -*/ -export default class ImportApi { - - /** - * Constructs a new ImportApi. - * @alias module:api/ImportApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive - * @param {File} importFile The file to import - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelImport} and HTTP response - */ - addImportWithHttpInfo(importFile) { - let postBody = null; - // verify the required parameter 'importFile' is set - if (importFile === undefined || importFile === null) { - throw new Error("Missing the required parameter 'importFile' when calling addImport"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - 'importFile': importFile - }; - - let authNames = []; - let contentTypes = ['multipart/form-data']; - let accepts = ['application/json']; - let returnType = ModelImport; - return this.apiClient.callApi( - '/import', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive - * @param {File} importFile The file to import - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelImport} - */ - addImport(importFile) { - return this.addImportWithHttpInfo(importFile) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get the status of an import - * @param {String} id The ID of the import - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelImport} and HTTP response - */ - getImportWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getImport"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ModelImport; - return this.apiClient.callApi( - '/import/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get the status of an import - * @param {String} id The ID of the import - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelImport} - */ - getImport(id) { - return this.getImportWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/ProjectApi.js b/src/api/ProjectApi.js deleted file mode 100644 index 7ba3bbb..0000000 --- a/src/api/ProjectApi.js +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import Project from '../model/Project'; -import ProjectList from '../model/ProjectList'; - -/** -* Project service. -* @module api/ProjectApi -* @version 1.0.0 -*/ -export default class ProjectApi { - - /** - * Constructs a new ProjectApi. - * @alias module:api/ProjectApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Create a project - * @param {module:model/Project} project Project - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response - */ - addProjectWithHttpInfo(project) { - let postBody = project; - // verify the required parameter 'project' is set - if (project === undefined || project === null) { - throw new Error("Missing the required parameter 'project' when calling addProject"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Project; - return this.apiClient.callApi( - '/project', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Create a project - * @param {module:model/Project} project Project - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project} - */ - addProject(project) { - return this.addProjectWithHttpInfo(project) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a single project by ID - * @param {String} id ID of test project - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response - */ - getProjectWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getProject"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Project; - return this.apiClient.callApi( - '/project/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a single project by ID - * @param {String} id ID of test project - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project} - */ - getProject(id) { - return this.getProjectWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a list of projects - * @param {Object} opts Optional parameters - * @param {String} opts.ownerId Filter projects by owner ID - * @param {String} opts.groupId Filter projects by group ID - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ProjectList} and HTTP response - */ - getProjectListWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'ownerId': opts['ownerId'], - 'groupId': opts['groupId'], - 'page': opts['page'], - 'pageSize': opts['pageSize'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ProjectList; - return this.apiClient.callApi( - '/project', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a list of projects - * @param {Object} opts Optional parameters - * @param {String} opts.ownerId Filter projects by owner ID - * @param {String} opts.groupId Filter projects by group ID - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProjectList} - */ - getProjectList(opts) { - return this.getProjectListWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Update a project - * @param {String} id ID of test project - * @param {Object} opts Optional parameters - * @param {module:model/Project} opts.project Project - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response - */ - updateProjectWithHttpInfo(id, opts) { - opts = opts || {}; - let postBody = opts['project']; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling updateProject"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Project; - return this.apiClient.callApi( - '/project/{id}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Update a project - * @param {String} id ID of test project - * @param {Object} opts Optional parameters - * @param {module:model/Project} opts.project Project - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project} - */ - updateProject(id, opts) { - return this.updateProjectWithHttpInfo(id, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/ReportApi.js b/src/api/ReportApi.js deleted file mode 100644 index ce52063..0000000 --- a/src/api/ReportApi.js +++ /dev/null @@ -1,374 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import InlineResponse200 from '../model/InlineResponse200'; -import Report from '../model/Report'; -import ReportList from '../model/ReportList'; -import ReportParameters from '../model/ReportParameters'; - -/** -* Report service. -* @module api/ReportApi -* @version 1.0.0 -*/ -export default class ReportApi { - - /** - * Constructs a new ReportApi. - * @alias module:api/ReportApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Create a new report - * @param {module:model/ReportParameters} reportParameters The parameters for the report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Report} and HTTP response - */ - addReportWithHttpInfo(reportParameters) { - let postBody = reportParameters; - // verify the required parameter 'reportParameters' is set - if (reportParameters === undefined || reportParameters === null) { - throw new Error("Missing the required parameter 'reportParameters' when calling addReport"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Report; - return this.apiClient.callApi( - '/report', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Create a new report - * @param {module:model/ReportParameters} reportParameters The parameters for the report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Report} - */ - addReport(reportParameters) { - return this.addReportWithHttpInfo(reportParameters) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Delete a report - * @param {String} id ID of report to delete - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response - */ - deleteReportWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteReport"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = []; - let returnType = null; - return this.apiClient.callApi( - '/report/{id}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Delete a report - * @param {String} id ID of report to delete - * @return {Promise} a {@link https://www.promisejs.org/|Promise} - */ - deleteReport(id) { - return this.deleteReportWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Download a report - * @param {String} id The ID of the report - * @param {String} filename The file name of the downloadable report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response - */ - downloadReportWithHttpInfo(id, filename) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling downloadReport"); - } - // verify the required parameter 'filename' is set - if (filename === undefined || filename === null) { - throw new Error("Missing the required parameter 'filename' when calling downloadReport"); - } - - let pathParams = { - 'id': id, - 'filename': filename - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['text/plain', 'application/csv', 'application/json', 'text/html', 'application/zip']; - let returnType = File; - return this.apiClient.callApi( - '/report/{id}/download/{filename}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Download a report - * @param {String} id The ID of the report - * @param {String} filename The file name of the downloadable report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File} - */ - downloadReport(id, filename) { - return this.downloadReportWithHttpInfo(id, filename) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a report - * @param {String} id The ID of the report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Report} and HTTP response - */ - getReportWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getReport"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Report; - return this.apiClient.callApi( - '/report/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a report - * @param {String} id The ID of the report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Report} - */ - getReport(id) { - return this.getReportWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a list of reports - * @param {Object} opts Optional parameters - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @param {String} opts.project Filter reports by project ID - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ReportList} and HTTP response - */ - getReportListWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'page': opts['page'], - 'pageSize': opts['pageSize'], - 'project': opts['project'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ReportList; - return this.apiClient.callApi( - '/report', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a list of reports - * @param {Object} opts Optional parameters - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @param {String} opts.project Filter reports by project ID - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ReportList} - */ - getReportList(opts) { - return this.getReportListWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a list of report types - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response - */ - getReportTypesWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = [InlineResponse200]; - return this.apiClient.callApi( - '/report/types', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a list of report types - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} - */ - getReportTypes() { - return this.getReportTypesWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * View a report - * @param {String} id The ID of the report - * @param {String} filename The file name of the downloadable report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response - */ - viewReportWithHttpInfo(id, filename) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling viewReport"); - } - // verify the required parameter 'filename' is set - if (filename === undefined || filename === null) { - throw new Error("Missing the required parameter 'filename' when calling viewReport"); - } - - let pathParams = { - 'id': id, - 'filename': filename - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['text/plain', 'application/csv', 'application/json', 'text/html', 'application/zip']; - let returnType = File; - return this.apiClient.callApi( - '/report/{id}/view/{filename}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * View a report - * @param {String} id The ID of the report - * @param {String} filename The file name of the downloadable report - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File} - */ - viewReport(id, filename) { - return this.viewReportWithHttpInfo(id, filename) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/ResultApi.js b/src/api/ResultApi.js deleted file mode 100644 index cf2a93c..0000000 --- a/src/api/ResultApi.js +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import Result from '../model/Result'; -import ResultList from '../model/ResultList'; - -/** -* Result service. -* @module api/ResultApi -* @version 1.0.0 -*/ -export default class ResultApi { - - /** - * Constructs a new ResultApi. - * @alias module:api/ResultApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Create a test result - * @param {Object} opts Optional parameters - * @param {module:model/Result} opts.result Result item - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Result} and HTTP response - */ - addResultWithHttpInfo(opts) { - opts = opts || {}; - let postBody = opts['result']; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Result; - return this.apiClient.callApi( - '/result', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Create a test result - * @param {Object} opts Optional parameters - * @param {module:model/Result} opts.result Result item - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Result} - */ - addResult(opts) { - return this.addResultWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a single result - * @param {String} id ID of pet to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Result} and HTTP response - */ - getResultWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getResult"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Result; - return this.apiClient.callApi( - '/result/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a single result - * @param {String} id ID of pet to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Result} - */ - getResult(id) { - return this.getResultWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get the list of results. - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - * @param {Object} opts Optional parameters - * @param {Array.} opts.filter Fields to filter by - * @param {Boolean} opts.applyMax Use a max to limit documents returned - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResultList} and HTTP response - */ - getResultListWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'filter': this.apiClient.buildCollectionParam(opts['filter'], 'multi'), - 'apply_max': opts['applyMax'], - 'page': opts['page'], - 'pageSize': opts['pageSize'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ResultList; - return this.apiClient.callApi( - '/result', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get the list of results. - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - * @param {Object} opts Optional parameters - * @param {Array.} opts.filter Fields to filter by - * @param {Boolean} opts.applyMax Use a max to limit documents returned - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResultList} - */ - getResultList(opts) { - return this.getResultListWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Updates a single result - * @param {String} id ID of result to update - * @param {Object} opts Optional parameters - * @param {module:model/Result} opts.result Result item - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Result} and HTTP response - */ - updateResultWithHttpInfo(id, opts) { - opts = opts || {}; - let postBody = opts['result']; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling updateResult"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Result; - return this.apiClient.callApi( - '/result/{id}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Updates a single result - * @param {String} id ID of result to update - * @param {Object} opts Optional parameters - * @param {module:model/Result} opts.result Result item - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Result} - */ - updateResult(id, opts) { - return this.updateResultWithHttpInfo(id, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/RunApi.js b/src/api/RunApi.js deleted file mode 100644 index 790a1c9..0000000 --- a/src/api/RunApi.js +++ /dev/null @@ -1,234 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import Run from '../model/Run'; -import RunList from '../model/RunList'; - -/** -* Run service. -* @module api/RunApi -* @version 1.0.0 -*/ -export default class RunApi { - - /** - * Constructs a new RunApi. - * @alias module:api/RunApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Create a run - * @param {Object} opts Optional parameters - * @param {module:model/Run} opts.run Run item - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Run} and HTTP response - */ - addRunWithHttpInfo(opts) { - opts = opts || {}; - let postBody = opts['run']; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Run; - return this.apiClient.callApi( - '/run', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Create a run - * @param {Object} opts Optional parameters - * @param {module:model/Run} opts.run Run item - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Run} - */ - addRun(opts) { - return this.addRunWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a single run by ID - * @param {String} id ID of test run - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Run} and HTTP response - */ - getRunWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getRun"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Run; - return this.apiClient.callApi( - '/run/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a single run by ID - * @param {String} id ID of test run - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Run} - */ - getRun(id) { - return this.getRunWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a list of the test runs - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - * @param {Object} opts Optional parameters - * @param {Array.} opts.filter Fields to filter by - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RunList} and HTTP response - */ - getRunListWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'filter': this.apiClient.buildCollectionParam(opts['filter'], 'multi'), - 'page': opts['page'], - 'pageSize': opts['pageSize'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = RunList; - return this.apiClient.callApi( - '/run', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a list of the test runs - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB's query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - * @param {Object} opts Optional parameters - * @param {Array.} opts.filter Fields to filter by - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RunList} - */ - getRunList(opts) { - return this.getRunListWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Update a single run - * @param {String} id ID of the test run - * @param {module:model/Run} run The updated test run - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Run} and HTTP response - */ - updateRunWithHttpInfo(id, run) { - let postBody = run; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling updateRun"); - } - // verify the required parameter 'run' is set - if (run === undefined || run === null) { - throw new Error("Missing the required parameter 'run' when calling updateRun"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = Run; - return this.apiClient.callApi( - '/run/{id}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Update a single run - * @param {String} id ID of the test run - * @param {module:model/Run} run The updated test run - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Run} - */ - updateRun(id, run) { - return this.updateRunWithHttpInfo(id, run) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/WidgetApi.js b/src/api/WidgetApi.js deleted file mode 100644 index fef25a7..0000000 --- a/src/api/WidgetApi.js +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import WidgetTypeList from '../model/WidgetTypeList'; - -/** -* Widget service. -* @module api/WidgetApi -* @version 1.0.0 -*/ -export default class WidgetApi { - - /** - * Constructs a new WidgetApi. - * @alias module:api/WidgetApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Generate data for a dashboard widget - * @param {String} id The widget identifier - * @param {Object} opts Optional parameters - * @param {Object} opts.params The parameters for the widget - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response - */ - getWidgetWithHttpInfo(id, opts) { - opts = opts || {}; - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getWidget"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - 'params': opts['params'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = Object; - return this.apiClient.callApi( - '/widget/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Generate data for a dashboard widget - * @param {String} id The widget identifier - * @param {Object} opts Optional parameters - * @param {Object} opts.params The parameters for the widget - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object} - */ - getWidget(id, opts) { - return this.getWidgetWithHttpInfo(id, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a list of widget types - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WidgetTypeList} and HTTP response - */ - getWidgetTypesWithHttpInfo() { - let postBody = null; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = WidgetTypeList; - return this.apiClient.callApi( - '/widget/types', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a list of widget types - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WidgetTypeList} - */ - getWidgetTypes() { - return this.getWidgetTypesWithHttpInfo() - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/api/WidgetConfigApi.js b/src/api/WidgetConfigApi.js deleted file mode 100644 index e0f8a91..0000000 --- a/src/api/WidgetConfigApi.js +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import WidgetConfig from '../model/WidgetConfig'; -import WidgetConfigList from '../model/WidgetConfigList'; - -/** -* WidgetConfig service. -* @module api/WidgetConfigApi -* @version 1.0.0 -*/ -export default class WidgetConfigApi { - - /** - * Constructs a new WidgetConfigApi. - * @alias module:api/WidgetConfigApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - - /** - * Create a widget configuration - * @param {Object} opts Optional parameters - * @param {module:model/WidgetConfig} opts.widgetConfig Widget configuration - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WidgetConfig} and HTTP response - */ - addWidgetConfigWithHttpInfo(opts) { - opts = opts || {}; - let postBody = opts['widgetConfig']; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = WidgetConfig; - return this.apiClient.callApi( - '/widget-config', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Create a widget configuration - * @param {Object} opts Optional parameters - * @param {module:model/WidgetConfig} opts.widgetConfig Widget configuration - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WidgetConfig} - */ - addWidgetConfig(opts) { - return this.addWidgetConfigWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Delete a widget configuration - * @param {String} id ID of widget configuration to delete - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response - */ - deleteWidgetConfigWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteWidgetConfig"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = []; - let returnType = null; - return this.apiClient.callApi( - '/widget-config/{id}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Delete a widget configuration - * @param {String} id ID of widget configuration to delete - * @return {Promise} a {@link https://www.promisejs.org/|Promise} - */ - deleteWidgetConfig(id) { - return this.deleteWidgetConfigWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get a single widget configuration - * @param {String} id ID of widget config to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WidgetConfig} and HTTP response - */ - getWidgetConfigWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getWidgetConfig"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = WidgetConfig; - return this.apiClient.callApi( - '/widget-config/{id}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get a single widget configuration - * @param {String} id ID of widget config to return - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WidgetConfig} - */ - getWidgetConfig(id) { - return this.getWidgetConfigWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Get the list of widget configurations - * A list of widget configurations - * @param {Object} opts Optional parameters - * @param {Array.} opts.filter Fields to filter by - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WidgetConfigList} and HTTP response - */ - getWidgetConfigListWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'filter': this.apiClient.buildCollectionParam(opts['filter'], 'multi'), - 'page': opts['page'], - 'pageSize': opts['pageSize'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = WidgetConfigList; - return this.apiClient.callApi( - '/widget-config', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get the list of widget configurations - * A list of widget configurations - * @param {Object} opts Optional parameters - * @param {Array.} opts.filter Fields to filter by - * @param {Number} opts.page Set the page of items to return, defaults to 1 - * @param {Number} opts.pageSize Set the number of items per page, defaults to 25 - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WidgetConfigList} - */ - getWidgetConfigList(opts) { - return this.getWidgetConfigListWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Updates a single widget configuration - * @param {String} id ID of widget configuration to update - * @param {Object} opts Optional parameters - * @param {module:model/WidgetConfig} opts.widgetConfig Widget configuration - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WidgetConfig} and HTTP response - */ - updateWidgetConfigWithHttpInfo(id, opts) { - opts = opts || {}; - let postBody = opts['widgetConfig']; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling updateWidgetConfig"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = []; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = WidgetConfig; - return this.apiClient.callApi( - '/widget-config/{id}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Updates a single widget configuration - * @param {String} id ID of widget configuration to update - * @param {Object} opts Optional parameters - * @param {module:model/WidgetConfig} opts.widgetConfig Widget configuration - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WidgetConfig} - */ - updateWidgetConfig(id, opts) { - return this.updateWidgetConfigWithHttpInfo(id, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - -} diff --git a/src/apis/AdminProjectManagementApi.ts b/src/apis/AdminProjectManagementApi.ts new file mode 100644 index 0000000..01e68f1 --- /dev/null +++ b/src/apis/AdminProjectManagementApi.ts @@ -0,0 +1,369 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Project, + ProjectList, +} from '../models/index'; +import { + ProjectFromJSON, + ProjectToJSON, + ProjectListFromJSON, + ProjectListToJSON, +} from '../models/index'; + +export interface AdminAddProjectRequest { + project?: Project; +} + +export interface AdminDeleteProjectRequest { + id: string; +} + +export interface AdminGetProjectRequest { + id: string; +} + +export interface AdminGetProjectListRequest { + filter?: Array; + page?: number; + pageSize?: number; +} + +export interface AdminUpdateProjectRequest { + id: string; + project?: Project; +} + +/** + * AdminProjectManagementApi - interface + * + * @export + * @interface AdminProjectManagementApiInterface + */ +export interface AdminProjectManagementApiInterface { + /** + * + * @summary Administration endpoint to manually add a project. Only accessible to superadmins. + * @param {Project} [project] A project object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminAddProjectRaw(requestParameters: AdminAddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to manually add a project. Only accessible to superadmins. + */ + adminAddProject(requestParameters: AdminAddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Administration endpoint to delete a project. Only accessible to superadmins. + * @param {string} id The ID of the project to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminDeleteProjectRaw(requestParameters: AdminDeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to delete a project. Only accessible to superadmins. + */ + adminDeleteProject(requestParameters: AdminDeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Administration endpoint to return a project. Only accessible to superadmins. + * @param {string} id The id of a project + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminGetProjectRaw(requestParameters: AdminGetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to return a project. Only accessible to superadmins. + */ + adminGetProject(requestParameters: AdminGetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Administration endpoint to return a list of projects. Only accessible to superadmins. + * @param {Array} [filter] Fields to filter by + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminGetProjectListRaw(requestParameters: AdminGetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to return a list of projects. Only accessible to superadmins. + */ + adminGetProjectList(requestParameters: AdminGetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Administration endpoint to update a project. Only accessible to superadmins. + * @param {string} id The ID of the project to update + * @param {Project} [project] A project object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminUpdateProjectRaw(requestParameters: AdminUpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to update a project. Only accessible to superadmins. + */ + adminUpdateProject(requestParameters: AdminUpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class AdminProjectManagementApi extends runtime.BaseAPI implements AdminProjectManagementApiInterface { + + /** + * Administration endpoint to manually add a project. Only accessible to superadmins. + */ + async adminAddProjectRaw(requestParameters: AdminAddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/project`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ProjectToJSON(requestParameters['project']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Administration endpoint to manually add a project. Only accessible to superadmins. + */ + async adminAddProject(requestParameters: AdminAddProjectRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminAddProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to delete a project. Only accessible to superadmins. + */ + async adminDeleteProjectRaw(requestParameters: AdminDeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminDeleteProject().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/project/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Administration endpoint to delete a project. Only accessible to superadmins. + */ + async adminDeleteProject(requestParameters: AdminDeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.adminDeleteProjectRaw(requestParameters, initOverrides); + } + + /** + * Administration endpoint to return a project. Only accessible to superadmins. + */ + async adminGetProjectRaw(requestParameters: AdminGetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminGetProject().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/project/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Administration endpoint to return a project. Only accessible to superadmins. + */ + async adminGetProject(requestParameters: AdminGetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminGetProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to return a list of projects. Only accessible to superadmins. + */ + async adminGetProjectListRaw(requestParameters: AdminGetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/project`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectListFromJSON(jsonValue)); + } + + /** + * Administration endpoint to return a list of projects. Only accessible to superadmins. + */ + async adminGetProjectList(requestParameters: AdminGetProjectListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminGetProjectListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to update a project. Only accessible to superadmins. + */ + async adminUpdateProjectRaw(requestParameters: AdminUpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminUpdateProject().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/project/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ProjectToJSON(requestParameters['project']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Administration endpoint to update a project. Only accessible to superadmins. + */ + async adminUpdateProject(requestParameters: AdminUpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminUpdateProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/AdminUserManagementApi.ts b/src/apis/AdminUserManagementApi.ts new file mode 100644 index 0000000..e3cccbe --- /dev/null +++ b/src/apis/AdminUserManagementApi.ts @@ -0,0 +1,369 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + User, + UserList, +} from '../models/index'; +import { + UserFromJSON, + UserToJSON, + UserListFromJSON, + UserListToJSON, +} from '../models/index'; + +export interface AdminAddUserRequest { + user?: User; +} + +export interface AdminDeleteUserRequest { + id: string; +} + +export interface AdminGetUserRequest { + id: string; +} + +export interface AdminGetUserListRequest { + filter?: Array; + page?: number; + pageSize?: number; +} + +export interface AdminUpdateUserRequest { + id: string; + user?: User; +} + +/** + * AdminUserManagementApi - interface + * + * @export + * @interface AdminUserManagementApiInterface + */ +export interface AdminUserManagementApiInterface { + /** + * + * @summary Administration endpoint to manually add a user. Only accessible to superadmins. + * @param {User} [user] A user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminAddUserRaw(requestParameters: AdminAddUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to manually add a user. Only accessible to superadmins. + */ + adminAddUser(requestParameters: AdminAddUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Administration endpoint to delete a user. Only accessible to superadmins. + * @param {string} id The ID of the user to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminDeleteUserRaw(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to delete a user. Only accessible to superadmins. + */ + adminDeleteUser(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Administration endpoint to return a user. Only accessible to superadmins. + * @param {string} id The id of a user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminGetUserRaw(requestParameters: AdminGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to return a user. Only accessible to superadmins. + */ + adminGetUser(requestParameters: AdminGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Administration endpoint to return a list of users. Only accessible to superadmins. + * @param {Array} [filter] Fields to filter by + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminGetUserListRaw(requestParameters: AdminGetUserListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to return a list of users. Only accessible to superadmins. + */ + adminGetUserList(requestParameters: AdminGetUserListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Administration endpoint to update a user. Only accessible to superadmins. + * @param {string} id The ID of the user to update + * @param {User} [user] A user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminUpdateUserRaw(requestParameters: AdminUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Administration endpoint to update a user. Only accessible to superadmins. + */ + adminUpdateUser(requestParameters: AdminUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class AdminUserManagementApi extends runtime.BaseAPI implements AdminUserManagementApiInterface { + + /** + * Administration endpoint to manually add a user. Only accessible to superadmins. + */ + async adminAddUserRaw(requestParameters: AdminAddUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/user`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserToJSON(requestParameters['user']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Administration endpoint to manually add a user. Only accessible to superadmins. + */ + async adminAddUser(requestParameters: AdminAddUserRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminAddUserRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to delete a user. Only accessible to superadmins. + */ + async adminDeleteUserRaw(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminDeleteUser().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/user/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Administration endpoint to delete a user. Only accessible to superadmins. + */ + async adminDeleteUser(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.adminDeleteUserRaw(requestParameters, initOverrides); + } + + /** + * Administration endpoint to return a user. Only accessible to superadmins. + */ + async adminGetUserRaw(requestParameters: AdminGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminGetUser().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/user/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Administration endpoint to return a user. Only accessible to superadmins. + */ + async adminGetUser(requestParameters: AdminGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminGetUserRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to return a list of users. Only accessible to superadmins. + */ + async adminGetUserListRaw(requestParameters: AdminGetUserListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/user`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserListFromJSON(jsonValue)); + } + + /** + * Administration endpoint to return a list of users. Only accessible to superadmins. + */ + async adminGetUserList(requestParameters: AdminGetUserListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminGetUserListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to update a user. Only accessible to superadmins. + */ + async adminUpdateUserRaw(requestParameters: AdminUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminUpdateUser().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/admin/user/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserToJSON(requestParameters['user']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Administration endpoint to update a user. Only accessible to superadmins. + */ + async adminUpdateUser(requestParameters: AdminUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.adminUpdateUserRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/ArtifactApi.ts b/src/apis/ArtifactApi.ts new file mode 100644 index 0000000..aaacced --- /dev/null +++ b/src/apis/ArtifactApi.ts @@ -0,0 +1,490 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Artifact, + ArtifactList, +} from '../models/index'; +import { + ArtifactFromJSON, + ArtifactToJSON, + ArtifactListFromJSON, + ArtifactListToJSON, +} from '../models/index'; + +export interface DeleteArtifactRequest { + id: string; +} + +export interface DownloadArtifactRequest { + id: string; +} + +export interface GetArtifactRequest { + id: string; +} + +export interface GetArtifactListRequest { + resultId?: string; + runId?: string; + page?: number; + pageSize?: number; +} + +export interface UploadArtifactRequest { + filename: string; + file: Blob; + resultId?: string; + runId?: string; + additionalMetadata?: object; +} + +export interface ViewArtifactRequest { + id: string; +} + +/** + * ArtifactApi - interface + * + * @export + * @interface ArtifactApiInterface + */ +export interface ArtifactApiInterface { + /** + * + * @summary Delete an artifact + * @param {string} id ID of artifact to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + deleteArtifactRaw(requestParameters: DeleteArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Delete an artifact + */ + deleteArtifact(requestParameters: DeleteArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Download an artifact + * @param {string} id ID of artifact to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + downloadArtifactRaw(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Download an artifact + */ + downloadArtifact(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a single artifact + * @param {string} id ID of artifact to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + getArtifactRaw(requestParameters: GetArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a single artifact + */ + getArtifact(requestParameters: GetArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a (filtered) list of artifacts + * @param {string} [resultId] The result ID to filter by + * @param {string} [runId] The run ID to filter by + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + getArtifactListRaw(requestParameters: GetArtifactListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a (filtered) list of artifacts + */ + getArtifactList(requestParameters: GetArtifactListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Uploads a test run artifact + * @param {string} filename name of the file + * @param {Blob} file file to upload + * @param {string} [resultId] ID of result to attach artifact to (mutually exclusive with runId) + * @param {string} [runId] ID of run to attach artifact to (mutually exclusive with resultId) + * @param {object} [additionalMetadata] Additional data to pass to server + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + uploadArtifactRaw(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Uploads a test run artifact + */ + uploadArtifact(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Stream an artifact directly to the client/browser + * @param {string} id ID of artifact to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + viewArtifactRaw(requestParameters: ViewArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Stream an artifact directly to the client/browser + */ + viewArtifact(requestParameters: ViewArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class ArtifactApi extends runtime.BaseAPI implements ArtifactApiInterface { + + /** + * Delete an artifact + */ + async deleteArtifactRaw(requestParameters: DeleteArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteArtifact().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/artifact/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete an artifact + */ + async deleteArtifact(requestParameters: DeleteArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteArtifactRaw(requestParameters, initOverrides); + } + + /** + * Download an artifact + */ + async downloadArtifactRaw(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling downloadArtifact().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/artifact/{id}/download`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * Download an artifact + */ + async downloadArtifact(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.downloadArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single artifact + */ + async getArtifactRaw(requestParameters: GetArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getArtifact().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/artifact/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactFromJSON(jsonValue)); + } + + /** + * Get a single artifact + */ + async getArtifact(requestParameters: GetArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a (filtered) list of artifacts + */ + async getArtifactListRaw(requestParameters: GetArtifactListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['resultId'] != null) { + queryParameters['resultId'] = requestParameters['resultId']; + } + + if (requestParameters['runId'] != null) { + queryParameters['runId'] = requestParameters['runId']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/artifact`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactListFromJSON(jsonValue)); + } + + /** + * Get a (filtered) list of artifacts + */ + async getArtifactList(requestParameters: GetArtifactListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getArtifactListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Uploads a test run artifact + */ + async uploadArtifactRaw(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['filename'] == null) { + throw new runtime.RequiredError( + 'filename', + 'Required parameter "filename" was null or undefined when calling uploadArtifact().' + ); + } + + if (requestParameters['file'] == null) { + throw new runtime.RequiredError( + 'file', + 'Required parameter "file" was null or undefined when calling uploadArtifact().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['resultId'] != null) { + formParams.append('resultId', requestParameters['resultId'] as any); + } + + if (requestParameters['runId'] != null) { + formParams.append('runId', requestParameters['runId'] as any); + } + + if (requestParameters['filename'] != null) { + formParams.append('filename', requestParameters['filename'] as any); + } + + if (requestParameters['file'] != null) { + formParams.append('file', requestParameters['file'] as any); + } + + if (requestParameters['additionalMetadata'] != null) { + formParams.append('additionalMetadata', new Blob([JSON.stringify(objectToJSON(requestParameters['additionalMetadata']))], { type: "application/json", })); + } + + + let urlPath = `/artifact`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactFromJSON(jsonValue)); + } + + /** + * Uploads a test run artifact + */ + async uploadArtifact(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.uploadArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Stream an artifact directly to the client/browser + */ + async viewArtifactRaw(requestParameters: ViewArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling viewArtifact().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/artifact/{id}/view`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * Stream an artifact directly to the client/browser + */ + async viewArtifact(requestParameters: ViewArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.viewArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/DashboardApi.ts b/src/apis/DashboardApi.ts new file mode 100644 index 0000000..aa6f40f --- /dev/null +++ b/src/apis/DashboardApi.ts @@ -0,0 +1,381 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Dashboard, + DashboardList, +} from '../models/index'; +import { + DashboardFromJSON, + DashboardToJSON, + DashboardListFromJSON, + DashboardListToJSON, +} from '../models/index'; + +export interface AddDashboardRequest { + dashboard?: Dashboard; +} + +export interface DeleteDashboardRequest { + id: string; +} + +export interface GetDashboardRequest { + id: string; +} + +export interface GetDashboardListRequest { + filter?: Array; + projectId?: string; + userId?: string; + page?: number; + pageSize?: number; +} + +export interface UpdateDashboardRequest { + id: string; + dashboard?: Dashboard; +} + +/** + * DashboardApi - interface + * + * @export + * @interface DashboardApiInterface + */ +export interface DashboardApiInterface { + /** + * + * @summary Create a dashboard + * @param {Dashboard} [dashboard] A dashboard object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + addDashboardRaw(requestParameters: AddDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a dashboard + */ + addDashboard(requestParameters: AddDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Delete a dashboard + * @param {string} id ID of dashboard to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + deleteDashboardRaw(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Delete a dashboard + */ + deleteDashboard(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a single dashboard by ID + * @param {string} id ID of test dashboard + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + getDashboardRaw(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a single dashboard by ID + */ + getDashboard(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a list of dashboards + * @param {Array} [filter] Fields to filter by + * @param {string} [projectId] Filter dashboards by project ID + * @param {string} [userId] Filter dashboards by user ID + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + getDashboardListRaw(requestParameters: GetDashboardListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a list of dashboards + */ + getDashboardList(requestParameters: GetDashboardListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Update a dashboard + * @param {string} id ID of test dashboard + * @param {Dashboard} [dashboard] A dashboard object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + updateDashboardRaw(requestParameters: UpdateDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Update a dashboard + */ + updateDashboard(requestParameters: UpdateDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class DashboardApi extends runtime.BaseAPI implements DashboardApiInterface { + + /** + * Create a dashboard + */ + async addDashboardRaw(requestParameters: AddDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/dashboard`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DashboardToJSON(requestParameters['dashboard']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); + } + + /** + * Create a dashboard + */ + async addDashboard(requestParameters: AddDashboardRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.addDashboardRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a dashboard + */ + async deleteDashboardRaw(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteDashboard().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/dashboard/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a dashboard + */ + async deleteDashboard(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteDashboardRaw(requestParameters, initOverrides); + } + + /** + * Get a single dashboard by ID + */ + async getDashboardRaw(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getDashboard().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/dashboard/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); + } + + /** + * Get a single dashboard by ID + */ + async getDashboard(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDashboardRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of dashboards + */ + async getDashboardListRaw(requestParameters: GetDashboardListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['projectId'] != null) { + queryParameters['project_id'] = requestParameters['projectId']; + } + + if (requestParameters['userId'] != null) { + queryParameters['user_id'] = requestParameters['userId']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/dashboard`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DashboardListFromJSON(jsonValue)); + } + + /** + * Get a list of dashboards + */ + async getDashboardList(requestParameters: GetDashboardListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDashboardListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a dashboard + */ + async updateDashboardRaw(requestParameters: UpdateDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateDashboard().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/dashboard/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DashboardToJSON(requestParameters['dashboard']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); + } + + /** + * Update a dashboard + */ + async updateDashboard(requestParameters: UpdateDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateDashboardRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/GroupApi.ts b/src/apis/GroupApi.ts new file mode 100644 index 0000000..62b2179 --- /dev/null +++ b/src/apis/GroupApi.ts @@ -0,0 +1,300 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Group, + GroupList, +} from '../models/index'; +import { + GroupFromJSON, + GroupToJSON, + GroupListFromJSON, + GroupListToJSON, +} from '../models/index'; + +export interface AddGroupRequest { + group?: Group; +} + +export interface GetGroupRequest { + id: string; +} + +export interface GetGroupListRequest { + page?: number; + pageSize?: number; +} + +export interface UpdateGroupRequest { + id: string; + group?: Group; +} + +/** + * GroupApi - interface + * + * @export + * @interface GroupApiInterface + */ +export interface GroupApiInterface { + /** + * + * @summary Create a new group + * @param {Group} [group] A group object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupApiInterface + */ + addGroupRaw(requestParameters: AddGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a new group + */ + addGroup(requestParameters: AddGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a group + * @param {string} id The ID of the group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupApiInterface + */ + getGroupRaw(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a group + */ + getGroup(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a list of groups + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupApiInterface + */ + getGroupListRaw(requestParameters: GetGroupListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a list of groups + */ + getGroupList(requestParameters: GetGroupListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Update a group + * @param {string} id The ID of the group + * @param {Group} [group] A group object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupApiInterface + */ + updateGroupRaw(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Update a group + */ + updateGroup(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class GroupApi extends runtime.BaseAPI implements GroupApiInterface { + + /** + * Create a new group + */ + async addGroupRaw(requestParameters: AddGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/group`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupToJSON(requestParameters['group']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Create a new group + */ + async addGroup(requestParameters: AddGroupRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.addGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a group + */ + async getGroupRaw(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/group/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Get a group + */ + async getGroup(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of groups + */ + async getGroupListRaw(requestParameters: GetGroupListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/group`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupListFromJSON(jsonValue)); + } + + /** + * Get a list of groups + */ + async getGroupList(requestParameters: GetGroupListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getGroupListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a group + */ + async updateGroupRaw(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/group/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupToJSON(requestParameters['group']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Update a group + */ + async updateGroup(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/HealthApi.ts b/src/apis/HealthApi.ts new file mode 100644 index 0000000..21d09b6 --- /dev/null +++ b/src/apis/HealthApi.ts @@ -0,0 +1,187 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Health, + HealthInfo, +} from '../models/index'; +import { + HealthFromJSON, + HealthToJSON, + HealthInfoFromJSON, + HealthInfoToJSON, +} from '../models/index'; + +/** + * HealthApi - interface + * + * @export + * @interface HealthApiInterface + */ +export interface HealthApiInterface { + /** + * + * @summary Get a health report for the database + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof HealthApiInterface + */ + getDatabaseHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a health report for the database + */ + getDatabaseHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a general health report + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof HealthApiInterface + */ + getHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a general health report + */ + getHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get information about the server + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof HealthApiInterface + */ + getHealthInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get information about the server + */ + getHealthInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class HealthApi extends runtime.BaseAPI implements HealthApiInterface { + + /** + * Get a health report for the database + */ + async getDatabaseHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/health/database`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthFromJSON(jsonValue)); + } + + /** + * Get a health report for the database + */ + async getDatabaseHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDatabaseHealthRaw(initOverrides); + return await response.value(); + } + + /** + * Get a general health report + */ + async getHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/health`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthFromJSON(jsonValue)); + } + + /** + * Get a general health report + */ + async getHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getHealthRaw(initOverrides); + return await response.value(); + } + + /** + * Get information about the server + */ + async getHealthInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/health/info`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthInfoFromJSON(jsonValue)); + } + + /** + * Get information about the server + */ + async getHealthInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getHealthInfoRaw(initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/ImportApi.ts b/src/apis/ImportApi.ts new file mode 100644 index 0000000..ddfcde0 --- /dev/null +++ b/src/apis/ImportApi.ts @@ -0,0 +1,205 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Import, +} from '../models/index'; +import { + ImportFromJSON, + ImportToJSON, +} from '../models/index'; + +export interface AddImportRequest { + importFile: Blob; + project?: string; + metadata?: object; + source?: string; +} + +export interface GetImportRequest { + id: string; +} + +/** + * ImportApi - interface + * + * @export + * @interface ImportApiInterface + */ +export interface ImportApiInterface { + /** + * + * @summary Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive + * @param {Blob} importFile The file to import + * @param {string} [project] The project associated with this import + * @param {object} [metadata] Additional metadata about imported run + * @param {string} [source] The source of this import + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ImportApiInterface + */ + addImportRaw(requestParameters: AddImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive + */ + addImport(requestParameters: AddImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get the status of an import + * @param {string} id The ID of the import + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ImportApiInterface + */ + getImportRaw(requestParameters: GetImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get the status of an import + */ + getImport(requestParameters: GetImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class ImportApi extends runtime.BaseAPI implements ImportApiInterface { + + /** + * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive + */ + async addImportRaw(requestParameters: AddImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['importFile'] == null) { + throw new runtime.RequiredError( + 'importFile', + 'Required parameter "importFile" was null or undefined when calling addImport().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['importFile'] != null) { + formParams.append('importFile', requestParameters['importFile'] as any); + } + + if (requestParameters['project'] != null) { + formParams.append('project', requestParameters['project'] as any); + } + + if (requestParameters['metadata'] != null) { + formParams.append('metadata', new Blob([JSON.stringify(objectToJSON(requestParameters['metadata']))], { type: "application/json", })); + } + + if (requestParameters['source'] != null) { + formParams.append('source', requestParameters['source'] as any); + } + + + let urlPath = `/import`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ImportFromJSON(jsonValue)); + } + + /** + * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive + */ + async addImport(requestParameters: AddImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.addImportRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get the status of an import + */ + async getImportRaw(requestParameters: GetImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getImport().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/import/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ImportFromJSON(jsonValue)); + } + + /** + * Get the status of an import + */ + async getImport(requestParameters: GetImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getImportRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/LoginApi.ts b/src/apis/LoginApi.ts new file mode 100644 index 0000000..f4d3ec1 --- /dev/null +++ b/src/apis/LoginApi.ts @@ -0,0 +1,438 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + AccountRecovery, + AccountRegistration, + AccountReset, + Credentials, + LoginConfig, + LoginError, + LoginSupport, + LoginToken, +} from '../models/index'; +import { + AccountRecoveryFromJSON, + AccountRecoveryToJSON, + AccountRegistrationFromJSON, + AccountRegistrationToJSON, + AccountResetFromJSON, + AccountResetToJSON, + CredentialsFromJSON, + CredentialsToJSON, + LoginConfigFromJSON, + LoginConfigToJSON, + LoginErrorFromJSON, + LoginErrorToJSON, + LoginSupportFromJSON, + LoginSupportToJSON, + LoginTokenFromJSON, + LoginTokenToJSON, +} from '../models/index'; + +export interface ActivateRequest { + activationCode: string; +} + +export interface AuthRequest { + provider: string; +} + +export interface ConfigRequest { + provider: string; +} + +export interface LoginRequest { + credentials?: Credentials; +} + +export interface RecoverRequest { + accountRecovery?: AccountRecovery; +} + +export interface RegisterRequest { + accountRegistration?: AccountRegistration; +} + +export interface ResetPasswordRequest { + accountReset?: AccountReset; +} + +/** + * LoginApi - interface + * + * @export + * @interface LoginApiInterface + */ +export interface LoginApiInterface { + /** + * + * @param {string} activationCode The activation code + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + activateRaw(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + activate(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {string} provider The login provider\'s configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + authRaw(requestParameters: AuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + auth(requestParameters: AuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {string} provider The login provider\'s configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + configRaw(requestParameters: ConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + config(requestParameters: ConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {Credentials} [credentials] A login object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + loginRaw(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + login(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {AccountRecovery} [accountRecovery] A user recovering their password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + recoverRaw(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + recover(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {AccountRegistration} [accountRegistration] A user registering their account + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + registerRaw(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + register(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {AccountReset} [accountReset] A user resetting their password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + resetPasswordRaw(requestParameters: ResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + resetPassword(requestParameters: ResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + supportRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + support(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class LoginApi extends runtime.BaseAPI implements LoginApiInterface { + + /** + */ + async activateRaw(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['activationCode'] == null) { + throw new runtime.RequiredError( + 'activationCode', + 'Required parameter "activationCode" was null or undefined when calling activate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/login/activate/{activation_code}`; + urlPath = urlPath.replace(`{${"activation_code"}}`, encodeURIComponent(String(requestParameters['activationCode']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async activate(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.activateRaw(requestParameters, initOverrides); + } + + /** + */ + async authRaw(requestParameters: AuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['provider'] == null) { + throw new runtime.RequiredError( + 'provider', + 'Required parameter "provider" was null or undefined when calling auth().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/login/auth/{provider}`; + urlPath = urlPath.replace(`{${"provider"}}`, encodeURIComponent(String(requestParameters['provider']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async auth(requestParameters: AuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.authRaw(requestParameters, initOverrides); + } + + /** + */ + async configRaw(requestParameters: ConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['provider'] == null) { + throw new runtime.RequiredError( + 'provider', + 'Required parameter "provider" was null or undefined when calling config().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/login/config/{provider}`; + urlPath = urlPath.replace(`{${"provider"}}`, encodeURIComponent(String(requestParameters['provider']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LoginConfigFromJSON(jsonValue)); + } + + /** + */ + async config(requestParameters: ConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.configRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async loginRaw(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/login`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CredentialsToJSON(requestParameters['credentials']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LoginTokenFromJSON(jsonValue)); + } + + /** + */ + async login(requestParameters: LoginRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.loginRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async recoverRaw(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/login/recover`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AccountRecoveryToJSON(requestParameters['accountRecovery']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async recover(requestParameters: RecoverRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.recoverRaw(requestParameters, initOverrides); + } + + /** + */ + async registerRaw(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/login/register`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AccountRegistrationToJSON(requestParameters['accountRegistration']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async register(requestParameters: RegisterRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.registerRaw(requestParameters, initOverrides); + } + + /** + */ + async resetPasswordRaw(requestParameters: ResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/login/reset-password`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AccountResetToJSON(requestParameters['accountReset']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async resetPassword(requestParameters: ResetPasswordRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.resetPasswordRaw(requestParameters, initOverrides); + } + + /** + */ + async supportRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/login/support`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => LoginSupportFromJSON(jsonValue)); + } + + /** + */ + async support(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.supportRaw(initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/ProjectApi.ts b/src/apis/ProjectApi.ts new file mode 100644 index 0000000..749314b --- /dev/null +++ b/src/apis/ProjectApi.ts @@ -0,0 +1,382 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Project, + ProjectList, +} from '../models/index'; +import { + ProjectFromJSON, + ProjectToJSON, + ProjectListFromJSON, + ProjectListToJSON, +} from '../models/index'; + +export interface AddProjectRequest { + project?: Project; +} + +export interface GetFilterParamsRequest { + id: string; +} + +export interface GetProjectRequest { + id: string; +} + +export interface GetProjectListRequest { + filter?: Array; + ownerId?: string; + groupId?: string; + page?: number; + pageSize?: number; +} + +export interface UpdateProjectRequest { + id: string; + project?: Project; +} + +/** + * ProjectApi - interface + * + * @export + * @interface ProjectApiInterface + */ +export interface ProjectApiInterface { + /** + * + * @summary Create a project + * @param {Project} [project] A project object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + addProjectRaw(requestParameters: AddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a project + */ + addProject(requestParameters: AddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a project\'s filterable parameters + * @param {string} id ID of test project + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + getFilterParamsRaw(requestParameters: GetFilterParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; + + /** + * Get a project\'s filterable parameters + */ + getFilterParams(requestParameters: GetFilterParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * + * @summary Get a single project by ID + * @param {string} id ID of test project + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + getProjectRaw(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a single project by ID + */ + getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a list of projects + * @param {Array} [filter] Fields to filter by + * @param {string} [ownerId] Filter projects by owner ID + * @param {string} [groupId] Filter projects by group ID + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + getProjectListRaw(requestParameters: GetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a list of projects + */ + getProjectList(requestParameters: GetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Update a project + * @param {string} id ID of test project + * @param {Project} [project] A project object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + updateProjectRaw(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Update a project + */ + updateProject(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class ProjectApi extends runtime.BaseAPI implements ProjectApiInterface { + + /** + * Create a project + */ + async addProjectRaw(requestParameters: AddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/project`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ProjectToJSON(requestParameters['project']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Create a project + */ + async addProject(requestParameters: AddProjectRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.addProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a project\'s filterable parameters + */ + async getFilterParamsRaw(requestParameters: GetFilterParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getFilterParams().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/project/filter-params/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get a project\'s filterable parameters + */ + async getFilterParams(requestParameters: GetFilterParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getFilterParamsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single project by ID + */ + async getProjectRaw(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getProject().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/project/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Get a single project by ID + */ + async getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of projects + */ + async getProjectListRaw(requestParameters: GetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['ownerId'] != null) { + queryParameters['ownerId'] = requestParameters['ownerId']; + } + + if (requestParameters['groupId'] != null) { + queryParameters['groupId'] = requestParameters['groupId']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/project`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectListFromJSON(jsonValue)); + } + + /** + * Get a list of projects + */ + async getProjectList(requestParameters: GetProjectListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getProjectListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a project + */ + async updateProjectRaw(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateProject().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/project/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ProjectToJSON(requestParameters['project']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Update a project + */ + async updateProject(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/ResultApi.ts b/src/apis/ResultApi.ts new file mode 100644 index 0000000..f0fdbfd --- /dev/null +++ b/src/apis/ResultApi.ts @@ -0,0 +1,315 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Result, + ResultList, +} from '../models/index'; +import { + ResultFromJSON, + ResultToJSON, + ResultListFromJSON, + ResultListToJSON, +} from '../models/index'; + +export interface AddResultRequest { + result?: Result; +} + +export interface GetResultRequest { + id: string; +} + +export interface GetResultListRequest { + filter?: Array; + estimate?: boolean; + page?: number; + pageSize?: number; +} + +export interface UpdateResultRequest { + id: string; + result?: Result; +} + +/** + * ResultApi - interface + * + * @export + * @interface ResultApiInterface + */ +export interface ResultApiInterface { + /** + * + * @summary Create a test result + * @param {Result} [result] Result item + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResultApiInterface + */ + addResultRaw(requestParameters: AddResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a test result + */ + addResult(requestParameters: AddResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a single result + * @param {string} id ID of result to return (uuid required) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResultApiInterface + */ + getResultRaw(requestParameters: GetResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a single result + */ + getResult(requestParameters: GetResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed + * @summary Get the list of results. + * @param {Array} [filter] Fields to filter by + * @param {boolean} [estimate] Return an estimated count + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResultApiInterface + */ + getResultListRaw(requestParameters: GetResultListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed + * Get the list of results. + */ + getResultList(requestParameters: GetResultListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Updates a single result + * @param {string} id ID of result to update + * @param {Result} [result] Result item + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResultApiInterface + */ + updateResultRaw(requestParameters: UpdateResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Updates a single result + */ + updateResult(requestParameters: UpdateResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class ResultApi extends runtime.BaseAPI implements ResultApiInterface { + + /** + * Create a test result + */ + async addResultRaw(requestParameters: AddResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/result`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ResultToJSON(requestParameters['result']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); + } + + /** + * Create a test result + */ + async addResult(requestParameters: AddResultRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.addResultRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single result + */ + async getResultRaw(requestParameters: GetResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getResult().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/result/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); + } + + /** + * Get a single result + */ + async getResult(requestParameters: GetResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed + * Get the list of results. + */ + async getResultListRaw(requestParameters: GetResultListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['estimate'] != null) { + queryParameters['estimate'] = requestParameters['estimate']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/result`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResultListFromJSON(jsonValue)); + } + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed + * Get the list of results. + */ + async getResultList(requestParameters: GetResultListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a single result + */ + async updateResultRaw(requestParameters: UpdateResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateResult().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/result/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ResultToJSON(requestParameters['result']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); + } + + /** + * Updates a single result + */ + async updateResult(requestParameters: UpdateResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateResultRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/RunApi.ts b/src/apis/RunApi.ts new file mode 100644 index 0000000..a5fb3e3 --- /dev/null +++ b/src/apis/RunApi.ts @@ -0,0 +1,389 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Run, + RunList, + UpdateRun, +} from '../models/index'; +import { + RunFromJSON, + RunToJSON, + RunListFromJSON, + RunListToJSON, + UpdateRunFromJSON, + UpdateRunToJSON, +} from '../models/index'; + +export interface AddRunRequest { + run?: Run; +} + +export interface BulkUpdateRequest { + filter?: Array; + pageSize?: number; + updateRun?: UpdateRun; +} + +export interface GetRunRequest { + id: string; +} + +export interface GetRunListRequest { + filter?: Array; + estimate?: boolean; + page?: number; + pageSize?: number; +} + +export interface UpdateRunRequest { + id: string; + run?: Run; +} + +/** + * RunApi - interface + * + * @export + * @interface RunApiInterface + */ +export interface RunApiInterface { + /** + * + * @summary Create a run + * @param {Run} [run] A run object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + addRunRaw(requestParameters: AddRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a run + */ + addRun(requestParameters: AddRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Update multiple runs with common metadata + * @param {Array} [filter] Fields to filter by + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {UpdateRun} [updateRun] Run metadata updates + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + bulkUpdateRaw(requestParameters: BulkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Update multiple runs with common metadata + */ + bulkUpdate(requestParameters: BulkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a single run by ID (uuid required) + * @param {string} id ID of test run + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + getRunRaw(requestParameters: GetRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a single run by ID (uuid required) + */ + getRun(requestParameters: GetRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 + * @summary Get a list of the test runs + * @param {Array} [filter] Fields to filter by + * @param {boolean} [estimate] Return an estimated count + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + getRunListRaw(requestParameters: GetRunListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 + * Get a list of the test runs + */ + getRunList(requestParameters: GetRunListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Update a single run + * @param {string} id ID of the test run + * @param {Run} [run] A run object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + updateRunRaw(requestParameters: UpdateRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Update a single run + */ + updateRun(requestParameters: UpdateRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class RunApi extends runtime.BaseAPI implements RunApiInterface { + + /** + * Create a run + */ + async addRunRaw(requestParameters: AddRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/run`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RunToJSON(requestParameters['run']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); + } + + /** + * Create a run + */ + async addRun(requestParameters: AddRunRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.addRunRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update multiple runs with common metadata + */ + async bulkUpdateRaw(requestParameters: BulkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/runs/bulk-update`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UpdateRunToJSON(requestParameters['updateRun']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunListFromJSON(jsonValue)); + } + + /** + * Update multiple runs with common metadata + */ + async bulkUpdate(requestParameters: BulkUpdateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.bulkUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single run by ID (uuid required) + */ + async getRunRaw(requestParameters: GetRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getRun().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/run/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); + } + + /** + * Get a single run by ID (uuid required) + */ + async getRun(requestParameters: GetRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRunRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 + * Get a list of the test runs + */ + async getRunListRaw(requestParameters: GetRunListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['estimate'] != null) { + queryParameters['estimate'] = requestParameters['estimate']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/run`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunListFromJSON(jsonValue)); + } + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 + * Get a list of the test runs + */ + async getRunList(requestParameters: GetRunListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getRunListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a single run + */ + async updateRunRaw(requestParameters: UpdateRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateRun().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/run/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RunToJSON(requestParameters['run']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); + } + + /** + * Update a single run + */ + async updateRun(requestParameters: UpdateRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateRunRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/TaskApi.ts b/src/apis/TaskApi.ts new file mode 100644 index 0000000..a1afc4f --- /dev/null +++ b/src/apis/TaskApi.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; + +export interface GetTaskRequest { + id: string; +} + +/** + * TaskApi - interface + * + * @export + * @interface TaskApiInterface + */ +export interface TaskApiInterface { + /** + * + * @summary Get the status or result of a task + * @param {string} id The ID of the task + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TaskApiInterface + */ + getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get the status or result of a task + */ + getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class TaskApi extends runtime.BaseAPI implements TaskApiInterface { + + /** + * Get the status or result of a task + */ + async getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getTask().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/task/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get the status or result of a task + */ + async getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTaskRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/UserApi.ts b/src/apis/UserApi.ts new file mode 100644 index 0000000..79941ab --- /dev/null +++ b/src/apis/UserApi.ts @@ -0,0 +1,402 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CreateToken, + Token, + TokenList, + User, +} from '../models/index'; +import { + CreateTokenFromJSON, + CreateTokenToJSON, + TokenFromJSON, + TokenToJSON, + TokenListFromJSON, + TokenListToJSON, + UserFromJSON, + UserToJSON, +} from '../models/index'; + +export interface AddTokenRequest { + createToken?: CreateToken; +} + +export interface DeleteTokenRequest { + id: string; +} + +export interface GetTokenRequest { + id: string; +} + +export interface GetTokenListRequest { + page?: number; + pageSize?: number; +} + +/** + * UserApi - interface + * + * @export + * @interface UserApiInterface + */ +export interface UserApiInterface { + /** + * + * @summary Create a token for the current user + * @param {CreateToken} [createToken] Create a token for a user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + addTokenRaw(requestParameters: AddTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a token for the current user + */ + addToken(requestParameters: AddTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Delete the token + * @param {string} id The id of a token + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + deleteTokenRaw(requestParameters: DeleteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Delete the token + */ + deleteToken(requestParameters: DeleteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Return the user details for the current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + getCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Return the user details for the current user + */ + getCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Retrieve a single token for the current user + * @param {string} id The id of a token + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + getTokenRaw(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Retrieve a single token for the current user + */ + getToken(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Return the tokens for the user + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + getTokenListRaw(requestParameters: GetTokenListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Return the tokens for the user + */ + getTokenList(requestParameters: GetTokenListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Return the user details for the current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + updateCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Return the user details for the current user + */ + updateCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class UserApi extends runtime.BaseAPI implements UserApiInterface { + + /** + * Create a token for the current user + */ + async addTokenRaw(requestParameters: AddTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/user/token`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateTokenToJSON(requestParameters['createToken']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + } + + /** + * Create a token for the current user + */ + async addToken(requestParameters: AddTokenRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.addTokenRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete the token + */ + async deleteTokenRaw(requestParameters: DeleteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteToken().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/user/token/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete the token + */ + async deleteToken(requestParameters: DeleteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteTokenRaw(requestParameters, initOverrides); + } + + /** + * Return the user details for the current user + */ + async getCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/user`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Return the user details for the current user + */ + async getCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getCurrentUserRaw(initOverrides); + return await response.value(); + } + + /** + * Retrieve a single token for the current user + */ + async getTokenRaw(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getToken().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/user/token/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + } + + /** + * Retrieve a single token for the current user + */ + async getToken(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTokenRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return the tokens for the user + */ + async getTokenListRaw(requestParameters: GetTokenListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/user/token`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenListFromJSON(jsonValue)); + } + + /** + * Return the tokens for the user + */ + async getTokenList(requestParameters: GetTokenListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTokenListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return the user details for the current user + */ + async updateCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/user`; + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Return the user details for the current user + */ + async updateCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateCurrentUserRaw(initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/WidgetApi.ts b/src/apis/WidgetApi.ts new file mode 100644 index 0000000..66f5280 --- /dev/null +++ b/src/apis/WidgetApi.ts @@ -0,0 +1,172 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + WidgetTypeList, +} from '../models/index'; +import { + WidgetTypeListFromJSON, + WidgetTypeListToJSON, +} from '../models/index'; + +export interface GetWidgetRequest { + id: string; + params?: object; +} + +export interface GetWidgetTypesRequest { + type?: string; +} + +/** + * WidgetApi - interface + * + * @export + * @interface WidgetApiInterface + */ +export interface WidgetApiInterface { + /** + * + * @summary Generate data for a dashboard widget + * @param {string} id The widget identifier + * @param {object} [params] The parameters for the widget + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetApiInterface + */ + getWidgetRaw(requestParameters: GetWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Generate data for a dashboard widget + */ + getWidget(requestParameters: GetWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * A list of widget types + * @summary Get a list of widget types + * @param {string} [type] Filter by type of widget + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetApiInterface + */ + getWidgetTypesRaw(requestParameters: GetWidgetTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * A list of widget types + * Get a list of widget types + */ + getWidgetTypes(requestParameters: GetWidgetTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class WidgetApi extends runtime.BaseAPI implements WidgetApiInterface { + + /** + * Generate data for a dashboard widget + */ + async getWidgetRaw(requestParameters: GetWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getWidget().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['params'] != null) { + queryParameters['params'] = requestParameters['params']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/widget/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Generate data for a dashboard widget + */ + async getWidget(requestParameters: GetWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getWidgetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A list of widget types + * Get a list of widget types + */ + async getWidgetTypesRaw(requestParameters: GetWidgetTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['type'] != null) { + queryParameters['type'] = requestParameters['type']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/widget/types`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetTypeListFromJSON(jsonValue)); + } + + /** + * A list of widget types + * Get a list of widget types + */ + async getWidgetTypes(requestParameters: GetWidgetTypesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getWidgetTypesRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/WidgetConfigApi.ts b/src/apis/WidgetConfigApi.ts new file mode 100644 index 0000000..4f2c89c --- /dev/null +++ b/src/apis/WidgetConfigApi.ts @@ -0,0 +1,372 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + WidgetConfig, + WidgetConfigList, +} from '../models/index'; +import { + WidgetConfigFromJSON, + WidgetConfigToJSON, + WidgetConfigListFromJSON, + WidgetConfigListToJSON, +} from '../models/index'; + +export interface AddWidgetConfigRequest { + widgetConfig?: WidgetConfig; +} + +export interface DeleteWidgetConfigRequest { + id: string; +} + +export interface GetWidgetConfigRequest { + id: string; +} + +export interface GetWidgetConfigListRequest { + filter?: Array; + page?: number; + pageSize?: number; +} + +export interface UpdateWidgetConfigRequest { + id: string; + widgetConfig?: WidgetConfig; +} + +/** + * WidgetConfigApi - interface + * + * @export + * @interface WidgetConfigApiInterface + */ +export interface WidgetConfigApiInterface { + /** + * + * @summary Create a widget configuration + * @param {WidgetConfig} [widgetConfig] Widget configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + addWidgetConfigRaw(requestParameters: AddWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a widget configuration + */ + addWidgetConfig(requestParameters: AddWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Delete a widget configuration + * @param {string} id ID of widget configuration to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + deleteWidgetConfigRaw(requestParameters: DeleteWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Delete a widget configuration + */ + deleteWidgetConfig(requestParameters: DeleteWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a single widget configuration + * @param {string} id ID of widget config to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + getWidgetConfigRaw(requestParameters: GetWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get a single widget configuration + */ + getWidgetConfig(requestParameters: GetWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * A list of widget configurations + * @summary Get the list of widget configurations + * @param {Array} [filter] Fields to filter by + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + getWidgetConfigListRaw(requestParameters: GetWidgetConfigListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * A list of widget configurations + * Get the list of widget configurations + */ + getWidgetConfigList(requestParameters: GetWidgetConfigListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Updates a single widget configuration + * @param {string} id ID of widget configuration to update + * @param {WidgetConfig} [widgetConfig] Widget configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + updateWidgetConfigRaw(requestParameters: UpdateWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Updates a single widget configuration + */ + updateWidgetConfig(requestParameters: UpdateWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class WidgetConfigApi extends runtime.BaseAPI implements WidgetConfigApiInterface { + + /** + * Create a widget configuration + */ + async addWidgetConfigRaw(requestParameters: AddWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/widget-config`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: WidgetConfigToJSON(requestParameters['widgetConfig']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); + } + + /** + * Create a widget configuration + */ + async addWidgetConfig(requestParameters: AddWidgetConfigRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.addWidgetConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a widget configuration + */ + async deleteWidgetConfigRaw(requestParameters: DeleteWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteWidgetConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/widget-config/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a widget configuration + */ + async deleteWidgetConfig(requestParameters: DeleteWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteWidgetConfigRaw(requestParameters, initOverrides); + } + + /** + * Get a single widget configuration + */ + async getWidgetConfigRaw(requestParameters: GetWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getWidgetConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/widget-config/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); + } + + /** + * Get a single widget configuration + */ + async getWidgetConfig(requestParameters: GetWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getWidgetConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A list of widget configurations + * Get the list of widget configurations + */ + async getWidgetConfigListRaw(requestParameters: GetWidgetConfigListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/widget-config`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigListFromJSON(jsonValue)); + } + + /** + * A list of widget configurations + * Get the list of widget configurations + */ + async getWidgetConfigList(requestParameters: GetWidgetConfigListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getWidgetConfigListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a single widget configuration + */ + async updateWidgetConfigRaw(requestParameters: UpdateWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateWidgetConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("jwt", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/widget-config/{id}`; + urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: WidgetConfigToJSON(requestParameters['widgetConfig']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); + } + + /** + * Updates a single widget configuration + */ + async updateWidgetConfig(requestParameters: UpdateWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateWidgetConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/apis/index.ts b/src/apis/index.ts new file mode 100644 index 0000000..e37e295 --- /dev/null +++ b/src/apis/index.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AdminProjectManagementApi'; +export * from './AdminUserManagementApi'; +export * from './ArtifactApi'; +export * from './DashboardApi'; +export * from './GroupApi'; +export * from './HealthApi'; +export * from './ImportApi'; +export * from './LoginApi'; +export * from './ProjectApi'; +export * from './ResultApi'; +export * from './RunApi'; +export * from './TaskApi'; +export * from './UserApi'; +export * from './WidgetApi'; +export * from './WidgetConfigApi'; diff --git a/src/index.js b/src/index.js deleted file mode 100644 index df721ec..0000000 --- a/src/index.js +++ /dev/null @@ -1,300 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from './ApiClient'; -import Artifact from './model/Artifact'; -import ArtifactList from './model/ArtifactList'; -import Group from './model/Group'; -import GroupList from './model/GroupList'; -import Health from './model/Health'; -import HealthInfo from './model/HealthInfo'; -import InlineObject from './model/InlineObject'; -import InlineObject1 from './model/InlineObject1'; -import InlineResponse200 from './model/InlineResponse200'; -import ModelImport from './model/ModelImport'; -import Pagination from './model/Pagination'; -import Project from './model/Project'; -import ProjectList from './model/ProjectList'; -import Report from './model/Report'; -import ReportList from './model/ReportList'; -import ReportParameters from './model/ReportParameters'; -import Result from './model/Result'; -import ResultList from './model/ResultList'; -import Run from './model/Run'; -import RunList from './model/RunList'; -import WidgetConfig from './model/WidgetConfig'; -import WidgetConfigList from './model/WidgetConfigList'; -import WidgetParam from './model/WidgetParam'; -import WidgetType from './model/WidgetType'; -import WidgetTypeList from './model/WidgetTypeList'; -import ArtifactApi from './api/ArtifactApi'; -import GroupApi from './api/GroupApi'; -import HealthApi from './api/HealthApi'; -import ImportApi from './api/ImportApi'; -import ProjectApi from './api/ProjectApi'; -import ReportApi from './api/ReportApi'; -import ResultApi from './api/ResultApi'; -import RunApi from './api/RunApi'; -import WidgetApi from './api/WidgetApi'; -import WidgetConfigApi from './api/WidgetConfigApi'; - - -/** -* A Javascript client for the Ibutsu API.
-* The index module provides access to constructors for all the classes which comprise the public API. -*

-* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: -*

-* var ibutsu = require('index'); // See note below*.
-* var xxxSvc = new ibutsu.XxxApi(); // Allocate the API class we're going to use.
-* var yyyModel = new ibutsu.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-* *NOTE: For a top-level AMD script, use require(['index'], function(){...}) -* and put the application logic within the callback function. -*

-*

-* A non-AMD browser application (discouraged) might do something like this: -*

-* var xxxSvc = new ibutsu.XxxApi(); // Allocate the API class we're going to use.
-* var yyy = new ibutsu.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-*

-* @module index -* @version 1.0.0 -*/ -export { - /** - * The ApiClient constructor. - * @property {module:ApiClient} - */ - ApiClient, - - /** - * The Artifact model constructor. - * @property {module:model/Artifact} - */ - Artifact, - - /** - * The ArtifactList model constructor. - * @property {module:model/ArtifactList} - */ - ArtifactList, - - /** - * The Group model constructor. - * @property {module:model/Group} - */ - Group, - - /** - * The GroupList model constructor. - * @property {module:model/GroupList} - */ - GroupList, - - /** - * The Health model constructor. - * @property {module:model/Health} - */ - Health, - - /** - * The HealthInfo model constructor. - * @property {module:model/HealthInfo} - */ - HealthInfo, - - /** - * The InlineObject model constructor. - * @property {module:model/InlineObject} - */ - InlineObject, - - /** - * The InlineObject1 model constructor. - * @property {module:model/InlineObject1} - */ - InlineObject1, - - /** - * The InlineResponse200 model constructor. - * @property {module:model/InlineResponse200} - */ - InlineResponse200, - - /** - * The ModelImport model constructor. - * @property {module:model/ModelImport} - */ - ModelImport, - - /** - * The Pagination model constructor. - * @property {module:model/Pagination} - */ - Pagination, - - /** - * The Project model constructor. - * @property {module:model/Project} - */ - Project, - - /** - * The ProjectList model constructor. - * @property {module:model/ProjectList} - */ - ProjectList, - - /** - * The Report model constructor. - * @property {module:model/Report} - */ - Report, - - /** - * The ReportList model constructor. - * @property {module:model/ReportList} - */ - ReportList, - - /** - * The ReportParameters model constructor. - * @property {module:model/ReportParameters} - */ - ReportParameters, - - /** - * The Result model constructor. - * @property {module:model/Result} - */ - Result, - - /** - * The ResultList model constructor. - * @property {module:model/ResultList} - */ - ResultList, - - /** - * The Run model constructor. - * @property {module:model/Run} - */ - Run, - - /** - * The RunList model constructor. - * @property {module:model/RunList} - */ - RunList, - - /** - * The WidgetConfig model constructor. - * @property {module:model/WidgetConfig} - */ - WidgetConfig, - - /** - * The WidgetConfigList model constructor. - * @property {module:model/WidgetConfigList} - */ - WidgetConfigList, - - /** - * The WidgetParam model constructor. - * @property {module:model/WidgetParam} - */ - WidgetParam, - - /** - * The WidgetType model constructor. - * @property {module:model/WidgetType} - */ - WidgetType, - - /** - * The WidgetTypeList model constructor. - * @property {module:model/WidgetTypeList} - */ - WidgetTypeList, - - /** - * The ArtifactApi service constructor. - * @property {module:api/ArtifactApi} - */ - ArtifactApi, - - /** - * The GroupApi service constructor. - * @property {module:api/GroupApi} - */ - GroupApi, - - /** - * The HealthApi service constructor. - * @property {module:api/HealthApi} - */ - HealthApi, - - /** - * The ImportApi service constructor. - * @property {module:api/ImportApi} - */ - ImportApi, - - /** - * The ProjectApi service constructor. - * @property {module:api/ProjectApi} - */ - ProjectApi, - - /** - * The ReportApi service constructor. - * @property {module:api/ReportApi} - */ - ReportApi, - - /** - * The ResultApi service constructor. - * @property {module:api/ResultApi} - */ - ResultApi, - - /** - * The RunApi service constructor. - * @property {module:api/RunApi} - */ - RunApi, - - /** - * The WidgetApi service constructor. - * @property {module:api/WidgetApi} - */ - WidgetApi, - - /** - * The WidgetConfigApi service constructor. - * @property {module:api/WidgetConfigApi} - */ - WidgetConfigApi -}; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..bebe8bb --- /dev/null +++ b/src/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/model/Artifact.js b/src/model/Artifact.js deleted file mode 100644 index 3cf5773..0000000 --- a/src/model/Artifact.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Artifact model module. - * @module model/Artifact - * @version 1.0.0 - */ -class Artifact { - /** - * Constructs a new Artifact. - * @alias module:model/Artifact - */ - constructor() { - - Artifact.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Artifact from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Artifact} obj Optional instance to populate. - * @return {module:model/Artifact} The populated Artifact instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Artifact(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('resultId')) { - obj['resultId'] = ApiClient.convertToType(data['resultId'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = ApiClient.convertToType(data['filename'], 'String'); - } - if (data.hasOwnProperty('additionalMetadata')) { - obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], Object); - } - } - return obj; - } - - -} - -/** - * Unique ID of the artifact - * @member {String} id - */ -Artifact.prototype['id'] = undefined; - -/** - * ID of test result to attach artifact to - * @member {String} resultId - */ -Artifact.prototype['resultId'] = undefined; - -/** - * ID of pet to update - * @member {String} filename - */ -Artifact.prototype['filename'] = undefined; - -/** - * Additional data to pass to server - * @member {Object} additionalMetadata - */ -Artifact.prototype['additionalMetadata'] = undefined; - - - - - - -export default Artifact; - diff --git a/src/model/ArtifactList.js b/src/model/ArtifactList.js deleted file mode 100644 index 6d83974..0000000 --- a/src/model/ArtifactList.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Artifact from './Artifact'; -import Pagination from './Pagination'; - -/** - * The ArtifactList model module. - * @module model/ArtifactList - * @version 1.0.0 - */ -class ArtifactList { - /** - * Constructs a new ArtifactList. - * @alias module:model/ArtifactList - */ - constructor() { - - ArtifactList.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ArtifactList from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ArtifactList} obj Optional instance to populate. - * @return {module:model/ArtifactList} The populated ArtifactList instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ArtifactList(); - - if (data.hasOwnProperty('artifacts')) { - obj['artifacts'] = ApiClient.convertToType(data['artifacts'], [Artifact]); - } - if (data.hasOwnProperty('pagination')) { - obj['pagination'] = Pagination.constructFromObject(data['pagination']); - } - } - return obj; - } - - -} - -/** - * @member {Array.} artifacts - */ -ArtifactList.prototype['artifacts'] = undefined; - -/** - * @member {module:model/Pagination} pagination - */ -ArtifactList.prototype['pagination'] = undefined; - - - - - - -export default ArtifactList; - diff --git a/src/model/Group.js b/src/model/Group.js deleted file mode 100644 index eeac3c7..0000000 --- a/src/model/Group.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Group model module. - * @module model/Group - * @version 1.0.0 - */ -class Group { - /** - * Constructs a new Group. - * @alias module:model/Group - */ - constructor() { - - Group.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Group from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Group} obj Optional instance to populate. - * @return {module:model/Group} The populated Group instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Group(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * Unique ID of the project - * @member {String} id - */ -Group.prototype['id'] = undefined; - -/** - * The name of the group - * @member {String} name - */ -Group.prototype['name'] = undefined; - - - - - - -export default Group; - diff --git a/src/model/GroupList.js b/src/model/GroupList.js deleted file mode 100644 index 0f1e144..0000000 --- a/src/model/GroupList.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Group from './Group'; -import Pagination from './Pagination'; - -/** - * The GroupList model module. - * @module model/GroupList - * @version 1.0.0 - */ -class GroupList { - /** - * Constructs a new GroupList. - * @alias module:model/GroupList - */ - constructor() { - - GroupList.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a GroupList from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GroupList} obj Optional instance to populate. - * @return {module:model/GroupList} The populated GroupList instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new GroupList(); - - if (data.hasOwnProperty('groups')) { - obj['groups'] = ApiClient.convertToType(data['groups'], [Group]); - } - if (data.hasOwnProperty('pagination')) { - obj['pagination'] = Pagination.constructFromObject(data['pagination']); - } - } - return obj; - } - - -} - -/** - * @member {Array.} groups - */ -GroupList.prototype['groups'] = undefined; - -/** - * @member {module:model/Pagination} pagination - */ -GroupList.prototype['pagination'] = undefined; - - - - - - -export default GroupList; - diff --git a/src/model/Health.js b/src/model/Health.js deleted file mode 100644 index a5493de..0000000 --- a/src/model/Health.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Health model module. - * @module model/Health - * @version 1.0.0 - */ -class Health { - /** - * Constructs a new Health. - * @alias module:model/Health - */ - constructor() { - - Health.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Health from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Health} obj Optional instance to populate. - * @return {module:model/Health} The populated Health instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Health(); - - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = ApiClient.convertToType(data['message'], 'String'); - } - } - return obj; - } - - -} - -/** - * The status of the database, one of \"OK\", \"Error\", \"Pending\" - * @member {String} status - */ -Health.prototype['status'] = undefined; - -/** - * A message to explain the current status - * @member {String} message - */ -Health.prototype['message'] = undefined; - - - - - - -export default Health; - diff --git a/src/model/HealthInfo.js b/src/model/HealthInfo.js deleted file mode 100644 index 84eab9a..0000000 --- a/src/model/HealthInfo.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The HealthInfo model module. - * @module model/HealthInfo - * @version 1.0.0 - */ -class HealthInfo { - /** - * Constructs a new HealthInfo. - * @alias module:model/HealthInfo - */ - constructor() { - - HealthInfo.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a HealthInfo from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/HealthInfo} obj Optional instance to populate. - * @return {module:model/HealthInfo} The populated HealthInfo instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new HealthInfo(); - - if (data.hasOwnProperty('frontend')) { - obj['frontend'] = ApiClient.convertToType(data['frontend'], 'String'); - } - if (data.hasOwnProperty('backend')) { - obj['backend'] = ApiClient.convertToType(data['backend'], 'String'); - } - if (data.hasOwnProperty('api_ui')) { - obj['api_ui'] = ApiClient.convertToType(data['api_ui'], 'String'); - } - } - return obj; - } - - -} - -/** - * The URL of the frontend - * @member {String} frontend - */ -HealthInfo.prototype['frontend'] = undefined; - -/** - * The URL of the backend - * @member {String} backend - */ -HealthInfo.prototype['backend'] = undefined; - -/** - * The URL to the UI for the API - * @member {String} api_ui - */ -HealthInfo.prototype['api_ui'] = undefined; - - - - - - -export default HealthInfo; - diff --git a/src/model/InlineObject.js b/src/model/InlineObject.js deleted file mode 100644 index 56e209e..0000000 --- a/src/model/InlineObject.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject model module. - * @module model/InlineObject - * @version 1.0.0 - */ -class InlineObject { - /** - * Constructs a new InlineObject. - * @alias module:model/InlineObject - * @param resultId {String} ID of result to attach artifact to - * @param filename {String} ID of pet to update - * @param file {File} file to upload - */ - constructor(resultId, filename, file) { - - InlineObject.initialize(this, resultId, filename, file); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, resultId, filename, file) { - obj['resultId'] = resultId; - obj['filename'] = filename; - obj['file'] = file; - } - - /** - * Constructs a InlineObject from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject} obj Optional instance to populate. - * @return {module:model/InlineObject} The populated InlineObject instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject(); - - if (data.hasOwnProperty('resultId')) { - obj['resultId'] = ApiClient.convertToType(data['resultId'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = ApiClient.convertToType(data['filename'], 'String'); - } - if (data.hasOwnProperty('file')) { - obj['file'] = ApiClient.convertToType(data['file'], File); - } - if (data.hasOwnProperty('additionalMetadata')) { - obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], Object); - } - } - return obj; - } - - -} - -/** - * ID of result to attach artifact to - * @member {String} resultId - */ -InlineObject.prototype['resultId'] = undefined; - -/** - * ID of pet to update - * @member {String} filename - */ -InlineObject.prototype['filename'] = undefined; - -/** - * file to upload - * @member {File} file - */ -InlineObject.prototype['file'] = undefined; - -/** - * Additional data to pass to server - * @member {Object} additionalMetadata - */ -InlineObject.prototype['additionalMetadata'] = undefined; - - - - - - -export default InlineObject; - diff --git a/src/model/InlineObject1.js b/src/model/InlineObject1.js deleted file mode 100644 index 59823c6..0000000 --- a/src/model/InlineObject1.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject1 model module. - * @module model/InlineObject1 - * @version 1.0.0 - */ -class InlineObject1 { - /** - * Constructs a new InlineObject1. - * @alias module:model/InlineObject1 - * @param importFile {File} The file to import - */ - constructor(importFile) { - - InlineObject1.initialize(this, importFile); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, importFile) { - obj['importFile'] = importFile; - } - - /** - * Constructs a InlineObject1 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject1} obj Optional instance to populate. - * @return {module:model/InlineObject1} The populated InlineObject1 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject1(); - - if (data.hasOwnProperty('importFile')) { - obj['importFile'] = ApiClient.convertToType(data['importFile'], File); - } - } - return obj; - } - - -} - -/** - * The file to import - * @member {File} importFile - */ -InlineObject1.prototype['importFile'] = undefined; - - - - - - -export default InlineObject1; - diff --git a/src/model/InlineResponse200.js b/src/model/InlineResponse200.js deleted file mode 100644 index 2c1a527..0000000 --- a/src/model/InlineResponse200.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineResponse200 model module. - * @module model/InlineResponse200 - * @version 1.0.0 - */ -class InlineResponse200 { - /** - * Constructs a new InlineResponse200. - * @alias module:model/InlineResponse200 - */ - constructor() { - - InlineResponse200.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineResponse200 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineResponse200} obj Optional instance to populate. - * @return {module:model/InlineResponse200} The populated InlineResponse200 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineResponse200(); - - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * The machine-readable name of report type - * @member {String} type - */ -InlineResponse200.prototype['type'] = undefined; - -/** - * The human-readable name of report type - * @member {String} name - */ -InlineResponse200.prototype['name'] = undefined; - - - - - - -export default InlineResponse200; - diff --git a/src/model/ModelImport.js b/src/model/ModelImport.js deleted file mode 100644 index b2499da..0000000 --- a/src/model/ModelImport.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ModelImport model module. - * @module model/ModelImport - * @version 1.0.0 - */ -class ModelImport { - /** - * Constructs a new ModelImport. - * @alias module:model/ModelImport - */ - constructor() { - - ModelImport.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ModelImport from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ModelImport} obj Optional instance to populate. - * @return {module:model/ModelImport} The populated ModelImport instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ModelImport(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = ApiClient.convertToType(data['filename'], 'String'); - } - if (data.hasOwnProperty('format')) { - obj['format'] = ApiClient.convertToType(data['format'], 'String'); - } - if (data.hasOwnProperty('run_id')) { - obj['run_id'] = ApiClient.convertToType(data['run_id'], 'String'); - } - } - return obj; - } - - -} - -/** - * The database ID of the import - * @member {String} id - */ -ModelImport.prototype['id'] = undefined; - -/** - * The current status of the import, can be one of \"pending\", \"running\", \"done\" - * @member {String} status - */ -ModelImport.prototype['status'] = undefined; - -/** - * The name of the file that was uploaded - * @member {String} filename - */ -ModelImport.prototype['filename'] = undefined; - -/** - * The format of the file uploaded - * @member {String} format - */ -ModelImport.prototype['format'] = undefined; - -/** - * The ID of the run from the import - * @member {String} run_id - */ -ModelImport.prototype['run_id'] = undefined; - - - - - - -export default ModelImport; - diff --git a/src/model/Pagination.js b/src/model/Pagination.js deleted file mode 100644 index 40329e5..0000000 --- a/src/model/Pagination.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Pagination model module. - * @module model/Pagination - * @version 1.0.0 - */ -class Pagination { - /** - * Constructs a new Pagination. - * @alias module:model/Pagination - */ - constructor() { - - Pagination.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Pagination from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Pagination} obj Optional instance to populate. - * @return {module:model/Pagination} The populated Pagination instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Pagination(); - - if (data.hasOwnProperty('page')) { - obj['page'] = ApiClient.convertToType(data['page'], 'Number'); - } - if (data.hasOwnProperty('pageSize')) { - obj['pageSize'] = ApiClient.convertToType(data['pageSize'], 'Number'); - } - if (data.hasOwnProperty('totalPages')) { - obj['totalPages'] = ApiClient.convertToType(data['totalPages'], 'Number'); - } - if (data.hasOwnProperty('totalItems')) { - obj['totalItems'] = ApiClient.convertToType(data['totalItems'], 'Number'); - } - } - return obj; - } - - -} - -/** - * The current page number - * @member {Number} page - */ -Pagination.prototype['page'] = undefined; - -/** - * The number of items per page - * @member {Number} pageSize - */ -Pagination.prototype['pageSize'] = undefined; - -/** - * The total number of pages - * @member {Number} totalPages - */ -Pagination.prototype['totalPages'] = undefined; - -/** - * The total number of items for this query - * @member {Number} totalItems - */ -Pagination.prototype['totalItems'] = undefined; - - - - - - -export default Pagination; - diff --git a/src/model/Project.js b/src/model/Project.js deleted file mode 100644 index ca301e8..0000000 --- a/src/model/Project.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Project model module. - * @module model/Project - * @version 1.0.0 - */ -class Project { - /** - * Constructs a new Project. - * @alias module:model/Project - */ - constructor() { - - Project.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Project from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Project} obj Optional instance to populate. - * @return {module:model/Project} The populated Project instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Project(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('title')) { - obj['title'] = ApiClient.convertToType(data['title'], 'String'); - } - if (data.hasOwnProperty('ownerId')) { - obj['ownerId'] = ApiClient.convertToType(data['ownerId'], 'String'); - } - if (data.hasOwnProperty('groupId')) { - obj['groupId'] = ApiClient.convertToType(data['groupId'], 'String'); - } - } - return obj; - } - - -} - -/** - * Unique ID of the project - * @member {String} id - */ -Project.prototype['id'] = undefined; - -/** - * The machine name of the project - * @member {String} name - */ -Project.prototype['name'] = undefined; - -/** - * The human-readable title of the project - * @member {String} title - */ -Project.prototype['title'] = undefined; - -/** - * The ID of the owner of this project - * @member {String} ownerId - */ -Project.prototype['ownerId'] = undefined; - -/** - * The ID of the group of this project - * @member {String} groupId - */ -Project.prototype['groupId'] = undefined; - - - - - - -export default Project; - diff --git a/src/model/ProjectList.js b/src/model/ProjectList.js deleted file mode 100644 index b41ff87..0000000 --- a/src/model/ProjectList.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Pagination from './Pagination'; -import Project from './Project'; - -/** - * The ProjectList model module. - * @module model/ProjectList - * @version 1.0.0 - */ -class ProjectList { - /** - * Constructs a new ProjectList. - * @alias module:model/ProjectList - */ - constructor() { - - ProjectList.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ProjectList from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ProjectList} obj Optional instance to populate. - * @return {module:model/ProjectList} The populated ProjectList instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ProjectList(); - - if (data.hasOwnProperty('projects')) { - obj['projects'] = ApiClient.convertToType(data['projects'], [Project]); - } - if (data.hasOwnProperty('pagination')) { - obj['pagination'] = Pagination.constructFromObject(data['pagination']); - } - } - return obj; - } - - -} - -/** - * @member {Array.} projects - */ -ProjectList.prototype['projects'] = undefined; - -/** - * @member {module:model/Pagination} pagination - */ -ProjectList.prototype['pagination'] = undefined; - - - - - - -export default ProjectList; - diff --git a/src/model/Report.js b/src/model/Report.js deleted file mode 100644 index 6052699..0000000 --- a/src/model/Report.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ReportParameters from './ReportParameters'; - -/** - * The Report model module. - * @module model/Report - * @version 1.0.0 - */ -class Report { - /** - * Constructs a new Report. - * @alias module:model/Report - */ - constructor() { - - Report.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Report from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Report} obj Optional instance to populate. - * @return {module:model/Report} The populated Report instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Report(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = ApiClient.convertToType(data['filename'], 'String'); - } - if (data.hasOwnProperty('mimetype')) { - obj['mimetype'] = ApiClient.convertToType(data['mimetype'], 'String'); - } - if (data.hasOwnProperty('url')) { - obj['url'] = ApiClient.convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('download_url')) { - obj['download_url'] = ApiClient.convertToType(data['download_url'], 'String'); - } - if (data.hasOwnProperty('view_url')) { - obj['view_url'] = ApiClient.convertToType(data['view_url'], 'String'); - } - if (data.hasOwnProperty('parameters')) { - obj['parameters'] = ReportParameters.constructFromObject(data['parameters']); - } - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - } - return obj; - } - - -} - -/** - * Unique ID of the project - * @member {String} id - */ -Report.prototype['id'] = undefined; - -/** - * The filename of the report - * @member {String} filename - */ -Report.prototype['filename'] = undefined; - -/** - * The mime type of the downloadable file - * @member {String} mimetype - */ -Report.prototype['mimetype'] = undefined; - -/** - * The URL to the downloadable report (deprecated) - * @member {String} url - */ -Report.prototype['url'] = undefined; - -/** - * The URL to the downloadable report - * @member {String} download_url - */ -Report.prototype['download_url'] = undefined; - -/** - * The URL to the viewable report - * @member {String} view_url - */ -Report.prototype['view_url'] = undefined; - -/** - * @member {module:model/ReportParameters} parameters - */ -Report.prototype['parameters'] = undefined; - -/** - * The status of the report, one of \"pending\", \"running\", \"done\" - * @member {String} status - */ -Report.prototype['status'] = undefined; - - - - - - -export default Report; - diff --git a/src/model/ReportList.js b/src/model/ReportList.js deleted file mode 100644 index ca8e700..0000000 --- a/src/model/ReportList.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Pagination from './Pagination'; -import Report from './Report'; - -/** - * The ReportList model module. - * @module model/ReportList - * @version 1.0.0 - */ -class ReportList { - /** - * Constructs a new ReportList. - * @alias module:model/ReportList - */ - constructor() { - - ReportList.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ReportList from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ReportList} obj Optional instance to populate. - * @return {module:model/ReportList} The populated ReportList instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ReportList(); - - if (data.hasOwnProperty('reports')) { - obj['reports'] = ApiClient.convertToType(data['reports'], [Report]); - } - if (data.hasOwnProperty('pagination')) { - obj['pagination'] = Pagination.constructFromObject(data['pagination']); - } - } - return obj; - } - - -} - -/** - * @member {Array.} reports - */ -ReportList.prototype['reports'] = undefined; - -/** - * @member {module:model/Pagination} pagination - */ -ReportList.prototype['pagination'] = undefined; - - - - - - -export default ReportList; - diff --git a/src/model/ReportParameters.js b/src/model/ReportParameters.js deleted file mode 100644 index 69d9728..0000000 --- a/src/model/ReportParameters.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ReportParameters model module. - * @module model/ReportParameters - * @version 1.0.0 - */ -class ReportParameters { - /** - * Constructs a new ReportParameters. - * @alias module:model/ReportParameters - */ - constructor() { - - ReportParameters.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ReportParameters from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ReportParameters} obj Optional instance to populate. - * @return {module:model/ReportParameters} The populated ReportParameters instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ReportParameters(); - - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('filter')) { - obj['filter'] = ApiClient.convertToType(data['filter'], 'String'); - } - if (data.hasOwnProperty('source')) { - obj['source'] = ApiClient.convertToType(data['source'], 'String'); - } - } - return obj; - } - - -} - -/** - * The type of report to generate - * @member {String} type - */ -ReportParameters.prototype['type'] = undefined; - -/** - * A regular expression to filter test results by - * @member {String} filter - */ -ReportParameters.prototype['filter'] = undefined; - -/** - * The source of the test results - * @member {String} source - */ -ReportParameters.prototype['source'] = undefined; - - - - - - -export default ReportParameters; - diff --git a/src/model/Result.js b/src/model/Result.js deleted file mode 100644 index 2188e7e..0000000 --- a/src/model/Result.js +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Result model module. - * @module model/Result - * @version 1.0.0 - */ -class Result { - /** - * Constructs a new Result. - * @alias module:model/Result - */ - constructor() { - - Result.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Result from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Result} obj Optional instance to populate. - * @return {module:model/Result} The populated Result instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Result(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('test_id')) { - obj['test_id'] = ApiClient.convertToType(data['test_id'], 'String'); - } - if (data.hasOwnProperty('start_time')) { - obj['start_time'] = ApiClient.convertToType(data['start_time'], 'Number'); - } - if (data.hasOwnProperty('duration')) { - obj['duration'] = ApiClient.convertToType(data['duration'], 'Number'); - } - if (data.hasOwnProperty('result')) { - obj['result'] = ApiClient.convertToType(data['result'], 'String'); - } - if (data.hasOwnProperty('metadata')) { - obj['metadata'] = ApiClient.convertToType(data['metadata'], Object); - } - if (data.hasOwnProperty('params')) { - obj['params'] = ApiClient.convertToType(data['params'], Object); - } - if (data.hasOwnProperty('source')) { - obj['source'] = ApiClient.convertToType(data['source'], 'String'); - } - } - return obj; - } - - -} - -/** - * Unique ID of the test result - * @member {String} id - */ -Result.prototype['id'] = undefined; - -/** - * Unique id - * @member {String} test_id - */ -Result.prototype['test_id'] = undefined; - -/** - * Timestamp of starttime. - * @member {Number} start_time - */ -Result.prototype['start_time'] = undefined; - -/** - * Duration of test in seconds. - * @member {Number} duration - */ -Result.prototype['duration'] = undefined; - -/** - * Status of result. - * @member {module:model/Result.ResultEnum} result - */ -Result.prototype['result'] = undefined; - -/** - * @member {Object} metadata - */ -Result.prototype['metadata'] = undefined; - -/** - * @member {Object} params - */ -Result.prototype['params'] = undefined; - -/** - * Where the data came from (useful for filtering) - * @member {String} source - */ -Result.prototype['source'] = undefined; - - - - - -/** - * Allowed values for the result property. - * @enum {String} - * @readonly - */ -Result['ResultEnum'] = { - - /** - * value: "passed" - * @const - */ - "passed": "passed", - - /** - * value: "failed" - * @const - */ - "failed": "failed", - - /** - * value: "error" - * @const - */ - "error": "error", - - /** - * value: "skipped" - * @const - */ - "skipped": "skipped" -}; - - - -export default Result; - diff --git a/src/model/ResultList.js b/src/model/ResultList.js deleted file mode 100644 index 6c0a0a1..0000000 --- a/src/model/ResultList.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Pagination from './Pagination'; -import Result from './Result'; - -/** - * The ResultList model module. - * @module model/ResultList - * @version 1.0.0 - */ -class ResultList { - /** - * Constructs a new ResultList. - * @alias module:model/ResultList - */ - constructor() { - - ResultList.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ResultList from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ResultList} obj Optional instance to populate. - * @return {module:model/ResultList} The populated ResultList instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ResultList(); - - if (data.hasOwnProperty('results')) { - obj['results'] = ApiClient.convertToType(data['results'], [Result]); - } - if (data.hasOwnProperty('pagination')) { - obj['pagination'] = Pagination.constructFromObject(data['pagination']); - } - } - return obj; - } - - -} - -/** - * @member {Array.} results - */ -ResultList.prototype['results'] = undefined; - -/** - * @member {module:model/Pagination} pagination - */ -ResultList.prototype['pagination'] = undefined; - - - - - - -export default ResultList; - diff --git a/src/model/Run.js b/src/model/Run.js deleted file mode 100644 index c3efffb..0000000 --- a/src/model/Run.js +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The Run model module. - * @module model/Run - * @version 1.0.0 - */ -class Run { - /** - * Constructs a new Run. - * @alias module:model/Run - */ - constructor() { - - Run.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a Run from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Run} obj Optional instance to populate. - * @return {module:model/Run} The populated Run instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Run(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('created')) { - obj['created'] = ApiClient.convertToType(data['created'], 'String'); - } - if (data.hasOwnProperty('duration')) { - obj['duration'] = ApiClient.convertToType(data['duration'], 'Number'); - } - if (data.hasOwnProperty('source')) { - obj['source'] = ApiClient.convertToType(data['source'], 'String'); - } - if (data.hasOwnProperty('start_time')) { - obj['start_time'] = ApiClient.convertToType(data['start_time'], 'Number'); - } - if (data.hasOwnProperty('summary')) { - obj['summary'] = ApiClient.convertToType(data['summary'], Object); - } - if (data.hasOwnProperty('metadata')) { - obj['metadata'] = ApiClient.convertToType(data['metadata'], Object); - } - } - return obj; - } - - -} - -/** - * Unique ID of the test run - * @member {String} id - */ -Run.prototype['id'] = undefined; - -/** - * The time this record was created - * @member {String} created - */ -Run.prototype['created'] = undefined; - -/** - * Duration of tests in seconds - * @member {Number} duration - */ -Run.prototype['duration'] = undefined; - -/** - * A source for this test run - * @member {String} source - */ -Run.prototype['source'] = undefined; - -/** - * The time the test run started - * @member {Number} start_time - */ -Run.prototype['start_time'] = undefined; - -/** - * A summary of the test results - * @member {Object} summary - */ -Run.prototype['summary'] = undefined; - -/** - * Extra data for this run - * @member {Object} metadata - */ -Run.prototype['metadata'] = undefined; - - - - - - -export default Run; - diff --git a/src/model/RunList.js b/src/model/RunList.js deleted file mode 100644 index f0b750a..0000000 --- a/src/model/RunList.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Pagination from './Pagination'; -import Run from './Run'; - -/** - * The RunList model module. - * @module model/RunList - * @version 1.0.0 - */ -class RunList { - /** - * Constructs a new RunList. - * @alias module:model/RunList - */ - constructor() { - - RunList.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a RunList from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/RunList} obj Optional instance to populate. - * @return {module:model/RunList} The populated RunList instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new RunList(); - - if (data.hasOwnProperty('runs')) { - obj['runs'] = ApiClient.convertToType(data['runs'], [Run]); - } - if (data.hasOwnProperty('pagination')) { - obj['pagination'] = Pagination.constructFromObject(data['pagination']); - } - } - return obj; - } - - -} - -/** - * @member {Array.} runs - */ -RunList.prototype['runs'] = undefined; - -/** - * @member {module:model/Pagination} pagination - */ -RunList.prototype['pagination'] = undefined; - - - - - - -export default RunList; - diff --git a/src/model/WidgetConfig.js b/src/model/WidgetConfig.js deleted file mode 100644 index a778fbf..0000000 --- a/src/model/WidgetConfig.js +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The WidgetConfig model module. - * @module model/WidgetConfig - * @version 1.0.0 - */ -class WidgetConfig { - /** - * Constructs a new WidgetConfig. - * @alias module:model/WidgetConfig - */ - constructor() { - - WidgetConfig.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a WidgetConfig from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/WidgetConfig} obj Optional instance to populate. - * @return {module:model/WidgetConfig} The populated WidgetConfig instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new WidgetConfig(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('widget')) { - obj['widget'] = ApiClient.convertToType(data['widget'], 'String'); - } - if (data.hasOwnProperty('project')) { - obj['project'] = ApiClient.convertToType(data['project'], 'String'); - } - if (data.hasOwnProperty('weight')) { - obj['weight'] = ApiClient.convertToType(data['weight'], 'Number'); - } - if (data.hasOwnProperty('params')) { - obj['params'] = ApiClient.convertToType(data['params'], Object); - } - if (data.hasOwnProperty('title')) { - obj['title'] = ApiClient.convertToType(data['title'], 'String'); - } - } - return obj; - } - - -} - -/** - * The internal ID of the WidgetConfig - * @member {String} id - */ -WidgetConfig.prototype['id'] = undefined; - -/** - * The type of widget, one of either \"widget\" or \"view\" - * @member {String} type - */ -WidgetConfig.prototype['type'] = undefined; - -/** - * The widget to render, from the list at /widget/types - * @member {String} widget - */ -WidgetConfig.prototype['widget'] = undefined; - -/** - * The project for which the widget is designed - * @member {String} project - */ -WidgetConfig.prototype['project'] = undefined; - -/** - * The weighting for the widget, lower weight means it will display first - * @member {Number} weight - */ -WidgetConfig.prototype['weight'] = undefined; - -/** - * A dictionary of parameters to send to the widget - * @member {Object} params - */ -WidgetConfig.prototype['params'] = undefined; - -/** - * The title shown on the widget or page - * @member {String} title - */ -WidgetConfig.prototype['title'] = undefined; - - - - - - -export default WidgetConfig; - diff --git a/src/model/WidgetConfigList.js b/src/model/WidgetConfigList.js deleted file mode 100644 index dc2300b..0000000 --- a/src/model/WidgetConfigList.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Pagination from './Pagination'; -import WidgetConfig from './WidgetConfig'; - -/** - * The WidgetConfigList model module. - * @module model/WidgetConfigList - * @version 1.0.0 - */ -class WidgetConfigList { - /** - * Constructs a new WidgetConfigList. - * @alias module:model/WidgetConfigList - */ - constructor() { - - WidgetConfigList.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a WidgetConfigList from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/WidgetConfigList} obj Optional instance to populate. - * @return {module:model/WidgetConfigList} The populated WidgetConfigList instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new WidgetConfigList(); - - if (data.hasOwnProperty('widgets')) { - obj['widgets'] = ApiClient.convertToType(data['widgets'], [WidgetConfig]); - } - if (data.hasOwnProperty('pagination')) { - obj['pagination'] = Pagination.constructFromObject(data['pagination']); - } - } - return obj; - } - - -} - -/** - * @member {Array.} widgets - */ -WidgetConfigList.prototype['widgets'] = undefined; - -/** - * @member {module:model/Pagination} pagination - */ -WidgetConfigList.prototype['pagination'] = undefined; - - - - - - -export default WidgetConfigList; - diff --git a/src/model/WidgetParam.js b/src/model/WidgetParam.js deleted file mode 100644 index 6840274..0000000 --- a/src/model/WidgetParam.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The WidgetParam model module. - * @module model/WidgetParam - * @version 1.0.0 - */ -class WidgetParam { - /** - * Constructs a new WidgetParam. - * @alias module:model/WidgetParam - */ - constructor() { - - WidgetParam.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a WidgetParam from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/WidgetParam} obj Optional instance to populate. - * @return {module:model/WidgetParam} The populated WidgetParam instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new WidgetParam(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('description')) { - obj['description'] = ApiClient.convertToType(data['description'], 'String'); - } - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); - } - } - return obj; - } - - -} - -/** - * The name of the parameter to supply to the widget - * @member {String} name - */ -WidgetParam.prototype['name'] = undefined; - -/** - * A friendly description of the parameter - * @member {String} description - */ -WidgetParam.prototype['description'] = undefined; - -/** - * The type of parameter (string, integer, etc) - * @member {String} type - */ -WidgetParam.prototype['type'] = undefined; - - - - - - -export default WidgetParam; - diff --git a/src/model/WidgetType.js b/src/model/WidgetType.js deleted file mode 100644 index 562ce9a..0000000 --- a/src/model/WidgetType.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import WidgetParam from './WidgetParam'; - -/** - * The WidgetType model module. - * @module model/WidgetType - * @version 1.0.0 - */ -class WidgetType { - /** - * Constructs a new WidgetType. - * @alias module:model/WidgetType - */ - constructor() { - - WidgetType.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a WidgetType from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/WidgetType} obj Optional instance to populate. - * @return {module:model/WidgetType} The populated WidgetType instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new WidgetType(); - - if (data.hasOwnProperty('id')) { - obj['id'] = ApiClient.convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('title')) { - obj['title'] = ApiClient.convertToType(data['title'], 'String'); - } - if (data.hasOwnProperty('description')) { - obj['description'] = ApiClient.convertToType(data['description'], 'String'); - } - if (data.hasOwnProperty('params')) { - obj['params'] = ApiClient.convertToType(data['params'], [WidgetParam]); - } - } - return obj; - } - - -} - -/** - * A unique identifier for this widget type - * @member {String} id - */ -WidgetType.prototype['id'] = undefined; - -/** - * The title of the widget, for users to see - * @member {String} title - */ -WidgetType.prototype['title'] = undefined; - -/** - * A helpful description of this widget type - * @member {String} description - */ -WidgetType.prototype['description'] = undefined; - -/** - * A dictionary or map of parameters to values - * @member {Array.} params - */ -WidgetType.prototype['params'] = undefined; - - - - - - -export default WidgetType; - diff --git a/src/model/WidgetTypeList.js b/src/model/WidgetTypeList.js deleted file mode 100644 index 4499ef9..0000000 --- a/src/model/WidgetTypeList.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ibutsu API - * A system to store and query test results - * - * The version of the OpenAPI document: 1.9.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Pagination from './Pagination'; -import WidgetType from './WidgetType'; - -/** - * The WidgetTypeList model module. - * @module model/WidgetTypeList - * @version 1.0.0 - */ -class WidgetTypeList { - /** - * Constructs a new WidgetTypeList. - * @alias module:model/WidgetTypeList - */ - constructor() { - - WidgetTypeList.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a WidgetTypeList from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/WidgetTypeList} obj Optional instance to populate. - * @return {module:model/WidgetTypeList} The populated WidgetTypeList instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new WidgetTypeList(); - - if (data.hasOwnProperty('types')) { - obj['types'] = ApiClient.convertToType(data['types'], [WidgetType]); - } - if (data.hasOwnProperty('pagination')) { - obj['pagination'] = Pagination.constructFromObject(data['pagination']); - } - } - return obj; - } - - -} - -/** - * @member {Array.} types - */ -WidgetTypeList.prototype['types'] = undefined; - -/** - * @member {module:model/Pagination} pagination - */ -WidgetTypeList.prototype['pagination'] = undefined; - - - - - - -export default WidgetTypeList; - diff --git a/src/models/AccountRecovery.ts b/src/models/AccountRecovery.ts new file mode 100644 index 0000000..e0b8640 --- /dev/null +++ b/src/models/AccountRecovery.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AccountRecovery + */ +export interface AccountRecovery { + /** + * The user's e-mail address + * @type {string} + * @memberof AccountRecovery + */ + email: string; +} + +/** + * Check if a given object implements the AccountRecovery interface. + */ +export function instanceOfAccountRecovery(value: object): value is AccountRecovery { + if (!('email' in value) || value['email'] === undefined) return false; + return true; +} + +export function AccountRecoveryFromJSON(json: any): AccountRecovery { + return AccountRecoveryFromJSONTyped(json, false); +} + +export function AccountRecoveryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountRecovery { + if (json == null) { + return json; + } + return { + + 'email': json['email'], + }; +} + +export function AccountRecoveryToJSON(json: any): AccountRecovery { + return AccountRecoveryToJSONTyped(json, false); +} + +export function AccountRecoveryToJSONTyped(value?: AccountRecovery | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'email': value['email'], + }; +} + diff --git a/src/models/AccountRegistration.ts b/src/models/AccountRegistration.ts new file mode 100644 index 0000000..fef157b --- /dev/null +++ b/src/models/AccountRegistration.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AccountRegistration + */ +export interface AccountRegistration { + /** + * The user's e-mail address + * @type {string} + * @memberof AccountRegistration + */ + email: string; + /** + * The user's password + * @type {string} + * @memberof AccountRegistration + */ + password: string; +} + +/** + * Check if a given object implements the AccountRegistration interface. + */ +export function instanceOfAccountRegistration(value: object): value is AccountRegistration { + if (!('email' in value) || value['email'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; +} + +export function AccountRegistrationFromJSON(json: any): AccountRegistration { + return AccountRegistrationFromJSONTyped(json, false); +} + +export function AccountRegistrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountRegistration { + if (json == null) { + return json; + } + return { + + 'email': json['email'], + 'password': json['password'], + }; +} + +export function AccountRegistrationToJSON(json: any): AccountRegistration { + return AccountRegistrationToJSONTyped(json, false); +} + +export function AccountRegistrationToJSONTyped(value?: AccountRegistration | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'email': value['email'], + 'password': value['password'], + }; +} + diff --git a/src/models/AccountReset.ts b/src/models/AccountReset.ts new file mode 100644 index 0000000..d13f098 --- /dev/null +++ b/src/models/AccountReset.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface AccountReset + */ +export interface AccountReset { + /** + * The activation code generated by Ibutsu + * @type {string} + * @memberof AccountReset + */ + activationCode: string; + /** + * The user's password + * @type {string} + * @memberof AccountReset + */ + password: string; +} + +/** + * Check if a given object implements the AccountReset interface. + */ +export function instanceOfAccountReset(value: object): value is AccountReset { + if (!('activationCode' in value) || value['activationCode'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; +} + +export function AccountResetFromJSON(json: any): AccountReset { + return AccountResetFromJSONTyped(json, false); +} + +export function AccountResetFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountReset { + if (json == null) { + return json; + } + return { + + 'activationCode': json['activation_code'], + 'password': json['password'], + }; +} + +export function AccountResetToJSON(json: any): AccountReset { + return AccountResetToJSONTyped(json, false); +} + +export function AccountResetToJSONTyped(value?: AccountReset | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'activation_code': value['activationCode'], + 'password': value['password'], + }; +} + diff --git a/src/models/Artifact.ts b/src/models/Artifact.ts new file mode 100644 index 0000000..036942c --- /dev/null +++ b/src/models/Artifact.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Artifact + */ +export interface Artifact { + /** + * Unique ID of the artifact + * @type {string} + * @memberof Artifact + */ + id?: string; + /** + * ID of test result to attach artifact to + * @type {string} + * @memberof Artifact + */ + resultId?: string; + /** + * ID of test run to attach artifact to + * @type {string} + * @memberof Artifact + */ + runId?: string; + /** + * name of the file + * @type {string} + * @memberof Artifact + */ + filename?: string; + /** + * Additional data to pass to server + * @type {object} + * @memberof Artifact + */ + additionalMetadata?: object; + /** + * The date this artifact was uploaded + * @type {string} + * @memberof Artifact + */ + uploadDate?: string; +} + +/** + * Check if a given object implements the Artifact interface. + */ +export function instanceOfArtifact(value: object): value is Artifact { + return true; +} + +export function ArtifactFromJSON(json: any): Artifact { + return ArtifactFromJSONTyped(json, false); +} + +export function ArtifactFromJSONTyped(json: any, ignoreDiscriminator: boolean): Artifact { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'resultId': json['result_id'] == null ? undefined : json['result_id'], + 'runId': json['run_id'] == null ? undefined : json['run_id'], + 'filename': json['filename'] == null ? undefined : json['filename'], + 'additionalMetadata': json['additional_metadata'] == null ? undefined : json['additional_metadata'], + 'uploadDate': json['upload_date'] == null ? undefined : json['upload_date'], + }; +} + +export function ArtifactToJSON(json: any): Artifact { + return ArtifactToJSONTyped(json, false); +} + +export function ArtifactToJSONTyped(value?: Artifact | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'result_id': value['resultId'], + 'run_id': value['runId'], + 'filename': value['filename'], + 'additional_metadata': value['additionalMetadata'], + 'upload_date': value['uploadDate'], + }; +} + diff --git a/src/models/ArtifactList.ts b/src/models/ArtifactList.ts new file mode 100644 index 0000000..be6363a --- /dev/null +++ b/src/models/ArtifactList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Artifact } from './Artifact'; +import { + ArtifactFromJSON, + ArtifactFromJSONTyped, + ArtifactToJSON, + ArtifactToJSONTyped, +} from './Artifact'; + +/** + * + * @export + * @interface ArtifactList + */ +export interface ArtifactList { + /** + * + * @type {Array} + * @memberof ArtifactList + */ + artifacts?: Array; + /** + * + * @type {Pagination} + * @memberof ArtifactList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the ArtifactList interface. + */ +export function instanceOfArtifactList(value: object): value is ArtifactList { + return true; +} + +export function ArtifactListFromJSON(json: any): ArtifactList { + return ArtifactListFromJSONTyped(json, false); +} + +export function ArtifactListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactList { + if (json == null) { + return json; + } + return { + + 'artifacts': json['artifacts'] == null ? undefined : ((json['artifacts'] as Array).map(ArtifactFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function ArtifactListToJSON(json: any): ArtifactList { + return ArtifactListToJSONTyped(json, false); +} + +export function ArtifactListToJSONTyped(value?: ArtifactList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'artifacts': value['artifacts'] == null ? undefined : ((value['artifacts'] as Array).map(ArtifactToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/CreateToken.ts b/src/models/CreateToken.ts new file mode 100644 index 0000000..0ae0973 --- /dev/null +++ b/src/models/CreateToken.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateToken + */ +export interface CreateToken { + /** + * The name given to this token + * @type {string} + * @memberof CreateToken + */ + name: string; + /** + * The date and time when this token expires + * @type {string} + * @memberof CreateToken + */ + expires: string | null; +} + +/** + * Check if a given object implements the CreateToken interface. + */ +export function instanceOfCreateToken(value: object): value is CreateToken { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expires' in value) || value['expires'] === undefined) return false; + return true; +} + +export function CreateTokenFromJSON(json: any): CreateToken { + return CreateTokenFromJSONTyped(json, false); +} + +export function CreateTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateToken { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'expires': json['expires'], + }; +} + +export function CreateTokenToJSON(json: any): CreateToken { + return CreateTokenToJSONTyped(json, false); +} + +export function CreateTokenToJSONTyped(value?: CreateToken | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'expires': value['expires'], + }; +} + diff --git a/src/models/Credentials.ts b/src/models/Credentials.ts new file mode 100644 index 0000000..f7e084d --- /dev/null +++ b/src/models/Credentials.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Credentials + */ +export interface Credentials { + /** + * The e-mail address of the user + * @type {string} + * @memberof Credentials + */ + email: string; + /** + * The password for the user + * @type {string} + * @memberof Credentials + */ + password: string; +} + +/** + * Check if a given object implements the Credentials interface. + */ +export function instanceOfCredentials(value: object): value is Credentials { + if (!('email' in value) || value['email'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; +} + +export function CredentialsFromJSON(json: any): Credentials { + return CredentialsFromJSONTyped(json, false); +} + +export function CredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Credentials { + if (json == null) { + return json; + } + return { + + 'email': json['email'], + 'password': json['password'], + }; +} + +export function CredentialsToJSON(json: any): Credentials { + return CredentialsToJSONTyped(json, false); +} + +export function CredentialsToJSONTyped(value?: Credentials | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'email': value['email'], + 'password': value['password'], + }; +} + diff --git a/src/models/Dashboard.ts b/src/models/Dashboard.ts new file mode 100644 index 0000000..5a96727 --- /dev/null +++ b/src/models/Dashboard.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Dashboard + */ +export interface Dashboard { + /** + * Unique ID of the dashboard + * @type {string} + * @memberof Dashboard + */ + id?: string; + /** + * The title of the dashboard + * @type {string} + * @memberof Dashboard + */ + title?: string; + /** + * A basic description of the dashboard + * @type {string} + * @memberof Dashboard + */ + description?: string; + /** + * An optional set of filters + * @type {string} + * @memberof Dashboard + */ + filters?: string; + /** + * The ID of the project this dashboard is associated with + * @type {string} + * @memberof Dashboard + */ + projectId?: string; + /** + * The ID of a user this dashboard might be associated with + * @type {string} + * @memberof Dashboard + */ + userId?: string; +} + +/** + * Check if a given object implements the Dashboard interface. + */ +export function instanceOfDashboard(value: object): value is Dashboard { + return true; +} + +export function DashboardFromJSON(json: any): Dashboard { + return DashboardFromJSONTyped(json, false); +} + +export function DashboardFromJSONTyped(json: any, ignoreDiscriminator: boolean): Dashboard { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'title': json['title'] == null ? undefined : json['title'], + 'description': json['description'] == null ? undefined : json['description'], + 'filters': json['filters'] == null ? undefined : json['filters'], + 'projectId': json['project_id'] == null ? undefined : json['project_id'], + 'userId': json['user_id'] == null ? undefined : json['user_id'], + }; +} + +export function DashboardToJSON(json: any): Dashboard { + return DashboardToJSONTyped(json, false); +} + +export function DashboardToJSONTyped(value?: Dashboard | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'title': value['title'], + 'description': value['description'], + 'filters': value['filters'], + 'project_id': value['projectId'], + 'user_id': value['userId'], + }; +} + diff --git a/src/models/DashboardList.ts b/src/models/DashboardList.ts new file mode 100644 index 0000000..4f6e71a --- /dev/null +++ b/src/models/DashboardList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Dashboard } from './Dashboard'; +import { + DashboardFromJSON, + DashboardFromJSONTyped, + DashboardToJSON, + DashboardToJSONTyped, +} from './Dashboard'; + +/** + * + * @export + * @interface DashboardList + */ +export interface DashboardList { + /** + * + * @type {Array} + * @memberof DashboardList + */ + dashboards?: Array; + /** + * + * @type {Pagination} + * @memberof DashboardList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the DashboardList interface. + */ +export function instanceOfDashboardList(value: object): value is DashboardList { + return true; +} + +export function DashboardListFromJSON(json: any): DashboardList { + return DashboardListFromJSONTyped(json, false); +} + +export function DashboardListFromJSONTyped(json: any, ignoreDiscriminator: boolean): DashboardList { + if (json == null) { + return json; + } + return { + + 'dashboards': json['dashboards'] == null ? undefined : ((json['dashboards'] as Array).map(DashboardFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function DashboardListToJSON(json: any): DashboardList { + return DashboardListToJSONTyped(json, false); +} + +export function DashboardListToJSONTyped(value?: DashboardList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'dashboards': value['dashboards'] == null ? undefined : ((value['dashboards'] as Array).map(DashboardToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/Group.ts b/src/models/Group.ts new file mode 100644 index 0000000..2c4a60b --- /dev/null +++ b/src/models/Group.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Group + */ +export interface Group { + /** + * Unique ID of the group + * @type {string} + * @memberof Group + */ + id?: string; + /** + * The name of the group + * @type {string} + * @memberof Group + */ + name?: string; +} + +/** + * Check if a given object implements the Group interface. + */ +export function instanceOfGroup(value: object): value is Group { + return true; +} + +export function GroupFromJSON(json: any): Group { + return GroupFromJSONTyped(json, false); +} + +export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Group { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + }; +} + +export function GroupToJSON(json: any): Group { + return GroupToJSONTyped(json, false); +} + +export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + }; +} + diff --git a/src/models/GroupList.ts b/src/models/GroupList.ts new file mode 100644 index 0000000..c1cc968 --- /dev/null +++ b/src/models/GroupList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Group } from './Group'; +import { + GroupFromJSON, + GroupFromJSONTyped, + GroupToJSON, + GroupToJSONTyped, +} from './Group'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; + +/** + * + * @export + * @interface GroupList + */ +export interface GroupList { + /** + * + * @type {Array} + * @memberof GroupList + */ + groups?: Array; + /** + * + * @type {Pagination} + * @memberof GroupList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the GroupList interface. + */ +export function instanceOfGroupList(value: object): value is GroupList { + return true; +} + +export function GroupListFromJSON(json: any): GroupList { + return GroupListFromJSONTyped(json, false); +} + +export function GroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupList { + if (json == null) { + return json; + } + return { + + 'groups': json['groups'] == null ? undefined : ((json['groups'] as Array).map(GroupFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function GroupListToJSON(json: any): GroupList { + return GroupListToJSONTyped(json, false); +} + +export function GroupListToJSONTyped(value?: GroupList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array).map(GroupToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/Health.ts b/src/models/Health.ts new file mode 100644 index 0000000..57f2712 --- /dev/null +++ b/src/models/Health.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Health + */ +export interface Health { + /** + * The status of the database, one of "OK", "Error", "Pending" + * @type {string} + * @memberof Health + */ + status?: string; + /** + * A message to explain the current status + * @type {string} + * @memberof Health + */ + message?: string; +} + +/** + * Check if a given object implements the Health interface. + */ +export function instanceOfHealth(value: object): value is Health { + return true; +} + +export function HealthFromJSON(json: any): Health { + return HealthFromJSONTyped(json, false); +} + +export function HealthFromJSONTyped(json: any, ignoreDiscriminator: boolean): Health { + if (json == null) { + return json; + } + return { + + 'status': json['status'] == null ? undefined : json['status'], + 'message': json['message'] == null ? undefined : json['message'], + }; +} + +export function HealthToJSON(json: any): Health { + return HealthToJSONTyped(json, false); +} + +export function HealthToJSONTyped(value?: Health | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'status': value['status'], + 'message': value['message'], + }; +} + diff --git a/src/models/HealthInfo.ts b/src/models/HealthInfo.ts new file mode 100644 index 0000000..9ad324e --- /dev/null +++ b/src/models/HealthInfo.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface HealthInfo + */ +export interface HealthInfo { + /** + * The URL of the frontend + * @type {string} + * @memberof HealthInfo + */ + frontend?: string; + /** + * The URL of the backend + * @type {string} + * @memberof HealthInfo + */ + backend?: string; + /** + * The URL to the UI for the API + * @type {string} + * @memberof HealthInfo + */ + apiUi?: string; +} + +/** + * Check if a given object implements the HealthInfo interface. + */ +export function instanceOfHealthInfo(value: object): value is HealthInfo { + return true; +} + +export function HealthInfoFromJSON(json: any): HealthInfo { + return HealthInfoFromJSONTyped(json, false); +} + +export function HealthInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthInfo { + if (json == null) { + return json; + } + return { + + 'frontend': json['frontend'] == null ? undefined : json['frontend'], + 'backend': json['backend'] == null ? undefined : json['backend'], + 'apiUi': json['api_ui'] == null ? undefined : json['api_ui'], + }; +} + +export function HealthInfoToJSON(json: any): HealthInfo { + return HealthInfoToJSONTyped(json, false); +} + +export function HealthInfoToJSONTyped(value?: HealthInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'frontend': value['frontend'], + 'backend': value['backend'], + 'api_ui': value['apiUi'], + }; +} + diff --git a/src/models/Import.ts b/src/models/Import.ts new file mode 100644 index 0000000..3a1c717 --- /dev/null +++ b/src/models/Import.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Import + */ +export interface Import { + /** + * The database ID of the import + * @type {string} + * @memberof Import + */ + id?: string; + /** + * The current status of the import, can be one of "pending", "running", "done" + * @type {string} + * @memberof Import + */ + status?: string; + /** + * The name of the file that was uploaded + * @type {string} + * @memberof Import + */ + filename?: string; + /** + * The format of the file uploaded + * @type {string} + * @memberof Import + */ + format?: string; + /** + * The ID of the run from the import + * @type {string} + * @memberof Import + */ + runId?: string; +} + +/** + * Check if a given object implements the Import interface. + */ +export function instanceOfImport(value: object): value is Import { + return true; +} + +export function ImportFromJSON(json: any): Import { + return ImportFromJSONTyped(json, false); +} + +export function ImportFromJSONTyped(json: any, ignoreDiscriminator: boolean): Import { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'status': json['status'] == null ? undefined : json['status'], + 'filename': json['filename'] == null ? undefined : json['filename'], + 'format': json['format'] == null ? undefined : json['format'], + 'runId': json['run_id'] == null ? undefined : json['run_id'], + }; +} + +export function ImportToJSON(json: any): Import { + return ImportToJSONTyped(json, false); +} + +export function ImportToJSONTyped(value?: Import | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'status': value['status'], + 'filename': value['filename'], + 'format': value['format'], + 'run_id': value['runId'], + }; +} + diff --git a/src/models/LoginConfig.ts b/src/models/LoginConfig.ts new file mode 100644 index 0000000..5bf3af9 --- /dev/null +++ b/src/models/LoginConfig.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface LoginConfig + */ +export interface LoginConfig { + /** + * The client ID for the provider + * @type {string} + * @memberof LoginConfig + */ + clientId?: string; + /** + * The redirect URI for the provider to call back + * @type {string} + * @memberof LoginConfig + */ + redirectUri?: string; + /** + * The OAuth2 permission scope + * @type {string} + * @memberof LoginConfig + */ + scope?: string; +} + +/** + * Check if a given object implements the LoginConfig interface. + */ +export function instanceOfLoginConfig(value: object): value is LoginConfig { + return true; +} + +export function LoginConfigFromJSON(json: any): LoginConfig { + return LoginConfigFromJSONTyped(json, false); +} + +export function LoginConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginConfig { + if (json == null) { + return json; + } + return { + + 'clientId': json['client_id'] == null ? undefined : json['client_id'], + 'redirectUri': json['redirect_uri'] == null ? undefined : json['redirect_uri'], + 'scope': json['scope'] == null ? undefined : json['scope'], + }; +} + +export function LoginConfigToJSON(json: any): LoginConfig { + return LoginConfigToJSONTyped(json, false); +} + +export function LoginConfigToJSONTyped(value?: LoginConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'client_id': value['clientId'], + 'redirect_uri': value['redirectUri'], + 'scope': value['scope'], + }; +} + diff --git a/src/models/LoginError.ts b/src/models/LoginError.ts new file mode 100644 index 0000000..8179078 --- /dev/null +++ b/src/models/LoginError.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface LoginError + */ +export interface LoginError { + /** + * An error code generated by the server + * @type {string} + * @memberof LoginError + */ + code?: string; + /** + * The error message that corresponds with the error code + * @type {string} + * @memberof LoginError + */ + message?: string; +} + +/** + * Check if a given object implements the LoginError interface. + */ +export function instanceOfLoginError(value: object): value is LoginError { + return true; +} + +export function LoginErrorFromJSON(json: any): LoginError { + return LoginErrorFromJSONTyped(json, false); +} + +export function LoginErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginError { + if (json == null) { + return json; + } + return { + + 'code': json['code'] == null ? undefined : json['code'], + 'message': json['message'] == null ? undefined : json['message'], + }; +} + +export function LoginErrorToJSON(json: any): LoginError { + return LoginErrorToJSONTyped(json, false); +} + +export function LoginErrorToJSONTyped(value?: LoginError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'code': value['code'], + 'message': value['message'], + }; +} + diff --git a/src/models/LoginSupport.ts b/src/models/LoginSupport.ts new file mode 100644 index 0000000..50d5fbc --- /dev/null +++ b/src/models/LoginSupport.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface LoginSupport + */ +export interface LoginSupport { + /** + * Flag to see if email/password login is available + * @type {boolean} + * @memberof LoginSupport + */ + user?: boolean; + /** + * Flag to see if Keycloak login is available + * @type {boolean} + * @memberof LoginSupport + */ + keycloak?: boolean; + /** + * Flag to see if Google login is available + * @type {boolean} + * @memberof LoginSupport + */ + google?: boolean; + /** + * Flag to see if GitHub login is available + * @type {boolean} + * @memberof LoginSupport + */ + github?: boolean; + /** + * Flag to see if Facebook login is available + * @type {boolean} + * @memberof LoginSupport + */ + facebook?: boolean; + /** + * Flag to see if GitLab login is available + * @type {boolean} + * @memberof LoginSupport + */ + gitlab?: boolean; +} + +/** + * Check if a given object implements the LoginSupport interface. + */ +export function instanceOfLoginSupport(value: object): value is LoginSupport { + return true; +} + +export function LoginSupportFromJSON(json: any): LoginSupport { + return LoginSupportFromJSONTyped(json, false); +} + +export function LoginSupportFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginSupport { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : json['user'], + 'keycloak': json['keycloak'] == null ? undefined : json['keycloak'], + 'google': json['google'] == null ? undefined : json['google'], + 'github': json['github'] == null ? undefined : json['github'], + 'facebook': json['facebook'] == null ? undefined : json['facebook'], + 'gitlab': json['gitlab'] == null ? undefined : json['gitlab'], + }; +} + +export function LoginSupportToJSON(json: any): LoginSupport { + return LoginSupportToJSONTyped(json, false); +} + +export function LoginSupportToJSONTyped(value?: LoginSupport | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': value['user'], + 'keycloak': value['keycloak'], + 'google': value['google'], + 'github': value['github'], + 'facebook': value['facebook'], + 'gitlab': value['gitlab'], + }; +} + diff --git a/src/models/LoginToken.ts b/src/models/LoginToken.ts new file mode 100644 index 0000000..1980d0e --- /dev/null +++ b/src/models/LoginToken.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface LoginToken + */ +export interface LoginToken { + /** + * The JWT token returned from a successful login + * @type {string} + * @memberof LoginToken + */ + token?: string; +} + +/** + * Check if a given object implements the LoginToken interface. + */ +export function instanceOfLoginToken(value: object): value is LoginToken { + return true; +} + +export function LoginTokenFromJSON(json: any): LoginToken { + return LoginTokenFromJSONTyped(json, false); +} + +export function LoginTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginToken { + if (json == null) { + return json; + } + return { + + 'token': json['token'] == null ? undefined : json['token'], + }; +} + +export function LoginTokenToJSON(json: any): LoginToken { + return LoginTokenToJSONTyped(json, false); +} + +export function LoginTokenToJSONTyped(value?: LoginToken | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token': value['token'], + }; +} + diff --git a/src/models/Pagination.ts b/src/models/Pagination.ts new file mode 100644 index 0000000..ca07b00 --- /dev/null +++ b/src/models/Pagination.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Pagination + */ +export interface Pagination { + /** + * The current page number + * @type {number} + * @memberof Pagination + */ + page?: number; + /** + * The number of items per page + * @type {number} + * @memberof Pagination + */ + pageSize?: number; + /** + * The total number of pages + * @type {number} + * @memberof Pagination + */ + totalPages?: number; + /** + * The total number of items for this query + * @type {number} + * @memberof Pagination + */ + totalItems?: number; +} + +/** + * Check if a given object implements the Pagination interface. + */ +export function instanceOfPagination(value: object): value is Pagination { + return true; +} + +export function PaginationFromJSON(json: any): Pagination { + return PaginationFromJSONTyped(json, false); +} + +export function PaginationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pagination { + if (json == null) { + return json; + } + return { + + 'page': json['page'] == null ? undefined : json['page'], + 'pageSize': json['pageSize'] == null ? undefined : json['pageSize'], + 'totalPages': json['totalPages'] == null ? undefined : json['totalPages'], + 'totalItems': json['totalItems'] == null ? undefined : json['totalItems'], + }; +} + +export function PaginationToJSON(json: any): Pagination { + return PaginationToJSONTyped(json, false); +} + +export function PaginationToJSONTyped(value?: Pagination | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'page': value['page'], + 'pageSize': value['pageSize'], + 'totalPages': value['totalPages'], + 'totalItems': value['totalItems'], + }; +} + diff --git a/src/models/Project.ts b/src/models/Project.ts new file mode 100644 index 0000000..3e2184b --- /dev/null +++ b/src/models/Project.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Project + */ +export interface Project { + /** + * Unique ID of the project + * @type {string} + * @memberof Project + */ + id?: string; + /** + * The machine name of the project + * @type {string} + * @memberof Project + */ + name?: string; + /** + * The human-readable title of the project + * @type {string} + * @memberof Project + */ + title?: string; + /** + * The ID of the owner of this project + * @type {string} + * @memberof Project + */ + ownerId?: string | null; + /** + * The ID of the group of this project + * @type {string} + * @memberof Project + */ + groupId?: string | null; +} + +/** + * Check if a given object implements the Project interface. + */ +export function instanceOfProject(value: object): value is Project { + return true; +} + +export function ProjectFromJSON(json: any): Project { + return ProjectFromJSONTyped(json, false); +} + +export function ProjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): Project { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'title': json['title'] == null ? undefined : json['title'], + 'ownerId': json['owner_id'] == null ? undefined : json['owner_id'], + 'groupId': json['group_id'] == null ? undefined : json['group_id'], + }; +} + +export function ProjectToJSON(json: any): Project { + return ProjectToJSONTyped(json, false); +} + +export function ProjectToJSONTyped(value?: Project | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'title': value['title'], + 'owner_id': value['ownerId'], + 'group_id': value['groupId'], + }; +} + diff --git a/src/models/ProjectList.ts b/src/models/ProjectList.ts new file mode 100644 index 0000000..8fd96c1 --- /dev/null +++ b/src/models/ProjectList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Project } from './Project'; +import { + ProjectFromJSON, + ProjectFromJSONTyped, + ProjectToJSON, + ProjectToJSONTyped, +} from './Project'; + +/** + * + * @export + * @interface ProjectList + */ +export interface ProjectList { + /** + * + * @type {Array} + * @memberof ProjectList + */ + projects?: Array; + /** + * + * @type {Pagination} + * @memberof ProjectList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the ProjectList interface. + */ +export function instanceOfProjectList(value: object): value is ProjectList { + return true; +} + +export function ProjectListFromJSON(json: any): ProjectList { + return ProjectListFromJSONTyped(json, false); +} + +export function ProjectListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectList { + if (json == null) { + return json; + } + return { + + 'projects': json['projects'] == null ? undefined : ((json['projects'] as Array).map(ProjectFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function ProjectListToJSON(json: any): ProjectList { + return ProjectListToJSONTyped(json, false); +} + +export function ProjectListToJSONTyped(value?: ProjectList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'projects': value['projects'] == null ? undefined : ((value['projects'] as Array).map(ProjectToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/Result.ts b/src/models/Result.ts new file mode 100644 index 0000000..e39d777 --- /dev/null +++ b/src/models/Result.ts @@ -0,0 +1,170 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Result + */ +export interface Result { + /** + * Unique ID of the test result + * @type {string} + * @memberof Result + */ + id?: string; + /** + * Unique id + * @type {string} + * @memberof Result + */ + testId?: string; + /** + * Timestamp of starttime. + * @type {string} + * @memberof Result + */ + startTime?: string; + /** + * Duration of test in seconds. + * @type {number} + * @memberof Result + */ + duration?: number; + /** + * Status of result. + * @type {string} + * @memberof Result + */ + result?: ResultResultEnum; + /** + * A component + * @type {string} + * @memberof Result + */ + component?: string | null; + /** + * The environment which is being tested + * @type {string} + * @memberof Result + */ + env?: string | null; + /** + * The run this result is associated with + * @type {string} + * @memberof Result + */ + runId?: string | null; + /** + * The project this run is associated with + * @type {string} + * @memberof Result + */ + projectId?: string | null; + /** + * + * @type {object} + * @memberof Result + */ + metadata?: object; + /** + * + * @type {object} + * @memberof Result + */ + params?: object; + /** + * Where the data came from (useful for filtering) + * @type {string} + * @memberof Result + */ + source?: string; +} + + +/** + * @export + */ +export const ResultResultEnum = { + Passed: 'passed', + Failed: 'failed', + Error: 'error', + Skipped: 'skipped', + Xpassed: 'xpassed', + Xfailed: 'xfailed', + Manual: 'manual', + Blocked: 'blocked' +} as const; +export type ResultResultEnum = typeof ResultResultEnum[keyof typeof ResultResultEnum]; + + +/** + * Check if a given object implements the Result interface. + */ +export function instanceOfResult(value: object): value is Result { + return true; +} + +export function ResultFromJSON(json: any): Result { + return ResultFromJSONTyped(json, false); +} + +export function ResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): Result { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'testId': json['test_id'] == null ? undefined : json['test_id'], + 'startTime': json['start_time'] == null ? undefined : json['start_time'], + 'duration': json['duration'] == null ? undefined : json['duration'], + 'result': json['result'] == null ? undefined : json['result'], + 'component': json['component'] == null ? undefined : json['component'], + 'env': json['env'] == null ? undefined : json['env'], + 'runId': json['run_id'] == null ? undefined : json['run_id'], + 'projectId': json['project_id'] == null ? undefined : json['project_id'], + 'metadata': json['metadata'] == null ? undefined : json['metadata'], + 'params': json['params'] == null ? undefined : json['params'], + 'source': json['source'] == null ? undefined : json['source'], + }; +} + +export function ResultToJSON(json: any): Result { + return ResultToJSONTyped(json, false); +} + +export function ResultToJSONTyped(value?: Result | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'test_id': value['testId'], + 'start_time': value['startTime'], + 'duration': value['duration'], + 'result': value['result'], + 'component': value['component'], + 'env': value['env'], + 'run_id': value['runId'], + 'project_id': value['projectId'], + 'metadata': value['metadata'], + 'params': value['params'], + 'source': value['source'], + }; +} + diff --git a/src/models/ResultList.ts b/src/models/ResultList.ts new file mode 100644 index 0000000..f22f58c --- /dev/null +++ b/src/models/ResultList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Result } from './Result'; +import { + ResultFromJSON, + ResultFromJSONTyped, + ResultToJSON, + ResultToJSONTyped, +} from './Result'; + +/** + * + * @export + * @interface ResultList + */ +export interface ResultList { + /** + * + * @type {Array} + * @memberof ResultList + */ + results?: Array; + /** + * + * @type {Pagination} + * @memberof ResultList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the ResultList interface. + */ +export function instanceOfResultList(value: object): value is ResultList { + return true; +} + +export function ResultListFromJSON(json: any): ResultList { + return ResultListFromJSONTyped(json, false); +} + +export function ResultListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResultList { + if (json == null) { + return json; + } + return { + + 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(ResultFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function ResultListToJSON(json: any): ResultList { + return ResultListToJSONTyped(json, false); +} + +export function ResultListToJSONTyped(value?: ResultList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(ResultToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/Run.ts b/src/models/Run.ts new file mode 100644 index 0000000..16e3c1f --- /dev/null +++ b/src/models/Run.ts @@ -0,0 +1,137 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Run + */ +export interface Run { + /** + * Unique ID of the test run + * @type {string} + * @memberof Run + */ + id?: string; + /** + * The time this record was created + * @type {string} + * @memberof Run + */ + created?: string; + /** + * Duration of tests in seconds + * @type {number} + * @memberof Run + */ + duration?: number; + /** + * A source for this test run + * @type {string} + * @memberof Run + */ + source?: string | null; + /** + * The time the test run started + * @type {string} + * @memberof Run + */ + startTime?: string; + /** + * A component + * @type {string} + * @memberof Run + */ + component?: string | null; + /** + * The environment which is being tested + * @type {string} + * @memberof Run + */ + env?: string | null; + /** + * The project this run is associated with + * @type {string} + * @memberof Run + */ + projectId?: string | null; + /** + * A summary of the test results + * @type {object} + * @memberof Run + */ + summary?: object; + /** + * Extra metadata for this run + * @type {object} + * @memberof Run + */ + metadata?: object | null; +} + +/** + * Check if a given object implements the Run interface. + */ +export function instanceOfRun(value: object): value is Run { + return true; +} + +export function RunFromJSON(json: any): Run { + return RunFromJSONTyped(json, false); +} + +export function RunFromJSONTyped(json: any, ignoreDiscriminator: boolean): Run { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'created': json['created'] == null ? undefined : json['created'], + 'duration': json['duration'] == null ? undefined : json['duration'], + 'source': json['source'] == null ? undefined : json['source'], + 'startTime': json['start_time'] == null ? undefined : json['start_time'], + 'component': json['component'] == null ? undefined : json['component'], + 'env': json['env'] == null ? undefined : json['env'], + 'projectId': json['project_id'] == null ? undefined : json['project_id'], + 'summary': json['summary'] == null ? undefined : json['summary'], + 'metadata': json['metadata'] == null ? undefined : json['metadata'], + }; +} + +export function RunToJSON(json: any): Run { + return RunToJSONTyped(json, false); +} + +export function RunToJSONTyped(value?: Run | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'created': value['created'], + 'duration': value['duration'], + 'source': value['source'], + 'start_time': value['startTime'], + 'component': value['component'], + 'env': value['env'], + 'project_id': value['projectId'], + 'summary': value['summary'], + 'metadata': value['metadata'], + }; +} + diff --git a/src/models/RunList.ts b/src/models/RunList.ts new file mode 100644 index 0000000..a85f0ed --- /dev/null +++ b/src/models/RunList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Run } from './Run'; +import { + RunFromJSON, + RunFromJSONTyped, + RunToJSON, + RunToJSONTyped, +} from './Run'; + +/** + * + * @export + * @interface RunList + */ +export interface RunList { + /** + * + * @type {Array} + * @memberof RunList + */ + runs?: Array; + /** + * + * @type {Pagination} + * @memberof RunList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the RunList interface. + */ +export function instanceOfRunList(value: object): value is RunList { + return true; +} + +export function RunListFromJSON(json: any): RunList { + return RunListFromJSONTyped(json, false); +} + +export function RunListFromJSONTyped(json: any, ignoreDiscriminator: boolean): RunList { + if (json == null) { + return json; + } + return { + + 'runs': json['runs'] == null ? undefined : ((json['runs'] as Array).map(RunFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function RunListToJSON(json: any): RunList { + return RunListToJSONTyped(json, false); +} + +export function RunListToJSONTyped(value?: RunList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'runs': value['runs'] == null ? undefined : ((value['runs'] as Array).map(RunToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/Token.ts b/src/models/Token.ts new file mode 100644 index 0000000..9c83f23 --- /dev/null +++ b/src/models/Token.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface Token + */ +export interface Token { + /** + * The ID of the token + * @type {string} + * @memberof Token + */ + id: string; + /** + * The ID of the user that owns this token + * @type {string} + * @memberof Token + */ + userId: string; + /** + * The name given to this token + * @type {string} + * @memberof Token + */ + name: string; + /** + * The date and time when this token expires + * @type {string} + * @memberof Token + */ + expires?: string | null; + /** + * The token itself + * @type {string} + * @memberof Token + */ + token: string; +} + +/** + * Check if a given object implements the Token interface. + */ +export function instanceOfToken(value: object): value is Token { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('userId' in value) || value['userId'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function TokenFromJSON(json: any): Token { + return TokenFromJSONTyped(json, false); +} + +export function TokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): Token { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'userId': json['user_id'], + 'name': json['name'], + 'expires': json['expires'] == null ? undefined : json['expires'], + 'token': json['token'], + }; +} + +export function TokenToJSON(json: any): Token { + return TokenToJSONTyped(json, false); +} + +export function TokenToJSONTyped(value?: Token | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'user_id': value['userId'], + 'name': value['name'], + 'expires': value['expires'], + 'token': value['token'], + }; +} + diff --git a/src/models/TokenList.ts b/src/models/TokenList.ts new file mode 100644 index 0000000..130a6be --- /dev/null +++ b/src/models/TokenList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { Token } from './Token'; +import { + TokenFromJSON, + TokenFromJSONTyped, + TokenToJSON, + TokenToJSONTyped, +} from './Token'; + +/** + * + * @export + * @interface TokenList + */ +export interface TokenList { + /** + * + * @type {Array} + * @memberof TokenList + */ + tokens?: Array; + /** + * + * @type {Pagination} + * @memberof TokenList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the TokenList interface. + */ +export function instanceOfTokenList(value: object): value is TokenList { + return true; +} + +export function TokenListFromJSON(json: any): TokenList { + return TokenListFromJSONTyped(json, false); +} + +export function TokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenList { + if (json == null) { + return json; + } + return { + + 'tokens': json['tokens'] == null ? undefined : ((json['tokens'] as Array).map(TokenFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function TokenListToJSON(json: any): TokenList { + return TokenListToJSONTyped(json, false); +} + +export function TokenListToJSONTyped(value?: TokenList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'tokens': value['tokens'] == null ? undefined : ((value['tokens'] as Array).map(TokenToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/UpdateRun.ts b/src/models/UpdateRun.ts new file mode 100644 index 0000000..0d39f3f --- /dev/null +++ b/src/models/UpdateRun.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface UpdateRun + */ +export interface UpdateRun { + /** + * Extra data for this run + * @type {object} + * @memberof UpdateRun + */ + metadata?: object; +} + +/** + * Check if a given object implements the UpdateRun interface. + */ +export function instanceOfUpdateRun(value: object): value is UpdateRun { + return true; +} + +export function UpdateRunFromJSON(json: any): UpdateRun { + return UpdateRunFromJSONTyped(json, false); +} + +export function UpdateRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateRun { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : json['metadata'], + }; +} + +export function UpdateRunToJSON(json: any): UpdateRun { + return UpdateRunToJSONTyped(json, false); +} + +export function UpdateRunToJSONTyped(value?: UpdateRun | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': value['metadata'], + }; +} + diff --git a/src/models/User.ts b/src/models/User.ts new file mode 100644 index 0000000..4a49b02 --- /dev/null +++ b/src/models/User.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface User + */ +export interface User { + /** + * The ID of the user + * @type {string} + * @memberof User + */ + id?: string; + /** + * The user's e-mail address + * @type {string} + * @memberof User + */ + email: string; + /** + * The user's name + * @type {string} + * @memberof User + */ + name?: string | null; + /** + * Flag to show if a user is a super-admin + * @type {boolean} + * @memberof User + */ + isSuperadmin?: boolean; + /** + * Flag to show if the user is active + * @type {boolean} + * @memberof User + */ + isActive?: boolean; + /** + * The ID of the group of this project + * @type {string} + * @memberof User + */ + groupId?: string | null; +} + +/** + * Check if a given object implements the User interface. + */ +export function instanceOfUser(value: object): value is User { + if (!('email' in value) || value['email'] === undefined) return false; + return true; +} + +export function UserFromJSON(json: any): User { + return UserFromJSONTyped(json, false); +} + +export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'email': json['email'], + 'name': json['name'] == null ? undefined : json['name'], + 'isSuperadmin': json['is_superadmin'] == null ? undefined : json['is_superadmin'], + 'isActive': json['is_active'] == null ? undefined : json['is_active'], + 'groupId': json['group_id'] == null ? undefined : json['group_id'], + }; +} + +export function UserToJSON(json: any): User { + return UserToJSONTyped(json, false); +} + +export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'email': value['email'], + 'name': value['name'], + 'is_superadmin': value['isSuperadmin'], + 'is_active': value['isActive'], + 'group_id': value['groupId'], + }; +} + diff --git a/src/models/UserList.ts b/src/models/UserList.ts new file mode 100644 index 0000000..cd80c30 --- /dev/null +++ b/src/models/UserList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { User } from './User'; +import { + UserFromJSON, + UserFromJSONTyped, + UserToJSON, + UserToJSONTyped, +} from './User'; + +/** + * + * @export + * @interface UserList + */ +export interface UserList { + /** + * + * @type {Array} + * @memberof UserList + */ + users?: Array; + /** + * + * @type {Pagination} + * @memberof UserList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the UserList interface. + */ +export function instanceOfUserList(value: object): value is UserList { + return true; +} + +export function UserListFromJSON(json: any): UserList { + return UserListFromJSONTyped(json, false); +} + +export function UserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserList { + if (json == null) { + return json; + } + return { + + 'users': json['users'] == null ? undefined : ((json['users'] as Array).map(UserFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function UserListToJSON(json: any): UserList { + return UserListToJSONTyped(json, false); +} + +export function UserListToJSONTyped(value?: UserList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'users': value['users'] == null ? undefined : ((value['users'] as Array).map(UserToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/WidgetConfig.ts b/src/models/WidgetConfig.ts new file mode 100644 index 0000000..b579cdb --- /dev/null +++ b/src/models/WidgetConfig.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface WidgetConfig + */ +export interface WidgetConfig { + /** + * The internal ID of the WidgetConfig + * @type {string} + * @memberof WidgetConfig + */ + id?: string; + /** + * The type of widget, one of either "widget" or "view" + * @type {string} + * @memberof WidgetConfig + */ + type?: string; + /** + * The widget to render, from the list at /widget/types + * @type {string} + * @memberof WidgetConfig + */ + widget?: string; + /** + * The project ID for which the widget is designed + * @type {string} + * @memberof WidgetConfig + */ + projectId?: string; + /** + * The weighting for the widget, lower weight means it will display first + * @type {number} + * @memberof WidgetConfig + */ + weight?: number; + /** + * A dictionary of parameters to send to the widget + * @type {object} + * @memberof WidgetConfig + */ + params?: object; + /** + * The title shown on the widget or page + * @type {string} + * @memberof WidgetConfig + */ + title?: string; +} + +/** + * Check if a given object implements the WidgetConfig interface. + */ +export function instanceOfWidgetConfig(value: object): value is WidgetConfig { + return true; +} + +export function WidgetConfigFromJSON(json: any): WidgetConfig { + return WidgetConfigFromJSONTyped(json, false); +} + +export function WidgetConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetConfig { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'type': json['type'] == null ? undefined : json['type'], + 'widget': json['widget'] == null ? undefined : json['widget'], + 'projectId': json['project_id'] == null ? undefined : json['project_id'], + 'weight': json['weight'] == null ? undefined : json['weight'], + 'params': json['params'] == null ? undefined : json['params'], + 'title': json['title'] == null ? undefined : json['title'], + }; +} + +export function WidgetConfigToJSON(json: any): WidgetConfig { + return WidgetConfigToJSONTyped(json, false); +} + +export function WidgetConfigToJSONTyped(value?: WidgetConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'type': value['type'], + 'widget': value['widget'], + 'project_id': value['projectId'], + 'weight': value['weight'], + 'params': value['params'], + 'title': value['title'], + }; +} + diff --git a/src/models/WidgetConfigList.ts b/src/models/WidgetConfigList.ts new file mode 100644 index 0000000..3b8df8a --- /dev/null +++ b/src/models/WidgetConfigList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { WidgetConfig } from './WidgetConfig'; +import { + WidgetConfigFromJSON, + WidgetConfigFromJSONTyped, + WidgetConfigToJSON, + WidgetConfigToJSONTyped, +} from './WidgetConfig'; + +/** + * + * @export + * @interface WidgetConfigList + */ +export interface WidgetConfigList { + /** + * + * @type {Array} + * @memberof WidgetConfigList + */ + widgets?: Array; + /** + * + * @type {Pagination} + * @memberof WidgetConfigList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the WidgetConfigList interface. + */ +export function instanceOfWidgetConfigList(value: object): value is WidgetConfigList { + return true; +} + +export function WidgetConfigListFromJSON(json: any): WidgetConfigList { + return WidgetConfigListFromJSONTyped(json, false); +} + +export function WidgetConfigListFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetConfigList { + if (json == null) { + return json; + } + return { + + 'widgets': json['widgets'] == null ? undefined : ((json['widgets'] as Array).map(WidgetConfigFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function WidgetConfigListToJSON(json: any): WidgetConfigList { + return WidgetConfigListToJSONTyped(json, false); +} + +export function WidgetConfigListToJSONTyped(value?: WidgetConfigList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'widgets': value['widgets'] == null ? undefined : ((value['widgets'] as Array).map(WidgetConfigToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/WidgetParam.ts b/src/models/WidgetParam.ts new file mode 100644 index 0000000..1e41405 --- /dev/null +++ b/src/models/WidgetParam.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface WidgetParam + */ +export interface WidgetParam { + /** + * The name of the parameter to supply to the widget + * @type {string} + * @memberof WidgetParam + */ + name?: string; + /** + * A friendly description of the parameter + * @type {string} + * @memberof WidgetParam + */ + description?: string; + /** + * The type of parameter (string, integer, etc) + * @type {string} + * @memberof WidgetParam + */ + type?: string; +} + +/** + * Check if a given object implements the WidgetParam interface. + */ +export function instanceOfWidgetParam(value: object): value is WidgetParam { + return true; +} + +export function WidgetParamFromJSON(json: any): WidgetParam { + return WidgetParamFromJSONTyped(json, false); +} + +export function WidgetParamFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetParam { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'type': json['type'] == null ? undefined : json['type'], + }; +} + +export function WidgetParamToJSON(json: any): WidgetParam { + return WidgetParamToJSONTyped(json, false); +} + +export function WidgetParamToJSONTyped(value?: WidgetParam | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'description': value['description'], + 'type': value['type'], + }; +} + diff --git a/src/models/WidgetType.ts b/src/models/WidgetType.ts new file mode 100644 index 0000000..a733714 --- /dev/null +++ b/src/models/WidgetType.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { WidgetParam } from './WidgetParam'; +import { + WidgetParamFromJSON, + WidgetParamFromJSONTyped, + WidgetParamToJSON, + WidgetParamToJSONTyped, +} from './WidgetParam'; + +/** + * + * @export + * @interface WidgetType + */ +export interface WidgetType { + /** + * A unique identifier for this widget type + * @type {string} + * @memberof WidgetType + */ + id?: string; + /** + * The title of the widget, for users to see + * @type {string} + * @memberof WidgetType + */ + title?: string; + /** + * A helpful description of this widget type + * @type {string} + * @memberof WidgetType + */ + description?: string; + /** + * A dictionary or map of parameters to values + * @type {Array} + * @memberof WidgetType + */ + params?: Array; + /** + * The type of widget (widget, view) + * @type {string} + * @memberof WidgetType + */ + type?: string; +} + +/** + * Check if a given object implements the WidgetType interface. + */ +export function instanceOfWidgetType(value: object): value is WidgetType { + return true; +} + +export function WidgetTypeFromJSON(json: any): WidgetType { + return WidgetTypeFromJSONTyped(json, false); +} + +export function WidgetTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetType { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'title': json['title'] == null ? undefined : json['title'], + 'description': json['description'] == null ? undefined : json['description'], + 'params': json['params'] == null ? undefined : ((json['params'] as Array).map(WidgetParamFromJSON)), + 'type': json['type'] == null ? undefined : json['type'], + }; +} + +export function WidgetTypeToJSON(json: any): WidgetType { + return WidgetTypeToJSONTyped(json, false); +} + +export function WidgetTypeToJSONTyped(value?: WidgetType | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'title': value['title'], + 'description': value['description'], + 'params': value['params'] == null ? undefined : ((value['params'] as Array).map(WidgetParamToJSON)), + 'type': value['type'], + }; +} + diff --git a/src/models/WidgetTypeList.ts b/src/models/WidgetTypeList.ts new file mode 100644 index 0000000..a64857e --- /dev/null +++ b/src/models/WidgetTypeList.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { Pagination } from './Pagination'; +import { + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, +} from './Pagination'; +import type { WidgetType } from './WidgetType'; +import { + WidgetTypeFromJSON, + WidgetTypeFromJSONTyped, + WidgetTypeToJSON, + WidgetTypeToJSONTyped, +} from './WidgetType'; + +/** + * + * @export + * @interface WidgetTypeList + */ +export interface WidgetTypeList { + /** + * + * @type {Array} + * @memberof WidgetTypeList + */ + types?: Array; + /** + * + * @type {Pagination} + * @memberof WidgetTypeList + */ + pagination?: Pagination; +} + +/** + * Check if a given object implements the WidgetTypeList interface. + */ +export function instanceOfWidgetTypeList(value: object): value is WidgetTypeList { + return true; +} + +export function WidgetTypeListFromJSON(json: any): WidgetTypeList { + return WidgetTypeListFromJSONTyped(json, false); +} + +export function WidgetTypeListFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetTypeList { + if (json == null) { + return json; + } + return { + + 'types': json['types'] == null ? undefined : ((json['types'] as Array).map(WidgetTypeFromJSON)), + 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; +} + +export function WidgetTypeListToJSON(json: any): WidgetTypeList { + return WidgetTypeListToJSONTyped(json, false); +} + +export function WidgetTypeListToJSONTyped(value?: WidgetTypeList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'types': value['types'] == null ? undefined : ((value['types'] as Array).map(WidgetTypeToJSON)), + 'pagination': PaginationToJSON(value['pagination']), + }; +} + diff --git a/src/models/index.ts b/src/models/index.ts new file mode 100644 index 0000000..e8667e3 --- /dev/null +++ b/src/models/index.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AccountRecovery'; +export * from './AccountRegistration'; +export * from './AccountReset'; +export * from './Artifact'; +export * from './ArtifactList'; +export * from './CreateToken'; +export * from './Credentials'; +export * from './Dashboard'; +export * from './DashboardList'; +export * from './Group'; +export * from './GroupList'; +export * from './Health'; +export * from './HealthInfo'; +export * from './Import'; +export * from './LoginConfig'; +export * from './LoginError'; +export * from './LoginSupport'; +export * from './LoginToken'; +export * from './Pagination'; +export * from './Project'; +export * from './ProjectList'; +export * from './Result'; +export * from './ResultList'; +export * from './Run'; +export * from './RunList'; +export * from './Token'; +export * from './TokenList'; +export * from './UpdateRun'; +export * from './User'; +export * from './UserList'; +export * from './WidgetConfig'; +export * from './WidgetConfigList'; +export * from './WidgetParam'; +export * from './WidgetType'; +export * from './WidgetTypeList'; diff --git a/src/runtime.ts b/src/runtime.ts new file mode 100644 index 0000000..dc4f459 --- /dev/null +++ b/src/runtime.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ibutsu API + * A system to store and query test results + * + * The version of the OpenAPI document: 2.8.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "/api".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} From f951df9c61e25669c28a0c4795003b076875a4c8 Mon Sep 17 00:00:00 2001 From: mshriver Date: Tue, 4 Nov 2025 13:32:59 +0100 Subject: [PATCH 03/13] Remove unused imports and fix function sigs --- src/models/AccountRecovery.ts | 5 ++--- src/models/AccountRegistration.ts | 5 ++--- src/models/AccountReset.ts | 5 ++--- src/models/Artifact.ts | 5 ++--- src/models/ArtifactList.ts | 5 ++--- src/models/CreateToken.ts | 5 ++--- src/models/Credentials.ts | 5 ++--- src/models/Dashboard.ts | 5 ++--- src/models/DashboardList.ts | 5 ++--- src/models/Group.ts | 5 ++--- src/models/GroupList.ts | 5 ++--- src/models/Health.ts | 5 ++--- src/models/HealthInfo.ts | 5 ++--- src/models/Import.ts | 5 ++--- src/models/LoginConfig.ts | 5 ++--- src/models/LoginError.ts | 5 ++--- src/models/LoginSupport.ts | 5 ++--- src/models/LoginToken.ts | 5 ++--- src/models/Pagination.ts | 5 ++--- src/models/Project.ts | 5 ++--- src/models/ProjectList.ts | 5 ++--- src/models/Result.ts | 5 ++--- src/models/ResultList.ts | 5 ++--- src/models/Run.ts | 5 ++--- src/models/RunList.ts | 5 ++--- src/models/Token.ts | 5 ++--- src/models/TokenList.ts | 5 ++--- src/models/UpdateRun.ts | 5 ++--- src/models/User.ts | 5 ++--- src/models/UserList.ts | 5 ++--- src/models/WidgetConfig.ts | 5 ++--- src/models/WidgetConfigList.ts | 5 ++--- src/models/WidgetParam.ts | 5 ++--- src/models/WidgetType.ts | 5 ++--- src/models/WidgetTypeList.ts | 5 ++--- 35 files changed, 70 insertions(+), 105 deletions(-) diff --git a/src/models/AccountRecovery.ts b/src/models/AccountRecovery.ts index e0b8640..275a9de 100644 --- a/src/models/AccountRecovery.ts +++ b/src/models/AccountRecovery.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -49,8 +48,8 @@ export function AccountRecoveryFromJSONTyped(json: any, ignoreDiscriminator: boo }; } -export function AccountRecoveryToJSON(json: any): AccountRecovery { - return AccountRecoveryToJSONTyped(json, false); +export function AccountRecoveryToJSON(value?: AccountRecovery | null): any { + return AccountRecoveryToJSONTyped(value, false); } export function AccountRecoveryToJSONTyped(value?: AccountRecovery | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/AccountRegistration.ts b/src/models/AccountRegistration.ts index fef157b..777acb7 100644 --- a/src/models/AccountRegistration.ts +++ b/src/models/AccountRegistration.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -57,8 +56,8 @@ export function AccountRegistrationFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function AccountRegistrationToJSON(json: any): AccountRegistration { - return AccountRegistrationToJSONTyped(json, false); +export function AccountRegistrationToJSON(value?: AccountRegistration | null): any { + return AccountRegistrationToJSONTyped(value, false); } export function AccountRegistrationToJSONTyped(value?: AccountRegistration | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/AccountReset.ts b/src/models/AccountReset.ts index d13f098..8b151f5 100644 --- a/src/models/AccountReset.ts +++ b/src/models/AccountReset.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -57,8 +56,8 @@ export function AccountResetFromJSONTyped(json: any, ignoreDiscriminator: boolea }; } -export function AccountResetToJSON(json: any): AccountReset { - return AccountResetToJSONTyped(json, false); +export function AccountResetToJSON(value?: AccountReset | null): any { + return AccountResetToJSONTyped(value, false); } export function AccountResetToJSONTyped(value?: AccountReset | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Artifact.ts b/src/models/Artifact.ts index 036942c..ad3f042 100644 --- a/src/models/Artifact.ts +++ b/src/models/Artifact.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -83,8 +82,8 @@ export function ArtifactFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function ArtifactToJSON(json: any): Artifact { - return ArtifactToJSONTyped(json, false); +export function ArtifactToJSON(value?: Artifact | null): any { + return ArtifactToJSONTyped(value, false); } export function ArtifactToJSONTyped(value?: Artifact | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/ArtifactList.ts b/src/models/ArtifactList.ts index be6363a..c992471 100644 --- a/src/models/ArtifactList.ts +++ b/src/models/ArtifactList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function ArtifactListFromJSONTyped(json: any, ignoreDiscriminator: boolea }; } -export function ArtifactListToJSON(json: any): ArtifactList { - return ArtifactListToJSONTyped(json, false); +export function ArtifactListToJSON(value?: ArtifactList | null): any { + return ArtifactListToJSONTyped(value, false); } export function ArtifactListToJSONTyped(value?: ArtifactList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/CreateToken.ts b/src/models/CreateToken.ts index 0ae0973..a43b8de 100644 --- a/src/models/CreateToken.ts +++ b/src/models/CreateToken.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -57,8 +56,8 @@ export function CreateTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean }; } -export function CreateTokenToJSON(json: any): CreateToken { - return CreateTokenToJSONTyped(json, false); +export function CreateTokenToJSON(value?: CreateToken | null): any { + return CreateTokenToJSONTyped(value, false); } export function CreateTokenToJSONTyped(value?: CreateToken | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Credentials.ts b/src/models/Credentials.ts index f7e084d..36c4931 100644 --- a/src/models/Credentials.ts +++ b/src/models/Credentials.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -57,8 +56,8 @@ export function CredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean }; } -export function CredentialsToJSON(json: any): Credentials { - return CredentialsToJSONTyped(json, false); +export function CredentialsToJSON(value?: Credentials | null): any { + return CredentialsToJSONTyped(value, false); } export function CredentialsToJSONTyped(value?: Credentials | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Dashboard.ts b/src/models/Dashboard.ts index 5a96727..2d7dcc0 100644 --- a/src/models/Dashboard.ts +++ b/src/models/Dashboard.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -83,8 +82,8 @@ export function DashboardFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function DashboardToJSON(json: any): Dashboard { - return DashboardToJSONTyped(json, false); +export function DashboardToJSON(value?: Dashboard | null): any { + return DashboardToJSONTyped(value, false); } export function DashboardToJSONTyped(value?: Dashboard | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/DashboardList.ts b/src/models/DashboardList.ts index 4f6e71a..a0b3083 100644 --- a/src/models/DashboardList.ts +++ b/src/models/DashboardList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function DashboardListFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function DashboardListToJSON(json: any): DashboardList { - return DashboardListToJSONTyped(json, false); +export function DashboardListToJSON(value?: DashboardList | null): any { + return DashboardListToJSONTyped(value, false); } export function DashboardListToJSONTyped(value?: DashboardList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Group.ts b/src/models/Group.ts index 2c4a60b..e13dac5 100644 --- a/src/models/Group.ts +++ b/src/models/Group.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -55,8 +54,8 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro }; } -export function GroupToJSON(json: any): Group { - return GroupToJSONTyped(json, false); +export function GroupToJSON(value?: Group | null): any { + return GroupToJSONTyped(value, false); } export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/GroupList.ts b/src/models/GroupList.ts index c1cc968..a20e1fa 100644 --- a/src/models/GroupList.ts +++ b/src/models/GroupList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Group } from './Group'; import { GroupFromJSON, @@ -70,8 +69,8 @@ export function GroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function GroupListToJSON(json: any): GroupList { - return GroupListToJSONTyped(json, false); +export function GroupListToJSON(value?: GroupList | null): any { + return GroupListToJSONTyped(value, false); } export function GroupListToJSONTyped(value?: GroupList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Health.ts b/src/models/Health.ts index 57f2712..fb68631 100644 --- a/src/models/Health.ts +++ b/src/models/Health.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -55,8 +54,8 @@ export function HealthFromJSONTyped(json: any, ignoreDiscriminator: boolean): He }; } -export function HealthToJSON(json: any): Health { - return HealthToJSONTyped(json, false); +export function HealthToJSON(value?: Health | null): any { + return HealthToJSONTyped(value, false); } export function HealthToJSONTyped(value?: Health | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/HealthInfo.ts b/src/models/HealthInfo.ts index 9ad324e..3a10fae 100644 --- a/src/models/HealthInfo.ts +++ b/src/models/HealthInfo.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -62,8 +61,8 @@ export function HealthInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function HealthInfoToJSON(json: any): HealthInfo { - return HealthInfoToJSONTyped(json, false); +export function HealthInfoToJSON(value?: HealthInfo | null): any { + return HealthInfoToJSONTyped(value, false); } export function HealthInfoToJSONTyped(value?: HealthInfo | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Import.ts b/src/models/Import.ts index 3a1c717..a804e61 100644 --- a/src/models/Import.ts +++ b/src/models/Import.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -76,8 +75,8 @@ export function ImportFromJSONTyped(json: any, ignoreDiscriminator: boolean): Im }; } -export function ImportToJSON(json: any): Import { - return ImportToJSONTyped(json, false); +export function ImportToJSON(value?: Import | null): any { + return ImportToJSONTyped(value, false); } export function ImportToJSONTyped(value?: Import | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/LoginConfig.ts b/src/models/LoginConfig.ts index 5bf3af9..882379a 100644 --- a/src/models/LoginConfig.ts +++ b/src/models/LoginConfig.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -62,8 +61,8 @@ export function LoginConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean }; } -export function LoginConfigToJSON(json: any): LoginConfig { - return LoginConfigToJSONTyped(json, false); +export function LoginConfigToJSON(value?: LoginConfig | null): any { + return LoginConfigToJSONTyped(value, false); } export function LoginConfigToJSONTyped(value?: LoginConfig | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/LoginError.ts b/src/models/LoginError.ts index 8179078..773bb05 100644 --- a/src/models/LoginError.ts +++ b/src/models/LoginError.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -55,8 +54,8 @@ export function LoginErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function LoginErrorToJSON(json: any): LoginError { - return LoginErrorToJSONTyped(json, false); +export function LoginErrorToJSON(value?: LoginError | null): any { + return LoginErrorToJSONTyped(value, false); } export function LoginErrorToJSONTyped(value?: LoginError | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/LoginSupport.ts b/src/models/LoginSupport.ts index 50d5fbc..4bdd141 100644 --- a/src/models/LoginSupport.ts +++ b/src/models/LoginSupport.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -83,8 +82,8 @@ export function LoginSupportFromJSONTyped(json: any, ignoreDiscriminator: boolea }; } -export function LoginSupportToJSON(json: any): LoginSupport { - return LoginSupportToJSONTyped(json, false); +export function LoginSupportToJSON(value?: LoginSupport | null): any { + return LoginSupportToJSONTyped(value, false); } export function LoginSupportToJSONTyped(value?: LoginSupport | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/LoginToken.ts b/src/models/LoginToken.ts index 1980d0e..47ccf28 100644 --- a/src/models/LoginToken.ts +++ b/src/models/LoginToken.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -48,8 +47,8 @@ export function LoginTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function LoginTokenToJSON(json: any): LoginToken { - return LoginTokenToJSONTyped(json, false); +export function LoginTokenToJSON(value?: LoginToken | null): any { + return LoginTokenToJSONTyped(value, false); } export function LoginTokenToJSONTyped(value?: LoginToken | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Pagination.ts b/src/models/Pagination.ts index ca07b00..297fe72 100644 --- a/src/models/Pagination.ts +++ b/src/models/Pagination.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -69,8 +68,8 @@ export function PaginationFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function PaginationToJSON(json: any): Pagination { - return PaginationToJSONTyped(json, false); +export function PaginationToJSON(value?: Pagination | null): any { + return PaginationToJSONTyped(value, false); } export function PaginationToJSONTyped(value?: Pagination | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Project.ts b/src/models/Project.ts index 3e2184b..1daab82 100644 --- a/src/models/Project.ts +++ b/src/models/Project.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -76,8 +75,8 @@ export function ProjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): P }; } -export function ProjectToJSON(json: any): Project { - return ProjectToJSONTyped(json, false); +export function ProjectToJSON(value?: Project | null): any { + return ProjectToJSONTyped(value, false); } export function ProjectToJSONTyped(value?: Project | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/ProjectList.ts b/src/models/ProjectList.ts index 8fd96c1..4081f7f 100644 --- a/src/models/ProjectList.ts +++ b/src/models/ProjectList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function ProjectListFromJSONTyped(json: any, ignoreDiscriminator: boolean }; } -export function ProjectListToJSON(json: any): ProjectList { - return ProjectListToJSONTyped(json, false); +export function ProjectListToJSON(value?: ProjectList | null): any { + return ProjectListToJSONTyped(value, false); } export function ProjectListToJSONTyped(value?: ProjectList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Result.ts b/src/models/Result.ts index e39d777..90da44d 100644 --- a/src/models/Result.ts +++ b/src/models/Result.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -142,8 +141,8 @@ export function ResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): Re }; } -export function ResultToJSON(json: any): Result { - return ResultToJSONTyped(json, false); +export function ResultToJSON(value?: Result | null): any { + return ResultToJSONTyped(value, false); } export function ResultToJSONTyped(value?: Result | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/ResultList.ts b/src/models/ResultList.ts index f22f58c..1fdd286 100644 --- a/src/models/ResultList.ts +++ b/src/models/ResultList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function ResultListFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function ResultListToJSON(json: any): ResultList { - return ResultListToJSONTyped(json, false); +export function ResultListToJSON(value?: ResultList | null): any { + return ResultListToJSONTyped(value, false); } export function ResultListToJSONTyped(value?: ResultList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Run.ts b/src/models/Run.ts index 16e3c1f..1f2a947 100644 --- a/src/models/Run.ts +++ b/src/models/Run.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -111,8 +110,8 @@ export function RunFromJSONTyped(json: any, ignoreDiscriminator: boolean): Run { }; } -export function RunToJSON(json: any): Run { - return RunToJSONTyped(json, false); +export function RunToJSON(value?: Run | null): any { + return RunToJSONTyped(value, false); } export function RunToJSONTyped(value?: Run | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/RunList.ts b/src/models/RunList.ts index a85f0ed..05b2d37 100644 --- a/src/models/RunList.ts +++ b/src/models/RunList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function RunListFromJSONTyped(json: any, ignoreDiscriminator: boolean): R }; } -export function RunListToJSON(json: any): RunList { - return RunListToJSONTyped(json, false); +export function RunListToJSON(value?: RunList | null): any { + return RunListToJSONTyped(value, false); } export function RunListToJSONTyped(value?: RunList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/Token.ts b/src/models/Token.ts index 9c83f23..92bc4cb 100644 --- a/src/models/Token.ts +++ b/src/models/Token.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -80,8 +79,8 @@ export function TokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tok }; } -export function TokenToJSON(json: any): Token { - return TokenToJSONTyped(json, false); +export function TokenToJSON(value?: Token | null): any { + return TokenToJSONTyped(value, false); } export function TokenToJSONTyped(value?: Token | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/TokenList.ts b/src/models/TokenList.ts index 130a6be..2acbe16 100644 --- a/src/models/TokenList.ts +++ b/src/models/TokenList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function TokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function TokenListToJSON(json: any): TokenList { - return TokenListToJSONTyped(json, false); +export function TokenListToJSON(value?: TokenList | null): any { + return TokenListToJSONTyped(value, false); } export function TokenListToJSONTyped(value?: TokenList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/UpdateRun.ts b/src/models/UpdateRun.ts index 0d39f3f..fca06ed 100644 --- a/src/models/UpdateRun.ts +++ b/src/models/UpdateRun.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -48,8 +47,8 @@ export function UpdateRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function UpdateRunToJSON(json: any): UpdateRun { - return UpdateRunToJSONTyped(json, false); +export function UpdateRunToJSON(value?: UpdateRun | null): any { + return UpdateRunToJSONTyped(value, false); } export function UpdateRunToJSONTyped(value?: UpdateRun | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/User.ts b/src/models/User.ts index 4a49b02..cfedbbd 100644 --- a/src/models/User.ts +++ b/src/models/User.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -84,8 +83,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/UserList.ts b/src/models/UserList.ts index cd80c30..d22a4ad 100644 --- a/src/models/UserList.ts +++ b/src/models/UserList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function UserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function UserListToJSON(json: any): UserList { - return UserListToJSONTyped(json, false); +export function UserListToJSON(value?: UserList | null): any { + return UserListToJSONTyped(value, false); } export function UserListToJSONTyped(value?: UserList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/WidgetConfig.ts b/src/models/WidgetConfig.ts index b579cdb..a1a8376 100644 --- a/src/models/WidgetConfig.ts +++ b/src/models/WidgetConfig.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -90,8 +89,8 @@ export function WidgetConfigFromJSONTyped(json: any, ignoreDiscriminator: boolea }; } -export function WidgetConfigToJSON(json: any): WidgetConfig { - return WidgetConfigToJSONTyped(json, false); +export function WidgetConfigToJSON(value?: WidgetConfig | null): any { + return WidgetConfigToJSONTyped(value, false); } export function WidgetConfigToJSONTyped(value?: WidgetConfig | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/WidgetConfigList.ts b/src/models/WidgetConfigList.ts index 3b8df8a..aed8114 100644 --- a/src/models/WidgetConfigList.ts +++ b/src/models/WidgetConfigList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function WidgetConfigListFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function WidgetConfigListToJSON(json: any): WidgetConfigList { - return WidgetConfigListToJSONTyped(json, false); +export function WidgetConfigListToJSON(value?: WidgetConfigList | null): any { + return WidgetConfigListToJSONTyped(value, false); } export function WidgetConfigListToJSONTyped(value?: WidgetConfigList | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/WidgetParam.ts b/src/models/WidgetParam.ts index 1e41405..aad6068 100644 --- a/src/models/WidgetParam.ts +++ b/src/models/WidgetParam.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; /** * * @export @@ -62,8 +61,8 @@ export function WidgetParamFromJSONTyped(json: any, ignoreDiscriminator: boolean }; } -export function WidgetParamToJSON(json: any): WidgetParam { - return WidgetParamToJSONTyped(json, false); +export function WidgetParamToJSON(value?: WidgetParam | null): any { + return WidgetParamToJSONTyped(value, false); } export function WidgetParamToJSONTyped(value?: WidgetParam | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/WidgetType.ts b/src/models/WidgetType.ts index a733714..57740a2 100644 --- a/src/models/WidgetType.ts +++ b/src/models/WidgetType.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { WidgetParam } from './WidgetParam'; import { WidgetParamFromJSON, @@ -84,8 +83,8 @@ export function WidgetTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function WidgetTypeToJSON(json: any): WidgetType { - return WidgetTypeToJSONTyped(json, false); +export function WidgetTypeToJSON(value?: WidgetType | null): any { + return WidgetTypeToJSONTyped(value, false); } export function WidgetTypeToJSONTyped(value?: WidgetType | null, ignoreDiscriminator: boolean = false): any { diff --git a/src/models/WidgetTypeList.ts b/src/models/WidgetTypeList.ts index a64857e..ce549f1 100644 --- a/src/models/WidgetTypeList.ts +++ b/src/models/WidgetTypeList.ts @@ -12,7 +12,6 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; import type { Pagination } from './Pagination'; import { PaginationFromJSON, @@ -70,8 +69,8 @@ export function WidgetTypeListFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function WidgetTypeListToJSON(json: any): WidgetTypeList { - return WidgetTypeListToJSONTyped(json, false); +export function WidgetTypeListToJSON(value?: WidgetTypeList | null): any { + return WidgetTypeListToJSONTyped(value, false); } export function WidgetTypeListToJSONTyped(value?: WidgetTypeList | null, ignoreDiscriminator: boolean = false): any { From 5149d96c1f8d0eabf0dbc1cc68944e382ba57ffe Mon Sep 17 00:00:00 2001 From: mshriver Date: Tue, 4 Nov 2025 14:05:02 +0100 Subject: [PATCH 04/13] pre-commit/pretter/eslint applied --- .eslintrc.json | 33 - .openapi-generator/VERSION | 2 +- .pre-commit-config.yaml | 29 + .prettierignore | 7 + .prettierrc.json | 9 - README.md | 1 - eslint.config.mjs | 33 + package.json | 24 +- prettier.config.mjs | 9 + regenerate-client.sh | 2 +- src/apis/AdminProjectManagementApi.ts | 663 ++++++++++--------- src/apis/AdminUserManagementApi.ts | 662 ++++++++++--------- src/apis/ArtifactApi.ts | 901 ++++++++++++++------------ src/apis/DashboardApi.ts | 678 ++++++++++--------- src/apis/GroupApi.ts | 524 ++++++++------- src/apis/HealthApi.ts | 325 +++++----- src/apis/ImportApi.ts | 349 +++++----- src/apis/LoginApi.ts | 853 +++++++++++++----------- src/apis/ProjectApi.ts | 680 ++++++++++--------- src/apis/ResultApi.ts | 549 +++++++++------- src/apis/RunApi.ts | 689 +++++++++++--------- src/apis/TaskApi.ts | 133 ++-- src/apis/UserApi.ts | 735 +++++++++++---------- src/apis/WidgetApi.ts | 275 ++++---- src/apis/WidgetConfigApi.ts | 666 ++++++++++--------- src/apis/index.ts | 2 +- src/models/AccountRecovery.ts | 61 +- src/models/AccountRegistration.ts | 79 +-- src/models/AccountReset.ts | 74 +-- src/models/Artifact.ts | 135 ++-- src/models/ArtifactList.ts | 92 +-- src/models/CreateToken.ts | 74 +-- src/models/Credentials.ts | 74 +-- src/models/Dashboard.ts | 134 ++-- src/models/DashboardList.ts | 92 +-- src/models/Group.ts | 65 +- src/models/GroupList.ts | 85 ++- src/models/Health.ts | 70 +- src/models/HealthInfo.ts | 86 +-- src/models/Import.ts | 118 ++-- src/models/LoginConfig.ts | 86 +-- src/models/LoginError.ts | 70 +- src/models/LoginSupport.ts | 134 ++-- src/models/LoginToken.ts | 54 +- src/models/Pagination.ts | 102 +-- src/models/Project.ts | 118 ++-- src/models/ProjectList.ts | 88 +-- src/models/Result.ts | 250 ++++--- src/models/ResultList.ts | 87 ++- src/models/Run.ts | 193 +++--- src/models/RunList.ts | 85 ++- src/models/Token.ts | 121 ++-- src/models/TokenList.ts | 85 ++- src/models/UpdateRun.ts | 54 +- src/models/User.ts | 131 ++-- src/models/UserList.ts | 85 ++- src/models/WidgetConfig.ts | 150 ++--- src/models/WidgetConfigList.ts | 97 +-- src/models/WidgetParam.ts | 86 +-- src/models/WidgetType.ts | 128 ++-- src/models/WidgetTypeList.ts | 93 +-- src/models/index.ts | 2 +- src/runtime.ts | 646 +++++++++--------- test/api/ArtifactApi.spec.js | 2 +- test/api/GroupApi.spec.js | 2 +- test/api/HealthApi.spec.js | 2 +- test/api/ImportApi.spec.js | 2 +- test/api/ProjectApi.spec.js | 2 +- test/api/ReportApi.spec.js | 2 +- test/api/ResultApi.spec.js | 2 +- test/api/RunApi.spec.js | 2 +- test/api/WidgetApi.spec.js | 2 +- test/api/WidgetConfigApi.spec.js | 2 +- test/model/Artifact.spec.js | 2 +- test/model/ArtifactList.spec.js | 2 +- test/model/Group.spec.js | 2 +- test/model/GroupList.spec.js | 2 +- test/model/Health.spec.js | 2 +- test/model/HealthInfo.spec.js | 2 +- test/model/InlineObject.spec.js | 2 +- test/model/InlineObject1.spec.js | 2 +- test/model/InlineResponse200.spec.js | 2 +- test/model/ModelImport.spec.js | 2 +- test/model/Pagination.spec.js | 2 +- test/model/Project.spec.js | 2 +- test/model/ProjectList.spec.js | 2 +- test/model/Report.spec.js | 2 +- test/model/ReportList.spec.js | 2 +- test/model/ReportParameters.spec.js | 2 +- test/model/Result.spec.js | 2 +- test/model/ResultList.spec.js | 2 +- test/model/Run.spec.js | 2 +- test/model/RunList.spec.js | 2 +- test/model/WidgetConfig.spec.js | 2 +- test/model/WidgetConfigList.spec.js | 2 +- test/model/WidgetParam.spec.js | 2 +- test/model/WidgetType.spec.js | 2 +- test/model/WidgetTypeList.spec.js | 2 +- tsconfig.esm.json | 2 - tsconfig.json | 1 - 100 files changed, 7013 insertions(+), 6077 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierignore delete mode 100644 .prettierrc.json create mode 100644 eslint.config.mjs create mode 100644 prettier.config.mjs diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 1954278..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module", - "project": "./tsconfig.json" - }, - "plugins": ["@typescript-eslint"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", - "prettier" - ], - "rules": { - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], - "@typescript-eslint/no-floating-promises": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-return": "off", - "@typescript-eslint/restrict-template-expressions": "off", - "@typescript-eslint/no-redundant-type-constituents": "off" - }, - "env": { - "node": true, - "es6": true - }, - "ignorePatterns": ["dist/", "node_modules/", "*.js", "*.d.ts"] -} - diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index ecedc98..f77856a 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.1 \ No newline at end of file +4.3.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..8cea9cb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - id: check-json + - repo: local + hooks: + - id: yarn-lint + name: yarn lint + entry: yarn lint:fix + language: system + types: [file] + files: \.(ts|tsx)$ + pass_filenames: false + - id: yarn-format + name: yarn format + entry: yarn format + language: system + types: [file] + files: \.(ts|tsx|json|yaml|md)$ + pass_filenames: false + +ci: + autofix_prs: false + skip: [] diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..b9603f1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +dist/ +node_modules/ +*.d.ts +coverage/ +.yarn/ +yarn.lock +package-lock.json diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 621b6f3..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "semi": true, - "trailingComma": "es5", - "singleQuote": true, - "printWidth": 100, - "tabWidth": 2, - "arrowParens": "always" -} - diff --git a/README.md b/README.md index 1ebc056..f3911ff 100644 --- a/README.md +++ b/README.md @@ -200,4 +200,3 @@ Class | Method | HTTP request | Description - **Type**: API key - **API key parameter name**: api_key - **Location**: HTTP header - diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..6c20ca7 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,33 @@ +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import eslintConfigPrettier from 'eslint-config-prettier'; + +export default tseslint.config( + { + ignores: ['dist/', 'node_modules/', '**/*.js', '**/*.d.ts'], + }, + eslint.configs.recommended, + ...tseslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + { + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', + }, + }, + eslintConfigPrettier +); diff --git a/package.json b/package.json index 0d2d835..75dd0af 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,11 @@ }, "scripts": { "build": "tsc && tsc -p tsconfig.esm.json", - "prepack": "npm run build", + "prepack": "yarn build", "test": "jest", - "lint": "eslint src/**/*.ts", + "lint": "yarn lint:eslint && yarn format:check", + "lint:eslint": "eslint src/**/*.ts", + "lint:fix": "eslint --fix src/**/*.ts && yarn format", "format": "prettier --write \"src/**/*.ts\"", "format:check": "prettier --check \"src/**/*.ts\"" }, @@ -36,14 +38,14 @@ "portable-fetch": "^3.0.0" }, "devDependencies": { - "@types/node": "^20.0.0", - "@typescript-eslint/eslint-plugin": "^6.0.0", - "@typescript-eslint/parser": "^6.0.0", - "eslint": "^8.0.0", - "eslint-config-prettier": "^9.0.0", - "jest": "^29.0.0", - "prettier": "^3.0.0", - "typescript": "^5.3.0" + "@eslint/js": "^9.16.0", + "@types/node": "^24.10.0", + "eslint": "^9.39.1", + "eslint-config-prettier": "^10.1.8", + "jest": "^30.2.0", + "prettier": "^3.4.0", + "typescript": "^5.7.0", + "typescript-eslint": "^8.18.0" }, "files": [ "dist", @@ -52,6 +54,6 @@ "LICENSE" ], "engines": { - "node": ">=18.0.0" + "node": ">=22.0.0" } } diff --git a/prettier.config.mjs b/prettier.config.mjs new file mode 100644 index 0000000..16cad62 --- /dev/null +++ b/prettier.config.mjs @@ -0,0 +1,9 @@ +/** @type {import("prettier").Config} */ +export default { + semi: true, + trailingComma: 'es5', + singleQuote: true, + printWidth: 100, + tabWidth: 2, + arrowParens: 'always', +}; diff --git a/regenerate-client.sh b/regenerate-client.sh index daba279..389126c 100755 --- a/regenerate-client.sh +++ b/regenerate-client.sh @@ -202,7 +202,7 @@ if command -v npm >/dev/null 2>&1; then echo "Installing dependencies..." cd "${CLIENT_DIR}" npm install > /dev/null 2>&1 || echo "npm install had some issues, continuing..." - + echo "Running code formatting and linting..." npm run format 2>&1 || echo "Formatting completed with some issues (normal for generated code)" npm run lint -- --fix 2>&1 || echo "Linting completed with some issues (normal for generated code)" diff --git a/src/apis/AdminProjectManagementApi.ts b/src/apis/AdminProjectManagementApi.ts index 01e68f1..0c733c1 100644 --- a/src/apis/AdminProjectManagementApi.ts +++ b/src/apis/AdminProjectManagementApi.ts @@ -5,365 +5,436 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Project, - ProjectList, -} from '../models/index'; +import type { Project, ProjectList } from '../models/index'; import { - ProjectFromJSON, - ProjectToJSON, - ProjectListFromJSON, - ProjectListToJSON, + ProjectFromJSON, + ProjectToJSON, + ProjectListFromJSON, + ProjectListToJSON, } from '../models/index'; export interface AdminAddProjectRequest { - project?: Project; + project?: Project; } export interface AdminDeleteProjectRequest { - id: string; + id: string; } export interface AdminGetProjectRequest { - id: string; + id: string; } export interface AdminGetProjectListRequest { - filter?: Array; - page?: number; - pageSize?: number; + filter?: Array; + page?: number; + pageSize?: number; } export interface AdminUpdateProjectRequest { - id: string; - project?: Project; + id: string; + project?: Project; } /** * AdminProjectManagementApi - interface - * + * * @export * @interface AdminProjectManagementApiInterface */ export interface AdminProjectManagementApiInterface { - /** - * - * @summary Administration endpoint to manually add a project. Only accessible to superadmins. - * @param {Project} [project] A project object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminProjectManagementApiInterface - */ - adminAddProjectRaw(requestParameters: AdminAddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to manually add a project. Only accessible to superadmins. - */ - adminAddProject(requestParameters: AdminAddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Administration endpoint to delete a project. Only accessible to superadmins. - * @param {string} id The ID of the project to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminProjectManagementApiInterface - */ - adminDeleteProjectRaw(requestParameters: AdminDeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to delete a project. Only accessible to superadmins. - */ - adminDeleteProject(requestParameters: AdminDeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Administration endpoint to return a project. Only accessible to superadmins. - * @param {string} id The id of a project - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminProjectManagementApiInterface - */ - adminGetProjectRaw(requestParameters: AdminGetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to return a project. Only accessible to superadmins. - */ - adminGetProject(requestParameters: AdminGetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Administration endpoint to return a list of projects. Only accessible to superadmins. - * @param {Array} [filter] Fields to filter by - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminProjectManagementApiInterface - */ - adminGetProjectListRaw(requestParameters: AdminGetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to return a list of projects. Only accessible to superadmins. - */ - adminGetProjectList(requestParameters: AdminGetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Administration endpoint to update a project. Only accessible to superadmins. - * @param {string} id The ID of the project to update - * @param {Project} [project] A project object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminProjectManagementApiInterface - */ - adminUpdateProjectRaw(requestParameters: AdminUpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to update a project. Only accessible to superadmins. - */ - adminUpdateProject(requestParameters: AdminUpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Administration endpoint to manually add a project. Only accessible to superadmins. + * @param {Project} [project] A project object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminAddProjectRaw( + requestParameters: AdminAddProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to manually add a project. Only accessible to superadmins. + */ + adminAddProject( + requestParameters: AdminAddProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Administration endpoint to delete a project. Only accessible to superadmins. + * @param {string} id The ID of the project to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminDeleteProjectRaw( + requestParameters: AdminDeleteProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to delete a project. Only accessible to superadmins. + */ + adminDeleteProject( + requestParameters: AdminDeleteProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Administration endpoint to return a project. Only accessible to superadmins. + * @param {string} id The id of a project + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminGetProjectRaw( + requestParameters: AdminGetProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to return a project. Only accessible to superadmins. + */ + adminGetProject( + requestParameters: AdminGetProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Administration endpoint to return a list of projects. Only accessible to superadmins. + * @param {Array} [filter] Fields to filter by + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminGetProjectListRaw( + requestParameters: AdminGetProjectListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to return a list of projects. Only accessible to superadmins. + */ + adminGetProjectList( + requestParameters: AdminGetProjectListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Administration endpoint to update a project. Only accessible to superadmins. + * @param {string} id The ID of the project to update + * @param {Project} [project] A project object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminProjectManagementApiInterface + */ + adminUpdateProjectRaw( + requestParameters: AdminUpdateProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to update a project. Only accessible to superadmins. + */ + adminUpdateProject( + requestParameters: AdminUpdateProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ -export class AdminProjectManagementApi extends runtime.BaseAPI implements AdminProjectManagementApiInterface { +export class AdminProjectManagementApi + extends runtime.BaseAPI + implements AdminProjectManagementApiInterface +{ + /** + * Administration endpoint to manually add a project. Only accessible to superadmins. + */ + async adminAddProjectRaw( + requestParameters: AdminAddProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - /** - * Administration endpoint to manually add a project. Only accessible to superadmins. - */ - async adminAddProjectRaw(requestParameters: AdminAddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + let urlPath = `/admin/project`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ProjectToJSON(requestParameters['project']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Administration endpoint to manually add a project. Only accessible to superadmins. + */ + async adminAddProject( + requestParameters: AdminAddProjectRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.adminAddProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to delete a project. Only accessible to superadmins. + */ + async adminDeleteProjectRaw( + requestParameters: AdminDeleteProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminDeleteProject().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters['Content-Type'] = 'application/json'; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - let urlPath = `/admin/project`; + let urlPath = `/admin/project/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Administration endpoint to delete a project. Only accessible to superadmins. + */ + async adminDeleteProject( + requestParameters: AdminDeleteProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.adminDeleteProjectRaw(requestParameters, initOverrides); + } + + /** + * Administration endpoint to return a project. Only accessible to superadmins. + */ + async adminGetProjectRaw( + requestParameters: AdminGetProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminGetProject().' + ); + } - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ProjectToJSON(requestParameters['project']), - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); - } + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Administration endpoint to manually add a project. Only accessible to superadmins. - */ - async adminAddProject(requestParameters: AdminAddProjectRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.adminAddProjectRaw(requestParameters, initOverrides); - return await response.value(); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Administration endpoint to delete a project. Only accessible to superadmins. - */ - async adminDeleteProjectRaw(requestParameters: AdminDeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling adminDeleteProject().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/admin/project/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Administration endpoint to delete a project. Only accessible to superadmins. - */ - async adminDeleteProject(requestParameters: AdminDeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.adminDeleteProjectRaw(requestParameters, initOverrides); + let urlPath = `/admin/project/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Administration endpoint to return a project. Only accessible to superadmins. + */ + async adminGetProject( + requestParameters: AdminGetProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.adminGetProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to return a list of projects. Only accessible to superadmins. + */ + async adminGetProjectListRaw( + requestParameters: AdminGetProjectListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; } - /** - * Administration endpoint to return a project. Only accessible to superadmins. - */ - async adminGetProjectRaw(requestParameters: AdminGetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling adminGetProject().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/admin/project/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * Administration endpoint to return a project. Only accessible to superadmins. - */ - async adminGetProject(requestParameters: AdminGetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.adminGetProjectRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; } - /** - * Administration endpoint to return a list of projects. Only accessible to superadmins. - */ - async adminGetProjectListRaw(requestParameters: AdminGetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filter'] != null) { - queryParameters['filter'] = requestParameters['filter']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/admin/project`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Administration endpoint to return a list of projects. Only accessible to superadmins. - */ - async adminGetProjectList(requestParameters: AdminGetProjectListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.adminGetProjectListRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/admin/project`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectListFromJSON(jsonValue)); + } + + /** + * Administration endpoint to return a list of projects. Only accessible to superadmins. + */ + async adminGetProjectList( + requestParameters: AdminGetProjectListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.adminGetProjectListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to update a project. Only accessible to superadmins. + */ + async adminUpdateProjectRaw( + requestParameters: AdminUpdateProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminUpdateProject().' + ); } - /** - * Administration endpoint to update a project. Only accessible to superadmins. - */ - async adminUpdateProjectRaw(requestParameters: AdminUpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling adminUpdateProject().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/admin/project/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ProjectToJSON(requestParameters['project']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Administration endpoint to update a project. Only accessible to superadmins. - */ - async adminUpdateProject(requestParameters: AdminUpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.adminUpdateProjectRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/admin/project/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ProjectToJSON(requestParameters['project']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Administration endpoint to update a project. Only accessible to superadmins. + */ + async adminUpdateProject( + requestParameters: AdminUpdateProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.adminUpdateProjectRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/AdminUserManagementApi.ts b/src/apis/AdminUserManagementApi.ts index e3cccbe..1531f02 100644 --- a/src/apis/AdminUserManagementApi.ts +++ b/src/apis/AdminUserManagementApi.ts @@ -5,365 +5,431 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - User, - UserList, -} from '../models/index'; -import { - UserFromJSON, - UserToJSON, - UserListFromJSON, - UserListToJSON, -} from '../models/index'; +import type { User, UserList } from '../models/index'; +import { UserFromJSON, UserToJSON, UserListFromJSON, UserListToJSON } from '../models/index'; export interface AdminAddUserRequest { - user?: User; + user?: User; } export interface AdminDeleteUserRequest { - id: string; + id: string; } export interface AdminGetUserRequest { - id: string; + id: string; } export interface AdminGetUserListRequest { - filter?: Array; - page?: number; - pageSize?: number; + filter?: Array; + page?: number; + pageSize?: number; } export interface AdminUpdateUserRequest { - id: string; - user?: User; + id: string; + user?: User; } /** * AdminUserManagementApi - interface - * + * * @export * @interface AdminUserManagementApiInterface */ export interface AdminUserManagementApiInterface { - /** - * - * @summary Administration endpoint to manually add a user. Only accessible to superadmins. - * @param {User} [user] A user object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminUserManagementApiInterface - */ - adminAddUserRaw(requestParameters: AdminAddUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to manually add a user. Only accessible to superadmins. - */ - adminAddUser(requestParameters: AdminAddUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Administration endpoint to delete a user. Only accessible to superadmins. - * @param {string} id The ID of the user to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminUserManagementApiInterface - */ - adminDeleteUserRaw(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to delete a user. Only accessible to superadmins. - */ - adminDeleteUser(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Administration endpoint to return a user. Only accessible to superadmins. - * @param {string} id The id of a user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminUserManagementApiInterface - */ - adminGetUserRaw(requestParameters: AdminGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to return a user. Only accessible to superadmins. - */ - adminGetUser(requestParameters: AdminGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Administration endpoint to return a list of users. Only accessible to superadmins. - * @param {Array} [filter] Fields to filter by - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminUserManagementApiInterface - */ - adminGetUserListRaw(requestParameters: AdminGetUserListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to return a list of users. Only accessible to superadmins. - */ - adminGetUserList(requestParameters: AdminGetUserListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Administration endpoint to update a user. Only accessible to superadmins. - * @param {string} id The ID of the user to update - * @param {User} [user] A user object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminUserManagementApiInterface - */ - adminUpdateUserRaw(requestParameters: AdminUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Administration endpoint to update a user. Only accessible to superadmins. - */ - adminUpdateUser(requestParameters: AdminUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Administration endpoint to manually add a user. Only accessible to superadmins. + * @param {User} [user] A user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminAddUserRaw( + requestParameters: AdminAddUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to manually add a user. Only accessible to superadmins. + */ + adminAddUser( + requestParameters: AdminAddUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Administration endpoint to delete a user. Only accessible to superadmins. + * @param {string} id The ID of the user to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminDeleteUserRaw( + requestParameters: AdminDeleteUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to delete a user. Only accessible to superadmins. + */ + adminDeleteUser( + requestParameters: AdminDeleteUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Administration endpoint to return a user. Only accessible to superadmins. + * @param {string} id The id of a user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminGetUserRaw( + requestParameters: AdminGetUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to return a user. Only accessible to superadmins. + */ + adminGetUser( + requestParameters: AdminGetUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Administration endpoint to return a list of users. Only accessible to superadmins. + * @param {Array} [filter] Fields to filter by + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminGetUserListRaw( + requestParameters: AdminGetUserListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to return a list of users. Only accessible to superadmins. + */ + adminGetUserList( + requestParameters: AdminGetUserListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Administration endpoint to update a user. Only accessible to superadmins. + * @param {string} id The ID of the user to update + * @param {User} [user] A user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminUserManagementApiInterface + */ + adminUpdateUserRaw( + requestParameters: AdminUpdateUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Administration endpoint to update a user. Only accessible to superadmins. + */ + adminUpdateUser( + requestParameters: AdminUpdateUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ -export class AdminUserManagementApi extends runtime.BaseAPI implements AdminUserManagementApiInterface { +export class AdminUserManagementApi + extends runtime.BaseAPI + implements AdminUserManagementApiInterface +{ + /** + * Administration endpoint to manually add a user. Only accessible to superadmins. + */ + async adminAddUserRaw( + requestParameters: AdminAddUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - /** - * Administration endpoint to manually add a user. Only accessible to superadmins. - */ - async adminAddUserRaw(requestParameters: AdminAddUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + let urlPath = `/admin/user`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UserToJSON(requestParameters['user']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Administration endpoint to manually add a user. Only accessible to superadmins. + */ + async adminAddUser( + requestParameters: AdminAddUserRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.adminAddUserRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to delete a user. Only accessible to superadmins. + */ + async adminDeleteUserRaw( + requestParameters: AdminDeleteUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminDeleteUser().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters['Content-Type'] = 'application/json'; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - let urlPath = `/admin/user`; + let urlPath = `/admin/user/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Administration endpoint to delete a user. Only accessible to superadmins. + */ + async adminDeleteUser( + requestParameters: AdminDeleteUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.adminDeleteUserRaw(requestParameters, initOverrides); + } + + /** + * Administration endpoint to return a user. Only accessible to superadmins. + */ + async adminGetUserRaw( + requestParameters: AdminGetUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminGetUser().' + ); + } - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: UserToJSON(requestParameters['user']), - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); - } + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Administration endpoint to manually add a user. Only accessible to superadmins. - */ - async adminAddUser(requestParameters: AdminAddUserRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.adminAddUserRaw(requestParameters, initOverrides); - return await response.value(); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Administration endpoint to delete a user. Only accessible to superadmins. - */ - async adminDeleteUserRaw(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling adminDeleteUser().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/admin/user/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Administration endpoint to delete a user. Only accessible to superadmins. - */ - async adminDeleteUser(requestParameters: AdminDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.adminDeleteUserRaw(requestParameters, initOverrides); + let urlPath = `/admin/user/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Administration endpoint to return a user. Only accessible to superadmins. + */ + async adminGetUser( + requestParameters: AdminGetUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.adminGetUserRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to return a list of users. Only accessible to superadmins. + */ + async adminGetUserListRaw( + requestParameters: AdminGetUserListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; } - /** - * Administration endpoint to return a user. Only accessible to superadmins. - */ - async adminGetUserRaw(requestParameters: AdminGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling adminGetUser().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/admin/user/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * Administration endpoint to return a user. Only accessible to superadmins. - */ - async adminGetUser(requestParameters: AdminGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.adminGetUserRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; } - /** - * Administration endpoint to return a list of users. Only accessible to superadmins. - */ - async adminGetUserListRaw(requestParameters: AdminGetUserListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filter'] != null) { - queryParameters['filter'] = requestParameters['filter']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/admin/user`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Administration endpoint to return a list of users. Only accessible to superadmins. - */ - async adminGetUserList(requestParameters: AdminGetUserListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.adminGetUserListRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/admin/user`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserListFromJSON(jsonValue)); + } + + /** + * Administration endpoint to return a list of users. Only accessible to superadmins. + */ + async adminGetUserList( + requestParameters: AdminGetUserListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.adminGetUserListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Administration endpoint to update a user. Only accessible to superadmins. + */ + async adminUpdateUserRaw( + requestParameters: AdminUpdateUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling adminUpdateUser().' + ); } - /** - * Administration endpoint to update a user. Only accessible to superadmins. - */ - async adminUpdateUserRaw(requestParameters: AdminUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling adminUpdateUser().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/admin/user/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UserToJSON(requestParameters['user']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Administration endpoint to update a user. Only accessible to superadmins. - */ - async adminUpdateUser(requestParameters: AdminUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.adminUpdateUserRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/admin/user/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UserToJSON(requestParameters['user']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Administration endpoint to update a user. Only accessible to superadmins. + */ + async adminUpdateUser( + requestParameters: AdminUpdateUserRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.adminUpdateUserRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/ArtifactApi.ts b/src/apis/ArtifactApi.ts index aaacced..82a5502 100644 --- a/src/apis/ArtifactApi.ts +++ b/src/apis/ArtifactApi.ts @@ -5,486 +5,571 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Artifact, - ArtifactList, -} from '../models/index'; +import type { Artifact, ArtifactList } from '../models/index'; import { - ArtifactFromJSON, - ArtifactToJSON, - ArtifactListFromJSON, - ArtifactListToJSON, + ArtifactFromJSON, + ArtifactToJSON, + ArtifactListFromJSON, + ArtifactListToJSON, } from '../models/index'; export interface DeleteArtifactRequest { - id: string; + id: string; } export interface DownloadArtifactRequest { - id: string; + id: string; } export interface GetArtifactRequest { - id: string; + id: string; } export interface GetArtifactListRequest { - resultId?: string; - runId?: string; - page?: number; - pageSize?: number; + resultId?: string; + runId?: string; + page?: number; + pageSize?: number; } export interface UploadArtifactRequest { - filename: string; - file: Blob; - resultId?: string; - runId?: string; - additionalMetadata?: object; + filename: string; + file: Blob; + resultId?: string; + runId?: string; + additionalMetadata?: object; } export interface ViewArtifactRequest { - id: string; + id: string; } /** * ArtifactApi - interface - * + * * @export * @interface ArtifactApiInterface */ export interface ArtifactApiInterface { - /** - * - * @summary Delete an artifact - * @param {string} id ID of artifact to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArtifactApiInterface - */ - deleteArtifactRaw(requestParameters: DeleteArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Delete an artifact - */ - deleteArtifact(requestParameters: DeleteArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Download an artifact - * @param {string} id ID of artifact to return - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArtifactApiInterface - */ - downloadArtifactRaw(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Download an artifact - */ - downloadArtifact(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a single artifact - * @param {string} id ID of artifact to return - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArtifactApiInterface - */ - getArtifactRaw(requestParameters: GetArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a single artifact - */ - getArtifact(requestParameters: GetArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a (filtered) list of artifacts - * @param {string} [resultId] The result ID to filter by - * @param {string} [runId] The run ID to filter by - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArtifactApiInterface - */ - getArtifactListRaw(requestParameters: GetArtifactListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a (filtered) list of artifacts - */ - getArtifactList(requestParameters: GetArtifactListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Uploads a test run artifact - * @param {string} filename name of the file - * @param {Blob} file file to upload - * @param {string} [resultId] ID of result to attach artifact to (mutually exclusive with runId) - * @param {string} [runId] ID of run to attach artifact to (mutually exclusive with resultId) - * @param {object} [additionalMetadata] Additional data to pass to server - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArtifactApiInterface - */ - uploadArtifactRaw(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Uploads a test run artifact - */ - uploadArtifact(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Stream an artifact directly to the client/browser - * @param {string} id ID of artifact to return - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArtifactApiInterface - */ - viewArtifactRaw(requestParameters: ViewArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Stream an artifact directly to the client/browser - */ - viewArtifact(requestParameters: ViewArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Delete an artifact + * @param {string} id ID of artifact to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + deleteArtifactRaw( + requestParameters: DeleteArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Delete an artifact + */ + deleteArtifact( + requestParameters: DeleteArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Download an artifact + * @param {string} id ID of artifact to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + downloadArtifactRaw( + requestParameters: DownloadArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Download an artifact + */ + downloadArtifact( + requestParameters: DownloadArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a single artifact + * @param {string} id ID of artifact to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + getArtifactRaw( + requestParameters: GetArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a single artifact + */ + getArtifact( + requestParameters: GetArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a (filtered) list of artifacts + * @param {string} [resultId] The result ID to filter by + * @param {string} [runId] The run ID to filter by + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + getArtifactListRaw( + requestParameters: GetArtifactListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a (filtered) list of artifacts + */ + getArtifactList( + requestParameters: GetArtifactListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Uploads a test run artifact + * @param {string} filename name of the file + * @param {Blob} file file to upload + * @param {string} [resultId] ID of result to attach artifact to (mutually exclusive with runId) + * @param {string} [runId] ID of run to attach artifact to (mutually exclusive with resultId) + * @param {object} [additionalMetadata] Additional data to pass to server + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + uploadArtifactRaw( + requestParameters: UploadArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Uploads a test run artifact + */ + uploadArtifact( + requestParameters: UploadArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Stream an artifact directly to the client/browser + * @param {string} id ID of artifact to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArtifactApiInterface + */ + viewArtifactRaw( + requestParameters: ViewArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Stream an artifact directly to the client/browser + */ + viewArtifact( + requestParameters: ViewArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class ArtifactApi extends runtime.BaseAPI implements ArtifactApiInterface { + /** + * Delete an artifact + */ + async deleteArtifactRaw( + requestParameters: DeleteArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteArtifact().' + ); + } + + const queryParameters: any = {}; - /** - * Delete an artifact - */ - async deleteArtifactRaw(requestParameters: DeleteArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling deleteArtifact().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/artifact/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Delete an artifact - */ - async deleteArtifact(requestParameters: DeleteArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteArtifactRaw(requestParameters, initOverrides); + let urlPath = `/artifact/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete an artifact + */ + async deleteArtifact( + requestParameters: DeleteArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.deleteArtifactRaw(requestParameters, initOverrides); + } + + /** + * Download an artifact + */ + async downloadArtifactRaw( + requestParameters: DownloadArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling downloadArtifact().' + ); } - /** - * Download an artifact - */ - async downloadArtifactRaw(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling downloadArtifact().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/artifact/{id}/download`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.BlobApiResponse(response); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Download an artifact - */ - async downloadArtifact(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.downloadArtifactRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/artifact/{id}/download`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.BlobApiResponse(response); + } + + /** + * Download an artifact + */ + async downloadArtifact( + requestParameters: DownloadArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.downloadArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single artifact + */ + async getArtifactRaw( + requestParameters: GetArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getArtifact().' + ); } - /** - * Get a single artifact - */ - async getArtifactRaw(requestParameters: GetArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getArtifact().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/artifact/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Get a single artifact - */ - async getArtifact(requestParameters: GetArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getArtifactRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/artifact/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactFromJSON(jsonValue)); + } + + /** + * Get a single artifact + */ + async getArtifact( + requestParameters: GetArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a (filtered) list of artifacts + */ + async getArtifactListRaw( + requestParameters: GetArtifactListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['resultId'] != null) { + queryParameters['resultId'] = requestParameters['resultId']; } - /** - * Get a (filtered) list of artifacts - */ - async getArtifactListRaw(requestParameters: GetArtifactListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + if (requestParameters['runId'] != null) { + queryParameters['runId'] = requestParameters['runId']; + } + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; + } - if (requestParameters['resultId'] != null) { - queryParameters['resultId'] = requestParameters['resultId']; - } + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } - if (requestParameters['runId'] != null) { - queryParameters['runId'] = requestParameters['runId']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - const headerParameters: runtime.HTTPHeaders = {}; + let urlPath = `/artifact`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactListFromJSON(jsonValue)); + } + + /** + * Get a (filtered) list of artifacts + */ + async getArtifactList( + requestParameters: GetArtifactListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getArtifactListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Uploads a test run artifact + */ + async uploadArtifactRaw( + requestParameters: UploadArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['filename'] == null) { + throw new runtime.RequiredError( + 'filename', + 'Required parameter "filename" was null or undefined when calling uploadArtifact().' + ); + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + if (requestParameters['file'] == null) { + throw new runtime.RequiredError( + 'file', + 'Required parameter "file" was null or undefined when calling uploadArtifact().' + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const queryParameters: any = {}; - let urlPath = `/artifact`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [{ contentType: 'multipart/form-data' }]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); } - /** - * Get a (filtered) list of artifacts - */ - async getArtifactList(requestParameters: GetArtifactListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getArtifactListRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['resultId'] != null) { + formParams.append('resultId', requestParameters['resultId'] as any); } - /** - * Uploads a test run artifact - */ - async uploadArtifactRaw(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['filename'] == null) { - throw new runtime.RequiredError( - 'filename', - 'Required parameter "filename" was null or undefined when calling uploadArtifact().' - ); - } - - if (requestParameters['file'] == null) { - throw new runtime.RequiredError( - 'file', - 'Required parameter "file" was null or undefined when calling uploadArtifact().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const consumes: runtime.Consume[] = [ - { contentType: 'multipart/form-data' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - // use FormData to transmit files using content-type "multipart/form-data" - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters['resultId'] != null) { - formParams.append('resultId', requestParameters['resultId'] as any); - } - - if (requestParameters['runId'] != null) { - formParams.append('runId', requestParameters['runId'] as any); - } - - if (requestParameters['filename'] != null) { - formParams.append('filename', requestParameters['filename'] as any); - } - - if (requestParameters['file'] != null) { - formParams.append('file', requestParameters['file'] as any); - } - - if (requestParameters['additionalMetadata'] != null) { - formParams.append('additionalMetadata', new Blob([JSON.stringify(objectToJSON(requestParameters['additionalMetadata']))], { type: "application/json", })); - } - - - let urlPath = `/artifact`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactFromJSON(jsonValue)); + if (requestParameters['runId'] != null) { + formParams.append('runId', requestParameters['runId'] as any); } - /** - * Uploads a test run artifact - */ - async uploadArtifact(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.uploadArtifactRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['filename'] != null) { + formParams.append('filename', requestParameters['filename'] as any); } - /** - * Stream an artifact directly to the client/browser - */ - async viewArtifactRaw(requestParameters: ViewArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling viewArtifact().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/artifact/{id}/view`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.BlobApiResponse(response); + if (requestParameters['file'] != null) { + formParams.append('file', requestParameters['file'] as any); } - /** - * Stream an artifact directly to the client/browser - */ - async viewArtifact(requestParameters: ViewArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.viewArtifactRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['additionalMetadata'] != null) { + formParams.append( + 'additionalMetadata', + new Blob([JSON.stringify(objectToJSON(requestParameters['additionalMetadata']))], { + type: 'application/json', + }) + ); + } + + let urlPath = `/artifact`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactFromJSON(jsonValue)); + } + + /** + * Uploads a test run artifact + */ + async uploadArtifact( + requestParameters: UploadArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.uploadArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Stream an artifact directly to the client/browser + */ + async viewArtifactRaw( + requestParameters: ViewArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling viewArtifact().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/artifact/{id}/view`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.BlobApiResponse(response); + } + + /** + * Stream an artifact directly to the client/browser + */ + async viewArtifact( + requestParameters: ViewArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.viewArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/DashboardApi.ts b/src/apis/DashboardApi.ts index aa6f40f..d0728aa 100644 --- a/src/apis/DashboardApi.ts +++ b/src/apis/DashboardApi.ts @@ -5,377 +5,445 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Dashboard, - DashboardList, -} from '../models/index'; +import type { Dashboard, DashboardList } from '../models/index'; import { - DashboardFromJSON, - DashboardToJSON, - DashboardListFromJSON, - DashboardListToJSON, + DashboardFromJSON, + DashboardToJSON, + DashboardListFromJSON, + DashboardListToJSON, } from '../models/index'; export interface AddDashboardRequest { - dashboard?: Dashboard; + dashboard?: Dashboard; } export interface DeleteDashboardRequest { - id: string; + id: string; } export interface GetDashboardRequest { - id: string; + id: string; } export interface GetDashboardListRequest { - filter?: Array; - projectId?: string; - userId?: string; - page?: number; - pageSize?: number; + filter?: Array; + projectId?: string; + userId?: string; + page?: number; + pageSize?: number; } export interface UpdateDashboardRequest { - id: string; - dashboard?: Dashboard; + id: string; + dashboard?: Dashboard; } /** * DashboardApi - interface - * + * * @export * @interface DashboardApiInterface */ export interface DashboardApiInterface { - /** - * - * @summary Create a dashboard - * @param {Dashboard} [dashboard] A dashboard object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DashboardApiInterface - */ - addDashboardRaw(requestParameters: AddDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a dashboard - */ - addDashboard(requestParameters: AddDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Delete a dashboard - * @param {string} id ID of dashboard to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DashboardApiInterface - */ - deleteDashboardRaw(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Delete a dashboard - */ - deleteDashboard(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a single dashboard by ID - * @param {string} id ID of test dashboard - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DashboardApiInterface - */ - getDashboardRaw(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a single dashboard by ID - */ - getDashboard(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a list of dashboards - * @param {Array} [filter] Fields to filter by - * @param {string} [projectId] Filter dashboards by project ID - * @param {string} [userId] Filter dashboards by user ID - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DashboardApiInterface - */ - getDashboardListRaw(requestParameters: GetDashboardListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a list of dashboards - */ - getDashboardList(requestParameters: GetDashboardListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Update a dashboard - * @param {string} id ID of test dashboard - * @param {Dashboard} [dashboard] A dashboard object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DashboardApiInterface - */ - updateDashboardRaw(requestParameters: UpdateDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Update a dashboard - */ - updateDashboard(requestParameters: UpdateDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Create a dashboard + * @param {Dashboard} [dashboard] A dashboard object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + addDashboardRaw( + requestParameters: AddDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Create a dashboard + */ + addDashboard( + requestParameters: AddDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Delete a dashboard + * @param {string} id ID of dashboard to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + deleteDashboardRaw( + requestParameters: DeleteDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Delete a dashboard + */ + deleteDashboard( + requestParameters: DeleteDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a single dashboard by ID + * @param {string} id ID of test dashboard + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + getDashboardRaw( + requestParameters: GetDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a single dashboard by ID + */ + getDashboard( + requestParameters: GetDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a list of dashboards + * @param {Array} [filter] Fields to filter by + * @param {string} [projectId] Filter dashboards by project ID + * @param {string} [userId] Filter dashboards by user ID + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + getDashboardListRaw( + requestParameters: GetDashboardListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a list of dashboards + */ + getDashboardList( + requestParameters: GetDashboardListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Update a dashboard + * @param {string} id ID of test dashboard + * @param {Dashboard} [dashboard] A dashboard object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApiInterface + */ + updateDashboardRaw( + requestParameters: UpdateDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Update a dashboard + */ + updateDashboard( + requestParameters: UpdateDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class DashboardApi extends runtime.BaseAPI implements DashboardApiInterface { + /** + * Create a dashboard + */ + async addDashboardRaw( + requestParameters: AddDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - /** - * Create a dashboard - */ - async addDashboardRaw(requestParameters: AddDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + let urlPath = `/dashboard`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DashboardToJSON(requestParameters['dashboard']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); + } + + /** + * Create a dashboard + */ + async addDashboard( + requestParameters: AddDashboardRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.addDashboardRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a dashboard + */ + async deleteDashboardRaw( + requestParameters: DeleteDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteDashboard().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters['Content-Type'] = 'application/json'; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - let urlPath = `/dashboard`; + let urlPath = `/dashboard/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a dashboard + */ + async deleteDashboard( + requestParameters: DeleteDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.deleteDashboardRaw(requestParameters, initOverrides); + } + + /** + * Get a single dashboard by ID + */ + async getDashboardRaw( + requestParameters: GetDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getDashboard().' + ); + } - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: DashboardToJSON(requestParameters['dashboard']), - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); - } + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Create a dashboard - */ - async addDashboard(requestParameters: AddDashboardRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addDashboardRaw(requestParameters, initOverrides); - return await response.value(); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Delete a dashboard - */ - async deleteDashboardRaw(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling deleteDashboard().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/dashboard/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Delete a dashboard - */ - async deleteDashboard(requestParameters: DeleteDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteDashboardRaw(requestParameters, initOverrides); + let urlPath = `/dashboard/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); + } + + /** + * Get a single dashboard by ID + */ + async getDashboard( + requestParameters: GetDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getDashboardRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of dashboards + */ + async getDashboardListRaw( + requestParameters: GetDashboardListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; } - /** - * Get a single dashboard by ID - */ - async getDashboardRaw(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getDashboard().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/dashboard/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); + if (requestParameters['projectId'] != null) { + queryParameters['project_id'] = requestParameters['projectId']; } - /** - * Get a single dashboard by ID - */ - async getDashboard(requestParameters: GetDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDashboardRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['userId'] != null) { + queryParameters['user_id'] = requestParameters['userId']; } - /** - * Get a list of dashboards - */ - async getDashboardListRaw(requestParameters: GetDashboardListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filter'] != null) { - queryParameters['filter'] = requestParameters['filter']; - } - - if (requestParameters['projectId'] != null) { - queryParameters['project_id'] = requestParameters['projectId']; - } - - if (requestParameters['userId'] != null) { - queryParameters['user_id'] = requestParameters['userId']; - } - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/dashboard`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DashboardListFromJSON(jsonValue)); + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * Get a list of dashboards - */ - async getDashboardList(requestParameters: GetDashboardListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDashboardListRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; } - /** - * Update a dashboard - */ - async updateDashboardRaw(requestParameters: UpdateDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateDashboard().' - ); - } - - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - headerParameters['Content-Type'] = 'application/json'; + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + let urlPath = `/dashboard`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => DashboardListFromJSON(jsonValue)); + } + + /** + * Get a list of dashboards + */ + async getDashboardList( + requestParameters: GetDashboardListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getDashboardListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a dashboard + */ + async updateDashboardRaw( + requestParameters: UpdateDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateDashboard().' + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const queryParameters: any = {}; - let urlPath = `/dashboard/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: DashboardToJSON(requestParameters['dashboard']), - }, initOverrides); + headerParameters['Content-Type'] = 'application/json'; - return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Update a dashboard - */ - async updateDashboard(requestParameters: UpdateDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateDashboardRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/dashboard/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: DashboardToJSON(requestParameters['dashboard']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => DashboardFromJSON(jsonValue)); + } + + /** + * Update a dashboard + */ + async updateDashboard( + requestParameters: UpdateDashboardRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.updateDashboardRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/GroupApi.ts b/src/apis/GroupApi.ts index 62b2179..92b7104 100644 --- a/src/apis/GroupApi.ts +++ b/src/apis/GroupApi.ts @@ -5,296 +5,344 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Group, - GroupList, -} from '../models/index'; -import { - GroupFromJSON, - GroupToJSON, - GroupListFromJSON, - GroupListToJSON, -} from '../models/index'; +import type { Group, GroupList } from '../models/index'; +import { GroupFromJSON, GroupToJSON, GroupListFromJSON, GroupListToJSON } from '../models/index'; export interface AddGroupRequest { - group?: Group; + group?: Group; } export interface GetGroupRequest { - id: string; + id: string; } export interface GetGroupListRequest { - page?: number; - pageSize?: number; + page?: number; + pageSize?: number; } export interface UpdateGroupRequest { - id: string; - group?: Group; + id: string; + group?: Group; } /** * GroupApi - interface - * + * * @export * @interface GroupApiInterface */ export interface GroupApiInterface { - /** - * - * @summary Create a new group - * @param {Group} [group] A group object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GroupApiInterface - */ - addGroupRaw(requestParameters: AddGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a new group - */ - addGroup(requestParameters: AddGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a group - * @param {string} id The ID of the group - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GroupApiInterface - */ - getGroupRaw(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a group - */ - getGroup(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a list of groups - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GroupApiInterface - */ - getGroupListRaw(requestParameters: GetGroupListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a list of groups - */ - getGroupList(requestParameters: GetGroupListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Update a group - * @param {string} id The ID of the group - * @param {Group} [group] A group object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GroupApiInterface - */ - updateGroupRaw(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Update a group - */ - updateGroup(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Create a new group + * @param {Group} [group] A group object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupApiInterface + */ + addGroupRaw( + requestParameters: AddGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Create a new group + */ + addGroup( + requestParameters: AddGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a group + * @param {string} id The ID of the group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupApiInterface + */ + getGroupRaw( + requestParameters: GetGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a group + */ + getGroup( + requestParameters: GetGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a list of groups + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupApiInterface + */ + getGroupListRaw( + requestParameters: GetGroupListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a list of groups + */ + getGroupList( + requestParameters: GetGroupListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Update a group + * @param {string} id The ID of the group + * @param {Group} [group] A group object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupApiInterface + */ + updateGroupRaw( + requestParameters: UpdateGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Update a group + */ + updateGroup( + requestParameters: UpdateGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class GroupApi extends runtime.BaseAPI implements GroupApiInterface { + /** + * Create a new group + */ + async addGroupRaw( + requestParameters: AddGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - /** - * Create a new group - */ - async addGroupRaw(requestParameters: AddGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + let urlPath = `/group`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GroupToJSON(requestParameters['group']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Create a new group + */ + async addGroup( + requestParameters: AddGroupRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.addGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a group + */ + async getGroupRaw( + requestParameters: GetGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getGroup().' + ); + } - let urlPath = `/group`; + const queryParameters: any = {}; - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: GroupToJSON(requestParameters['group']), - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Create a new group - */ - async addGroup(requestParameters: AddGroupRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addGroupRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Get a group - */ - async getGroupRaw(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getGroup().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/group/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + let urlPath = `/group/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Get a group + */ + async getGroup( + requestParameters: GetGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of groups + */ + async getGroupListRaw( + requestParameters: GetGroupListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * Get a group - */ - async getGroup(requestParameters: GetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getGroupRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; } - /** - * Get a list of groups - */ - async getGroupListRaw(requestParameters: GetGroupListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/group`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GroupListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Get a list of groups - */ - async getGroupList(requestParameters: GetGroupListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getGroupListRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/group`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupListFromJSON(jsonValue)); + } + + /** + * Get a list of groups + */ + async getGroupList( + requestParameters: GetGroupListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getGroupListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a group + */ + async updateGroupRaw( + requestParameters: UpdateGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateGroup().' + ); } - /** - * Update a group - */ - async updateGroupRaw(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateGroup().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/group/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: GroupToJSON(requestParameters['group']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Update a group - */ - async updateGroup(requestParameters: UpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateGroupRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/group/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: GroupToJSON(requestParameters['group']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue)); + } + + /** + * Update a group + */ + async updateGroup( + requestParameters: UpdateGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.updateGroupRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/HealthApi.ts b/src/apis/HealthApi.ts index 21d09b6..0583641 100644 --- a/src/apis/HealthApi.ts +++ b/src/apis/HealthApi.ts @@ -5,183 +5,200 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Health, - HealthInfo, -} from '../models/index'; +import type { Health, HealthInfo } from '../models/index'; import { - HealthFromJSON, - HealthToJSON, - HealthInfoFromJSON, - HealthInfoToJSON, + HealthFromJSON, + HealthToJSON, + HealthInfoFromJSON, + HealthInfoToJSON, } from '../models/index'; /** * HealthApi - interface - * + * * @export * @interface HealthApiInterface */ export interface HealthApiInterface { - /** - * - * @summary Get a health report for the database - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof HealthApiInterface - */ - getDatabaseHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a health report for the database - */ - getDatabaseHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a general health report - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof HealthApiInterface - */ - getHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a general health report - */ - getHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get information about the server - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof HealthApiInterface - */ - getHealthInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get information about the server - */ - getHealthInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Get a health report for the database + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof HealthApiInterface + */ + getDatabaseHealthRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a health report for the database + */ + getDatabaseHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get a general health report + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof HealthApiInterface + */ + getHealthRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a general health report + */ + getHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Get information about the server + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof HealthApiInterface + */ + getHealthInfoRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get information about the server + */ + getHealthInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** - * + * */ export class HealthApi extends runtime.BaseAPI implements HealthApiInterface { - - /** - * Get a health report for the database - */ - async getDatabaseHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/health/database`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthFromJSON(jsonValue)); - } - - /** - * Get a health report for the database - */ - async getDatabaseHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDatabaseHealthRaw(initOverrides); - return await response.value(); - } - - /** - * Get a general health report - */ - async getHealthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/health`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthFromJSON(jsonValue)); - } - - /** - * Get a general health report - */ - async getHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getHealthRaw(initOverrides); - return await response.value(); - } - - /** - * Get information about the server - */ - async getHealthInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/health/info`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthInfoFromJSON(jsonValue)); + /** + * Get a health report for the database + */ + async getDatabaseHealthRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Get information about the server - */ - async getHealthInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getHealthInfoRaw(initOverrides); - return await response.value(); + let urlPath = `/health/database`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthFromJSON(jsonValue)); + } + + /** + * Get a health report for the database + */ + async getDatabaseHealth( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getDatabaseHealthRaw(initOverrides); + return await response.value(); + } + + /** + * Get a general health report + */ + async getHealthRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/health`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthFromJSON(jsonValue)); + } + + /** + * Get a general health report + */ + async getHealth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getHealthRaw(initOverrides); + return await response.value(); + } + + /** + * Get information about the server + */ + async getHealthInfoRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/health/info`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthInfoFromJSON(jsonValue)); + } + + /** + * Get information about the server + */ + async getHealthInfo( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getHealthInfoRaw(initOverrides); + return await response.value(); + } } diff --git a/src/apis/ImportApi.ts b/src/apis/ImportApi.ts index ddfcde0..17db31c 100644 --- a/src/apis/ImportApi.ts +++ b/src/apis/ImportApi.ts @@ -5,201 +5,224 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Import, -} from '../models/index'; -import { - ImportFromJSON, - ImportToJSON, -} from '../models/index'; +import type { Import } from '../models/index'; +import { ImportFromJSON, ImportToJSON } from '../models/index'; export interface AddImportRequest { - importFile: Blob; - project?: string; - metadata?: object; - source?: string; + importFile: Blob; + project?: string; + metadata?: object; + source?: string; } export interface GetImportRequest { - id: string; + id: string; } /** * ImportApi - interface - * + * * @export * @interface ImportApiInterface */ export interface ImportApiInterface { - /** - * - * @summary Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive - * @param {Blob} importFile The file to import - * @param {string} [project] The project associated with this import - * @param {object} [metadata] Additional metadata about imported run - * @param {string} [source] The source of this import - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ImportApiInterface - */ - addImportRaw(requestParameters: AddImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive - */ - addImport(requestParameters: AddImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get the status of an import - * @param {string} id The ID of the import - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ImportApiInterface - */ - getImportRaw(requestParameters: GetImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get the status of an import - */ - getImport(requestParameters: GetImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive + * @param {Blob} importFile The file to import + * @param {string} [project] The project associated with this import + * @param {object} [metadata] Additional metadata about imported run + * @param {string} [source] The source of this import + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ImportApiInterface + */ + addImportRaw( + requestParameters: AddImportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive + */ + addImport( + requestParameters: AddImportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get the status of an import + * @param {string} id The ID of the import + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ImportApiInterface + */ + getImportRaw( + requestParameters: GetImportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get the status of an import + */ + getImport( + requestParameters: GetImportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class ImportApi extends runtime.BaseAPI implements ImportApiInterface { + /** + * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive + */ + async addImportRaw( + requestParameters: AddImportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['importFile'] == null) { + throw new runtime.RequiredError( + 'importFile', + 'Required parameter "importFile" was null or undefined when calling addImport().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive - */ - async addImportRaw(requestParameters: AddImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['importFile'] == null) { - throw new runtime.RequiredError( - 'importFile', - 'Required parameter "importFile" was null or undefined when calling addImport().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const consumes: runtime.Consume[] = [ - { contentType: 'multipart/form-data' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - // use FormData to transmit files using content-type "multipart/form-data" - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters['importFile'] != null) { - formParams.append('importFile', requestParameters['importFile'] as any); - } - - if (requestParameters['project'] != null) { - formParams.append('project', requestParameters['project'] as any); - } - - if (requestParameters['metadata'] != null) { - formParams.append('metadata', new Blob([JSON.stringify(objectToJSON(requestParameters['metadata']))], { type: "application/json", })); - } - - if (requestParameters['source'] != null) { - formParams.append('source', requestParameters['source'] as any); - } - - - let urlPath = `/import`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ImportFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [{ contentType: 'multipart/form-data' }]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); } - /** - * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive - */ - async addImport(requestParameters: AddImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addImportRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['importFile'] != null) { + formParams.append('importFile', requestParameters['importFile'] as any); } - /** - * Get the status of an import - */ - async getImportRaw(requestParameters: GetImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getImport().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/import/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ImportFromJSON(jsonValue)); + if (requestParameters['project'] != null) { + formParams.append('project', requestParameters['project'] as any); } - /** - * Get the status of an import - */ - async getImport(requestParameters: GetImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getImportRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['metadata'] != null) { + formParams.append( + 'metadata', + new Blob([JSON.stringify(objectToJSON(requestParameters['metadata']))], { + type: 'application/json', + }) + ); + } + + if (requestParameters['source'] != null) { + formParams.append('source', requestParameters['source'] as any); + } + + let urlPath = `/import`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ImportFromJSON(jsonValue)); + } + + /** + * Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive + */ + async addImport( + requestParameters: AddImportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.addImportRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get the status of an import + */ + async getImportRaw( + requestParameters: GetImportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getImport().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/import/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ImportFromJSON(jsonValue)); + } + + /** + * Get the status of an import + */ + async getImport( + requestParameters: GetImportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getImportRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/LoginApi.ts b/src/apis/LoginApi.ts index f4d3ec1..7194c43 100644 --- a/src/apis/LoginApi.ts +++ b/src/apis/LoginApi.ts @@ -5,14 +5,13 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; import type { AccountRecovery, @@ -25,414 +24,524 @@ import type { LoginToken, } from '../models/index'; import { - AccountRecoveryFromJSON, - AccountRecoveryToJSON, - AccountRegistrationFromJSON, - AccountRegistrationToJSON, - AccountResetFromJSON, - AccountResetToJSON, - CredentialsFromJSON, - CredentialsToJSON, - LoginConfigFromJSON, - LoginConfigToJSON, - LoginErrorFromJSON, - LoginErrorToJSON, - LoginSupportFromJSON, - LoginSupportToJSON, - LoginTokenFromJSON, - LoginTokenToJSON, + AccountRecoveryFromJSON, + AccountRecoveryToJSON, + AccountRegistrationFromJSON, + AccountRegistrationToJSON, + AccountResetFromJSON, + AccountResetToJSON, + CredentialsFromJSON, + CredentialsToJSON, + LoginConfigFromJSON, + LoginConfigToJSON, + LoginErrorFromJSON, + LoginErrorToJSON, + LoginSupportFromJSON, + LoginSupportToJSON, + LoginTokenFromJSON, + LoginTokenToJSON, } from '../models/index'; export interface ActivateRequest { - activationCode: string; + activationCode: string; } export interface AuthRequest { - provider: string; + provider: string; } export interface ConfigRequest { - provider: string; + provider: string; } export interface LoginRequest { - credentials?: Credentials; + credentials?: Credentials; } export interface RecoverRequest { - accountRecovery?: AccountRecovery; + accountRecovery?: AccountRecovery; } export interface RegisterRequest { - accountRegistration?: AccountRegistration; + accountRegistration?: AccountRegistration; } export interface ResetPasswordRequest { - accountReset?: AccountReset; + accountReset?: AccountReset; } /** * LoginApi - interface - * + * * @export * @interface LoginApiInterface */ export interface LoginApiInterface { - /** - * - * @param {string} activationCode The activation code - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LoginApiInterface - */ - activateRaw(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - */ - activate(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @param {string} provider The login provider\'s configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LoginApiInterface - */ - authRaw(requestParameters: AuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - */ - auth(requestParameters: AuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @param {string} provider The login provider\'s configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LoginApiInterface - */ - configRaw(requestParameters: ConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - */ - config(requestParameters: ConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @param {Credentials} [credentials] A login object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LoginApiInterface - */ - loginRaw(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - */ - login(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @param {AccountRecovery} [accountRecovery] A user recovering their password - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LoginApiInterface - */ - recoverRaw(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - */ - recover(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @param {AccountRegistration} [accountRegistration] A user registering their account - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LoginApiInterface - */ - registerRaw(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - */ - register(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @param {AccountReset} [accountReset] A user resetting their password - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LoginApiInterface - */ - resetPasswordRaw(requestParameters: ResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - */ - resetPassword(requestParameters: ResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LoginApiInterface - */ - supportRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - */ - support(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @param {string} activationCode The activation code + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + activateRaw( + requestParameters: ActivateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + */ + activate( + requestParameters: ActivateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @param {string} provider The login provider\'s configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + authRaw( + requestParameters: AuthRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + */ + auth( + requestParameters: AuthRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @param {string} provider The login provider\'s configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + configRaw( + requestParameters: ConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + */ + config( + requestParameters: ConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @param {Credentials} [credentials] A login object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + loginRaw( + requestParameters: LoginRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + */ + login( + requestParameters: LoginRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @param {AccountRecovery} [accountRecovery] A user recovering their password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + recoverRaw( + requestParameters: RecoverRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + */ + recover( + requestParameters: RecoverRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @param {AccountRegistration} [accountRegistration] A user registering their account + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + registerRaw( + requestParameters: RegisterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + */ + register( + requestParameters: RegisterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @param {AccountReset} [accountReset] A user resetting their password + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + resetPasswordRaw( + requestParameters: ResetPasswordRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + */ + resetPassword( + requestParameters: ResetPasswordRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LoginApiInterface + */ + supportRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + */ + support(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** - * + * */ export class LoginApi extends runtime.BaseAPI implements LoginApiInterface { - - /** - */ - async activateRaw(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['activationCode'] == null) { - throw new runtime.RequiredError( - 'activationCode', - 'Required parameter "activationCode" was null or undefined when calling activate().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/login/activate/{activation_code}`; - urlPath = urlPath.replace(`{${"activation_code"}}`, encodeURIComponent(String(requestParameters['activationCode']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async activate(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.activateRaw(requestParameters, initOverrides); - } - - /** - */ - async authRaw(requestParameters: AuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['provider'] == null) { - throw new runtime.RequiredError( - 'provider', - 'Required parameter "provider" was null or undefined when calling auth().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/login/auth/{provider}`; - urlPath = urlPath.replace(`{${"provider"}}`, encodeURIComponent(String(requestParameters['provider']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async auth(requestParameters: AuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.authRaw(requestParameters, initOverrides); - } - - /** - */ - async configRaw(requestParameters: ConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['provider'] == null) { - throw new runtime.RequiredError( - 'provider', - 'Required parameter "provider" was null or undefined when calling config().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/login/config/{provider}`; - urlPath = urlPath.replace(`{${"provider"}}`, encodeURIComponent(String(requestParameters['provider']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => LoginConfigFromJSON(jsonValue)); + /** + */ + async activateRaw( + requestParameters: ActivateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['activationCode'] == null) { + throw new runtime.RequiredError( + 'activationCode', + 'Required parameter "activationCode" was null or undefined when calling activate().' + ); } - /** - */ - async config(requestParameters: ConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.configRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async loginRaw(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - - let urlPath = `/login`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CredentialsToJSON(requestParameters['credentials']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => LoginTokenFromJSON(jsonValue)); - } - - /** - */ - async login(requestParameters: LoginRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.loginRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async recoverRaw(requestParameters: RecoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - - let urlPath = `/login/recover`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AccountRecoveryToJSON(requestParameters['accountRecovery']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async recover(requestParameters: RecoverRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.recoverRaw(requestParameters, initOverrides); - } - - /** - */ - async registerRaw(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - - let urlPath = `/login/register`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AccountRegistrationToJSON(requestParameters['accountRegistration']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async register(requestParameters: RegisterRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.registerRaw(requestParameters, initOverrides); - } - - /** - */ - async resetPasswordRaw(requestParameters: ResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - - let urlPath = `/login/reset-password`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AccountResetToJSON(requestParameters['accountReset']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - */ - async resetPassword(requestParameters: ResetPasswordRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.resetPasswordRaw(requestParameters, initOverrides); - } - - /** - */ - async supportRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/login/support`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => LoginSupportFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/login/activate/{activation_code}`; + urlPath = urlPath.replace( + `{${'activation_code'}}`, + encodeURIComponent(String(requestParameters['activationCode'])) + ); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async activate( + requestParameters: ActivateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.activateRaw(requestParameters, initOverrides); + } + + /** + */ + async authRaw( + requestParameters: AuthRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['provider'] == null) { + throw new runtime.RequiredError( + 'provider', + 'Required parameter "provider" was null or undefined when calling auth().' + ); } - /** - */ - async support(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.supportRaw(initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/login/auth/{provider}`; + urlPath = urlPath.replace( + `{${'provider'}}`, + encodeURIComponent(String(requestParameters['provider'])) + ); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async auth( + requestParameters: AuthRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.authRaw(requestParameters, initOverrides); + } + + /** + */ + async configRaw( + requestParameters: ConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['provider'] == null) { + throw new runtime.RequiredError( + 'provider', + 'Required parameter "provider" was null or undefined when calling config().' + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/login/config/{provider}`; + urlPath = urlPath.replace( + `{${'provider'}}`, + encodeURIComponent(String(requestParameters['provider'])) + ); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => LoginConfigFromJSON(jsonValue)); + } + + /** + */ + async config( + requestParameters: ConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.configRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async loginRaw( + requestParameters: LoginRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/login`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CredentialsToJSON(requestParameters['credentials']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => LoginTokenFromJSON(jsonValue)); + } + + /** + */ + async login( + requestParameters: LoginRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.loginRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async recoverRaw( + requestParameters: RecoverRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/login/recover`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AccountRecoveryToJSON(requestParameters['accountRecovery']), + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async recover( + requestParameters: RecoverRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.recoverRaw(requestParameters, initOverrides); + } + + /** + */ + async registerRaw( + requestParameters: RegisterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/login/register`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AccountRegistrationToJSON(requestParameters['accountRegistration']), + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async register( + requestParameters: RegisterRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.registerRaw(requestParameters, initOverrides); + } + + /** + */ + async resetPasswordRaw( + requestParameters: ResetPasswordRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/login/reset-password`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AccountResetToJSON(requestParameters['accountReset']), + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async resetPassword( + requestParameters: ResetPasswordRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.resetPasswordRaw(requestParameters, initOverrides); + } + + /** + */ + async supportRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/login/support`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => LoginSupportFromJSON(jsonValue)); + } + + /** + */ + async support(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.supportRaw(initOverrides); + return await response.value(); + } } diff --git a/src/apis/ProjectApi.ts b/src/apis/ProjectApi.ts index 749314b..2d14363 100644 --- a/src/apis/ProjectApi.ts +++ b/src/apis/ProjectApi.ts @@ -5,378 +5,446 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Project, - ProjectList, -} from '../models/index'; +import type { Project, ProjectList } from '../models/index'; import { - ProjectFromJSON, - ProjectToJSON, - ProjectListFromJSON, - ProjectListToJSON, + ProjectFromJSON, + ProjectToJSON, + ProjectListFromJSON, + ProjectListToJSON, } from '../models/index'; export interface AddProjectRequest { - project?: Project; + project?: Project; } export interface GetFilterParamsRequest { - id: string; + id: string; } export interface GetProjectRequest { - id: string; + id: string; } export interface GetProjectListRequest { - filter?: Array; - ownerId?: string; - groupId?: string; - page?: number; - pageSize?: number; + filter?: Array; + ownerId?: string; + groupId?: string; + page?: number; + pageSize?: number; } export interface UpdateProjectRequest { - id: string; - project?: Project; + id: string; + project?: Project; } /** * ProjectApi - interface - * + * * @export * @interface ProjectApiInterface */ export interface ProjectApiInterface { - /** - * - * @summary Create a project - * @param {Project} [project] A project object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectApiInterface - */ - addProjectRaw(requestParameters: AddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a project - */ - addProject(requestParameters: AddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a project\'s filterable parameters - * @param {string} id ID of test project - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectApiInterface - */ - getFilterParamsRaw(requestParameters: GetFilterParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; - - /** - * Get a project\'s filterable parameters - */ - getFilterParams(requestParameters: GetFilterParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * - * @summary Get a single project by ID - * @param {string} id ID of test project - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectApiInterface - */ - getProjectRaw(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a single project by ID - */ - getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a list of projects - * @param {Array} [filter] Fields to filter by - * @param {string} [ownerId] Filter projects by owner ID - * @param {string} [groupId] Filter projects by group ID - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectApiInterface - */ - getProjectListRaw(requestParameters: GetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a list of projects - */ - getProjectList(requestParameters: GetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Update a project - * @param {string} id ID of test project - * @param {Project} [project] A project object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectApiInterface - */ - updateProjectRaw(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Update a project - */ - updateProject(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Create a project + * @param {Project} [project] A project object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + addProjectRaw( + requestParameters: AddProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Create a project + */ + addProject( + requestParameters: AddProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a project\'s filterable parameters + * @param {string} id ID of test project + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + getFilterParamsRaw( + requestParameters: GetFilterParamsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>>; + + /** + * Get a project\'s filterable parameters + */ + getFilterParams( + requestParameters: GetFilterParamsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * + * @summary Get a single project by ID + * @param {string} id ID of test project + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + getProjectRaw( + requestParameters: GetProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a single project by ID + */ + getProject( + requestParameters: GetProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a list of projects + * @param {Array} [filter] Fields to filter by + * @param {string} [ownerId] Filter projects by owner ID + * @param {string} [groupId] Filter projects by group ID + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + getProjectListRaw( + requestParameters: GetProjectListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a list of projects + */ + getProjectList( + requestParameters: GetProjectListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Update a project + * @param {string} id ID of test project + * @param {Project} [project] A project object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectApiInterface + */ + updateProjectRaw( + requestParameters: UpdateProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Update a project + */ + updateProject( + requestParameters: UpdateProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class ProjectApi extends runtime.BaseAPI implements ProjectApiInterface { + /** + * Create a project + */ + async addProjectRaw( + requestParameters: AddProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - /** - * Create a project - */ - async addProjectRaw(requestParameters: AddProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + let urlPath = `/project`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ProjectToJSON(requestParameters['project']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Create a project + */ + async addProject( + requestParameters: AddProjectRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.addProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a project\'s filterable parameters + */ + async getFilterParamsRaw( + requestParameters: GetFilterParamsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getFilterParams().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters['Content-Type'] = 'application/json'; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - let urlPath = `/project`; + let urlPath = `/project/filter-params/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get a project\'s filterable parameters + */ + async getFilterParams( + requestParameters: GetFilterParamsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const response = await this.getFilterParamsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single project by ID + */ + async getProjectRaw( + requestParameters: GetProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getProject().' + ); + } - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ProjectToJSON(requestParameters['project']), - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); - } + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Create a project - */ - async addProject(requestParameters: AddProjectRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addProjectRaw(requestParameters, initOverrides); - return await response.value(); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Get a project\'s filterable parameters - */ - async getFilterParamsRaw(requestParameters: GetFilterParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getFilterParams().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/project/filter-params/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Get a project\'s filterable parameters - */ - async getFilterParams(requestParameters: GetFilterParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getFilterParamsRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/project/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Get a single project by ID + */ + async getProject( + requestParameters: GetProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getProjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of projects + */ + async getProjectListRaw( + requestParameters: GetProjectListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; } - /** - * Get a single project by ID - */ - async getProjectRaw(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getProject().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/project/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + if (requestParameters['ownerId'] != null) { + queryParameters['ownerId'] = requestParameters['ownerId']; } - /** - * Get a single project by ID - */ - async getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getProjectRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['groupId'] != null) { + queryParameters['groupId'] = requestParameters['groupId']; } - /** - * Get a list of projects - */ - async getProjectListRaw(requestParameters: GetProjectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filter'] != null) { - queryParameters['filter'] = requestParameters['filter']; - } - - if (requestParameters['ownerId'] != null) { - queryParameters['ownerId'] = requestParameters['ownerId']; - } - - if (requestParameters['groupId'] != null) { - queryParameters['groupId'] = requestParameters['groupId']; - } - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/project`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectListFromJSON(jsonValue)); + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * Get a list of projects - */ - async getProjectList(requestParameters: GetProjectListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getProjectListRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; } - /** - * Update a project - */ - async updateProjectRaw(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateProject().' - ); - } - - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - headerParameters['Content-Type'] = 'application/json'; + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + let urlPath = `/project`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectListFromJSON(jsonValue)); + } + + /** + * Get a list of projects + */ + async getProjectList( + requestParameters: GetProjectListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getProjectListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a project + */ + async updateProjectRaw( + requestParameters: UpdateProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateProject().' + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const queryParameters: any = {}; - let urlPath = `/project/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ProjectToJSON(requestParameters['project']), - }, initOverrides); + headerParameters['Content-Type'] = 'application/json'; - return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Update a project - */ - async updateProject(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateProjectRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/project/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ProjectToJSON(requestParameters['project']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProjectFromJSON(jsonValue)); + } + + /** + * Update a project + */ + async updateProject( + requestParameters: UpdateProjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.updateProjectRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/ResultApi.ts b/src/apis/ResultApi.ts index f0fdbfd..5ea2892 100644 --- a/src/apis/ResultApi.ts +++ b/src/apis/ResultApi.ts @@ -5,311 +5,364 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Result, - ResultList, -} from '../models/index'; +import type { Result, ResultList } from '../models/index'; import { - ResultFromJSON, - ResultToJSON, - ResultListFromJSON, - ResultListToJSON, + ResultFromJSON, + ResultToJSON, + ResultListFromJSON, + ResultListToJSON, } from '../models/index'; export interface AddResultRequest { - result?: Result; + result?: Result; } export interface GetResultRequest { - id: string; + id: string; } export interface GetResultListRequest { - filter?: Array; - estimate?: boolean; - page?: number; - pageSize?: number; + filter?: Array; + estimate?: boolean; + page?: number; + pageSize?: number; } export interface UpdateResultRequest { - id: string; - result?: Result; + id: string; + result?: Result; } /** * ResultApi - interface - * + * * @export * @interface ResultApiInterface */ export interface ResultApiInterface { - /** - * - * @summary Create a test result - * @param {Result} [result] Result item - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResultApiInterface - */ - addResultRaw(requestParameters: AddResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a test result - */ - addResult(requestParameters: AddResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a single result - * @param {string} id ID of result to return (uuid required) - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResultApiInterface - */ - getResultRaw(requestParameters: GetResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a single result - */ - getResult(requestParameters: GetResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - * @summary Get the list of results. - * @param {Array} [filter] Fields to filter by - * @param {boolean} [estimate] Return an estimated count - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResultApiInterface - */ - getResultListRaw(requestParameters: GetResultListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - * Get the list of results. - */ - getResultList(requestParameters: GetResultListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Updates a single result - * @param {string} id ID of result to update - * @param {Result} [result] Result item - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ResultApiInterface - */ - updateResultRaw(requestParameters: UpdateResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Updates a single result - */ - updateResult(requestParameters: UpdateResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Create a test result + * @param {Result} [result] Result item + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResultApiInterface + */ + addResultRaw( + requestParameters: AddResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Create a test result + */ + addResult( + requestParameters: AddResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a single result + * @param {string} id ID of result to return (uuid required) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResultApiInterface + */ + getResultRaw( + requestParameters: GetResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a single result + */ + getResult( + requestParameters: GetResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed + * @summary Get the list of results. + * @param {Array} [filter] Fields to filter by + * @param {boolean} [estimate] Return an estimated count + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResultApiInterface + */ + getResultListRaw( + requestParameters: GetResultListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed + * Get the list of results. + */ + getResultList( + requestParameters: GetResultListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Updates a single result + * @param {string} id ID of result to update + * @param {Result} [result] Result item + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ResultApiInterface + */ + updateResultRaw( + requestParameters: UpdateResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Updates a single result + */ + updateResult( + requestParameters: UpdateResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class ResultApi extends runtime.BaseAPI implements ResultApiInterface { + /** + * Create a test result + */ + async addResultRaw( + requestParameters: AddResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - /** - * Create a test result - */ - async addResultRaw(requestParameters: AddResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + let urlPath = `/result`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ResultToJSON(requestParameters['result']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); + } + + /** + * Create a test result + */ + async addResult( + requestParameters: AddResultRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.addResultRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single result + */ + async getResultRaw( + requestParameters: GetResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getResult().' + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const queryParameters: any = {}; - let urlPath = `/result`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ResultToJSON(requestParameters['result']), - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Create a test result - */ - async addResult(requestParameters: AddResultRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addResultRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/result/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); + } + + /** + * Get a single result + */ + async getResult( + requestParameters: GetResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getResultRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed + * Get the list of results. + */ + async getResultListRaw( + requestParameters: GetResultListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; } - /** - * Get a single result - */ - async getResultRaw(requestParameters: GetResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getResult().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/result/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); + if (requestParameters['estimate'] != null) { + queryParameters['estimate'] = requestParameters['estimate']; } - /** - * Get a single result - */ - async getResult(requestParameters: GetResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - * Get the list of results. - */ - async getResultListRaw(requestParameters: GetResultListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filter'] != null) { - queryParameters['filter'] = requestParameters['filter']; - } - - if (requestParameters['estimate'] != null) { - queryParameters['estimate'] = requestParameters['estimate']; - } - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } - let urlPath = `/result`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - return new runtime.JSONApiResponse(response, (jsonValue) => ResultListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed - * Get the list of results. - */ - async getResultList(requestParameters: GetResultListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultListRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/result`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResultListFromJSON(jsonValue)); + } + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /result?filter=metadata.run=63fe5 /result?filter=test_id~neg /result?filter=result!passed + * Get the list of results. + */ + async getResultList( + requestParameters: GetResultListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getResultListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a single result + */ + async updateResultRaw( + requestParameters: UpdateResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateResult().' + ); } - /** - * Updates a single result - */ - async updateResultRaw(requestParameters: UpdateResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateResult().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/result/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ResultToJSON(requestParameters['result']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Updates a single result - */ - async updateResult(requestParameters: UpdateResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateResultRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/result/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ResultToJSON(requestParameters['result']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ResultFromJSON(jsonValue)); + } + + /** + * Updates a single result + */ + async updateResult( + requestParameters: UpdateResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.updateResultRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/RunApi.ts b/src/apis/RunApi.ts index a5fb3e3..ee34703 100644 --- a/src/apis/RunApi.ts +++ b/src/apis/RunApi.ts @@ -5,385 +5,452 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - Run, - RunList, - UpdateRun, -} from '../models/index'; +import type { Run, RunList, UpdateRun } from '../models/index'; import { - RunFromJSON, - RunToJSON, - RunListFromJSON, - RunListToJSON, - UpdateRunFromJSON, - UpdateRunToJSON, + RunFromJSON, + RunToJSON, + RunListFromJSON, + RunListToJSON, + UpdateRunFromJSON, + UpdateRunToJSON, } from '../models/index'; export interface AddRunRequest { - run?: Run; + run?: Run; } export interface BulkUpdateRequest { - filter?: Array; - pageSize?: number; - updateRun?: UpdateRun; + filter?: Array; + pageSize?: number; + updateRun?: UpdateRun; } export interface GetRunRequest { - id: string; + id: string; } export interface GetRunListRequest { - filter?: Array; - estimate?: boolean; - page?: number; - pageSize?: number; + filter?: Array; + estimate?: boolean; + page?: number; + pageSize?: number; } export interface UpdateRunRequest { - id: string; - run?: Run; + id: string; + run?: Run; } /** * RunApi - interface - * + * * @export * @interface RunApiInterface */ export interface RunApiInterface { - /** - * - * @summary Create a run - * @param {Run} [run] A run object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RunApiInterface - */ - addRunRaw(requestParameters: AddRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a run - */ - addRun(requestParameters: AddRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Update multiple runs with common metadata - * @param {Array} [filter] Fields to filter by - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {UpdateRun} [updateRun] Run metadata updates - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RunApiInterface - */ - bulkUpdateRaw(requestParameters: BulkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Update multiple runs with common metadata - */ - bulkUpdate(requestParameters: BulkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a single run by ID (uuid required) - * @param {string} id ID of test run - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RunApiInterface - */ - getRunRaw(requestParameters: GetRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a single run by ID (uuid required) - */ - getRun(requestParameters: GetRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 - * @summary Get a list of the test runs - * @param {Array} [filter] Fields to filter by - * @param {boolean} [estimate] Return an estimated count - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RunApiInterface - */ - getRunListRaw(requestParameters: GetRunListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 - * Get a list of the test runs - */ - getRunList(requestParameters: GetRunListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Update a single run - * @param {string} id ID of the test run - * @param {Run} [run] A run object - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RunApiInterface - */ - updateRunRaw(requestParameters: UpdateRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Update a single run - */ - updateRun(requestParameters: UpdateRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Create a run + * @param {Run} [run] A run object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + addRunRaw( + requestParameters: AddRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Create a run + */ + addRun( + requestParameters: AddRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Update multiple runs with common metadata + * @param {Array} [filter] Fields to filter by + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {UpdateRun} [updateRun] Run metadata updates + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + bulkUpdateRaw( + requestParameters: BulkUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Update multiple runs with common metadata + */ + bulkUpdate( + requestParameters: BulkUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a single run by ID (uuid required) + * @param {string} id ID of test run + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + getRunRaw( + requestParameters: GetRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a single run by ID (uuid required) + */ + getRun( + requestParameters: GetRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 + * @summary Get a list of the test runs + * @param {Array} [filter] Fields to filter by + * @param {boolean} [estimate] Return an estimated count + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + getRunListRaw( + requestParameters: GetRunListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 + * Get a list of the test runs + */ + getRunList( + requestParameters: GetRunListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Update a single run + * @param {string} id ID of the test run + * @param {Run} [run] A run object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunApiInterface + */ + updateRunRaw( + requestParameters: UpdateRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Update a single run + */ + updateRun( + requestParameters: UpdateRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class RunApi extends runtime.BaseAPI implements RunApiInterface { - - /** - * Create a run - */ - async addRunRaw(requestParameters: AddRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/run`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RunToJSON(requestParameters['run']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); + /** + * Create a run + */ + async addRunRaw( + requestParameters: AddRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Create a run - */ - async addRun(requestParameters: AddRunRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addRunRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/run`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RunToJSON(requestParameters['run']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); + } + + /** + * Create a run + */ + async addRun( + requestParameters: AddRunRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.addRunRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update multiple runs with common metadata + */ + async bulkUpdateRaw( + requestParameters: BulkUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; } - /** - * Update multiple runs with common metadata - */ - async bulkUpdateRaw(requestParameters: BulkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } - if (requestParameters['filter'] != null) { - queryParameters['filter'] = requestParameters['filter']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } + headerParameters['Content-Type'] = 'application/json'; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - headerParameters['Content-Type'] = 'application/json'; + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + let urlPath = `/runs/bulk-update`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: UpdateRunToJSON(requestParameters['updateRun']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunListFromJSON(jsonValue)); + } + + /** + * Update multiple runs with common metadata + */ + async bulkUpdate( + requestParameters: BulkUpdateRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.bulkUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single run by ID (uuid required) + */ + async getRunRaw( + requestParameters: GetRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getRun().' + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const queryParameters: any = {}; - let urlPath = `/runs/bulk-update`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: UpdateRunToJSON(requestParameters['updateRun']), - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - return new runtime.JSONApiResponse(response, (jsonValue) => RunListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Update multiple runs with common metadata - */ - async bulkUpdate(requestParameters: BulkUpdateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.bulkUpdateRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/run/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); + } + + /** + * Get a single run by ID (uuid required) + */ + async getRun( + requestParameters: GetRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getRunRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 + * Get a list of the test runs + */ + async getRunListRaw( + requestParameters: GetRunListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; } - /** - * Get a single run by ID (uuid required) - */ - async getRunRaw(requestParameters: GetRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getRun().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/run/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); + if (requestParameters['estimate'] != null) { + queryParameters['estimate'] = requestParameters['estimate']; } - /** - * Get a single run by ID (uuid required) - */ - async getRun(requestParameters: GetRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getRunRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 - * Get a list of the test runs - */ - async getRunListRaw(requestParameters: GetRunListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filter'] != null) { - queryParameters['filter'] = requestParameters['filter']; - } - - if (requestParameters['estimate'] != null) { - queryParameters['estimate'] = requestParameters['estimate']; - } - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } - let urlPath = `/run`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - return new runtime.JSONApiResponse(response, (jsonValue) => RunListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 - * Get a list of the test runs - */ - async getRunList(requestParameters: GetRunListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getRunListRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/run`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunListFromJSON(jsonValue)); + } + + /** + * The `filter` parameter takes a list of filters to apply in the form of: {name}{operator}{value} where: - `name` is any valid column in the database - `operator` is one of `=`, `!`, `>`, `<`, `)`, `(`, `~`, `*` - `value` is what you want to filter by Operators are simple correspondents to MongoDB\'s query selectors: - `=` becomes `$eq` - `!` becomes `$ne` - `>` becomes `$gt` - `<` becomes `$lt` - `)` becomes `$gte` - `(` becomes `$lte` - `~` becomes `$regex` - `*` becomes `$in` - `@` becomes `$exists` Notes: - For the `$exists` operator, \"true\", \"t\", \"yes\", \"y\" and `1` will all be considered true, all other values are considered false. Example queries: /run?filter=metadata.jenkins.job_name=jenkins_job /run?filter=summary.failures>0 + * Get a list of the test runs + */ + async getRunList( + requestParameters: GetRunListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getRunListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a single run + */ + async updateRunRaw( + requestParameters: UpdateRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateRun().' + ); } - /** - * Update a single run - */ - async updateRunRaw(requestParameters: UpdateRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateRun().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; + const queryParameters: any = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + const headerParameters: runtime.HTTPHeaders = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + headerParameters['Content-Type'] = 'application/json'; - let urlPath = `/run/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: RunToJSON(requestParameters['run']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Update a single run - */ - async updateRun(requestParameters: UpdateRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateRunRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/run/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: RunToJSON(requestParameters['run']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => RunFromJSON(jsonValue)); + } + + /** + * Update a single run + */ + async updateRun( + requestParameters: UpdateRunRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.updateRunRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/TaskApi.ts b/src/apis/TaskApi.ts index a1afc4f..88669ad 100644 --- a/src/apis/TaskApi.ts +++ b/src/apis/TaskApi.ts @@ -1,96 +1,107 @@ /* tslint:disable */ -/* eslint-disable */ + /** * Ibutsu API * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; export interface GetTaskRequest { - id: string; + id: string; } /** * TaskApi - interface - * + * * @export * @interface TaskApiInterface */ export interface TaskApiInterface { - /** - * - * @summary Get the status or result of a task - * @param {string} id The ID of the task - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TaskApiInterface - */ - getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get the status or result of a task - */ - getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Get the status or result of a task + * @param {string} id The ID of the task + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TaskApiInterface + */ + getTaskRaw( + requestParameters: GetTaskRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get the status or result of a task + */ + getTask( + requestParameters: GetTaskRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class TaskApi extends runtime.BaseAPI implements TaskApiInterface { + /** + * Get the status or result of a task + */ + async getTaskRaw( + requestParameters: GetTaskRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getTask().' + ); + } - /** - * Get the status or result of a task - */ - async getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getTask().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/task/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); + const queryParameters: any = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Get the status or result of a task - */ - async getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTaskRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/task/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get the status or result of a task + */ + async getTask( + requestParameters: GetTaskRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getTaskRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/UserApi.ts b/src/apis/UserApi.ts index 79941ab..4aada00 100644 --- a/src/apis/UserApi.ts +++ b/src/apis/UserApi.ts @@ -5,398 +5,465 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - CreateToken, - Token, - TokenList, - User, -} from '../models/index'; +import type { CreateToken, Token, TokenList, User } from '../models/index'; import { - CreateTokenFromJSON, - CreateTokenToJSON, - TokenFromJSON, - TokenToJSON, - TokenListFromJSON, - TokenListToJSON, - UserFromJSON, - UserToJSON, + CreateTokenFromJSON, + CreateTokenToJSON, + TokenFromJSON, + TokenToJSON, + TokenListFromJSON, + TokenListToJSON, + UserFromJSON, + UserToJSON, } from '../models/index'; export interface AddTokenRequest { - createToken?: CreateToken; + createToken?: CreateToken; } export interface DeleteTokenRequest { - id: string; + id: string; } export interface GetTokenRequest { - id: string; + id: string; } export interface GetTokenListRequest { - page?: number; - pageSize?: number; + page?: number; + pageSize?: number; } /** * UserApi - interface - * + * * @export * @interface UserApiInterface */ export interface UserApiInterface { - /** - * - * @summary Create a token for the current user - * @param {CreateToken} [createToken] Create a token for a user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApiInterface - */ - addTokenRaw(requestParameters: AddTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a token for the current user - */ - addToken(requestParameters: AddTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Delete the token - * @param {string} id The id of a token - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApiInterface - */ - deleteTokenRaw(requestParameters: DeleteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Delete the token - */ - deleteToken(requestParameters: DeleteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Return the user details for the current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApiInterface - */ - getCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Return the user details for the current user - */ - getCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Retrieve a single token for the current user - * @param {string} id The id of a token - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApiInterface - */ - getTokenRaw(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Retrieve a single token for the current user - */ - getToken(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Return the tokens for the user - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApiInterface - */ - getTokenListRaw(requestParameters: GetTokenListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Return the tokens for the user - */ - getTokenList(requestParameters: GetTokenListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Return the user details for the current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApiInterface - */ - updateCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Return the user details for the current user - */ - updateCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Create a token for the current user + * @param {CreateToken} [createToken] Create a token for a user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + addTokenRaw( + requestParameters: AddTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Create a token for the current user + */ + addToken( + requestParameters: AddTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Delete the token + * @param {string} id The id of a token + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + deleteTokenRaw( + requestParameters: DeleteTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Delete the token + */ + deleteToken( + requestParameters: DeleteTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Return the user details for the current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + getCurrentUserRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Return the user details for the current user + */ + getCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @summary Retrieve a single token for the current user + * @param {string} id The id of a token + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + getTokenRaw( + requestParameters: GetTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Retrieve a single token for the current user + */ + getToken( + requestParameters: GetTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Return the tokens for the user + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + getTokenListRaw( + requestParameters: GetTokenListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Return the tokens for the user + */ + getTokenList( + requestParameters: GetTokenListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Return the user details for the current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApiInterface + */ + updateCurrentUserRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Return the user details for the current user + */ + updateCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** - * + * */ export class UserApi extends runtime.BaseAPI implements UserApiInterface { - - /** - * Create a token for the current user - */ - async addTokenRaw(requestParameters: AddTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/user/token`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateTokenToJSON(requestParameters['createToken']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); - } - - /** - * Create a token for the current user - */ - async addToken(requestParameters: AddTokenRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addTokenRaw(requestParameters, initOverrides); - return await response.value(); + /** + * Create a token for the current user + */ + async addTokenRaw( + requestParameters: AddTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Delete the token - */ - async deleteTokenRaw(requestParameters: DeleteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling deleteToken().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/user/token/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + let urlPath = `/user/token`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateTokenToJSON(requestParameters['createToken']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + } + + /** + * Create a token for the current user + */ + async addToken( + requestParameters: AddTokenRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.addTokenRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete the token + */ + async deleteTokenRaw( + requestParameters: DeleteTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteToken().' + ); } - /** - * Delete the token - */ - async deleteToken(requestParameters: DeleteTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteTokenRaw(requestParameters, initOverrides); - } - - /** - * Return the user details for the current user - */ - async getCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + const queryParameters: any = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const headerParameters: runtime.HTTPHeaders = {}; - let urlPath = `/user`; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); - } - - /** - * Return the user details for the current user - */ - async getCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCurrentUserRaw(initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Retrieve a single token for the current user - */ - async getTokenRaw(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getToken().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/user/token/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + let urlPath = `/user/token/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete the token + */ + async deleteToken( + requestParameters: DeleteTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.deleteTokenRaw(requestParameters, initOverrides); + } + + /** + * Return the user details for the current user + */ + async getCurrentUserRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Retrieve a single token for the current user - */ - async getToken(requestParameters: GetTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTokenRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/user`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Return the user details for the current user + */ + async getCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getCurrentUserRaw(initOverrides); + return await response.value(); + } + + /** + * Retrieve a single token for the current user + */ + async getTokenRaw( + requestParameters: GetTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getToken().' + ); } - /** - * Return the tokens for the user - */ - async getTokenListRaw(requestParameters: GetTokenListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } + const queryParameters: any = {}; - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/user/token`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TokenListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Return the tokens for the user - */ - async getTokenList(requestParameters: GetTokenListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTokenListRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/user/token/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenFromJSON(jsonValue)); + } + + /** + * Retrieve a single token for the current user + */ + async getToken( + requestParameters: GetTokenRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getTokenRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return the tokens for the user + */ + async getTokenListRaw( + requestParameters: GetTokenListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * Return the user details for the current user - */ - async updateCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; + } - let urlPath = `/user`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Return the user details for the current user - */ - async updateCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateCurrentUserRaw(initOverrides); - return await response.value(); + let urlPath = `/user/token`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TokenListFromJSON(jsonValue)); + } + + /** + * Return the tokens for the user + */ + async getTokenList( + requestParameters: GetTokenListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getTokenListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return the user details for the current user + */ + async updateCurrentUserRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/user`; + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); + } + + /** + * Return the user details for the current user + */ + async updateCurrentUser( + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.updateCurrentUserRaw(initOverrides); + return await response.value(); + } } diff --git a/src/apis/WidgetApi.ts b/src/apis/WidgetApi.ts index 66f5280..f59bf4a 100644 --- a/src/apis/WidgetApi.ts +++ b/src/apis/WidgetApi.ts @@ -5,168 +5,189 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - WidgetTypeList, -} from '../models/index'; -import { - WidgetTypeListFromJSON, - WidgetTypeListToJSON, -} from '../models/index'; +import type { WidgetTypeList } from '../models/index'; +import { WidgetTypeListFromJSON, WidgetTypeListToJSON } from '../models/index'; export interface GetWidgetRequest { - id: string; - params?: object; + id: string; + params?: object; } export interface GetWidgetTypesRequest { - type?: string; + type?: string; } /** * WidgetApi - interface - * + * * @export * @interface WidgetApiInterface */ export interface WidgetApiInterface { - /** - * - * @summary Generate data for a dashboard widget - * @param {string} id The widget identifier - * @param {object} [params] The parameters for the widget - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WidgetApiInterface - */ - getWidgetRaw(requestParameters: GetWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Generate data for a dashboard widget - */ - getWidget(requestParameters: GetWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * A list of widget types - * @summary Get a list of widget types - * @param {string} [type] Filter by type of widget - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WidgetApiInterface - */ - getWidgetTypesRaw(requestParameters: GetWidgetTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * A list of widget types - * Get a list of widget types - */ - getWidgetTypes(requestParameters: GetWidgetTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Generate data for a dashboard widget + * @param {string} id The widget identifier + * @param {object} [params] The parameters for the widget + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetApiInterface + */ + getWidgetRaw( + requestParameters: GetWidgetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Generate data for a dashboard widget + */ + getWidget( + requestParameters: GetWidgetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * A list of widget types + * @summary Get a list of widget types + * @param {string} [type] Filter by type of widget + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetApiInterface + */ + getWidgetTypesRaw( + requestParameters: GetWidgetTypesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * A list of widget types + * Get a list of widget types + */ + getWidgetTypes( + requestParameters: GetWidgetTypesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class WidgetApi extends runtime.BaseAPI implements WidgetApiInterface { - - /** - * Generate data for a dashboard widget - */ - async getWidgetRaw(requestParameters: GetWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getWidget().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['params'] != null) { - queryParameters['params'] = requestParameters['params']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/widget/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); + /** + * Generate data for a dashboard widget + */ + async getWidgetRaw( + requestParameters: GetWidgetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getWidget().' + ); } - /** - * Generate data for a dashboard widget - */ - async getWidget(requestParameters: GetWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getWidgetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * A list of widget types - * Get a list of widget types - */ - async getWidgetTypesRaw(requestParameters: GetWidgetTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const queryParameters: any = {}; - if (requestParameters['type'] != null) { - queryParameters['type'] = requestParameters['type']; - } + if (requestParameters['params'] != null) { + queryParameters['params'] = requestParameters['params']; + } - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - let urlPath = `/widget/types`; + let urlPath = `/widget/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Generate data for a dashboard widget + */ + async getWidget( + requestParameters: GetWidgetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getWidgetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A list of widget types + * Get a list of widget types + */ + async getWidgetTypesRaw( + requestParameters: GetWidgetTypesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['type'] != null) { + queryParameters['type'] = requestParameters['type']; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => WidgetTypeListFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * A list of widget types - * Get a list of widget types - */ - async getWidgetTypes(requestParameters: GetWidgetTypesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getWidgetTypesRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/widget/types`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetTypeListFromJSON(jsonValue)); + } + + /** + * A list of widget types + * Get a list of widget types + */ + async getWidgetTypes( + requestParameters: GetWidgetTypesRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getWidgetTypesRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/WidgetConfigApi.ts b/src/apis/WidgetConfigApi.ts index 4f2c89c..830b5eb 100644 --- a/src/apis/WidgetConfigApi.ts +++ b/src/apis/WidgetConfigApi.ts @@ -5,368 +5,438 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import * as runtime from '../runtime'; -import type { - WidgetConfig, - WidgetConfigList, -} from '../models/index'; +import type { WidgetConfig, WidgetConfigList } from '../models/index'; import { - WidgetConfigFromJSON, - WidgetConfigToJSON, - WidgetConfigListFromJSON, - WidgetConfigListToJSON, + WidgetConfigFromJSON, + WidgetConfigToJSON, + WidgetConfigListFromJSON, + WidgetConfigListToJSON, } from '../models/index'; export interface AddWidgetConfigRequest { - widgetConfig?: WidgetConfig; + widgetConfig?: WidgetConfig; } export interface DeleteWidgetConfigRequest { - id: string; + id: string; } export interface GetWidgetConfigRequest { - id: string; + id: string; } export interface GetWidgetConfigListRequest { - filter?: Array; - page?: number; - pageSize?: number; + filter?: Array; + page?: number; + pageSize?: number; } export interface UpdateWidgetConfigRequest { - id: string; - widgetConfig?: WidgetConfig; + id: string; + widgetConfig?: WidgetConfig; } /** * WidgetConfigApi - interface - * + * * @export * @interface WidgetConfigApiInterface */ export interface WidgetConfigApiInterface { - /** - * - * @summary Create a widget configuration - * @param {WidgetConfig} [widgetConfig] Widget configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WidgetConfigApiInterface - */ - addWidgetConfigRaw(requestParameters: AddWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a widget configuration - */ - addWidgetConfig(requestParameters: AddWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Delete a widget configuration - * @param {string} id ID of widget configuration to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WidgetConfigApiInterface - */ - deleteWidgetConfigRaw(requestParameters: DeleteWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Delete a widget configuration - */ - deleteWidgetConfig(requestParameters: DeleteWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a single widget configuration - * @param {string} id ID of widget config to return - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WidgetConfigApiInterface - */ - getWidgetConfigRaw(requestParameters: GetWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a single widget configuration - */ - getWidgetConfig(requestParameters: GetWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * A list of widget configurations - * @summary Get the list of widget configurations - * @param {Array} [filter] Fields to filter by - * @param {number} [page] Set the page of items to return, defaults to 1 - * @param {number} [pageSize] Set the number of items per page, defaults to 25 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WidgetConfigApiInterface - */ - getWidgetConfigListRaw(requestParameters: GetWidgetConfigListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * A list of widget configurations - * Get the list of widget configurations - */ - getWidgetConfigList(requestParameters: GetWidgetConfigListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Updates a single widget configuration - * @param {string} id ID of widget configuration to update - * @param {WidgetConfig} [widgetConfig] Widget configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WidgetConfigApiInterface - */ - updateWidgetConfigRaw(requestParameters: UpdateWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Updates a single widget configuration - */ - updateWidgetConfig(requestParameters: UpdateWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - + /** + * + * @summary Create a widget configuration + * @param {WidgetConfig} [widgetConfig] Widget configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + addWidgetConfigRaw( + requestParameters: AddWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Create a widget configuration + */ + addWidgetConfig( + requestParameters: AddWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Delete a widget configuration + * @param {string} id ID of widget configuration to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + deleteWidgetConfigRaw( + requestParameters: DeleteWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Delete a widget configuration + */ + deleteWidgetConfig( + requestParameters: DeleteWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Get a single widget configuration + * @param {string} id ID of widget config to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + getWidgetConfigRaw( + requestParameters: GetWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Get a single widget configuration + */ + getWidgetConfig( + requestParameters: GetWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * A list of widget configurations + * @summary Get the list of widget configurations + * @param {Array} [filter] Fields to filter by + * @param {number} [page] Set the page of items to return, defaults to 1 + * @param {number} [pageSize] Set the number of items per page, defaults to 25 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + getWidgetConfigListRaw( + requestParameters: GetWidgetConfigListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * A list of widget configurations + * Get the list of widget configurations + */ + getWidgetConfigList( + requestParameters: GetWidgetConfigListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; + + /** + * + * @summary Updates a single widget configuration + * @param {string} id ID of widget configuration to update + * @param {WidgetConfig} [widgetConfig] Widget configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetConfigApiInterface + */ + updateWidgetConfigRaw( + requestParameters: UpdateWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise>; + + /** + * Updates a single widget configuration + */ + updateWidgetConfig( + requestParameters: UpdateWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise; } /** - * + * */ export class WidgetConfigApi extends runtime.BaseAPI implements WidgetConfigApiInterface { + /** + * Create a widget configuration + */ + async addWidgetConfigRaw( + requestParameters: AddWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); + + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - /** - * Create a widget configuration - */ - async addWidgetConfigRaw(requestParameters: AddWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + let urlPath = `/widget-config`; + + const response = await this.request( + { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: WidgetConfigToJSON(requestParameters['widgetConfig']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); + } + + /** + * Create a widget configuration + */ + async addWidgetConfig( + requestParameters: AddWidgetConfigRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.addWidgetConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a widget configuration + */ + async deleteWidgetConfigRaw( + requestParameters: DeleteWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteWidgetConfig().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters['Content-Type'] = 'application/json'; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } + } - let urlPath = `/widget-config`; + let urlPath = `/widget-config/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a widget configuration + */ + async deleteWidgetConfig( + requestParameters: DeleteWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + await this.deleteWidgetConfigRaw(requestParameters, initOverrides); + } + + /** + * Get a single widget configuration + */ + async getWidgetConfigRaw( + requestParameters: GetWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getWidgetConfig().' + ); + } - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: WidgetConfigToJSON(requestParameters['widgetConfig']), - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); - } + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Create a widget configuration - */ - async addWidgetConfig(requestParameters: AddWidgetConfigRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addWidgetConfigRaw(requestParameters, initOverrides); - return await response.value(); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Delete a widget configuration - */ - async deleteWidgetConfigRaw(requestParameters: DeleteWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling deleteWidgetConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/widget-config/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * Delete a widget configuration - */ - async deleteWidgetConfig(requestParameters: DeleteWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteWidgetConfigRaw(requestParameters, initOverrides); + let urlPath = `/widget-config/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); + } + + /** + * Get a single widget configuration + */ + async getWidgetConfig( + requestParameters: GetWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getWidgetConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * A list of widget configurations + * Get the list of widget configurations + */ + async getWidgetConfigListRaw( + requestParameters: GetWidgetConfigListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; } - /** - * Get a single widget configuration - */ - async getWidgetConfigRaw(requestParameters: GetWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getWidgetConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/widget-config/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); + if (requestParameters['page'] != null) { + queryParameters['page'] = requestParameters['page']; } - /** - * Get a single widget configuration - */ - async getWidgetConfig(requestParameters: GetWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getWidgetConfigRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters['pageSize'] != null) { + queryParameters['pageSize'] = requestParameters['pageSize']; } - /** - * A list of widget configurations - * Get the list of widget configurations - */ - async getWidgetConfigListRaw(requestParameters: GetWidgetConfigListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filter'] != null) { - queryParameters['filter'] = requestParameters['filter']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - if (requestParameters['pageSize'] != null) { - queryParameters['pageSize'] = requestParameters['pageSize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/widget-config`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigListFromJSON(jsonValue)); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } - /** - * A list of widget configurations - * Get the list of widget configurations - */ - async getWidgetConfigList(requestParameters: GetWidgetConfigListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getWidgetConfigListRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/widget-config`; + + const response = await this.request( + { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + WidgetConfigListFromJSON(jsonValue) + ); + } + + /** + * A list of widget configurations + * Get the list of widget configurations + */ + async getWidgetConfigList( + requestParameters: GetWidgetConfigListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.getWidgetConfigListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a single widget configuration + */ + async updateWidgetConfigRaw( + requestParameters: UpdateWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateWidgetConfig().' + ); } - /** - * Updates a single widget configuration - */ - async updateWidgetConfigRaw(requestParameters: UpdateWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateWidgetConfig().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("jwt", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/widget-config/{id}`; - urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: WidgetConfigToJSON(requestParameters['widgetConfig']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token('jwt', []); - /** - * Updates a single widget configuration - */ - async updateWidgetConfig(requestParameters: UpdateWidgetConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateWidgetConfigRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters['Authorization'] = `Bearer ${tokenString}`; + } } + let urlPath = `/widget-config/{id}`; + urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id']))); + + const response = await this.request( + { + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: WidgetConfigToJSON(requestParameters['widgetConfig']), + }, + initOverrides + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => WidgetConfigFromJSON(jsonValue)); + } + + /** + * Updates a single widget configuration + */ + async updateWidgetConfig( + requestParameters: UpdateWidgetConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction + ): Promise { + const response = await this.updateWidgetConfigRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/apis/index.ts b/src/apis/index.ts index e37e295..c4935a9 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ -/* eslint-disable */ + export * from './AdminProjectManagementApi'; export * from './AdminUserManagementApi'; export * from './ArtifactApi'; diff --git a/src/models/AccountRecovery.ts b/src/models/AccountRecovery.ts index 275a9de..6dc3934 100644 --- a/src/models/AccountRecovery.ts +++ b/src/models/AccountRecovery.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,53 +13,56 @@ */ /** - * + * * @export * @interface AccountRecovery */ export interface AccountRecovery { - /** - * The user's e-mail address - * @type {string} - * @memberof AccountRecovery - */ - email: string; + /** + * The user's e-mail address + * @type {string} + * @memberof AccountRecovery + */ + email: string; } /** * Check if a given object implements the AccountRecovery interface. */ export function instanceOfAccountRecovery(value: object): value is AccountRecovery { - if (!('email' in value) || value['email'] === undefined) return false; - return true; + if (!('email' in value) || value['email'] === undefined) return false; + return true; } export function AccountRecoveryFromJSON(json: any): AccountRecovery { - return AccountRecoveryFromJSONTyped(json, false); + return AccountRecoveryFromJSONTyped(json, false); } -export function AccountRecoveryFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountRecovery { - if (json == null) { - return json; - } - return { - - 'email': json['email'], - }; +export function AccountRecoveryFromJSONTyped( + json: any, + ignoreDiscriminator: boolean +): AccountRecovery { + if (json == null) { + return json; + } + return { + email: json['email'], + }; } export function AccountRecoveryToJSON(value?: AccountRecovery | null): any { - return AccountRecoveryToJSONTyped(value, false); + return AccountRecoveryToJSONTyped(value, false); } -export function AccountRecoveryToJSONTyped(value?: AccountRecovery | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AccountRecoveryToJSONTyped( + value?: AccountRecovery | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'email': value['email'], - }; + return { + email: value['email'], + }; } - diff --git a/src/models/AccountRegistration.ts b/src/models/AccountRegistration.ts index 777acb7..27400ac 100644 --- a/src/models/AccountRegistration.ts +++ b/src/models/AccountRegistration.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,62 +13,65 @@ */ /** - * + * * @export * @interface AccountRegistration */ export interface AccountRegistration { - /** - * The user's e-mail address - * @type {string} - * @memberof AccountRegistration - */ - email: string; - /** - * The user's password - * @type {string} - * @memberof AccountRegistration - */ - password: string; + /** + * The user's e-mail address + * @type {string} + * @memberof AccountRegistration + */ + email: string; + /** + * The user's password + * @type {string} + * @memberof AccountRegistration + */ + password: string; } /** * Check if a given object implements the AccountRegistration interface. */ export function instanceOfAccountRegistration(value: object): value is AccountRegistration { - if (!('email' in value) || value['email'] === undefined) return false; - if (!('password' in value) || value['password'] === undefined) return false; - return true; + if (!('email' in value) || value['email'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; } export function AccountRegistrationFromJSON(json: any): AccountRegistration { - return AccountRegistrationFromJSONTyped(json, false); + return AccountRegistrationFromJSONTyped(json, false); } -export function AccountRegistrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountRegistration { - if (json == null) { - return json; - } - return { - - 'email': json['email'], - 'password': json['password'], - }; +export function AccountRegistrationFromJSONTyped( + json: any, + ignoreDiscriminator: boolean +): AccountRegistration { + if (json == null) { + return json; + } + return { + email: json['email'], + password: json['password'], + }; } export function AccountRegistrationToJSON(value?: AccountRegistration | null): any { - return AccountRegistrationToJSONTyped(value, false); + return AccountRegistrationToJSONTyped(value, false); } -export function AccountRegistrationToJSONTyped(value?: AccountRegistration | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AccountRegistrationToJSONTyped( + value?: AccountRegistration | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'email': value['email'], - 'password': value['password'], - }; + return { + email: value['email'], + password: value['password'], + }; } - diff --git a/src/models/AccountReset.ts b/src/models/AccountReset.ts index 8b151f5..d2d4a09 100644 --- a/src/models/AccountReset.ts +++ b/src/models/AccountReset.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,62 +13,62 @@ */ /** - * + * * @export * @interface AccountReset */ export interface AccountReset { - /** - * The activation code generated by Ibutsu - * @type {string} - * @memberof AccountReset - */ - activationCode: string; - /** - * The user's password - * @type {string} - * @memberof AccountReset - */ - password: string; + /** + * The activation code generated by Ibutsu + * @type {string} + * @memberof AccountReset + */ + activationCode: string; + /** + * The user's password + * @type {string} + * @memberof AccountReset + */ + password: string; } /** * Check if a given object implements the AccountReset interface. */ export function instanceOfAccountReset(value: object): value is AccountReset { - if (!('activationCode' in value) || value['activationCode'] === undefined) return false; - if (!('password' in value) || value['password'] === undefined) return false; - return true; + if (!('activationCode' in value) || value['activationCode'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; } export function AccountResetFromJSON(json: any): AccountReset { - return AccountResetFromJSONTyped(json, false); + return AccountResetFromJSONTyped(json, false); } export function AccountResetFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountReset { - if (json == null) { - return json; - } - return { - - 'activationCode': json['activation_code'], - 'password': json['password'], - }; + if (json == null) { + return json; + } + return { + activationCode: json['activation_code'], + password: json['password'], + }; } export function AccountResetToJSON(value?: AccountReset | null): any { - return AccountResetToJSONTyped(value, false); + return AccountResetToJSONTyped(value, false); } -export function AccountResetToJSONTyped(value?: AccountReset | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AccountResetToJSONTyped( + value?: AccountReset | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'activation_code': value['activationCode'], - 'password': value['password'], - }; + return { + activation_code: value['activationCode'], + password: value['password'], + }; } - diff --git a/src/models/Artifact.ts b/src/models/Artifact.ts index ad3f042..339b6df 100644 --- a/src/models/Artifact.ts +++ b/src/models/Artifact.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,92 +13,93 @@ */ /** - * + * * @export * @interface Artifact */ export interface Artifact { - /** - * Unique ID of the artifact - * @type {string} - * @memberof Artifact - */ - id?: string; - /** - * ID of test result to attach artifact to - * @type {string} - * @memberof Artifact - */ - resultId?: string; - /** - * ID of test run to attach artifact to - * @type {string} - * @memberof Artifact - */ - runId?: string; - /** - * name of the file - * @type {string} - * @memberof Artifact - */ - filename?: string; - /** - * Additional data to pass to server - * @type {object} - * @memberof Artifact - */ - additionalMetadata?: object; - /** - * The date this artifact was uploaded - * @type {string} - * @memberof Artifact - */ - uploadDate?: string; + /** + * Unique ID of the artifact + * @type {string} + * @memberof Artifact + */ + id?: string; + /** + * ID of test result to attach artifact to + * @type {string} + * @memberof Artifact + */ + resultId?: string; + /** + * ID of test run to attach artifact to + * @type {string} + * @memberof Artifact + */ + runId?: string; + /** + * name of the file + * @type {string} + * @memberof Artifact + */ + filename?: string; + /** + * Additional data to pass to server + * @type {object} + * @memberof Artifact + */ + additionalMetadata?: object; + /** + * The date this artifact was uploaded + * @type {string} + * @memberof Artifact + */ + uploadDate?: string; } /** * Check if a given object implements the Artifact interface. */ export function instanceOfArtifact(value: object): value is Artifact { - return true; + return true; } export function ArtifactFromJSON(json: any): Artifact { - return ArtifactFromJSONTyped(json, false); + return ArtifactFromJSONTyped(json, false); } export function ArtifactFromJSONTyped(json: any, ignoreDiscriminator: boolean): Artifact { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'resultId': json['result_id'] == null ? undefined : json['result_id'], - 'runId': json['run_id'] == null ? undefined : json['run_id'], - 'filename': json['filename'] == null ? undefined : json['filename'], - 'additionalMetadata': json['additional_metadata'] == null ? undefined : json['additional_metadata'], - 'uploadDate': json['upload_date'] == null ? undefined : json['upload_date'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + resultId: json['result_id'] == null ? undefined : json['result_id'], + runId: json['run_id'] == null ? undefined : json['run_id'], + filename: json['filename'] == null ? undefined : json['filename'], + additionalMetadata: + json['additional_metadata'] == null ? undefined : json['additional_metadata'], + uploadDate: json['upload_date'] == null ? undefined : json['upload_date'], + }; } export function ArtifactToJSON(value?: Artifact | null): any { - return ArtifactToJSONTyped(value, false); + return ArtifactToJSONTyped(value, false); } -export function ArtifactToJSONTyped(value?: Artifact | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactToJSONTyped( + value?: Artifact | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'result_id': value['resultId'], - 'run_id': value['runId'], - 'filename': value['filename'], - 'additional_metadata': value['additionalMetadata'], - 'upload_date': value['uploadDate'], - }; + return { + id: value['id'], + result_id: value['resultId'], + run_id: value['runId'], + filename: value['filename'], + additional_metadata: value['additionalMetadata'], + upload_date: value['uploadDate'], + }; } - diff --git a/src/models/ArtifactList.ts b/src/models/ArtifactList.ts index c992471..424e01b 100644 --- a/src/models/ArtifactList.ts +++ b/src/models/ArtifactList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,80 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { Artifact } from './Artifact'; import { - ArtifactFromJSON, - ArtifactFromJSONTyped, - ArtifactToJSON, - ArtifactToJSONTyped, + ArtifactFromJSON, + ArtifactFromJSONTyped, + ArtifactToJSON, + ArtifactToJSONTyped, } from './Artifact'; /** - * + * * @export * @interface ArtifactList */ export interface ArtifactList { - /** - * - * @type {Array} - * @memberof ArtifactList - */ - artifacts?: Array; - /** - * - * @type {Pagination} - * @memberof ArtifactList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof ArtifactList + */ + artifacts?: Array; + /** + * + * @type {Pagination} + * @memberof ArtifactList + */ + pagination?: Pagination; } /** * Check if a given object implements the ArtifactList interface. */ export function instanceOfArtifactList(value: object): value is ArtifactList { - return true; + return true; } export function ArtifactListFromJSON(json: any): ArtifactList { - return ArtifactListFromJSONTyped(json, false); + return ArtifactListFromJSONTyped(json, false); } export function ArtifactListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactList { - if (json == null) { - return json; - } - return { - - 'artifacts': json['artifacts'] == null ? undefined : ((json['artifacts'] as Array).map(ArtifactFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; + if (json == null) { + return json; + } + return { + artifacts: + json['artifacts'] == null + ? undefined + : (json['artifacts'] as Array).map(ArtifactFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function ArtifactListToJSON(value?: ArtifactList | null): any { - return ArtifactListToJSONTyped(value, false); + return ArtifactListToJSONTyped(value, false); } -export function ArtifactListToJSONTyped(value?: ArtifactList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactListToJSONTyped( + value?: ArtifactList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'artifacts': value['artifacts'] == null ? undefined : ((value['artifacts'] as Array).map(ArtifactToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + artifacts: + value['artifacts'] == null + ? undefined + : (value['artifacts'] as Array).map(ArtifactToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/CreateToken.ts b/src/models/CreateToken.ts index a43b8de..443a2b9 100644 --- a/src/models/CreateToken.ts +++ b/src/models/CreateToken.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,62 +13,62 @@ */ /** - * + * * @export * @interface CreateToken */ export interface CreateToken { - /** - * The name given to this token - * @type {string} - * @memberof CreateToken - */ - name: string; - /** - * The date and time when this token expires - * @type {string} - * @memberof CreateToken - */ - expires: string | null; + /** + * The name given to this token + * @type {string} + * @memberof CreateToken + */ + name: string; + /** + * The date and time when this token expires + * @type {string} + * @memberof CreateToken + */ + expires: string | null; } /** * Check if a given object implements the CreateToken interface. */ export function instanceOfCreateToken(value: object): value is CreateToken { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('expires' in value) || value['expires'] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('expires' in value) || value['expires'] === undefined) return false; + return true; } export function CreateTokenFromJSON(json: any): CreateToken { - return CreateTokenFromJSONTyped(json, false); + return CreateTokenFromJSONTyped(json, false); } export function CreateTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateToken { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'expires': json['expires'], - }; + if (json == null) { + return json; + } + return { + name: json['name'], + expires: json['expires'], + }; } export function CreateTokenToJSON(value?: CreateToken | null): any { - return CreateTokenToJSONTyped(value, false); + return CreateTokenToJSONTyped(value, false); } -export function CreateTokenToJSONTyped(value?: CreateToken | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateTokenToJSONTyped( + value?: CreateToken | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'expires': value['expires'], - }; + return { + name: value['name'], + expires: value['expires'], + }; } - diff --git a/src/models/Credentials.ts b/src/models/Credentials.ts index 36c4931..e675605 100644 --- a/src/models/Credentials.ts +++ b/src/models/Credentials.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,62 +13,62 @@ */ /** - * + * * @export * @interface Credentials */ export interface Credentials { - /** - * The e-mail address of the user - * @type {string} - * @memberof Credentials - */ - email: string; - /** - * The password for the user - * @type {string} - * @memberof Credentials - */ - password: string; + /** + * The e-mail address of the user + * @type {string} + * @memberof Credentials + */ + email: string; + /** + * The password for the user + * @type {string} + * @memberof Credentials + */ + password: string; } /** * Check if a given object implements the Credentials interface. */ export function instanceOfCredentials(value: object): value is Credentials { - if (!('email' in value) || value['email'] === undefined) return false; - if (!('password' in value) || value['password'] === undefined) return false; - return true; + if (!('email' in value) || value['email'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; } export function CredentialsFromJSON(json: any): Credentials { - return CredentialsFromJSONTyped(json, false); + return CredentialsFromJSONTyped(json, false); } export function CredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Credentials { - if (json == null) { - return json; - } - return { - - 'email': json['email'], - 'password': json['password'], - }; + if (json == null) { + return json; + } + return { + email: json['email'], + password: json['password'], + }; } export function CredentialsToJSON(value?: Credentials | null): any { - return CredentialsToJSONTyped(value, false); + return CredentialsToJSONTyped(value, false); } -export function CredentialsToJSONTyped(value?: Credentials | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CredentialsToJSONTyped( + value?: Credentials | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'email': value['email'], - 'password': value['password'], - }; + return { + email: value['email'], + password: value['password'], + }; } - diff --git a/src/models/Dashboard.ts b/src/models/Dashboard.ts index 2d7dcc0..437e3f8 100644 --- a/src/models/Dashboard.ts +++ b/src/models/Dashboard.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,92 +13,92 @@ */ /** - * + * * @export * @interface Dashboard */ export interface Dashboard { - /** - * Unique ID of the dashboard - * @type {string} - * @memberof Dashboard - */ - id?: string; - /** - * The title of the dashboard - * @type {string} - * @memberof Dashboard - */ - title?: string; - /** - * A basic description of the dashboard - * @type {string} - * @memberof Dashboard - */ - description?: string; - /** - * An optional set of filters - * @type {string} - * @memberof Dashboard - */ - filters?: string; - /** - * The ID of the project this dashboard is associated with - * @type {string} - * @memberof Dashboard - */ - projectId?: string; - /** - * The ID of a user this dashboard might be associated with - * @type {string} - * @memberof Dashboard - */ - userId?: string; + /** + * Unique ID of the dashboard + * @type {string} + * @memberof Dashboard + */ + id?: string; + /** + * The title of the dashboard + * @type {string} + * @memberof Dashboard + */ + title?: string; + /** + * A basic description of the dashboard + * @type {string} + * @memberof Dashboard + */ + description?: string; + /** + * An optional set of filters + * @type {string} + * @memberof Dashboard + */ + filters?: string; + /** + * The ID of the project this dashboard is associated with + * @type {string} + * @memberof Dashboard + */ + projectId?: string; + /** + * The ID of a user this dashboard might be associated with + * @type {string} + * @memberof Dashboard + */ + userId?: string; } /** * Check if a given object implements the Dashboard interface. */ export function instanceOfDashboard(value: object): value is Dashboard { - return true; + return true; } export function DashboardFromJSON(json: any): Dashboard { - return DashboardFromJSONTyped(json, false); + return DashboardFromJSONTyped(json, false); } export function DashboardFromJSONTyped(json: any, ignoreDiscriminator: boolean): Dashboard { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'title': json['title'] == null ? undefined : json['title'], - 'description': json['description'] == null ? undefined : json['description'], - 'filters': json['filters'] == null ? undefined : json['filters'], - 'projectId': json['project_id'] == null ? undefined : json['project_id'], - 'userId': json['user_id'] == null ? undefined : json['user_id'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + title: json['title'] == null ? undefined : json['title'], + description: json['description'] == null ? undefined : json['description'], + filters: json['filters'] == null ? undefined : json['filters'], + projectId: json['project_id'] == null ? undefined : json['project_id'], + userId: json['user_id'] == null ? undefined : json['user_id'], + }; } export function DashboardToJSON(value?: Dashboard | null): any { - return DashboardToJSONTyped(value, false); + return DashboardToJSONTyped(value, false); } -export function DashboardToJSONTyped(value?: Dashboard | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DashboardToJSONTyped( + value?: Dashboard | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'title': value['title'], - 'description': value['description'], - 'filters': value['filters'], - 'project_id': value['projectId'], - 'user_id': value['userId'], - }; + return { + id: value['id'], + title: value['title'], + description: value['description'], + filters: value['filters'], + project_id: value['projectId'], + user_id: value['userId'], + }; } - diff --git a/src/models/DashboardList.ts b/src/models/DashboardList.ts index a0b3083..5838cf0 100644 --- a/src/models/DashboardList.ts +++ b/src/models/DashboardList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,80 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { Dashboard } from './Dashboard'; import { - DashboardFromJSON, - DashboardFromJSONTyped, - DashboardToJSON, - DashboardToJSONTyped, + DashboardFromJSON, + DashboardFromJSONTyped, + DashboardToJSON, + DashboardToJSONTyped, } from './Dashboard'; /** - * + * * @export * @interface DashboardList */ export interface DashboardList { - /** - * - * @type {Array} - * @memberof DashboardList - */ - dashboards?: Array; - /** - * - * @type {Pagination} - * @memberof DashboardList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof DashboardList + */ + dashboards?: Array; + /** + * + * @type {Pagination} + * @memberof DashboardList + */ + pagination?: Pagination; } /** * Check if a given object implements the DashboardList interface. */ export function instanceOfDashboardList(value: object): value is DashboardList { - return true; + return true; } export function DashboardListFromJSON(json: any): DashboardList { - return DashboardListFromJSONTyped(json, false); + return DashboardListFromJSONTyped(json, false); } export function DashboardListFromJSONTyped(json: any, ignoreDiscriminator: boolean): DashboardList { - if (json == null) { - return json; - } - return { - - 'dashboards': json['dashboards'] == null ? undefined : ((json['dashboards'] as Array).map(DashboardFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; + if (json == null) { + return json; + } + return { + dashboards: + json['dashboards'] == null + ? undefined + : (json['dashboards'] as Array).map(DashboardFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function DashboardListToJSON(value?: DashboardList | null): any { - return DashboardListToJSONTyped(value, false); + return DashboardListToJSONTyped(value, false); } -export function DashboardListToJSONTyped(value?: DashboardList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DashboardListToJSONTyped( + value?: DashboardList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'dashboards': value['dashboards'] == null ? undefined : ((value['dashboards'] as Array).map(DashboardToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + dashboards: + value['dashboards'] == null + ? undefined + : (value['dashboards'] as Array).map(DashboardToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/Group.ts b/src/models/Group.ts index e13dac5..56e4b7a 100644 --- a/src/models/Group.ts +++ b/src/models/Group.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,60 +13,57 @@ */ /** - * + * * @export * @interface Group */ export interface Group { - /** - * Unique ID of the group - * @type {string} - * @memberof Group - */ - id?: string; - /** - * The name of the group - * @type {string} - * @memberof Group - */ - name?: string; + /** + * Unique ID of the group + * @type {string} + * @memberof Group + */ + id?: string; + /** + * The name of the group + * @type {string} + * @memberof Group + */ + name?: string; } /** * Check if a given object implements the Group interface. */ export function instanceOfGroup(value: object): value is Group { - return true; + return true; } export function GroupFromJSON(json: any): Group { - return GroupFromJSONTyped(json, false); + return GroupFromJSONTyped(json, false); } export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Group { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'] == null ? undefined : json['name'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + name: json['name'] == null ? undefined : json['name'], + }; } export function GroupToJSON(value?: Group | null): any { - return GroupToJSONTyped(value, false); + return GroupToJSONTyped(value, false); } export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'name': value['name'], - }; + return { + id: value['id'], + name: value['name'], + }; } - diff --git a/src/models/GroupList.ts b/src/models/GroupList.ts index a20e1fa..4f35b8b 100644 --- a/src/models/GroupList.ts +++ b/src/models/GroupList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,75 +13,70 @@ */ import type { Group } from './Group'; -import { - GroupFromJSON, - GroupFromJSONTyped, - GroupToJSON, - GroupToJSONTyped, -} from './Group'; +import { GroupFromJSON, GroupFromJSONTyped, GroupToJSON, GroupToJSONTyped } from './Group'; import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; /** - * + * * @export * @interface GroupList */ export interface GroupList { - /** - * - * @type {Array} - * @memberof GroupList - */ - groups?: Array; - /** - * - * @type {Pagination} - * @memberof GroupList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof GroupList + */ + groups?: Array; + /** + * + * @type {Pagination} + * @memberof GroupList + */ + pagination?: Pagination; } /** * Check if a given object implements the GroupList interface. */ export function instanceOfGroupList(value: object): value is GroupList { - return true; + return true; } export function GroupListFromJSON(json: any): GroupList { - return GroupListFromJSONTyped(json, false); + return GroupListFromJSONTyped(json, false); } export function GroupListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupList { - if (json == null) { - return json; - } - return { - - 'groups': json['groups'] == null ? undefined : ((json['groups'] as Array).map(GroupFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; + if (json == null) { + return json; + } + return { + groups: json['groups'] == null ? undefined : (json['groups'] as Array).map(GroupFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function GroupListToJSON(value?: GroupList | null): any { - return GroupListToJSONTyped(value, false); + return GroupListToJSONTyped(value, false); } -export function GroupListToJSONTyped(value?: GroupList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GroupListToJSONTyped( + value?: GroupList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array).map(GroupToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + groups: value['groups'] == null ? undefined : (value['groups'] as Array).map(GroupToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/Health.ts b/src/models/Health.ts index fb68631..78ffd2a 100644 --- a/src/models/Health.ts +++ b/src/models/Health.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,60 +13,60 @@ */ /** - * + * * @export * @interface Health */ export interface Health { - /** - * The status of the database, one of "OK", "Error", "Pending" - * @type {string} - * @memberof Health - */ - status?: string; - /** - * A message to explain the current status - * @type {string} - * @memberof Health - */ - message?: string; + /** + * The status of the database, one of "OK", "Error", "Pending" + * @type {string} + * @memberof Health + */ + status?: string; + /** + * A message to explain the current status + * @type {string} + * @memberof Health + */ + message?: string; } /** * Check if a given object implements the Health interface. */ export function instanceOfHealth(value: object): value is Health { - return true; + return true; } export function HealthFromJSON(json: any): Health { - return HealthFromJSONTyped(json, false); + return HealthFromJSONTyped(json, false); } export function HealthFromJSONTyped(json: any, ignoreDiscriminator: boolean): Health { - if (json == null) { - return json; - } - return { - - 'status': json['status'] == null ? undefined : json['status'], - 'message': json['message'] == null ? undefined : json['message'], - }; + if (json == null) { + return json; + } + return { + status: json['status'] == null ? undefined : json['status'], + message: json['message'] == null ? undefined : json['message'], + }; } export function HealthToJSON(value?: Health | null): any { - return HealthToJSONTyped(value, false); + return HealthToJSONTyped(value, false); } -export function HealthToJSONTyped(value?: Health | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HealthToJSONTyped( + value?: Health | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'status': value['status'], - 'message': value['message'], - }; + return { + status: value['status'], + message: value['message'], + }; } - diff --git a/src/models/HealthInfo.ts b/src/models/HealthInfo.ts index 3a10fae..ba596e3 100644 --- a/src/models/HealthInfo.ts +++ b/src/models/HealthInfo.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,68 +13,68 @@ */ /** - * + * * @export * @interface HealthInfo */ export interface HealthInfo { - /** - * The URL of the frontend - * @type {string} - * @memberof HealthInfo - */ - frontend?: string; - /** - * The URL of the backend - * @type {string} - * @memberof HealthInfo - */ - backend?: string; - /** - * The URL to the UI for the API - * @type {string} - * @memberof HealthInfo - */ - apiUi?: string; + /** + * The URL of the frontend + * @type {string} + * @memberof HealthInfo + */ + frontend?: string; + /** + * The URL of the backend + * @type {string} + * @memberof HealthInfo + */ + backend?: string; + /** + * The URL to the UI for the API + * @type {string} + * @memberof HealthInfo + */ + apiUi?: string; } /** * Check if a given object implements the HealthInfo interface. */ export function instanceOfHealthInfo(value: object): value is HealthInfo { - return true; + return true; } export function HealthInfoFromJSON(json: any): HealthInfo { - return HealthInfoFromJSONTyped(json, false); + return HealthInfoFromJSONTyped(json, false); } export function HealthInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthInfo { - if (json == null) { - return json; - } - return { - - 'frontend': json['frontend'] == null ? undefined : json['frontend'], - 'backend': json['backend'] == null ? undefined : json['backend'], - 'apiUi': json['api_ui'] == null ? undefined : json['api_ui'], - }; + if (json == null) { + return json; + } + return { + frontend: json['frontend'] == null ? undefined : json['frontend'], + backend: json['backend'] == null ? undefined : json['backend'], + apiUi: json['api_ui'] == null ? undefined : json['api_ui'], + }; } export function HealthInfoToJSON(value?: HealthInfo | null): any { - return HealthInfoToJSONTyped(value, false); + return HealthInfoToJSONTyped(value, false); } -export function HealthInfoToJSONTyped(value?: HealthInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HealthInfoToJSONTyped( + value?: HealthInfo | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'frontend': value['frontend'], - 'backend': value['backend'], - 'api_ui': value['apiUi'], - }; + return { + frontend: value['frontend'], + backend: value['backend'], + api_ui: value['apiUi'], + }; } - diff --git a/src/models/Import.ts b/src/models/Import.ts index a804e61..3329011 100644 --- a/src/models/Import.ts +++ b/src/models/Import.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,84 +13,84 @@ */ /** - * + * * @export * @interface Import */ export interface Import { - /** - * The database ID of the import - * @type {string} - * @memberof Import - */ - id?: string; - /** - * The current status of the import, can be one of "pending", "running", "done" - * @type {string} - * @memberof Import - */ - status?: string; - /** - * The name of the file that was uploaded - * @type {string} - * @memberof Import - */ - filename?: string; - /** - * The format of the file uploaded - * @type {string} - * @memberof Import - */ - format?: string; - /** - * The ID of the run from the import - * @type {string} - * @memberof Import - */ - runId?: string; + /** + * The database ID of the import + * @type {string} + * @memberof Import + */ + id?: string; + /** + * The current status of the import, can be one of "pending", "running", "done" + * @type {string} + * @memberof Import + */ + status?: string; + /** + * The name of the file that was uploaded + * @type {string} + * @memberof Import + */ + filename?: string; + /** + * The format of the file uploaded + * @type {string} + * @memberof Import + */ + format?: string; + /** + * The ID of the run from the import + * @type {string} + * @memberof Import + */ + runId?: string; } /** * Check if a given object implements the Import interface. */ export function instanceOfImport(value: object): value is Import { - return true; + return true; } export function ImportFromJSON(json: any): Import { - return ImportFromJSONTyped(json, false); + return ImportFromJSONTyped(json, false); } export function ImportFromJSONTyped(json: any, ignoreDiscriminator: boolean): Import { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'status': json['status'] == null ? undefined : json['status'], - 'filename': json['filename'] == null ? undefined : json['filename'], - 'format': json['format'] == null ? undefined : json['format'], - 'runId': json['run_id'] == null ? undefined : json['run_id'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + status: json['status'] == null ? undefined : json['status'], + filename: json['filename'] == null ? undefined : json['filename'], + format: json['format'] == null ? undefined : json['format'], + runId: json['run_id'] == null ? undefined : json['run_id'], + }; } export function ImportToJSON(value?: Import | null): any { - return ImportToJSONTyped(value, false); + return ImportToJSONTyped(value, false); } -export function ImportToJSONTyped(value?: Import | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImportToJSONTyped( + value?: Import | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'status': value['status'], - 'filename': value['filename'], - 'format': value['format'], - 'run_id': value['runId'], - }; + return { + id: value['id'], + status: value['status'], + filename: value['filename'], + format: value['format'], + run_id: value['runId'], + }; } - diff --git a/src/models/LoginConfig.ts b/src/models/LoginConfig.ts index 882379a..b2a6ccf 100644 --- a/src/models/LoginConfig.ts +++ b/src/models/LoginConfig.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,68 +13,68 @@ */ /** - * + * * @export * @interface LoginConfig */ export interface LoginConfig { - /** - * The client ID for the provider - * @type {string} - * @memberof LoginConfig - */ - clientId?: string; - /** - * The redirect URI for the provider to call back - * @type {string} - * @memberof LoginConfig - */ - redirectUri?: string; - /** - * The OAuth2 permission scope - * @type {string} - * @memberof LoginConfig - */ - scope?: string; + /** + * The client ID for the provider + * @type {string} + * @memberof LoginConfig + */ + clientId?: string; + /** + * The redirect URI for the provider to call back + * @type {string} + * @memberof LoginConfig + */ + redirectUri?: string; + /** + * The OAuth2 permission scope + * @type {string} + * @memberof LoginConfig + */ + scope?: string; } /** * Check if a given object implements the LoginConfig interface. */ export function instanceOfLoginConfig(value: object): value is LoginConfig { - return true; + return true; } export function LoginConfigFromJSON(json: any): LoginConfig { - return LoginConfigFromJSONTyped(json, false); + return LoginConfigFromJSONTyped(json, false); } export function LoginConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginConfig { - if (json == null) { - return json; - } - return { - - 'clientId': json['client_id'] == null ? undefined : json['client_id'], - 'redirectUri': json['redirect_uri'] == null ? undefined : json['redirect_uri'], - 'scope': json['scope'] == null ? undefined : json['scope'], - }; + if (json == null) { + return json; + } + return { + clientId: json['client_id'] == null ? undefined : json['client_id'], + redirectUri: json['redirect_uri'] == null ? undefined : json['redirect_uri'], + scope: json['scope'] == null ? undefined : json['scope'], + }; } export function LoginConfigToJSON(value?: LoginConfig | null): any { - return LoginConfigToJSONTyped(value, false); + return LoginConfigToJSONTyped(value, false); } -export function LoginConfigToJSONTyped(value?: LoginConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function LoginConfigToJSONTyped( + value?: LoginConfig | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'client_id': value['clientId'], - 'redirect_uri': value['redirectUri'], - 'scope': value['scope'], - }; + return { + client_id: value['clientId'], + redirect_uri: value['redirectUri'], + scope: value['scope'], + }; } - diff --git a/src/models/LoginError.ts b/src/models/LoginError.ts index 773bb05..d51bf91 100644 --- a/src/models/LoginError.ts +++ b/src/models/LoginError.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,60 +13,60 @@ */ /** - * + * * @export * @interface LoginError */ export interface LoginError { - /** - * An error code generated by the server - * @type {string} - * @memberof LoginError - */ - code?: string; - /** - * The error message that corresponds with the error code - * @type {string} - * @memberof LoginError - */ - message?: string; + /** + * An error code generated by the server + * @type {string} + * @memberof LoginError + */ + code?: string; + /** + * The error message that corresponds with the error code + * @type {string} + * @memberof LoginError + */ + message?: string; } /** * Check if a given object implements the LoginError interface. */ export function instanceOfLoginError(value: object): value is LoginError { - return true; + return true; } export function LoginErrorFromJSON(json: any): LoginError { - return LoginErrorFromJSONTyped(json, false); + return LoginErrorFromJSONTyped(json, false); } export function LoginErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginError { - if (json == null) { - return json; - } - return { - - 'code': json['code'] == null ? undefined : json['code'], - 'message': json['message'] == null ? undefined : json['message'], - }; + if (json == null) { + return json; + } + return { + code: json['code'] == null ? undefined : json['code'], + message: json['message'] == null ? undefined : json['message'], + }; } export function LoginErrorToJSON(value?: LoginError | null): any { - return LoginErrorToJSONTyped(value, false); + return LoginErrorToJSONTyped(value, false); } -export function LoginErrorToJSONTyped(value?: LoginError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function LoginErrorToJSONTyped( + value?: LoginError | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'code': value['code'], - 'message': value['message'], - }; + return { + code: value['code'], + message: value['message'], + }; } - diff --git a/src/models/LoginSupport.ts b/src/models/LoginSupport.ts index 4bdd141..b4e09d1 100644 --- a/src/models/LoginSupport.ts +++ b/src/models/LoginSupport.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,92 +13,92 @@ */ /** - * + * * @export * @interface LoginSupport */ export interface LoginSupport { - /** - * Flag to see if email/password login is available - * @type {boolean} - * @memberof LoginSupport - */ - user?: boolean; - /** - * Flag to see if Keycloak login is available - * @type {boolean} - * @memberof LoginSupport - */ - keycloak?: boolean; - /** - * Flag to see if Google login is available - * @type {boolean} - * @memberof LoginSupport - */ - google?: boolean; - /** - * Flag to see if GitHub login is available - * @type {boolean} - * @memberof LoginSupport - */ - github?: boolean; - /** - * Flag to see if Facebook login is available - * @type {boolean} - * @memberof LoginSupport - */ - facebook?: boolean; - /** - * Flag to see if GitLab login is available - * @type {boolean} - * @memberof LoginSupport - */ - gitlab?: boolean; + /** + * Flag to see if email/password login is available + * @type {boolean} + * @memberof LoginSupport + */ + user?: boolean; + /** + * Flag to see if Keycloak login is available + * @type {boolean} + * @memberof LoginSupport + */ + keycloak?: boolean; + /** + * Flag to see if Google login is available + * @type {boolean} + * @memberof LoginSupport + */ + google?: boolean; + /** + * Flag to see if GitHub login is available + * @type {boolean} + * @memberof LoginSupport + */ + github?: boolean; + /** + * Flag to see if Facebook login is available + * @type {boolean} + * @memberof LoginSupport + */ + facebook?: boolean; + /** + * Flag to see if GitLab login is available + * @type {boolean} + * @memberof LoginSupport + */ + gitlab?: boolean; } /** * Check if a given object implements the LoginSupport interface. */ export function instanceOfLoginSupport(value: object): value is LoginSupport { - return true; + return true; } export function LoginSupportFromJSON(json: any): LoginSupport { - return LoginSupportFromJSONTyped(json, false); + return LoginSupportFromJSONTyped(json, false); } export function LoginSupportFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginSupport { - if (json == null) { - return json; - } - return { - - 'user': json['user'] == null ? undefined : json['user'], - 'keycloak': json['keycloak'] == null ? undefined : json['keycloak'], - 'google': json['google'] == null ? undefined : json['google'], - 'github': json['github'] == null ? undefined : json['github'], - 'facebook': json['facebook'] == null ? undefined : json['facebook'], - 'gitlab': json['gitlab'] == null ? undefined : json['gitlab'], - }; + if (json == null) { + return json; + } + return { + user: json['user'] == null ? undefined : json['user'], + keycloak: json['keycloak'] == null ? undefined : json['keycloak'], + google: json['google'] == null ? undefined : json['google'], + github: json['github'] == null ? undefined : json['github'], + facebook: json['facebook'] == null ? undefined : json['facebook'], + gitlab: json['gitlab'] == null ? undefined : json['gitlab'], + }; } export function LoginSupportToJSON(value?: LoginSupport | null): any { - return LoginSupportToJSONTyped(value, false); + return LoginSupportToJSONTyped(value, false); } -export function LoginSupportToJSONTyped(value?: LoginSupport | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function LoginSupportToJSONTyped( + value?: LoginSupport | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'user': value['user'], - 'keycloak': value['keycloak'], - 'google': value['google'], - 'github': value['github'], - 'facebook': value['facebook'], - 'gitlab': value['gitlab'], - }; + return { + user: value['user'], + keycloak: value['keycloak'], + google: value['google'], + github: value['github'], + facebook: value['facebook'], + gitlab: value['gitlab'], + }; } - diff --git a/src/models/LoginToken.ts b/src/models/LoginToken.ts index 47ccf28..92fd3a9 100644 --- a/src/models/LoginToken.ts +++ b/src/models/LoginToken.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,52 +13,52 @@ */ /** - * + * * @export * @interface LoginToken */ export interface LoginToken { - /** - * The JWT token returned from a successful login - * @type {string} - * @memberof LoginToken - */ - token?: string; + /** + * The JWT token returned from a successful login + * @type {string} + * @memberof LoginToken + */ + token?: string; } /** * Check if a given object implements the LoginToken interface. */ export function instanceOfLoginToken(value: object): value is LoginToken { - return true; + return true; } export function LoginTokenFromJSON(json: any): LoginToken { - return LoginTokenFromJSONTyped(json, false); + return LoginTokenFromJSONTyped(json, false); } export function LoginTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginToken { - if (json == null) { - return json; - } - return { - - 'token': json['token'] == null ? undefined : json['token'], - }; + if (json == null) { + return json; + } + return { + token: json['token'] == null ? undefined : json['token'], + }; } export function LoginTokenToJSON(value?: LoginToken | null): any { - return LoginTokenToJSONTyped(value, false); + return LoginTokenToJSONTyped(value, false); } -export function LoginTokenToJSONTyped(value?: LoginToken | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function LoginTokenToJSONTyped( + value?: LoginToken | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'token': value['token'], - }; + return { + token: value['token'], + }; } - diff --git a/src/models/Pagination.ts b/src/models/Pagination.ts index 297fe72..03a25da 100644 --- a/src/models/Pagination.ts +++ b/src/models/Pagination.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,76 +13,76 @@ */ /** - * + * * @export * @interface Pagination */ export interface Pagination { - /** - * The current page number - * @type {number} - * @memberof Pagination - */ - page?: number; - /** - * The number of items per page - * @type {number} - * @memberof Pagination - */ - pageSize?: number; - /** - * The total number of pages - * @type {number} - * @memberof Pagination - */ - totalPages?: number; - /** - * The total number of items for this query - * @type {number} - * @memberof Pagination - */ - totalItems?: number; + /** + * The current page number + * @type {number} + * @memberof Pagination + */ + page?: number; + /** + * The number of items per page + * @type {number} + * @memberof Pagination + */ + pageSize?: number; + /** + * The total number of pages + * @type {number} + * @memberof Pagination + */ + totalPages?: number; + /** + * The total number of items for this query + * @type {number} + * @memberof Pagination + */ + totalItems?: number; } /** * Check if a given object implements the Pagination interface. */ export function instanceOfPagination(value: object): value is Pagination { - return true; + return true; } export function PaginationFromJSON(json: any): Pagination { - return PaginationFromJSONTyped(json, false); + return PaginationFromJSONTyped(json, false); } export function PaginationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pagination { - if (json == null) { - return json; - } - return { - - 'page': json['page'] == null ? undefined : json['page'], - 'pageSize': json['pageSize'] == null ? undefined : json['pageSize'], - 'totalPages': json['totalPages'] == null ? undefined : json['totalPages'], - 'totalItems': json['totalItems'] == null ? undefined : json['totalItems'], - }; + if (json == null) { + return json; + } + return { + page: json['page'] == null ? undefined : json['page'], + pageSize: json['pageSize'] == null ? undefined : json['pageSize'], + totalPages: json['totalPages'] == null ? undefined : json['totalPages'], + totalItems: json['totalItems'] == null ? undefined : json['totalItems'], + }; } export function PaginationToJSON(value?: Pagination | null): any { - return PaginationToJSONTyped(value, false); + return PaginationToJSONTyped(value, false); } -export function PaginationToJSONTyped(value?: Pagination | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PaginationToJSONTyped( + value?: Pagination | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'page': value['page'], - 'pageSize': value['pageSize'], - 'totalPages': value['totalPages'], - 'totalItems': value['totalItems'], - }; + return { + page: value['page'], + pageSize: value['pageSize'], + totalPages: value['totalPages'], + totalItems: value['totalItems'], + }; } - diff --git a/src/models/Project.ts b/src/models/Project.ts index 1daab82..ff5cc52 100644 --- a/src/models/Project.ts +++ b/src/models/Project.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,84 +13,84 @@ */ /** - * + * * @export * @interface Project */ export interface Project { - /** - * Unique ID of the project - * @type {string} - * @memberof Project - */ - id?: string; - /** - * The machine name of the project - * @type {string} - * @memberof Project - */ - name?: string; - /** - * The human-readable title of the project - * @type {string} - * @memberof Project - */ - title?: string; - /** - * The ID of the owner of this project - * @type {string} - * @memberof Project - */ - ownerId?: string | null; - /** - * The ID of the group of this project - * @type {string} - * @memberof Project - */ - groupId?: string | null; + /** + * Unique ID of the project + * @type {string} + * @memberof Project + */ + id?: string; + /** + * The machine name of the project + * @type {string} + * @memberof Project + */ + name?: string; + /** + * The human-readable title of the project + * @type {string} + * @memberof Project + */ + title?: string; + /** + * The ID of the owner of this project + * @type {string} + * @memberof Project + */ + ownerId?: string | null; + /** + * The ID of the group of this project + * @type {string} + * @memberof Project + */ + groupId?: string | null; } /** * Check if a given object implements the Project interface. */ export function instanceOfProject(value: object): value is Project { - return true; + return true; } export function ProjectFromJSON(json: any): Project { - return ProjectFromJSONTyped(json, false); + return ProjectFromJSONTyped(json, false); } export function ProjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): Project { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'] == null ? undefined : json['name'], - 'title': json['title'] == null ? undefined : json['title'], - 'ownerId': json['owner_id'] == null ? undefined : json['owner_id'], - 'groupId': json['group_id'] == null ? undefined : json['group_id'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + name: json['name'] == null ? undefined : json['name'], + title: json['title'] == null ? undefined : json['title'], + ownerId: json['owner_id'] == null ? undefined : json['owner_id'], + groupId: json['group_id'] == null ? undefined : json['group_id'], + }; } export function ProjectToJSON(value?: Project | null): any { - return ProjectToJSONTyped(value, false); + return ProjectToJSONTyped(value, false); } -export function ProjectToJSONTyped(value?: Project | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProjectToJSONTyped( + value?: Project | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'name': value['name'], - 'title': value['title'], - 'owner_id': value['ownerId'], - 'group_id': value['groupId'], - }; + return { + id: value['id'], + name: value['name'], + title: value['title'], + owner_id: value['ownerId'], + group_id: value['groupId'], + }; } - diff --git a/src/models/ProjectList.ts b/src/models/ProjectList.ts index 4081f7f..57b0af5 100644 --- a/src/models/ProjectList.ts +++ b/src/models/ProjectList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,76 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { Project } from './Project'; import { - ProjectFromJSON, - ProjectFromJSONTyped, - ProjectToJSON, - ProjectToJSONTyped, + ProjectFromJSON, + ProjectFromJSONTyped, + ProjectToJSON, + ProjectToJSONTyped, } from './Project'; /** - * + * * @export * @interface ProjectList */ export interface ProjectList { - /** - * - * @type {Array} - * @memberof ProjectList - */ - projects?: Array; - /** - * - * @type {Pagination} - * @memberof ProjectList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof ProjectList + */ + projects?: Array; + /** + * + * @type {Pagination} + * @memberof ProjectList + */ + pagination?: Pagination; } /** * Check if a given object implements the ProjectList interface. */ export function instanceOfProjectList(value: object): value is ProjectList { - return true; + return true; } export function ProjectListFromJSON(json: any): ProjectList { - return ProjectListFromJSONTyped(json, false); + return ProjectListFromJSONTyped(json, false); } export function ProjectListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectList { - if (json == null) { - return json; - } - return { - - 'projects': json['projects'] == null ? undefined : ((json['projects'] as Array).map(ProjectFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; + if (json == null) { + return json; + } + return { + projects: + json['projects'] == null ? undefined : (json['projects'] as Array).map(ProjectFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function ProjectListToJSON(value?: ProjectList | null): any { - return ProjectListToJSONTyped(value, false); + return ProjectListToJSONTyped(value, false); } -export function ProjectListToJSONTyped(value?: ProjectList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProjectListToJSONTyped( + value?: ProjectList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'projects': value['projects'] == null ? undefined : ((value['projects'] as Array).map(ProjectToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + projects: + value['projects'] == null ? undefined : (value['projects'] as Array).map(ProjectToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/Result.ts b/src/models/Result.ts index 90da44d..5a13b97 100644 --- a/src/models/Result.ts +++ b/src/models/Result.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,157 +13,155 @@ */ /** - * + * * @export * @interface Result */ export interface Result { - /** - * Unique ID of the test result - * @type {string} - * @memberof Result - */ - id?: string; - /** - * Unique id - * @type {string} - * @memberof Result - */ - testId?: string; - /** - * Timestamp of starttime. - * @type {string} - * @memberof Result - */ - startTime?: string; - /** - * Duration of test in seconds. - * @type {number} - * @memberof Result - */ - duration?: number; - /** - * Status of result. - * @type {string} - * @memberof Result - */ - result?: ResultResultEnum; - /** - * A component - * @type {string} - * @memberof Result - */ - component?: string | null; - /** - * The environment which is being tested - * @type {string} - * @memberof Result - */ - env?: string | null; - /** - * The run this result is associated with - * @type {string} - * @memberof Result - */ - runId?: string | null; - /** - * The project this run is associated with - * @type {string} - * @memberof Result - */ - projectId?: string | null; - /** - * - * @type {object} - * @memberof Result - */ - metadata?: object; - /** - * - * @type {object} - * @memberof Result - */ - params?: object; - /** - * Where the data came from (useful for filtering) - * @type {string} - * @memberof Result - */ - source?: string; + /** + * Unique ID of the test result + * @type {string} + * @memberof Result + */ + id?: string; + /** + * Unique id + * @type {string} + * @memberof Result + */ + testId?: string; + /** + * Timestamp of starttime. + * @type {string} + * @memberof Result + */ + startTime?: string; + /** + * Duration of test in seconds. + * @type {number} + * @memberof Result + */ + duration?: number; + /** + * Status of result. + * @type {string} + * @memberof Result + */ + result?: ResultResultEnum; + /** + * A component + * @type {string} + * @memberof Result + */ + component?: string | null; + /** + * The environment which is being tested + * @type {string} + * @memberof Result + */ + env?: string | null; + /** + * The run this result is associated with + * @type {string} + * @memberof Result + */ + runId?: string | null; + /** + * The project this run is associated with + * @type {string} + * @memberof Result + */ + projectId?: string | null; + /** + * + * @type {object} + * @memberof Result + */ + metadata?: object; + /** + * + * @type {object} + * @memberof Result + */ + params?: object; + /** + * Where the data came from (useful for filtering) + * @type {string} + * @memberof Result + */ + source?: string; } - /** * @export */ export const ResultResultEnum = { - Passed: 'passed', - Failed: 'failed', - Error: 'error', - Skipped: 'skipped', - Xpassed: 'xpassed', - Xfailed: 'xfailed', - Manual: 'manual', - Blocked: 'blocked' + Passed: 'passed', + Failed: 'failed', + Error: 'error', + Skipped: 'skipped', + Xpassed: 'xpassed', + Xfailed: 'xfailed', + Manual: 'manual', + Blocked: 'blocked', } as const; -export type ResultResultEnum = typeof ResultResultEnum[keyof typeof ResultResultEnum]; - +export type ResultResultEnum = (typeof ResultResultEnum)[keyof typeof ResultResultEnum]; /** * Check if a given object implements the Result interface. */ export function instanceOfResult(value: object): value is Result { - return true; + return true; } export function ResultFromJSON(json: any): Result { - return ResultFromJSONTyped(json, false); + return ResultFromJSONTyped(json, false); } export function ResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): Result { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'testId': json['test_id'] == null ? undefined : json['test_id'], - 'startTime': json['start_time'] == null ? undefined : json['start_time'], - 'duration': json['duration'] == null ? undefined : json['duration'], - 'result': json['result'] == null ? undefined : json['result'], - 'component': json['component'] == null ? undefined : json['component'], - 'env': json['env'] == null ? undefined : json['env'], - 'runId': json['run_id'] == null ? undefined : json['run_id'], - 'projectId': json['project_id'] == null ? undefined : json['project_id'], - 'metadata': json['metadata'] == null ? undefined : json['metadata'], - 'params': json['params'] == null ? undefined : json['params'], - 'source': json['source'] == null ? undefined : json['source'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + testId: json['test_id'] == null ? undefined : json['test_id'], + startTime: json['start_time'] == null ? undefined : json['start_time'], + duration: json['duration'] == null ? undefined : json['duration'], + result: json['result'] == null ? undefined : json['result'], + component: json['component'] == null ? undefined : json['component'], + env: json['env'] == null ? undefined : json['env'], + runId: json['run_id'] == null ? undefined : json['run_id'], + projectId: json['project_id'] == null ? undefined : json['project_id'], + metadata: json['metadata'] == null ? undefined : json['metadata'], + params: json['params'] == null ? undefined : json['params'], + source: json['source'] == null ? undefined : json['source'], + }; } export function ResultToJSON(value?: Result | null): any { - return ResultToJSONTyped(value, false); + return ResultToJSONTyped(value, false); } -export function ResultToJSONTyped(value?: Result | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResultToJSONTyped( + value?: Result | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'test_id': value['testId'], - 'start_time': value['startTime'], - 'duration': value['duration'], - 'result': value['result'], - 'component': value['component'], - 'env': value['env'], - 'run_id': value['runId'], - 'project_id': value['projectId'], - 'metadata': value['metadata'], - 'params': value['params'], - 'source': value['source'], - }; + return { + id: value['id'], + test_id: value['testId'], + start_time: value['startTime'], + duration: value['duration'], + result: value['result'], + component: value['component'], + env: value['env'], + run_id: value['runId'], + project_id: value['projectId'], + metadata: value['metadata'], + params: value['params'], + source: value['source'], + }; } - diff --git a/src/models/ResultList.ts b/src/models/ResultList.ts index 1fdd286..f98b46c 100644 --- a/src/models/ResultList.ts +++ b/src/models/ResultList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,71 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { Result } from './Result'; -import { - ResultFromJSON, - ResultFromJSONTyped, - ResultToJSON, - ResultToJSONTyped, -} from './Result'; +import { ResultFromJSON, ResultFromJSONTyped, ResultToJSON, ResultToJSONTyped } from './Result'; /** - * + * * @export * @interface ResultList */ export interface ResultList { - /** - * - * @type {Array} - * @memberof ResultList - */ - results?: Array; - /** - * - * @type {Pagination} - * @memberof ResultList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof ResultList + */ + results?: Array; + /** + * + * @type {Pagination} + * @memberof ResultList + */ + pagination?: Pagination; } /** * Check if a given object implements the ResultList interface. */ export function instanceOfResultList(value: object): value is ResultList { - return true; + return true; } export function ResultListFromJSON(json: any): ResultList { - return ResultListFromJSONTyped(json, false); + return ResultListFromJSONTyped(json, false); } export function ResultListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResultList { - if (json == null) { - return json; - } - return { - - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(ResultFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; + if (json == null) { + return json; + } + return { + results: + json['results'] == null ? undefined : (json['results'] as Array).map(ResultFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function ResultListToJSON(value?: ResultList | null): any { - return ResultListToJSONTyped(value, false); + return ResultListToJSONTyped(value, false); } -export function ResultListToJSONTyped(value?: ResultList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResultListToJSONTyped( + value?: ResultList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'results': value['results'] == null ? undefined : ((value['results'] as Array).map(ResultToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + results: + value['results'] == null ? undefined : (value['results'] as Array).map(ResultToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/Run.ts b/src/models/Run.ts index 1f2a947..e0b3835 100644 --- a/src/models/Run.ts +++ b/src/models/Run.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,124 +13,121 @@ */ /** - * + * * @export * @interface Run */ export interface Run { - /** - * Unique ID of the test run - * @type {string} - * @memberof Run - */ - id?: string; - /** - * The time this record was created - * @type {string} - * @memberof Run - */ - created?: string; - /** - * Duration of tests in seconds - * @type {number} - * @memberof Run - */ - duration?: number; - /** - * A source for this test run - * @type {string} - * @memberof Run - */ - source?: string | null; - /** - * The time the test run started - * @type {string} - * @memberof Run - */ - startTime?: string; - /** - * A component - * @type {string} - * @memberof Run - */ - component?: string | null; - /** - * The environment which is being tested - * @type {string} - * @memberof Run - */ - env?: string | null; - /** - * The project this run is associated with - * @type {string} - * @memberof Run - */ - projectId?: string | null; - /** - * A summary of the test results - * @type {object} - * @memberof Run - */ - summary?: object; - /** - * Extra metadata for this run - * @type {object} - * @memberof Run - */ - metadata?: object | null; + /** + * Unique ID of the test run + * @type {string} + * @memberof Run + */ + id?: string; + /** + * The time this record was created + * @type {string} + * @memberof Run + */ + created?: string; + /** + * Duration of tests in seconds + * @type {number} + * @memberof Run + */ + duration?: number; + /** + * A source for this test run + * @type {string} + * @memberof Run + */ + source?: string | null; + /** + * The time the test run started + * @type {string} + * @memberof Run + */ + startTime?: string; + /** + * A component + * @type {string} + * @memberof Run + */ + component?: string | null; + /** + * The environment which is being tested + * @type {string} + * @memberof Run + */ + env?: string | null; + /** + * The project this run is associated with + * @type {string} + * @memberof Run + */ + projectId?: string | null; + /** + * A summary of the test results + * @type {object} + * @memberof Run + */ + summary?: object; + /** + * Extra metadata for this run + * @type {object} + * @memberof Run + */ + metadata?: object | null; } /** * Check if a given object implements the Run interface. */ export function instanceOfRun(value: object): value is Run { - return true; + return true; } export function RunFromJSON(json: any): Run { - return RunFromJSONTyped(json, false); + return RunFromJSONTyped(json, false); } export function RunFromJSONTyped(json: any, ignoreDiscriminator: boolean): Run { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'created': json['created'] == null ? undefined : json['created'], - 'duration': json['duration'] == null ? undefined : json['duration'], - 'source': json['source'] == null ? undefined : json['source'], - 'startTime': json['start_time'] == null ? undefined : json['start_time'], - 'component': json['component'] == null ? undefined : json['component'], - 'env': json['env'] == null ? undefined : json['env'], - 'projectId': json['project_id'] == null ? undefined : json['project_id'], - 'summary': json['summary'] == null ? undefined : json['summary'], - 'metadata': json['metadata'] == null ? undefined : json['metadata'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + created: json['created'] == null ? undefined : json['created'], + duration: json['duration'] == null ? undefined : json['duration'], + source: json['source'] == null ? undefined : json['source'], + startTime: json['start_time'] == null ? undefined : json['start_time'], + component: json['component'] == null ? undefined : json['component'], + env: json['env'] == null ? undefined : json['env'], + projectId: json['project_id'] == null ? undefined : json['project_id'], + summary: json['summary'] == null ? undefined : json['summary'], + metadata: json['metadata'] == null ? undefined : json['metadata'], + }; } export function RunToJSON(value?: Run | null): any { - return RunToJSONTyped(value, false); + return RunToJSONTyped(value, false); } export function RunToJSONTyped(value?: Run | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'created': value['created'], - 'duration': value['duration'], - 'source': value['source'], - 'start_time': value['startTime'], - 'component': value['component'], - 'env': value['env'], - 'project_id': value['projectId'], - 'summary': value['summary'], - 'metadata': value['metadata'], - }; + return { + id: value['id'], + created: value['created'], + duration: value['duration'], + source: value['source'], + start_time: value['startTime'], + component: value['component'], + env: value['env'], + project_id: value['projectId'], + summary: value['summary'], + metadata: value['metadata'], + }; } - diff --git a/src/models/RunList.ts b/src/models/RunList.ts index 05b2d37..9cb5621 100644 --- a/src/models/RunList.ts +++ b/src/models/RunList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,69 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { Run } from './Run'; -import { - RunFromJSON, - RunFromJSONTyped, - RunToJSON, - RunToJSONTyped, -} from './Run'; +import { RunFromJSON, RunFromJSONTyped, RunToJSON, RunToJSONTyped } from './Run'; /** - * + * * @export * @interface RunList */ export interface RunList { - /** - * - * @type {Array} - * @memberof RunList - */ - runs?: Array; - /** - * - * @type {Pagination} - * @memberof RunList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof RunList + */ + runs?: Array; + /** + * + * @type {Pagination} + * @memberof RunList + */ + pagination?: Pagination; } /** * Check if a given object implements the RunList interface. */ export function instanceOfRunList(value: object): value is RunList { - return true; + return true; } export function RunListFromJSON(json: any): RunList { - return RunListFromJSONTyped(json, false); + return RunListFromJSONTyped(json, false); } export function RunListFromJSONTyped(json: any, ignoreDiscriminator: boolean): RunList { - if (json == null) { - return json; - } - return { - - 'runs': json['runs'] == null ? undefined : ((json['runs'] as Array).map(RunFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; + if (json == null) { + return json; + } + return { + runs: json['runs'] == null ? undefined : (json['runs'] as Array).map(RunFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function RunListToJSON(value?: RunList | null): any { - return RunListToJSONTyped(value, false); + return RunListToJSONTyped(value, false); } -export function RunListToJSONTyped(value?: RunList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RunListToJSONTyped( + value?: RunList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'runs': value['runs'] == null ? undefined : ((value['runs'] as Array).map(RunToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + runs: value['runs'] == null ? undefined : (value['runs'] as Array).map(RunToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/Token.ts b/src/models/Token.ts index 92bc4cb..d35728c 100644 --- a/src/models/Token.ts +++ b/src/models/Token.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,88 +13,85 @@ */ /** - * + * * @export * @interface Token */ export interface Token { - /** - * The ID of the token - * @type {string} - * @memberof Token - */ - id: string; - /** - * The ID of the user that owns this token - * @type {string} - * @memberof Token - */ - userId: string; - /** - * The name given to this token - * @type {string} - * @memberof Token - */ - name: string; - /** - * The date and time when this token expires - * @type {string} - * @memberof Token - */ - expires?: string | null; - /** - * The token itself - * @type {string} - * @memberof Token - */ - token: string; + /** + * The ID of the token + * @type {string} + * @memberof Token + */ + id: string; + /** + * The ID of the user that owns this token + * @type {string} + * @memberof Token + */ + userId: string; + /** + * The name given to this token + * @type {string} + * @memberof Token + */ + name: string; + /** + * The date and time when this token expires + * @type {string} + * @memberof Token + */ + expires?: string | null; + /** + * The token itself + * @type {string} + * @memberof Token + */ + token: string; } /** * Check if a given object implements the Token interface. */ export function instanceOfToken(value: object): value is Token { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('userId' in value) || value['userId'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('token' in value) || value['token'] === undefined) return false; - return true; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('userId' in value) || value['userId'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('token' in value) || value['token'] === undefined) return false; + return true; } export function TokenFromJSON(json: any): Token { - return TokenFromJSONTyped(json, false); + return TokenFromJSONTyped(json, false); } export function TokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): Token { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'userId': json['user_id'], - 'name': json['name'], - 'expires': json['expires'] == null ? undefined : json['expires'], - 'token': json['token'], - }; + if (json == null) { + return json; + } + return { + id: json['id'], + userId: json['user_id'], + name: json['name'], + expires: json['expires'] == null ? undefined : json['expires'], + token: json['token'], + }; } export function TokenToJSON(value?: Token | null): any { - return TokenToJSONTyped(value, false); + return TokenToJSONTyped(value, false); } export function TokenToJSONTyped(value?: Token | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'user_id': value['userId'], - 'name': value['name'], - 'expires': value['expires'], - 'token': value['token'], - }; + return { + id: value['id'], + user_id: value['userId'], + name: value['name'], + expires: value['expires'], + token: value['token'], + }; } - diff --git a/src/models/TokenList.ts b/src/models/TokenList.ts index 2acbe16..b4ca826 100644 --- a/src/models/TokenList.ts +++ b/src/models/TokenList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,69 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { Token } from './Token'; -import { - TokenFromJSON, - TokenFromJSONTyped, - TokenToJSON, - TokenToJSONTyped, -} from './Token'; +import { TokenFromJSON, TokenFromJSONTyped, TokenToJSON, TokenToJSONTyped } from './Token'; /** - * + * * @export * @interface TokenList */ export interface TokenList { - /** - * - * @type {Array} - * @memberof TokenList - */ - tokens?: Array; - /** - * - * @type {Pagination} - * @memberof TokenList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof TokenList + */ + tokens?: Array; + /** + * + * @type {Pagination} + * @memberof TokenList + */ + pagination?: Pagination; } /** * Check if a given object implements the TokenList interface. */ export function instanceOfTokenList(value: object): value is TokenList { - return true; + return true; } export function TokenListFromJSON(json: any): TokenList { - return TokenListFromJSONTyped(json, false); + return TokenListFromJSONTyped(json, false); } export function TokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenList { - if (json == null) { - return json; - } - return { - - 'tokens': json['tokens'] == null ? undefined : ((json['tokens'] as Array).map(TokenFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; + if (json == null) { + return json; + } + return { + tokens: json['tokens'] == null ? undefined : (json['tokens'] as Array).map(TokenFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function TokenListToJSON(value?: TokenList | null): any { - return TokenListToJSONTyped(value, false); + return TokenListToJSONTyped(value, false); } -export function TokenListToJSONTyped(value?: TokenList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TokenListToJSONTyped( + value?: TokenList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'tokens': value['tokens'] == null ? undefined : ((value['tokens'] as Array).map(TokenToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + tokens: value['tokens'] == null ? undefined : (value['tokens'] as Array).map(TokenToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/UpdateRun.ts b/src/models/UpdateRun.ts index fca06ed..d105cad 100644 --- a/src/models/UpdateRun.ts +++ b/src/models/UpdateRun.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,52 +13,52 @@ */ /** - * + * * @export * @interface UpdateRun */ export interface UpdateRun { - /** - * Extra data for this run - * @type {object} - * @memberof UpdateRun - */ - metadata?: object; + /** + * Extra data for this run + * @type {object} + * @memberof UpdateRun + */ + metadata?: object; } /** * Check if a given object implements the UpdateRun interface. */ export function instanceOfUpdateRun(value: object): value is UpdateRun { - return true; + return true; } export function UpdateRunFromJSON(json: any): UpdateRun { - return UpdateRunFromJSONTyped(json, false); + return UpdateRunFromJSONTyped(json, false); } export function UpdateRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateRun { - if (json == null) { - return json; - } - return { - - 'metadata': json['metadata'] == null ? undefined : json['metadata'], - }; + if (json == null) { + return json; + } + return { + metadata: json['metadata'] == null ? undefined : json['metadata'], + }; } export function UpdateRunToJSON(value?: UpdateRun | null): any { - return UpdateRunToJSONTyped(value, false); + return UpdateRunToJSONTyped(value, false); } -export function UpdateRunToJSONTyped(value?: UpdateRun | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateRunToJSONTyped( + value?: UpdateRun | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'metadata': value['metadata'], - }; + return { + metadata: value['metadata'], + }; } - diff --git a/src/models/User.ts b/src/models/User.ts index cfedbbd..691991c 100644 --- a/src/models/User.ts +++ b/src/models/User.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,93 +13,90 @@ */ /** - * + * * @export * @interface User */ export interface User { - /** - * The ID of the user - * @type {string} - * @memberof User - */ - id?: string; - /** - * The user's e-mail address - * @type {string} - * @memberof User - */ - email: string; - /** - * The user's name - * @type {string} - * @memberof User - */ - name?: string | null; - /** - * Flag to show if a user is a super-admin - * @type {boolean} - * @memberof User - */ - isSuperadmin?: boolean; - /** - * Flag to show if the user is active - * @type {boolean} - * @memberof User - */ - isActive?: boolean; - /** - * The ID of the group of this project - * @type {string} - * @memberof User - */ - groupId?: string | null; + /** + * The ID of the user + * @type {string} + * @memberof User + */ + id?: string; + /** + * The user's e-mail address + * @type {string} + * @memberof User + */ + email: string; + /** + * The user's name + * @type {string} + * @memberof User + */ + name?: string | null; + /** + * Flag to show if a user is a super-admin + * @type {boolean} + * @memberof User + */ + isSuperadmin?: boolean; + /** + * Flag to show if the user is active + * @type {boolean} + * @memberof User + */ + isActive?: boolean; + /** + * The ID of the group of this project + * @type {string} + * @memberof User + */ + groupId?: string | null; } /** * Check if a given object implements the User interface. */ export function instanceOfUser(value: object): value is User { - if (!('email' in value) || value['email'] === undefined) return false; - return true; + if (!('email' in value) || value['email'] === undefined) return false; + return true; } export function UserFromJSON(json: any): User { - return UserFromJSONTyped(json, false); + return UserFromJSONTyped(json, false); } export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'email': json['email'], - 'name': json['name'] == null ? undefined : json['name'], - 'isSuperadmin': json['is_superadmin'] == null ? undefined : json['is_superadmin'], - 'isActive': json['is_active'] == null ? undefined : json['is_active'], - 'groupId': json['group_id'] == null ? undefined : json['group_id'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + email: json['email'], + name: json['name'] == null ? undefined : json['name'], + isSuperadmin: json['is_superadmin'] == null ? undefined : json['is_superadmin'], + isActive: json['is_active'] == null ? undefined : json['is_active'], + groupId: json['group_id'] == null ? undefined : json['group_id'], + }; } export function UserToJSON(value?: User | null): any { - return UserToJSONTyped(value, false); + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'email': value['email'], - 'name': value['name'], - 'is_superadmin': value['isSuperadmin'], - 'is_active': value['isActive'], - 'group_id': value['groupId'], - }; + return { + id: value['id'], + email: value['email'], + name: value['name'], + is_superadmin: value['isSuperadmin'], + is_active: value['isActive'], + group_id: value['groupId'], + }; } - diff --git a/src/models/UserList.ts b/src/models/UserList.ts index d22a4ad..9c254b5 100644 --- a/src/models/UserList.ts +++ b/src/models/UserList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,69 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { User } from './User'; -import { - UserFromJSON, - UserFromJSONTyped, - UserToJSON, - UserToJSONTyped, -} from './User'; +import { UserFromJSON, UserFromJSONTyped, UserToJSON, UserToJSONTyped } from './User'; /** - * + * * @export * @interface UserList */ export interface UserList { - /** - * - * @type {Array} - * @memberof UserList - */ - users?: Array; - /** - * - * @type {Pagination} - * @memberof UserList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof UserList + */ + users?: Array; + /** + * + * @type {Pagination} + * @memberof UserList + */ + pagination?: Pagination; } /** * Check if a given object implements the UserList interface. */ export function instanceOfUserList(value: object): value is UserList { - return true; + return true; } export function UserListFromJSON(json: any): UserList { - return UserListFromJSONTyped(json, false); + return UserListFromJSONTyped(json, false); } export function UserListFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserList { - if (json == null) { - return json; - } - return { - - 'users': json['users'] == null ? undefined : ((json['users'] as Array).map(UserFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; + if (json == null) { + return json; + } + return { + users: json['users'] == null ? undefined : (json['users'] as Array).map(UserFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function UserListToJSON(value?: UserList | null): any { - return UserListToJSONTyped(value, false); + return UserListToJSONTyped(value, false); } -export function UserListToJSONTyped(value?: UserList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UserListToJSONTyped( + value?: UserList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'users': value['users'] == null ? undefined : ((value['users'] as Array).map(UserToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + users: value['users'] == null ? undefined : (value['users'] as Array).map(UserToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/WidgetConfig.ts b/src/models/WidgetConfig.ts index a1a8376..33fcd7a 100644 --- a/src/models/WidgetConfig.ts +++ b/src/models/WidgetConfig.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,100 +13,100 @@ */ /** - * + * * @export * @interface WidgetConfig */ export interface WidgetConfig { - /** - * The internal ID of the WidgetConfig - * @type {string} - * @memberof WidgetConfig - */ - id?: string; - /** - * The type of widget, one of either "widget" or "view" - * @type {string} - * @memberof WidgetConfig - */ - type?: string; - /** - * The widget to render, from the list at /widget/types - * @type {string} - * @memberof WidgetConfig - */ - widget?: string; - /** - * The project ID for which the widget is designed - * @type {string} - * @memberof WidgetConfig - */ - projectId?: string; - /** - * The weighting for the widget, lower weight means it will display first - * @type {number} - * @memberof WidgetConfig - */ - weight?: number; - /** - * A dictionary of parameters to send to the widget - * @type {object} - * @memberof WidgetConfig - */ - params?: object; - /** - * The title shown on the widget or page - * @type {string} - * @memberof WidgetConfig - */ - title?: string; + /** + * The internal ID of the WidgetConfig + * @type {string} + * @memberof WidgetConfig + */ + id?: string; + /** + * The type of widget, one of either "widget" or "view" + * @type {string} + * @memberof WidgetConfig + */ + type?: string; + /** + * The widget to render, from the list at /widget/types + * @type {string} + * @memberof WidgetConfig + */ + widget?: string; + /** + * The project ID for which the widget is designed + * @type {string} + * @memberof WidgetConfig + */ + projectId?: string; + /** + * The weighting for the widget, lower weight means it will display first + * @type {number} + * @memberof WidgetConfig + */ + weight?: number; + /** + * A dictionary of parameters to send to the widget + * @type {object} + * @memberof WidgetConfig + */ + params?: object; + /** + * The title shown on the widget or page + * @type {string} + * @memberof WidgetConfig + */ + title?: string; } /** * Check if a given object implements the WidgetConfig interface. */ export function instanceOfWidgetConfig(value: object): value is WidgetConfig { - return true; + return true; } export function WidgetConfigFromJSON(json: any): WidgetConfig { - return WidgetConfigFromJSONTyped(json, false); + return WidgetConfigFromJSONTyped(json, false); } export function WidgetConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetConfig { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'type': json['type'] == null ? undefined : json['type'], - 'widget': json['widget'] == null ? undefined : json['widget'], - 'projectId': json['project_id'] == null ? undefined : json['project_id'], - 'weight': json['weight'] == null ? undefined : json['weight'], - 'params': json['params'] == null ? undefined : json['params'], - 'title': json['title'] == null ? undefined : json['title'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + type: json['type'] == null ? undefined : json['type'], + widget: json['widget'] == null ? undefined : json['widget'], + projectId: json['project_id'] == null ? undefined : json['project_id'], + weight: json['weight'] == null ? undefined : json['weight'], + params: json['params'] == null ? undefined : json['params'], + title: json['title'] == null ? undefined : json['title'], + }; } export function WidgetConfigToJSON(value?: WidgetConfig | null): any { - return WidgetConfigToJSONTyped(value, false); + return WidgetConfigToJSONTyped(value, false); } -export function WidgetConfigToJSONTyped(value?: WidgetConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WidgetConfigToJSONTyped( + value?: WidgetConfig | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'type': value['type'], - 'widget': value['widget'], - 'project_id': value['projectId'], - 'weight': value['weight'], - 'params': value['params'], - 'title': value['title'], - }; + return { + id: value['id'], + type: value['type'], + widget: value['widget'], + project_id: value['projectId'], + weight: value['weight'], + params: value['params'], + title: value['title'], + }; } - diff --git a/src/models/WidgetConfigList.ts b/src/models/WidgetConfigList.ts index aed8114..b39100d 100644 --- a/src/models/WidgetConfigList.ts +++ b/src/models/WidgetConfigList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,83 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { WidgetConfig } from './WidgetConfig'; import { - WidgetConfigFromJSON, - WidgetConfigFromJSONTyped, - WidgetConfigToJSON, - WidgetConfigToJSONTyped, + WidgetConfigFromJSON, + WidgetConfigFromJSONTyped, + WidgetConfigToJSON, + WidgetConfigToJSONTyped, } from './WidgetConfig'; /** - * + * * @export * @interface WidgetConfigList */ export interface WidgetConfigList { - /** - * - * @type {Array} - * @memberof WidgetConfigList - */ - widgets?: Array; - /** - * - * @type {Pagination} - * @memberof WidgetConfigList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof WidgetConfigList + */ + widgets?: Array; + /** + * + * @type {Pagination} + * @memberof WidgetConfigList + */ + pagination?: Pagination; } /** * Check if a given object implements the WidgetConfigList interface. */ export function instanceOfWidgetConfigList(value: object): value is WidgetConfigList { - return true; + return true; } export function WidgetConfigListFromJSON(json: any): WidgetConfigList { - return WidgetConfigListFromJSONTyped(json, false); + return WidgetConfigListFromJSONTyped(json, false); } -export function WidgetConfigListFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetConfigList { - if (json == null) { - return json; - } - return { - - 'widgets': json['widgets'] == null ? undefined : ((json['widgets'] as Array).map(WidgetConfigFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; +export function WidgetConfigListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean +): WidgetConfigList { + if (json == null) { + return json; + } + return { + widgets: + json['widgets'] == null + ? undefined + : (json['widgets'] as Array).map(WidgetConfigFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function WidgetConfigListToJSON(value?: WidgetConfigList | null): any { - return WidgetConfigListToJSONTyped(value, false); + return WidgetConfigListToJSONTyped(value, false); } -export function WidgetConfigListToJSONTyped(value?: WidgetConfigList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WidgetConfigListToJSONTyped( + value?: WidgetConfigList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'widgets': value['widgets'] == null ? undefined : ((value['widgets'] as Array).map(WidgetConfigToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + widgets: + value['widgets'] == null + ? undefined + : (value['widgets'] as Array).map(WidgetConfigToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/WidgetParam.ts b/src/models/WidgetParam.ts index aad6068..bb4e1f9 100644 --- a/src/models/WidgetParam.ts +++ b/src/models/WidgetParam.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,68 +13,68 @@ */ /** - * + * * @export * @interface WidgetParam */ export interface WidgetParam { - /** - * The name of the parameter to supply to the widget - * @type {string} - * @memberof WidgetParam - */ - name?: string; - /** - * A friendly description of the parameter - * @type {string} - * @memberof WidgetParam - */ - description?: string; - /** - * The type of parameter (string, integer, etc) - * @type {string} - * @memberof WidgetParam - */ - type?: string; + /** + * The name of the parameter to supply to the widget + * @type {string} + * @memberof WidgetParam + */ + name?: string; + /** + * A friendly description of the parameter + * @type {string} + * @memberof WidgetParam + */ + description?: string; + /** + * The type of parameter (string, integer, etc) + * @type {string} + * @memberof WidgetParam + */ + type?: string; } /** * Check if a given object implements the WidgetParam interface. */ export function instanceOfWidgetParam(value: object): value is WidgetParam { - return true; + return true; } export function WidgetParamFromJSON(json: any): WidgetParam { - return WidgetParamFromJSONTyped(json, false); + return WidgetParamFromJSONTyped(json, false); } export function WidgetParamFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetParam { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'type': json['type'] == null ? undefined : json['type'], - }; + if (json == null) { + return json; + } + return { + name: json['name'] == null ? undefined : json['name'], + description: json['description'] == null ? undefined : json['description'], + type: json['type'] == null ? undefined : json['type'], + }; } export function WidgetParamToJSON(value?: WidgetParam | null): any { - return WidgetParamToJSONTyped(value, false); + return WidgetParamToJSONTyped(value, false); } -export function WidgetParamToJSONTyped(value?: WidgetParam | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WidgetParamToJSONTyped( + value?: WidgetParam | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'description': value['description'], - 'type': value['type'], - }; + return { + name: value['name'], + description: value['description'], + type: value['type'], + }; } - diff --git a/src/models/WidgetType.ts b/src/models/WidgetType.ts index 57740a2..29a3a2f 100644 --- a/src/models/WidgetType.ts +++ b/src/models/WidgetType.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,91 +14,93 @@ import type { WidgetParam } from './WidgetParam'; import { - WidgetParamFromJSON, - WidgetParamFromJSONTyped, - WidgetParamToJSON, - WidgetParamToJSONTyped, + WidgetParamFromJSON, + WidgetParamFromJSONTyped, + WidgetParamToJSON, + WidgetParamToJSONTyped, } from './WidgetParam'; /** - * + * * @export * @interface WidgetType */ export interface WidgetType { - /** - * A unique identifier for this widget type - * @type {string} - * @memberof WidgetType - */ - id?: string; - /** - * The title of the widget, for users to see - * @type {string} - * @memberof WidgetType - */ - title?: string; - /** - * A helpful description of this widget type - * @type {string} - * @memberof WidgetType - */ - description?: string; - /** - * A dictionary or map of parameters to values - * @type {Array} - * @memberof WidgetType - */ - params?: Array; - /** - * The type of widget (widget, view) - * @type {string} - * @memberof WidgetType - */ - type?: string; + /** + * A unique identifier for this widget type + * @type {string} + * @memberof WidgetType + */ + id?: string; + /** + * The title of the widget, for users to see + * @type {string} + * @memberof WidgetType + */ + title?: string; + /** + * A helpful description of this widget type + * @type {string} + * @memberof WidgetType + */ + description?: string; + /** + * A dictionary or map of parameters to values + * @type {Array} + * @memberof WidgetType + */ + params?: Array; + /** + * The type of widget (widget, view) + * @type {string} + * @memberof WidgetType + */ + type?: string; } /** * Check if a given object implements the WidgetType interface. */ export function instanceOfWidgetType(value: object): value is WidgetType { - return true; + return true; } export function WidgetTypeFromJSON(json: any): WidgetType { - return WidgetTypeFromJSONTyped(json, false); + return WidgetTypeFromJSONTyped(json, false); } export function WidgetTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetType { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'title': json['title'] == null ? undefined : json['title'], - 'description': json['description'] == null ? undefined : json['description'], - 'params': json['params'] == null ? undefined : ((json['params'] as Array).map(WidgetParamFromJSON)), - 'type': json['type'] == null ? undefined : json['type'], - }; + if (json == null) { + return json; + } + return { + id: json['id'] == null ? undefined : json['id'], + title: json['title'] == null ? undefined : json['title'], + description: json['description'] == null ? undefined : json['description'], + params: + json['params'] == null ? undefined : (json['params'] as Array).map(WidgetParamFromJSON), + type: json['type'] == null ? undefined : json['type'], + }; } export function WidgetTypeToJSON(value?: WidgetType | null): any { - return WidgetTypeToJSONTyped(value, false); + return WidgetTypeToJSONTyped(value, false); } -export function WidgetTypeToJSONTyped(value?: WidgetType | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WidgetTypeToJSONTyped( + value?: WidgetType | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'title': value['title'], - 'description': value['description'], - 'params': value['params'] == null ? undefined : ((value['params'] as Array).map(WidgetParamToJSON)), - 'type': value['type'], - }; + return { + id: value['id'], + title: value['title'], + description: value['description'], + params: + value['params'] == null ? undefined : (value['params'] as Array).map(WidgetParamToJSON), + type: value['type'], + }; } - diff --git a/src/models/WidgetTypeList.ts b/src/models/WidgetTypeList.ts index ce549f1..7d9c12d 100644 --- a/src/models/WidgetTypeList.ts +++ b/src/models/WidgetTypeList.ts @@ -5,7 +5,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,74 +14,79 @@ import type { Pagination } from './Pagination'; import { - PaginationFromJSON, - PaginationFromJSONTyped, - PaginationToJSON, - PaginationToJSONTyped, + PaginationFromJSON, + PaginationFromJSONTyped, + PaginationToJSON, + PaginationToJSONTyped, } from './Pagination'; import type { WidgetType } from './WidgetType'; import { - WidgetTypeFromJSON, - WidgetTypeFromJSONTyped, - WidgetTypeToJSON, - WidgetTypeToJSONTyped, + WidgetTypeFromJSON, + WidgetTypeFromJSONTyped, + WidgetTypeToJSON, + WidgetTypeToJSONTyped, } from './WidgetType'; /** - * + * * @export * @interface WidgetTypeList */ export interface WidgetTypeList { - /** - * - * @type {Array} - * @memberof WidgetTypeList - */ - types?: Array; - /** - * - * @type {Pagination} - * @memberof WidgetTypeList - */ - pagination?: Pagination; + /** + * + * @type {Array} + * @memberof WidgetTypeList + */ + types?: Array; + /** + * + * @type {Pagination} + * @memberof WidgetTypeList + */ + pagination?: Pagination; } /** * Check if a given object implements the WidgetTypeList interface. */ export function instanceOfWidgetTypeList(value: object): value is WidgetTypeList { - return true; + return true; } export function WidgetTypeListFromJSON(json: any): WidgetTypeList { - return WidgetTypeListFromJSONTyped(json, false); + return WidgetTypeListFromJSONTyped(json, false); } -export function WidgetTypeListFromJSONTyped(json: any, ignoreDiscriminator: boolean): WidgetTypeList { - if (json == null) { - return json; - } - return { - - 'types': json['types'] == null ? undefined : ((json['types'] as Array).map(WidgetTypeFromJSON)), - 'pagination': json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), - }; +export function WidgetTypeListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean +): WidgetTypeList { + if (json == null) { + return json; + } + return { + types: + json['types'] == null ? undefined : (json['types'] as Array).map(WidgetTypeFromJSON), + pagination: json['pagination'] == null ? undefined : PaginationFromJSON(json['pagination']), + }; } export function WidgetTypeListToJSON(value?: WidgetTypeList | null): any { - return WidgetTypeListToJSONTyped(value, false); + return WidgetTypeListToJSONTyped(value, false); } -export function WidgetTypeListToJSONTyped(value?: WidgetTypeList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WidgetTypeListToJSONTyped( + value?: WidgetTypeList | null, + ignoreDiscriminator: boolean = false +): any { + if (value == null) { + return value; + } - return { - - 'types': value['types'] == null ? undefined : ((value['types'] as Array).map(WidgetTypeToJSON)), - 'pagination': PaginationToJSON(value['pagination']), - }; + return { + types: + value['types'] == null ? undefined : (value['types'] as Array).map(WidgetTypeToJSON), + pagination: PaginationToJSON(value['pagination']), + }; } - diff --git a/src/models/index.ts b/src/models/index.ts index e8667e3..866b674 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ -/* eslint-disable */ + export * from './AccountRecovery'; export * from './AccountRegistration'; export * from './AccountReset'; diff --git a/src/runtime.ts b/src/runtime.ts index dc4f459..343dc8b 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -5,83 +5,85 @@ * A system to store and query test results * * The version of the OpenAPI document: 2.8.3 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export const BASE_PATH = "/api".replace(/\/+$/, ""); +export const BASE_PATH = '/api'.replace(/\/+$/, ''); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,199 +92,222 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + '^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', + 'i' + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === 'function' ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + 'The request failed and the interceptors did not return an alternative response' + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== 'undefined' && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: 'ResponseError' = 'ResponseError'; + constructor( + public response: Response, + msg?: string + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: 'FetchError' = 'FetchError'; + constructor( + public cause: Error, + msg?: string + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: 'RequiredError' = 'RequiredError'; + constructor( + public field: string, + msg?: string + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ',', + ssv: ' ', + tsv: '\t', + pipes: '|', }; export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; @@ -290,143 +315,176 @@ export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join('&'); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = '' +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - const result: { [key: string]: any } = {}; - for (const key of Object.keys(data)) { - result[key] = fn(data[key]); - } - return result; + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/test/api/ArtifactApi.spec.js b/test/api/ArtifactApi.spec.js index d9a8c5b..11b6a2d 100644 --- a/test/api/ArtifactApi.spec.js +++ b/test/api/ArtifactApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/GroupApi.spec.js b/test/api/GroupApi.spec.js index bdd9938..153e2f1 100644 --- a/test/api/GroupApi.spec.js +++ b/test/api/GroupApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/HealthApi.spec.js b/test/api/HealthApi.spec.js index 68d553c..aded0de 100644 --- a/test/api/HealthApi.spec.js +++ b/test/api/HealthApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/ImportApi.spec.js b/test/api/ImportApi.spec.js index debc73d..ced79c1 100644 --- a/test/api/ImportApi.spec.js +++ b/test/api/ImportApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/ProjectApi.spec.js b/test/api/ProjectApi.spec.js index 2519370..ee68d5d 100644 --- a/test/api/ProjectApi.spec.js +++ b/test/api/ProjectApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/ReportApi.spec.js b/test/api/ReportApi.spec.js index f0538c6..b6f8765 100644 --- a/test/api/ReportApi.spec.js +++ b/test/api/ReportApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/ResultApi.spec.js b/test/api/ResultApi.spec.js index 791a5b9..fac971d 100644 --- a/test/api/ResultApi.spec.js +++ b/test/api/ResultApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/RunApi.spec.js b/test/api/RunApi.spec.js index 397c61f..1263652 100644 --- a/test/api/RunApi.spec.js +++ b/test/api/RunApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/WidgetApi.spec.js b/test/api/WidgetApi.spec.js index 6b5e52a..89f1a41 100644 --- a/test/api/WidgetApi.spec.js +++ b/test/api/WidgetApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/api/WidgetConfigApi.spec.js b/test/api/WidgetConfigApi.spec.js index 872ff37..0e0c1ca 100644 --- a/test/api/WidgetConfigApi.spec.js +++ b/test/api/WidgetConfigApi.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/Artifact.spec.js b/test/model/Artifact.spec.js index c893c36..4280007 100644 --- a/test/model/Artifact.spec.js +++ b/test/model/Artifact.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/ArtifactList.spec.js b/test/model/ArtifactList.spec.js index 4170202..257a659 100644 --- a/test/model/ArtifactList.spec.js +++ b/test/model/ArtifactList.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/Group.spec.js b/test/model/Group.spec.js index 829b45c..6cc493e 100644 --- a/test/model/Group.spec.js +++ b/test/model/Group.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/GroupList.spec.js b/test/model/GroupList.spec.js index 775e066..a76f043 100644 --- a/test/model/GroupList.spec.js +++ b/test/model/GroupList.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/Health.spec.js b/test/model/Health.spec.js index c9607a4..e4ef345 100644 --- a/test/model/Health.spec.js +++ b/test/model/Health.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/HealthInfo.spec.js b/test/model/HealthInfo.spec.js index 47c8235..2cdc3fd 100644 --- a/test/model/HealthInfo.spec.js +++ b/test/model/HealthInfo.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/InlineObject.spec.js b/test/model/InlineObject.spec.js index f53f889..9d02644 100644 --- a/test/model/InlineObject.spec.js +++ b/test/model/InlineObject.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/InlineObject1.spec.js b/test/model/InlineObject1.spec.js index 118381f..b322839 100644 --- a/test/model/InlineObject1.spec.js +++ b/test/model/InlineObject1.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/InlineResponse200.spec.js b/test/model/InlineResponse200.spec.js index b5c0e08..e6a94fa 100644 --- a/test/model/InlineResponse200.spec.js +++ b/test/model/InlineResponse200.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/ModelImport.spec.js b/test/model/ModelImport.spec.js index 2c3088e..89cc267 100644 --- a/test/model/ModelImport.spec.js +++ b/test/model/ModelImport.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/Pagination.spec.js b/test/model/Pagination.spec.js index 14b9330..3500c0e 100644 --- a/test/model/Pagination.spec.js +++ b/test/model/Pagination.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/Project.spec.js b/test/model/Project.spec.js index 2f48b2c..b485743 100644 --- a/test/model/Project.spec.js +++ b/test/model/Project.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/ProjectList.spec.js b/test/model/ProjectList.spec.js index 0f280c6..23c019e 100644 --- a/test/model/ProjectList.spec.js +++ b/test/model/ProjectList.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/Report.spec.js b/test/model/Report.spec.js index d92b931..97edab3 100644 --- a/test/model/Report.spec.js +++ b/test/model/Report.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/ReportList.spec.js b/test/model/ReportList.spec.js index 9772e31..c53880d 100644 --- a/test/model/ReportList.spec.js +++ b/test/model/ReportList.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/ReportParameters.spec.js b/test/model/ReportParameters.spec.js index 79de3a9..597d96d 100644 --- a/test/model/ReportParameters.spec.js +++ b/test/model/ReportParameters.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/Result.spec.js b/test/model/Result.spec.js index 1731e05..58fc86d 100644 --- a/test/model/Result.spec.js +++ b/test/model/Result.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/ResultList.spec.js b/test/model/ResultList.spec.js index 215e456..8ac84dc 100644 --- a/test/model/ResultList.spec.js +++ b/test/model/ResultList.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/Run.spec.js b/test/model/Run.spec.js index 24eadff..087d5bd 100644 --- a/test/model/Run.spec.js +++ b/test/model/Run.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/RunList.spec.js b/test/model/RunList.spec.js index cbf232a..887e7f4 100644 --- a/test/model/RunList.spec.js +++ b/test/model/RunList.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/WidgetConfig.spec.js b/test/model/WidgetConfig.spec.js index 915bf0e..5a2137f 100644 --- a/test/model/WidgetConfig.spec.js +++ b/test/model/WidgetConfig.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/WidgetConfigList.spec.js b/test/model/WidgetConfigList.spec.js index 4bec89a..a32e36e 100644 --- a/test/model/WidgetConfigList.spec.js +++ b/test/model/WidgetConfigList.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/WidgetParam.spec.js b/test/model/WidgetParam.spec.js index 27e90d8..88c3f9c 100644 --- a/test/model/WidgetParam.spec.js +++ b/test/model/WidgetParam.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/WidgetType.spec.js b/test/model/WidgetType.spec.js index b800ac9..583af3a 100644 --- a/test/model/WidgetType.spec.js +++ b/test/model/WidgetType.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/test/model/WidgetTypeList.spec.js b/test/model/WidgetTypeList.spec.js index 93c308d..e3b057f 100644 --- a/test/model/WidgetTypeList.spec.js +++ b/test/model/WidgetTypeList.spec.js @@ -3,7 +3,7 @@ * A system to store and query test results * * The version of the OpenAPI document: 1.9.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 55893f4..837bcaa 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -3,7 +3,6 @@ "compilerOptions": { "module": "esnext", "outDir": "./dist", - "outFile": undefined, "declaration": false, "declarationMap": false }, @@ -14,4 +13,3 @@ "**/*.spec.ts" ] } - diff --git a/tsconfig.json b/tsconfig.json index 32f0386..0868e05 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -38,4 +38,3 @@ "**/*.spec.ts" ] } - From dff0ee86083f4bac36be4350908f074fa32ed50c Mon Sep 17 00:00:00 2001 From: mshriver Date: Tue, 4 Nov 2025 15:43:20 +0100 Subject: [PATCH 05/13] Use pre-commit directly in github workflow yarn isn't available in pre-commit CI --- .github/workflows/build.yml | 50 +++++++++++++++++++++++++++++++ .github/workflows/npm-publish.yml | 30 +++++++++++++++++-- .pre-commit-config.yaml | 4 --- 3 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..705d715 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +name: Build + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install npm dependencies + run: npm ci + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit + run: pre-commit run --all-files + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build TypeScript + run: npm run build diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 536a6f7..14e7c56 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,13 +8,37 @@ on: types: [created] jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 22 + + - name: Install npm dependencies + run: npm install + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit + run: pre-commit run --all-files + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 22 - run: npm install - run: npm ci - run: npm test @@ -26,7 +50,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 22 registry-url: https://registry.npmjs.org/ - run: npm install - run: npm ci @@ -41,7 +65,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 22 registry-url: https://npm.pkg.github.com/ - run: npm install - run: npm ci diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8cea9cb..c22c34e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,3 @@ repos: types: [file] files: \.(ts|tsx|json|yaml|md)$ pass_filenames: false - -ci: - autofix_prs: false - skip: [] From ae3af04f152124e8fa253fdc4b468e2ad8797c1c Mon Sep 17 00:00:00 2001 From: mshriver Date: Tue, 4 Nov 2025 16:34:07 +0100 Subject: [PATCH 06/13] yarn instead of npm in github workflows --- .github/workflows/build.yml | 12 +++++----- .github/workflows/npm-publish.yml | 37 +++++++++++++++++-------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 705d715..0e3f126 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,10 +16,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: '22' - cache: 'npm' + cache: 'yarn' - - name: Install npm dependencies - run: npm ci + - name: Install dependencies + run: yarn install --frozen-lockfile - name: Setup Python uses: actions/setup-python@v5 @@ -41,10 +41,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: '22' - cache: 'npm' + cache: 'yarn' - name: Install dependencies - run: npm ci + run: yarn install --frozen-lockfile - name: Build TypeScript - run: npm run build + run: yarn build diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 14e7c56..52f6569 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,15 +11,16 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 22 + cache: 'yarn' - - name: Install npm dependencies - run: npm install + - name: Install dependencies + run: yarn install --frozen-lockfile - name: Setup Python uses: actions/setup-python@v5 @@ -35,25 +36,26 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 22 - - run: npm install - - run: npm ci - - run: npm test + cache: 'yarn' + - run: yarn install --frozen-lockfile + - run: yarn test publish-npm: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 22 + cache: 'yarn' registry-url: https://registry.npmjs.org/ - - run: npm install - - run: npm ci + - run: yarn install --frozen-lockfile + - run: yarn build - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} @@ -62,13 +64,14 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 22 + cache: 'yarn' registry-url: https://npm.pkg.github.com/ - - run: npm install - - run: npm ci + - run: yarn install --frozen-lockfile + - run: yarn build - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From c3a5efdd7a496d23acd19ca342d62e2a6068213f Mon Sep 17 00:00:00 2001 From: mshriver Date: Tue, 4 Nov 2025 17:03:47 +0100 Subject: [PATCH 07/13] use frozen lockfile --- .github/workflows/npm-publish.yml | 1 - .gitignore | 1 - yarn.lock | 3002 +++++++++++++++++++++++++++++ 3 files changed, 3002 insertions(+), 2 deletions(-) create mode 100644 yarn.lock diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 52f6569..5124d51 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -68,7 +68,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 22 - cache: 'yarn' registry-url: https://npm.pkg.github.com/ - run: yarn install --frozen-lockfile - run: yarn build diff --git a/.gitignore b/.gitignore index ea7643c..59cb1dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # Dependencies node_modules/ package-lock.json -yarn.lock pnpm-lock.yaml # Build outputs diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..6bc534e --- /dev/null +++ b/yarn.lock @@ -0,0 +1,3002 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" + integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== + dependencies: + "@babel/helper-validator-identifier" "^7.27.1" + js-tokens "^4.0.0" + picocolors "^1.1.1" + +"@babel/compat-data@^7.27.2": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" + integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== + +"@babel/core@^7.23.9", "@babel/core@^7.27.4": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" + integrity sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.28.5" + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-module-transforms" "^7.28.3" + "@babel/helpers" "^7.28.4" + "@babel/parser" "^7.28.5" + "@babel/template" "^7.27.2" + "@babel/traverse" "^7.28.5" + "@babel/types" "^7.28.5" + "@jridgewell/remapping" "^2.3.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.27.5", "@babel/generator@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" + integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== + dependencies: + "@babel/parser" "^7.28.5" + "@babel/types" "^7.28.5" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + +"@babel/helper-compilation-targets@^7.27.2": + version "7.27.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" + integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== + dependencies: + "@babel/compat-data" "^7.27.2" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-globals@^7.28.0": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== + +"@babel/helper-module-imports@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" + integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== + dependencies: + "@babel/traverse" "^7.27.1" + "@babel/types" "^7.27.1" + +"@babel/helper-module-transforms@^7.28.3": + version "7.28.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz#a2b37d3da3b2344fe085dab234426f2b9a2fa5f6" + integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw== + dependencies: + "@babel/helper-module-imports" "^7.27.1" + "@babel/helper-validator-identifier" "^7.27.1" + "@babel/traverse" "^7.28.3" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c" + integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw== + +"@babel/helper-string-parser@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== + +"@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== + +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== + +"@babel/helpers@^7.28.4": + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" + integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== + dependencies: + "@babel/template" "^7.27.2" + "@babel/types" "^7.28.4" + +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" + integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== + dependencies: + "@babel/types" "^7.28.5" + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-import-attributes@^7.24.7": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz#34c017d54496f9b11b61474e7ea3dfd5563ffe07" + integrity sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-syntax-import-meta@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz#2f9beb5eff30fa507c5532d107daac7b888fa34c" + integrity sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-typescript@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz#5147d29066a793450f220c63fa3a9431b7e6dd18" + integrity sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/template@^7.27.2": + version "7.27.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" + integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/parser" "^7.27.2" + "@babel/types" "^7.27.1" + +"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.5.tgz#450cab9135d21a7a2ca9d2d35aa05c20e68c360b" + integrity sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.28.5" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.28.5" + "@babel/template" "^7.27.2" + "@babel/types" "^7.28.5" + debug "^4.3.1" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4", "@babel/types@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.5.tgz#10fc405f60897c35f07e85493c932c7b5ca0592b" + integrity sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA== + dependencies: + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@emnapi/core@^1.4.3": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.7.0.tgz#135de4e8858763989112281bdf38ca02439db7c3" + integrity sha512-pJdKGq/1iquWYtv1RRSljZklxHCOCAJFJrImO5ZLKPJVJlVUcs8yFwNQlqS0Lo8xT1VAXXTCZocF9n26FWEKsw== + dependencies: + "@emnapi/wasi-threads" "1.1.0" + tslib "^2.4.0" + +"@emnapi/runtime@^1.4.3": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.7.0.tgz#d7ef3832df8564fe5903bf0567aedbd19538ecbe" + integrity sha512-oAYoQnCYaQZKVS53Fq23ceWMRxq5EhQsE0x0RdQ55jT7wagMu5k+fS39v1fiSLrtrLQlXwVINenqhLMtTrV/1Q== + dependencies: + tslib "^2.4.0" + +"@emnapi/wasi-threads@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz#60b2102fddc9ccb78607e4a3cf8403ea69be41bf" + integrity sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ== + dependencies: + tslib "^2.4.0" + +"@eslint-community/eslint-utils@^4.7.0", "@eslint-community/eslint-utils@^4.8.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3" + integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g== + dependencies: + eslint-visitor-keys "^3.4.3" + +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": + version "4.12.2" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" + integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== + +"@eslint/config-array@^0.21.1": + version "0.21.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.1.tgz#7d1b0060fea407f8301e932492ba8c18aff29713" + integrity sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA== + dependencies: + "@eslint/object-schema" "^2.1.7" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/config-helpers@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda" + integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw== + dependencies: + "@eslint/core" "^0.17.0" + +"@eslint/core@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c" + integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ== + dependencies: + "@types/json-schema" "^7.0.15" + +"@eslint/eslintrc@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.1.tgz#e55f7f1dd400600dd066dbba349c4c0bac916964" + integrity sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^14.0.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" + +"@eslint/js@9.39.1", "@eslint/js@^9.16.0": + version "9.39.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.1.tgz#0dd59c3a9f40e3f1882975c321470969243e0164" + integrity sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw== + +"@eslint/object-schema@^2.1.7": + version "2.1.7" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad" + integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA== + +"@eslint/plugin-kit@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2" + integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA== + dependencies: + "@eslint/core" "^0.17.0" + levn "^0.4.1" + +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.7" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.7.tgz#822cb7b3a12c5a240a24f621b5a2413e27a45f26" + integrity sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ== + dependencies: + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.4.0" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/retry@^0.4.0", "@humanwhocodes/retry@^0.4.2": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba" + integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ== + +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-30.2.0.tgz#c52fcd5b58fdd2e8eb66b2fd8ae56f2f64d05b28" + integrity sha512-+O1ifRjkvYIkBqASKWgLxrpEhQAAE7hY77ALLUufSk5717KfOShg6IbqLmdsLMPdUiFvA2kTs0R7YZy+l0IzZQ== + dependencies: + "@jest/types" "30.2.0" + "@types/node" "*" + chalk "^4.1.2" + jest-message-util "30.2.0" + jest-util "30.2.0" + slash "^3.0.0" + +"@jest/core@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-30.2.0.tgz#813d59faa5abd5510964a8b3a7b17cc77b775275" + integrity sha512-03W6IhuhjqTlpzh/ojut/pDB2LPRygyWX8ExpgHtQA8H/3K7+1vKmcINx5UzeOX1se6YEsBsOHQ1CRzf3fOwTQ== + dependencies: + "@jest/console" "30.2.0" + "@jest/pattern" "30.0.1" + "@jest/reporters" "30.2.0" + "@jest/test-result" "30.2.0" + "@jest/transform" "30.2.0" + "@jest/types" "30.2.0" + "@types/node" "*" + ansi-escapes "^4.3.2" + chalk "^4.1.2" + ci-info "^4.2.0" + exit-x "^0.2.2" + graceful-fs "^4.2.11" + jest-changed-files "30.2.0" + jest-config "30.2.0" + jest-haste-map "30.2.0" + jest-message-util "30.2.0" + jest-regex-util "30.0.1" + jest-resolve "30.2.0" + jest-resolve-dependencies "30.2.0" + jest-runner "30.2.0" + jest-runtime "30.2.0" + jest-snapshot "30.2.0" + jest-util "30.2.0" + jest-validate "30.2.0" + jest-watcher "30.2.0" + micromatch "^4.0.8" + pretty-format "30.2.0" + slash "^3.0.0" + +"@jest/diff-sequences@30.0.1": + version "30.0.1" + resolved "https://registry.yarnpkg.com/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz#0ededeae4d071f5c8ffe3678d15f3a1be09156be" + integrity sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw== + +"@jest/environment@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-30.2.0.tgz#1e673cdb8b93ded707cf6631b8353011460831fa" + integrity sha512-/QPTL7OBJQ5ac09UDRa3EQes4gt1FTEG/8jZ/4v5IVzx+Cv7dLxlVIvfvSVRiiX2drWyXeBjkMSR8hvOWSog5g== + dependencies: + "@jest/fake-timers" "30.2.0" + "@jest/types" "30.2.0" + "@types/node" "*" + jest-mock "30.2.0" + +"@jest/expect-utils@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-30.2.0.tgz#4f95413d4748454fdb17404bf1141827d15e6011" + integrity sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA== + dependencies: + "@jest/get-type" "30.1.0" + +"@jest/expect@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-30.2.0.tgz#9a5968499bb8add2bbb09136f69f7df5ddbf3185" + integrity sha512-V9yxQK5erfzx99Sf+7LbhBwNWEZ9eZay8qQ9+JSC0TrMR1pMDHLMY+BnVPacWU6Jamrh252/IKo4F1Xn/zfiqA== + dependencies: + expect "30.2.0" + jest-snapshot "30.2.0" + +"@jest/fake-timers@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-30.2.0.tgz#0941ddc28a339b9819542495b5408622dc9e94ec" + integrity sha512-HI3tRLjRxAbBy0VO8dqqm7Hb2mIa8d5bg/NJkyQcOk7V118ObQML8RC5luTF/Zsg4474a+gDvhce7eTnP4GhYw== + dependencies: + "@jest/types" "30.2.0" + "@sinonjs/fake-timers" "^13.0.0" + "@types/node" "*" + jest-message-util "30.2.0" + jest-mock "30.2.0" + jest-util "30.2.0" + +"@jest/get-type@30.1.0": + version "30.1.0" + resolved "https://registry.yarnpkg.com/@jest/get-type/-/get-type-30.1.0.tgz#4fcb4dc2ebcf0811be1c04fd1cb79c2dba431cbc" + integrity sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA== + +"@jest/globals@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-30.2.0.tgz#2f4b696d5862664b89c4ee2e49ae24d2bb7e0988" + integrity sha512-b63wmnKPaK+6ZZfpYhz9K61oybvbI1aMcIs80++JI1O1rR1vaxHUCNqo3ITu6NU0d4V34yZFoHMn/uoKr/Rwfw== + dependencies: + "@jest/environment" "30.2.0" + "@jest/expect" "30.2.0" + "@jest/types" "30.2.0" + jest-mock "30.2.0" + +"@jest/pattern@30.0.1": + version "30.0.1" + resolved "https://registry.yarnpkg.com/@jest/pattern/-/pattern-30.0.1.tgz#d5304147f49a052900b4b853dedb111d080e199f" + integrity sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA== + dependencies: + "@types/node" "*" + jest-regex-util "30.0.1" + +"@jest/reporters@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-30.2.0.tgz#a36b28fcbaf0c4595250b108e6f20e363348fd91" + integrity sha512-DRyW6baWPqKMa9CzeiBjHwjd8XeAyco2Vt8XbcLFjiwCOEKOvy82GJ8QQnJE9ofsxCMPjH4MfH8fCWIHHDKpAQ== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "30.2.0" + "@jest/test-result" "30.2.0" + "@jest/transform" "30.2.0" + "@jest/types" "30.2.0" + "@jridgewell/trace-mapping" "^0.3.25" + "@types/node" "*" + chalk "^4.1.2" + collect-v8-coverage "^1.0.2" + exit-x "^0.2.2" + glob "^10.3.10" + graceful-fs "^4.2.11" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^6.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^5.0.0" + istanbul-reports "^3.1.3" + jest-message-util "30.2.0" + jest-util "30.2.0" + jest-worker "30.2.0" + slash "^3.0.0" + string-length "^4.0.2" + v8-to-istanbul "^9.0.1" + +"@jest/schemas@30.0.5": + version "30.0.5" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-30.0.5.tgz#7bdf69fc5a368a5abdb49fd91036c55225846473" + integrity sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA== + dependencies: + "@sinclair/typebox" "^0.34.0" + +"@jest/snapshot-utils@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/snapshot-utils/-/snapshot-utils-30.2.0.tgz#387858eb90c2f98f67bff327435a532ac5309fbe" + integrity sha512-0aVxM3RH6DaiLcjj/b0KrIBZhSX1373Xci4l3cW5xiUWPctZ59zQ7jj4rqcJQ/Z8JuN/4wX3FpJSa3RssVvCug== + dependencies: + "@jest/types" "30.2.0" + chalk "^4.1.2" + graceful-fs "^4.2.11" + natural-compare "^1.4.0" + +"@jest/source-map@30.0.1": + version "30.0.1" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-30.0.1.tgz#305ebec50468f13e658b3d5c26f85107a5620aaa" + integrity sha512-MIRWMUUR3sdbP36oyNyhbThLHyJ2eEDClPCiHVbrYAe5g3CHRArIVpBw7cdSB5fr+ofSfIb2Tnsw8iEHL0PYQg== + dependencies: + "@jridgewell/trace-mapping" "^0.3.25" + callsites "^3.1.0" + graceful-fs "^4.2.11" + +"@jest/test-result@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-30.2.0.tgz#9c0124377fb7996cdffb86eda3dbc56eacab363d" + integrity sha512-RF+Z+0CCHkARz5HT9mcQCBulb1wgCP3FBvl9VFokMX27acKphwyQsNuWH3c+ojd1LeWBLoTYoxF0zm6S/66mjg== + dependencies: + "@jest/console" "30.2.0" + "@jest/types" "30.2.0" + "@types/istanbul-lib-coverage" "^2.0.6" + collect-v8-coverage "^1.0.2" + +"@jest/test-sequencer@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-30.2.0.tgz#bf0066bc72e176d58f5dfa7f212b6e7eee44f221" + integrity sha512-wXKgU/lk8fKXMu/l5Hog1R61bL4q5GCdT6OJvdAFz1P+QrpoFuLU68eoKuVc4RbrTtNnTL5FByhWdLgOPSph+Q== + dependencies: + "@jest/test-result" "30.2.0" + graceful-fs "^4.2.11" + jest-haste-map "30.2.0" + slash "^3.0.0" + +"@jest/transform@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-30.2.0.tgz#54bef1a4510dcbd58d5d4de4fe2980a63077ef2a" + integrity sha512-XsauDV82o5qXbhalKxD7p4TZYYdwcaEXC77PPD2HixEFF+6YGppjrAAQurTl2ECWcEomHBMMNS9AH3kcCFx8jA== + dependencies: + "@babel/core" "^7.27.4" + "@jest/types" "30.2.0" + "@jridgewell/trace-mapping" "^0.3.25" + babel-plugin-istanbul "^7.0.1" + chalk "^4.1.2" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" + graceful-fs "^4.2.11" + jest-haste-map "30.2.0" + jest-regex-util "30.0.1" + jest-util "30.2.0" + micromatch "^4.0.8" + pirates "^4.0.7" + slash "^3.0.0" + write-file-atomic "^5.0.1" + +"@jest/types@30.2.0": + version "30.2.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-30.2.0.tgz#1c678a7924b8f59eafd4c77d56b6d0ba976d62b8" + integrity sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg== + dependencies: + "@jest/pattern" "30.0.1" + "@jest/schemas" "30.0.5" + "@types/istanbul-lib-coverage" "^2.0.6" + "@types/istanbul-reports" "^3.0.4" + "@types/node" "*" + "@types/yargs" "^17.0.33" + chalk "^4.1.2" + +"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.28": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@napi-rs/wasm-runtime@^0.2.11": + version "0.2.12" + resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz#3e78a8b96e6c33a6c517e1894efbd5385a7cb6f2" + integrity sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ== + dependencies: + "@emnapi/core" "^1.4.3" + "@emnapi/runtime" "^1.4.3" + "@tybys/wasm-util" "^0.10.0" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + +"@pkgr/core@^0.2.9": + version "0.2.9" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b" + integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA== + +"@sinclair/typebox@^0.34.0": + version "0.34.41" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.34.41.tgz#aa51a6c1946df2c5a11494a2cdb9318e026db16c" + integrity sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g== + +"@sinonjs/commons@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^13.0.0": + version "13.0.5" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz#36b9dbc21ad5546486ea9173d6bea063eb1717d5" + integrity sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw== + dependencies: + "@sinonjs/commons" "^3.0.1" + +"@tybys/wasm-util@^0.10.0": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414" + integrity sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg== + dependencies: + tslib "^2.4.0" + +"@types/babel__core@^7.20.5": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" + integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.28.0.tgz#07d713d6cce0d265c9849db0cbe62d3f61f36f74" + integrity sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q== + dependencies: + "@babel/types" "^7.28.2" + +"@types/estree@^1.0.6": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" + integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.1", "@types/istanbul-lib-coverage@^2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== + +"@types/istanbul-lib-report@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/json-schema@^7.0.15": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/node@*", "@types/node@^24.10.0": + version "24.10.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.10.0.tgz#6b79086b0dfc54e775a34ba8114dcc4e0221f31f" + integrity sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A== + dependencies: + undici-types "~7.16.0" + +"@types/stack-utils@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" + integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== + +"@types/yargs-parser@*": + version "21.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== + +"@types/yargs@^17.0.33": + version "17.0.34" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.34.tgz#1c2f9635b71d5401827373a01ce2e8a7670ea839" + integrity sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A== + dependencies: + "@types/yargs-parser" "*" + +"@typescript-eslint/eslint-plugin@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.3.tgz#6f7aeaf9f5c611425db9b8f983e8d3fe5deece3c" + integrity sha512-sbaQ27XBUopBkRiuY/P9sWGOWUW4rl8fDoHIUmLpZd8uldsTyB4/Zg6bWTegPoTLnKj9Hqgn3QD6cjPNB32Odw== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.46.3" + "@typescript-eslint/type-utils" "8.46.3" + "@typescript-eslint/utils" "8.46.3" + "@typescript-eslint/visitor-keys" "8.46.3" + graphemer "^1.4.0" + ignore "^7.0.0" + natural-compare "^1.4.0" + ts-api-utils "^2.1.0" + +"@typescript-eslint/parser@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.46.3.tgz#3badfb62d2e2dc733d02a038073e3f65f2cb833d" + integrity sha512-6m1I5RmHBGTnUGS113G04DMu3CpSdxCAU/UvtjNWL4Nuf3MW9tQhiJqRlHzChIkhy6kZSAQmc+I1bcGjE3yNKg== + dependencies: + "@typescript-eslint/scope-manager" "8.46.3" + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/typescript-estree" "8.46.3" + "@typescript-eslint/visitor-keys" "8.46.3" + debug "^4.3.4" + +"@typescript-eslint/project-service@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.46.3.tgz#4555c685407ea829081218fa033d7b032607aaef" + integrity sha512-Fz8yFXsp2wDFeUElO88S9n4w1I4CWDTXDqDr9gYvZgUpwXQqmZBr9+NTTql5R3J7+hrJZPdpiWaB9VNhAKYLuQ== + dependencies: + "@typescript-eslint/tsconfig-utils" "^8.46.3" + "@typescript-eslint/types" "^8.46.3" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.46.3.tgz#2e330f566e135ccac13477b98dd88d8f176e4dff" + integrity sha512-FCi7Y1zgrmxp3DfWfr+3m9ansUUFoy8dkEdeQSgA9gbm8DaHYvZCdkFRQrtKiedFf3Ha6VmoqoAaP68+i+22kg== + dependencies: + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/visitor-keys" "8.46.3" + +"@typescript-eslint/tsconfig-utils@8.46.3", "@typescript-eslint/tsconfig-utils@^8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.3.tgz#cad33398c762c97fe56a8defda00c16505abefa3" + integrity sha512-GLupljMniHNIROP0zE7nCcybptolcH8QZfXOpCfhQDAdwJ/ZTlcaBOYebSOZotpti/3HrHSw7D3PZm75gYFsOA== + +"@typescript-eslint/type-utils@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.46.3.tgz#71188df833d7697ecff256cd1d3889a20552d78c" + integrity sha512-ZPCADbr+qfz3aiTTYNNkCbUt+cjNwI/5McyANNrFBpVxPt7GqpEYz5ZfdwuFyGUnJ9FdDXbGODUu6iRCI6XRXw== + dependencies: + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/typescript-estree" "8.46.3" + "@typescript-eslint/utils" "8.46.3" + debug "^4.3.4" + ts-api-utils "^2.1.0" + +"@typescript-eslint/types@8.46.3", "@typescript-eslint/types@^8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.46.3.tgz#da05ea40e91359b4275dbb3a489f2f7907a02245" + integrity sha512-G7Ok9WN/ggW7e/tOf8TQYMaxgID3Iujn231hfi0Pc7ZheztIJVpO44ekY00b7akqc6nZcvregk0Jpah3kep6hA== + +"@typescript-eslint/typescript-estree@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.3.tgz#c12406afba707f9779ce0c0151a08c33b3a96d41" + integrity sha512-f/NvtRjOm80BtNM5OQtlaBdM5BRFUv7gf381j9wygDNL+qOYSNOgtQ/DCndiYi80iIOv76QqaTmp4fa9hwI0OA== + dependencies: + "@typescript-eslint/project-service" "8.46.3" + "@typescript-eslint/tsconfig-utils" "8.46.3" + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/visitor-keys" "8.46.3" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^2.1.0" + +"@typescript-eslint/utils@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.46.3.tgz#b6c7994b7c1ee2fe338ab32f7b3d4424856a73ce" + integrity sha512-VXw7qmdkucEx9WkmR3ld/u6VhRyKeiF1uxWwCy/iuNfokjJ7VhsgLSOTjsol8BunSw190zABzpwdNsze2Kpo4g== + dependencies: + "@eslint-community/eslint-utils" "^4.7.0" + "@typescript-eslint/scope-manager" "8.46.3" + "@typescript-eslint/types" "8.46.3" + "@typescript-eslint/typescript-estree" "8.46.3" + +"@typescript-eslint/visitor-keys@8.46.3": + version "8.46.3" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.3.tgz#6811b15053501981059c58e1c01b39242bd5c0f6" + integrity sha512-uk574k8IU0rOF/AjniX8qbLSGURJVUCeM5e4MIMKBFFi8weeiLrG1fyQejyLXQpRZbU/1BuQasleV/RfHC3hHg== + dependencies: + "@typescript-eslint/types" "8.46.3" + eslint-visitor-keys "^4.2.1" + +"@ungap/structured-clone@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" + integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== + +"@unrs/resolver-binding-android-arm-eabi@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz#9f5b04503088e6a354295e8ea8fe3cb99e43af81" + integrity sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw== + +"@unrs/resolver-binding-android-arm64@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz#7414885431bd7178b989aedc4d25cccb3865bc9f" + integrity sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g== + +"@unrs/resolver-binding-darwin-arm64@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz#b4a8556f42171fb9c9f7bac8235045e82aa0cbdf" + integrity sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g== + +"@unrs/resolver-binding-darwin-x64@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz#fd4d81257b13f4d1a083890a6a17c00de571f0dc" + integrity sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ== + +"@unrs/resolver-binding-freebsd-x64@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz#d2513084d0f37c407757e22f32bd924a78cfd99b" + integrity sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw== + +"@unrs/resolver-binding-linux-arm-gnueabihf@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz#844d2605d057488d77fab09705f2866b86164e0a" + integrity sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw== + +"@unrs/resolver-binding-linux-arm-musleabihf@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz#204892995cefb6bd1d017d52d097193bc61ddad3" + integrity sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw== + +"@unrs/resolver-binding-linux-arm64-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz#023eb0c3aac46066a10be7a3f362e7b34f3bdf9d" + integrity sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ== + +"@unrs/resolver-binding-linux-arm64-musl@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz#9e6f9abb06424e3140a60ac996139786f5d99be0" + integrity sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w== + +"@unrs/resolver-binding-linux-ppc64-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz#b111417f17c9d1b02efbec8e08398f0c5527bb44" + integrity sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA== + +"@unrs/resolver-binding-linux-riscv64-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz#92ffbf02748af3e99873945c9a8a5ead01d508a9" + integrity sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ== + +"@unrs/resolver-binding-linux-riscv64-musl@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz#0bec6f1258fc390e6b305e9ff44256cb207de165" + integrity sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew== + +"@unrs/resolver-binding-linux-s390x-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz#577843a084c5952f5906770633ccfb89dac9bc94" + integrity sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg== + +"@unrs/resolver-binding-linux-x64-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz#36fb318eebdd690f6da32ac5e0499a76fa881935" + integrity sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w== + +"@unrs/resolver-binding-linux-x64-musl@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz#bfb9af75f783f98f6a22c4244214efe4df1853d6" + integrity sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA== + +"@unrs/resolver-binding-wasm32-wasi@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz#752c359dd875684b27429500d88226d7cc72f71d" + integrity sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ== + dependencies: + "@napi-rs/wasm-runtime" "^0.2.11" + +"@unrs/resolver-binding-win32-arm64-msvc@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz#ce5735e600e4c2fbb409cd051b3b7da4a399af35" + integrity sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw== + +"@unrs/resolver-binding-win32-ia32-msvc@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz#72fc57bc7c64ec5c3de0d64ee0d1810317bc60a6" + integrity sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ== + +"@unrs/resolver-binding-win32-x64-msvc@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz#538b1e103bf8d9864e7b85cc96fa8d6fb6c40777" + integrity sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g== + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.15.0: + version "8.15.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== + +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + 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" + +ansi-escapes@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-regex@^6.0.1: + version "6.2.2" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1" + integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +ansi-styles@^6.1.0: + version "6.2.3" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041" + integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== + +anymatch@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +babel-jest@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-30.2.0.tgz#fd44a1ec9552be35ead881f7381faa7d8f3b95ac" + integrity sha512-0YiBEOxWqKkSQWL9nNGGEgndoeL0ZpWrbLMNL5u/Kaxrli3Eaxlt3ZtIDktEvXt4L/R9r3ODr2zKwGM/2BjxVw== + dependencies: + "@jest/transform" "30.2.0" + "@types/babel__core" "^7.20.5" + babel-plugin-istanbul "^7.0.1" + babel-preset-jest "30.2.0" + chalk "^4.1.2" + graceful-fs "^4.2.11" + slash "^3.0.0" + +babel-plugin-istanbul@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz#d8b518c8ea199364cf84ccc82de89740236daf92" + integrity sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-instrument "^6.0.2" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.2.0.tgz#94c250d36b43f95900f3a219241e0f4648191ce2" + integrity sha512-ftzhzSGMUnOzcCXd6WHdBGMyuwy15Wnn0iyyWGKgBDLxf9/s5ABuraCSpBX2uG0jUg4rqJnxsLc5+oYBqoxVaA== + dependencies: + "@types/babel__core" "^7.20.5" + +babel-preset-current-node-syntax@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz#20730d6cdc7dda5d89401cab10ac6a32067acde6" + integrity sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + +babel-preset-jest@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-30.2.0.tgz#04717843e561347781d6d7f69c81e6bcc3ed11ce" + integrity sha512-US4Z3NOieAQumwFnYdUWKvUKh8+YSnS/gB3t6YBiz0bskpu7Pine8pPCheNxlPEW4wnUkma2a94YuW2q3guvCQ== + dependencies: + babel-plugin-jest-hoist "30.2.0" + babel-preset-current-node-syntax "^1.2.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +baseline-browser-mapping@^2.8.19: + version "2.8.23" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.23.tgz#cd43e17eff5cbfb67c92153e7fe856cf6d426421" + integrity sha512-616V5YX4bepJFzNyOfce5Fa8fDJMfoxzOIzDCZwaGL8MKVpFrXqfNUoIpRn9YMI5pXf/VKgzjB4htFMsFKKdiQ== + +brace-expansion@^1.1.7: + version "1.1.12" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" + integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" + integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browserslist@^4.24.0: + version "4.27.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.27.0.tgz#755654744feae978fbb123718b2f139bc0fa6697" + integrity sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw== + dependencies: + baseline-browser-mapping "^2.8.19" + caniuse-lite "^1.0.30001751" + electron-to-chromium "^1.5.238" + node-releases "^2.0.26" + update-browserslist-db "^1.1.4" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +callsites@^3.0.0, callsites@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001751: + version "1.0.30001753" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001753.tgz#419f8fc9bab6f1a1d10d9574d0b3374f823c5b00" + integrity sha512-Bj5H35MD/ebaOV4iDLqPEtiliTN29qkGtEHCwawWn4cYm+bPJM2NsaP30vtZcnERClMzp52J4+aw2UNbK4o+zw== + +chalk@^4.0.0, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +ci-info@^4.2.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.3.1.tgz#355ad571920810b5623e11d40232f443f16f1daa" + integrity sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA== + +cjs-module-lexer@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-2.1.0.tgz#586e87d4341cb2661850ece5190232ccdebcff8b" + integrity sha512-UX0OwmYRYQQetfrLEZeewIFFI+wSTofC+pMBLNuH3RUuu/xzG1oz84UCEDOSoQlN3fZ4+AzmV50ZYvGqkMh9yA== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz#cc1f01eb8d02298cbc9a437c74c70ab4e5210b80" + integrity sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +cross-spawn@^7.0.3, cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + +dedent@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.0.tgz#c1f9445335f0175a96587be245a282ff451446ca" + integrity sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ== + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +deepmerge@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +detect-newline@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + +electron-to-chromium@^1.5.238: + version "1.5.244" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.244.tgz#b9b61e3d24ef4203489951468614f2a360763820" + integrity sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw== + +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +encoding@^0.1.11: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + +error-ex@^1.3.1: + version "1.3.4" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" + integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== + dependencies: + is-arrayish "^0.2.1" + +escalade@^3.1.1, escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-prettier@^10.1.8: + version "10.1.8" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz#15734ce4af8c2778cc32f0b01b37b0b5cd1ecb97" + integrity sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w== + +eslint-scope@^8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.4.0.tgz#88e646a207fad61436ffa39eb505147200655c82" + integrity sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint-visitor-keys@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" + integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== + +eslint@^9.39.1: + version "9.39.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.1.tgz#be8bf7c6de77dcc4252b5a8dcb31c2efff74a6e5" + integrity sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g== + dependencies: + "@eslint-community/eslint-utils" "^4.8.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.21.1" + "@eslint/config-helpers" "^0.4.2" + "@eslint/core" "^0.17.0" + "@eslint/eslintrc" "^3.3.1" + "@eslint/js" "9.39.1" + "@eslint/plugin-kit" "^0.4.1" + "@humanfs/node" "^0.16.6" + "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.4.2" + "@types/estree" "^1.0.6" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.6" + debug "^4.3.2" + escape-string-regexp "^4.0.0" + eslint-scope "^8.4.0" + eslint-visitor-keys "^4.2.1" + espree "^10.4.0" + esquery "^1.5.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^8.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + json-stable-stringify-without-jsonify "^1.0.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + +espree@^10.0.1, espree@^10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837" + integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ== + dependencies: + acorn "^8.15.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.1" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exit-x@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/exit-x/-/exit-x-0.2.2.tgz#1f9052de3b8d99a696b10dad5bced9bdd5c3aa64" + integrity sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ== + +expect@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-30.2.0.tgz#d4013bed267013c14bc1199cec8aa57cee9b5869" + integrity sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw== + dependencies: + "@jest/expect-utils" "30.2.0" + "@jest/get-type" "30.1.0" + jest-matcher-utils "30.2.0" + jest-message-util "30.2.0" + jest-mock "30.2.0" + jest-util "30.2.0" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + 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.8" + +fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.19.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" + integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== + dependencies: + reusify "^1.0.4" + +fb-watchman@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== + dependencies: + flat-cache "^4.0.0" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.4" + +flatted@^3.2.9: + version "3.3.3" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358" + integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== + +foreground-child@^3.1.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" + integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== + dependencies: + cross-spawn "^7.0.6" + signal-exit "^4.0.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^10.3.10: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + +glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + +graceful-fs@^4.2.11: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +ignore@^5.2.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +ignore@^7.0.0: + version "7.0.5" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" + integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== + +import-fresh@^3.2.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" + integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-local@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-instrument@^6.0.0, istanbul-lib-instrument@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^5.0.0: + version "5.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz#acaef948df7747c8eb5fbf1265cb980f6353a441" + integrity sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A== + dependencies: + "@jridgewell/trace-mapping" "^0.3.23" + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + +istanbul-reports@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.2.0.tgz#cb4535162b5784aa623cee21a7252cf2c807ac93" + integrity sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + +jest-changed-files@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-30.2.0.tgz#602266e478ed554e1e1469944faa7efd37cee61c" + integrity sha512-L8lR1ChrRnSdfeOvTrwZMlnWV8G/LLjQ0nG9MBclwWZidA2N5FviRki0Bvh20WRMOX31/JYvzdqTJrk5oBdydQ== + dependencies: + execa "^5.1.1" + jest-util "30.2.0" + p-limit "^3.1.0" + +jest-circus@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-30.2.0.tgz#98b8198b958748a2f322354311023d1d02e7603f" + integrity sha512-Fh0096NC3ZkFx05EP2OXCxJAREVxj1BcW/i6EWqqymcgYKWjyyDpral3fMxVcHXg6oZM7iULer9wGRFvfpl+Tg== + dependencies: + "@jest/environment" "30.2.0" + "@jest/expect" "30.2.0" + "@jest/test-result" "30.2.0" + "@jest/types" "30.2.0" + "@types/node" "*" + chalk "^4.1.2" + co "^4.6.0" + dedent "^1.6.0" + is-generator-fn "^2.1.0" + jest-each "30.2.0" + jest-matcher-utils "30.2.0" + jest-message-util "30.2.0" + jest-runtime "30.2.0" + jest-snapshot "30.2.0" + jest-util "30.2.0" + p-limit "^3.1.0" + pretty-format "30.2.0" + pure-rand "^7.0.0" + slash "^3.0.0" + stack-utils "^2.0.6" + +jest-cli@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-30.2.0.tgz#1780f8e9d66bf84a10b369aea60aeda7697dcc67" + integrity sha512-Os9ukIvADX/A9sLt6Zse3+nmHtHaE6hqOsjQtNiugFTbKRHYIYtZXNGNK9NChseXy7djFPjndX1tL0sCTlfpAA== + dependencies: + "@jest/core" "30.2.0" + "@jest/test-result" "30.2.0" + "@jest/types" "30.2.0" + chalk "^4.1.2" + exit-x "^0.2.2" + import-local "^3.2.0" + jest-config "30.2.0" + jest-util "30.2.0" + jest-validate "30.2.0" + yargs "^17.7.2" + +jest-config@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-30.2.0.tgz#29df8c50e2ad801cc59c406b50176c18c362a90b" + integrity sha512-g4WkyzFQVWHtu6uqGmQR4CQxz/CH3yDSlhzXMWzNjDx843gYjReZnMRanjRCq5XZFuQrGDxgUaiYWE8BRfVckA== + dependencies: + "@babel/core" "^7.27.4" + "@jest/get-type" "30.1.0" + "@jest/pattern" "30.0.1" + "@jest/test-sequencer" "30.2.0" + "@jest/types" "30.2.0" + babel-jest "30.2.0" + chalk "^4.1.2" + ci-info "^4.2.0" + deepmerge "^4.3.1" + glob "^10.3.10" + graceful-fs "^4.2.11" + jest-circus "30.2.0" + jest-docblock "30.2.0" + jest-environment-node "30.2.0" + jest-regex-util "30.0.1" + jest-resolve "30.2.0" + jest-runner "30.2.0" + jest-util "30.2.0" + jest-validate "30.2.0" + micromatch "^4.0.8" + parse-json "^5.2.0" + pretty-format "30.2.0" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-30.2.0.tgz#e3ec3a6ea5c5747f605c9e874f83d756cba36825" + integrity sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A== + dependencies: + "@jest/diff-sequences" "30.0.1" + "@jest/get-type" "30.1.0" + chalk "^4.1.2" + pretty-format "30.2.0" + +jest-docblock@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-30.2.0.tgz#42cd98d69f887e531c7352309542b1ce4ee10256" + integrity sha512-tR/FFgZKS1CXluOQzZvNH3+0z9jXr3ldGSD8bhyuxvlVUwbeLOGynkunvlTMxchC5urrKndYiwCFC0DLVjpOCA== + dependencies: + detect-newline "^3.1.0" + +jest-each@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-30.2.0.tgz#39e623ae71641c2ac3ee69b3ba3d258fce8e768d" + integrity sha512-lpWlJlM7bCUf1mfmuqTA8+j2lNURW9eNafOy99knBM01i5CQeY5UH1vZjgT9071nDJac1M4XsbyI44oNOdhlDQ== + dependencies: + "@jest/get-type" "30.1.0" + "@jest/types" "30.2.0" + chalk "^4.1.2" + jest-util "30.2.0" + pretty-format "30.2.0" + +jest-environment-node@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-30.2.0.tgz#3def7980ebd2fd86e74efd4d2e681f55ab38da0f" + integrity sha512-ElU8v92QJ9UrYsKrxDIKCxu6PfNj4Hdcktcn0JX12zqNdqWHB0N+hwOnnBBXvjLd2vApZtuLUGs1QSY+MsXoNA== + dependencies: + "@jest/environment" "30.2.0" + "@jest/fake-timers" "30.2.0" + "@jest/types" "30.2.0" + "@types/node" "*" + jest-mock "30.2.0" + jest-util "30.2.0" + jest-validate "30.2.0" + +jest-haste-map@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-30.2.0.tgz#808e3889f288603ac70ff0ac047598345a66022e" + integrity sha512-sQA/jCb9kNt+neM0anSj6eZhLZUIhQgwDt7cPGjumgLM4rXsfb9kpnlacmvZz3Q5tb80nS+oG/if+NBKrHC+Xw== + dependencies: + "@jest/types" "30.2.0" + "@types/node" "*" + anymatch "^3.1.3" + fb-watchman "^2.0.2" + graceful-fs "^4.2.11" + jest-regex-util "30.0.1" + jest-util "30.2.0" + jest-worker "30.2.0" + micromatch "^4.0.8" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.3" + +jest-leak-detector@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-30.2.0.tgz#292fdca7b7c9cf594e1e570ace140b01d8beb736" + integrity sha512-M6jKAjyzjHG0SrQgwhgZGy9hFazcudwCNovY/9HPIicmNSBuockPSedAP9vlPK6ONFJ1zfyH/M2/YYJxOz5cdQ== + dependencies: + "@jest/get-type" "30.1.0" + pretty-format "30.2.0" + +jest-matcher-utils@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-30.2.0.tgz#69a0d4c271066559ec8b0d8174829adc3f23a783" + integrity sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg== + dependencies: + "@jest/get-type" "30.1.0" + chalk "^4.1.2" + jest-diff "30.2.0" + pretty-format "30.2.0" + +jest-message-util@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-30.2.0.tgz#fc97bf90d11f118b31e6131e2b67fc4f39f92152" + integrity sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@jest/types" "30.2.0" + "@types/stack-utils" "^2.0.3" + chalk "^4.1.2" + graceful-fs "^4.2.11" + micromatch "^4.0.8" + pretty-format "30.2.0" + slash "^3.0.0" + stack-utils "^2.0.6" + +jest-mock@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-30.2.0.tgz#69f991614eeb4060189459d3584f710845bff45e" + integrity sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw== + dependencies: + "@jest/types" "30.2.0" + "@types/node" "*" + jest-util "30.2.0" + +jest-pnp-resolver@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@30.0.1: + version "30.0.1" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-30.0.1.tgz#f17c1de3958b67dfe485354f5a10093298f2a49b" + integrity sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA== + +jest-resolve-dependencies@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-30.2.0.tgz#3370e2c0b49cc560f6a7e8ec3a59dd99525e1a55" + integrity sha512-xTOIGug/0RmIe3mmCqCT95yO0vj6JURrn1TKWlNbhiAefJRWINNPgwVkrVgt/YaerPzY3iItufd80v3lOrFJ2w== + dependencies: + jest-regex-util "30.0.1" + jest-snapshot "30.2.0" + +jest-resolve@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-30.2.0.tgz#2e2009cbd61e8f1f003355d5ec87225412cebcd7" + integrity sha512-TCrHSxPlx3tBY3hWNtRQKbtgLhsXa1WmbJEqBlTBrGafd5fiQFByy2GNCEoGR+Tns8d15GaL9cxEzKOO3GEb2A== + dependencies: + chalk "^4.1.2" + graceful-fs "^4.2.11" + jest-haste-map "30.2.0" + jest-pnp-resolver "^1.2.3" + jest-util "30.2.0" + jest-validate "30.2.0" + slash "^3.0.0" + unrs-resolver "^1.7.11" + +jest-runner@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-30.2.0.tgz#c62b4c3130afa661789705e13a07bdbcec26a114" + integrity sha512-PqvZ2B2XEyPEbclp+gV6KO/F1FIFSbIwewRgmROCMBo/aZ6J1w8Qypoj2pEOcg3G2HzLlaP6VUtvwCI8dM3oqQ== + dependencies: + "@jest/console" "30.2.0" + "@jest/environment" "30.2.0" + "@jest/test-result" "30.2.0" + "@jest/transform" "30.2.0" + "@jest/types" "30.2.0" + "@types/node" "*" + chalk "^4.1.2" + emittery "^0.13.1" + exit-x "^0.2.2" + graceful-fs "^4.2.11" + jest-docblock "30.2.0" + jest-environment-node "30.2.0" + jest-haste-map "30.2.0" + jest-leak-detector "30.2.0" + jest-message-util "30.2.0" + jest-resolve "30.2.0" + jest-runtime "30.2.0" + jest-util "30.2.0" + jest-watcher "30.2.0" + jest-worker "30.2.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-30.2.0.tgz#395ea792cde048db1b0cd1a92dc9cb9f1921bf8a" + integrity sha512-p1+GVX/PJqTucvsmERPMgCPvQJpFt4hFbM+VN3n8TMo47decMUcJbt+rgzwrEme0MQUA/R+1de2axftTHkKckg== + dependencies: + "@jest/environment" "30.2.0" + "@jest/fake-timers" "30.2.0" + "@jest/globals" "30.2.0" + "@jest/source-map" "30.0.1" + "@jest/test-result" "30.2.0" + "@jest/transform" "30.2.0" + "@jest/types" "30.2.0" + "@types/node" "*" + chalk "^4.1.2" + cjs-module-lexer "^2.1.0" + collect-v8-coverage "^1.0.2" + glob "^10.3.10" + graceful-fs "^4.2.11" + jest-haste-map "30.2.0" + jest-message-util "30.2.0" + jest-mock "30.2.0" + jest-regex-util "30.0.1" + jest-resolve "30.2.0" + jest-snapshot "30.2.0" + jest-util "30.2.0" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-snapshot@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-30.2.0.tgz#266fbbb4b95fc4665ce6f32f1f38eeb39f4e26d0" + integrity sha512-5WEtTy2jXPFypadKNpbNkZ72puZCa6UjSr/7djeecHWOu7iYhSXSnHScT8wBz3Rn8Ena5d5RYRcsyKIeqG1IyA== + dependencies: + "@babel/core" "^7.27.4" + "@babel/generator" "^7.27.5" + "@babel/plugin-syntax-jsx" "^7.27.1" + "@babel/plugin-syntax-typescript" "^7.27.1" + "@babel/types" "^7.27.3" + "@jest/expect-utils" "30.2.0" + "@jest/get-type" "30.1.0" + "@jest/snapshot-utils" "30.2.0" + "@jest/transform" "30.2.0" + "@jest/types" "30.2.0" + babel-preset-current-node-syntax "^1.2.0" + chalk "^4.1.2" + expect "30.2.0" + graceful-fs "^4.2.11" + jest-diff "30.2.0" + jest-matcher-utils "30.2.0" + jest-message-util "30.2.0" + jest-util "30.2.0" + pretty-format "30.2.0" + semver "^7.7.2" + synckit "^0.11.8" + +jest-util@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-30.2.0.tgz#5142adbcad6f4e53c2776c067a4db3c14f913705" + integrity sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA== + dependencies: + "@jest/types" "30.2.0" + "@types/node" "*" + chalk "^4.1.2" + ci-info "^4.2.0" + graceful-fs "^4.2.11" + picomatch "^4.0.2" + +jest-validate@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-30.2.0.tgz#273eaaed4c0963b934b5b31e96289edda6e0a2ef" + integrity sha512-FBGWi7dP2hpdi8nBoWxSsLvBFewKAg0+uSQwBaof4Y4DPgBabXgpSYC5/lR7VmnIlSpASmCi/ntRWPbv7089Pw== + dependencies: + "@jest/get-type" "30.1.0" + "@jest/types" "30.2.0" + camelcase "^6.3.0" + chalk "^4.1.2" + leven "^3.1.0" + pretty-format "30.2.0" + +jest-watcher@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-30.2.0.tgz#f9c055de48e18c979e7756a3917e596e2d69b07b" + integrity sha512-PYxa28dxJ9g777pGm/7PrbnMeA0Jr7osHP9bS7eJy9DuAjMgdGtxgf0uKMyoIsTWAkIbUW5hSDdJ3urmgXBqxg== + dependencies: + "@jest/test-result" "30.2.0" + "@jest/types" "30.2.0" + "@types/node" "*" + ansi-escapes "^4.3.2" + chalk "^4.1.2" + emittery "^0.13.1" + jest-util "30.2.0" + string-length "^4.0.2" + +jest-worker@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-30.2.0.tgz#fd5c2a36ff6058ec8f74366ec89538cc99539d26" + integrity sha512-0Q4Uk8WF7BUwqXHuAjc23vmopWJw5WH7w2tqBoUOZpOjW/ZnR44GXXd1r82RvnmI2GZge3ivrYXk/BE2+VtW2g== + dependencies: + "@types/node" "*" + "@ungap/structured-clone" "^1.3.0" + jest-util "30.2.0" + merge-stream "^2.0.0" + supports-color "^8.1.1" + +jest@^30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-30.2.0.tgz#9f0a71e734af968f26952b5ae4b724af82681630" + integrity sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A== + dependencies: + "@jest/core" "30.2.0" + "@jest/types" "30.2.0" + import-local "^3.2.0" + jest-cli "30.2.0" + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +keyv@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lru-cache@^10.2.0: + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +napi-postinstall@^0.3.0: + version "0.3.4" + resolved "https://registry.yarnpkg.com/napi-postinstall/-/napi-postinstall-0.3.4.tgz#7af256d6588b5f8e952b9190965d6b019653bbb9" + integrity sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +node-fetch@^1.0.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-releases@^2.0.26: + version "2.0.27" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.5" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2, p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.0.4, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +picomatch@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042" + integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q== + +pirates@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +portable-fetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/portable-fetch/-/portable-fetch-3.0.0.tgz#3cbf4aa6dbc5a5734b41c0419c9273313bfd9ad8" + integrity sha512-2Gl204JKeJSFH3sIboK4iMPPaZI223xfBMHfQMcULTwySt2skWEd5OnYhtciPtHoxGzyaNLkGCalNfivCKxhQQ== + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier@^3.4.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" + integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== + +pretty-format@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-30.2.0.tgz#2d44fe6134529aed18506f6d11509d8a62775ebe" + integrity sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA== + dependencies: + "@jest/schemas" "30.0.5" + ansi-styles "^5.2.0" + react-is "^18.3.1" + +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +pure-rand@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-7.0.1.tgz#6f53a5a9e3e4a47445822af96821ca509ed37566" + integrity sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +react-is@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +reusify@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.7.2: + version "7.7.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" + integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +string-length@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.2.tgz#132875abde678c7ea8d691533f2e7e22bb744dba" + integrity sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA== + dependencies: + ansi-regex "^6.0.1" + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +synckit@^0.11.8: + version "0.11.11" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.11.tgz#c0b619cf258a97faa209155d9cd1699b5c998cb0" + integrity sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw== + dependencies: + "@pkgr/core" "^0.2.9" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +ts-api-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91" + integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ== + +tslib@^2.4.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +typescript-eslint@^8.18.0: + version "8.46.3" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.46.3.tgz#d58b337e4c6083ddef9a06542a03768a0150c564" + integrity sha512-bAfgMavTuGo+8n6/QQDVQz4tZ4f7Soqg53RbrlZQEoAltYop/XR4RAts/I0BrO3TTClTSTFJ0wYbla+P8cEWJA== + dependencies: + "@typescript-eslint/eslint-plugin" "8.46.3" + "@typescript-eslint/parser" "8.46.3" + "@typescript-eslint/typescript-estree" "8.46.3" + "@typescript-eslint/utils" "8.46.3" + +typescript@^5.7.0: + version "5.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" + integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== + +undici-types@~7.16.0: + version "7.16.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46" + integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== + +unrs-resolver@^1.7.11: + version "1.11.1" + resolved "https://registry.yarnpkg.com/unrs-resolver/-/unrs-resolver-1.11.1.tgz#be9cd8686c99ef53ecb96df2a473c64d304048a9" + integrity sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg== + dependencies: + napi-postinstall "^0.3.0" + optionalDependencies: + "@unrs/resolver-binding-android-arm-eabi" "1.11.1" + "@unrs/resolver-binding-android-arm64" "1.11.1" + "@unrs/resolver-binding-darwin-arm64" "1.11.1" + "@unrs/resolver-binding-darwin-x64" "1.11.1" + "@unrs/resolver-binding-freebsd-x64" "1.11.1" + "@unrs/resolver-binding-linux-arm-gnueabihf" "1.11.1" + "@unrs/resolver-binding-linux-arm-musleabihf" "1.11.1" + "@unrs/resolver-binding-linux-arm64-gnu" "1.11.1" + "@unrs/resolver-binding-linux-arm64-musl" "1.11.1" + "@unrs/resolver-binding-linux-ppc64-gnu" "1.11.1" + "@unrs/resolver-binding-linux-riscv64-gnu" "1.11.1" + "@unrs/resolver-binding-linux-riscv64-musl" "1.11.1" + "@unrs/resolver-binding-linux-s390x-gnu" "1.11.1" + "@unrs/resolver-binding-linux-x64-gnu" "1.11.1" + "@unrs/resolver-binding-linux-x64-musl" "1.11.1" + "@unrs/resolver-binding-wasm32-wasi" "1.11.1" + "@unrs/resolver-binding-win32-arm64-msvc" "1.11.1" + "@unrs/resolver-binding-win32-ia32-msvc" "1.11.1" + "@unrs/resolver-binding-win32-x64-msvc" "1.11.1" + +update-browserslist-db@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz#7802aa2ae91477f255b86e0e46dbc787a206ad4a" + integrity sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.1" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +v8-to-istanbul@^9.0.1: + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +whatwg-fetch@>=0.10.0: + version "3.6.20" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz#580ce6d791facec91d37c72890995a0b48d31c70" + integrity sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg== + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" + integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^4.0.1" + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 775f387183fa85b01560b3191358afa4591868d6 Mon Sep 17 00:00:00 2001 From: mshriver Date: Wed, 5 Nov 2025 09:20:33 +0100 Subject: [PATCH 08/13] Update package scope and publishing Move to an unscoped package, ibutsu-client-ts This will differentiate from the existing javascript release in the ibutsu org --- .github/workflows/npm-publish.yml | 43 +------------------------------ package.json | 2 +- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 5124d51..d680f78 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,4 +1,4 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# This workflow will run tests using node and then publish a package to NPM when a release is created # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages name: Node.js Package @@ -8,30 +8,6 @@ on: types: [created] jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: 'yarn' - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Install pre-commit - run: pip install pre-commit - - - name: Run pre-commit - run: pre-commit run --all-files build: runs-on: ubuntu-latest @@ -57,20 +33,3 @@ jobs: - run: yarn install --frozen-lockfile - run: yarn build - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 22 - registry-url: https://npm.pkg.github.com/ - - run: yarn install --frozen-lockfile - - run: yarn build - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package.json b/package.json index 75dd0af..c114d8c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@ibutsu/client", + "name": "ibutsu-client-ts", "version": "1.0.1", "description": "A TypeScript client for the Ibutsu API", "license": "MIT", From 6362d944e28c0a0b84c363642266819554b3f921 Mon Sep 17 00:00:00 2001 From: mshriver Date: Wed, 5 Nov 2025 09:26:13 +0100 Subject: [PATCH 09/13] Docker/Podman for regenerate, remove VERSION --- .gitignore | 3 +++ .openapi-generator/VERSION | 1 - regenerate-client.sh | 18 ++++++++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 .openapi-generator/VERSION diff --git a/.gitignore b/.gitignore index 59cb1dc..045231f 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,9 @@ tmp/ temp/ *.tmp +# OpenAPI Generator +.openapi-generator/ + # IDE .vscode/ .idea/ diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION deleted file mode 100644 index f77856a..0000000 --- a/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.1 diff --git a/regenerate-client.sh b/regenerate-client.sh index 389126c..9213e1b 100755 --- a/regenerate-client.sh +++ b/regenerate-client.sh @@ -48,11 +48,17 @@ get_versions() { # Check dependencies function check_dependencies() { - if ! command -v podman >/dev/null 2>&1; then - echo "Error: Podman is required for consistent OpenAPI generation" + if command -v podman >/dev/null 2>&1; then + CONTAINER_CMD="podman" + elif command -v docker >/dev/null 2>&1; then + CONTAINER_CMD="docker" + else + echo "Error: Either Podman or Docker is required for consistent OpenAPI generation" echo "Please install Podman from https://podman.io/getting-started/installation" + echo "Or install Docker from https://docs.docker.com/get-docker/" exit 1 fi + echo "Using container runtime: ${CONTAINER_CMD}" } function print_usage() { @@ -67,7 +73,7 @@ function print_usage() { echo "uncommitted changes in the working tree after running formatting." echo "" echo "Requirements:" - echo " - Podman (for consistent OpenAPI generation)" + echo " - Podman or Docker (for consistent OpenAPI generation)" echo " - Node.js (required for version management)" } @@ -123,11 +129,11 @@ if [[ ! $OPENAPI_FILE == http* ]] && [[ ! -f "$OPENAPI_FILE" ]]; then exit 1 fi -# Generate the client using Podman +# Generate the client using container runtime echo "Generating client with OpenAPI Generator v${OPENAPI_GENERATOR_VERSION}..." mkdir -p "$(dirname "${TEMP_DIR}")" -podman run --rm \ +${CONTAINER_CMD} run --rm \ -v "${CLIENT_DIR}:/local:Z" \ "openapitools/openapi-generator-cli:v${OPENAPI_GENERATOR_VERSION}" \ generate \ @@ -135,7 +141,7 @@ podman run --rm \ -g typescript-fetch \ -o "/local/tmp/client" \ --global-property skipFormModel=true \ - -p npmName=@ibutsu/client \ + -p npmName=ibutsu-client-ts \ -p npmVersion="${NEW_VERSION}" \ -p npmRepository=https://github.com/ibutsu/ibutsu-client-javascript \ -p supportsES6=true \ From 43e82dfecf3d97c543ad8686310ebae0dbc769c0 Mon Sep 17 00:00:00 2001 From: mshriver Date: Wed, 5 Nov 2025 10:21:21 +0100 Subject: [PATCH 10/13] Updated eslint/prettier rules, applied relaxed rules specifically for generated code, but some strict rules still applied and auto-fixed in generated code --- eslint.config.mjs | 204 +++++++++++++++++++++++++- src/apis/AdminProjectManagementApi.ts | 1 - src/apis/AdminUserManagementApi.ts | 1 - src/apis/ArtifactApi.ts | 1 - src/apis/DashboardApi.ts | 1 - src/apis/GroupApi.ts | 1 - src/apis/HealthApi.ts | 1 - src/apis/ImportApi.ts | 1 - src/apis/LoginApi.ts | 1 - src/apis/ProjectApi.ts | 1 - src/apis/ResultApi.ts | 1 - src/apis/RunApi.ts | 1 - src/apis/TaskApi.ts | 6 +- src/apis/UserApi.ts | 1 - src/apis/WidgetApi.ts | 1 - src/apis/WidgetConfigApi.ts | 1 - src/apis/index.ts | 2 - src/index.ts | 2 - src/models/AccountRecovery.ts | 1 - src/models/AccountRegistration.ts | 1 - src/models/AccountReset.ts | 1 - src/models/Artifact.ts | 1 - src/models/ArtifactList.ts | 1 - src/models/CreateToken.ts | 1 - src/models/Credentials.ts | 1 - src/models/Dashboard.ts | 1 - src/models/DashboardList.ts | 1 - src/models/Group.ts | 1 - src/models/GroupList.ts | 1 - src/models/Health.ts | 1 - src/models/HealthInfo.ts | 1 - src/models/Import.ts | 1 - src/models/LoginConfig.ts | 1 - src/models/LoginError.ts | 1 - src/models/LoginSupport.ts | 1 - src/models/LoginToken.ts | 1 - src/models/Pagination.ts | 1 - src/models/Project.ts | 1 - src/models/ProjectList.ts | 1 - src/models/Result.ts | 1 - src/models/ResultList.ts | 1 - src/models/Run.ts | 1 - src/models/RunList.ts | 1 - src/models/Token.ts | 1 - src/models/TokenList.ts | 1 - src/models/UpdateRun.ts | 1 - src/models/User.ts | 1 - src/models/UserList.ts | 1 - src/models/WidgetConfig.ts | 1 - src/models/WidgetConfigList.ts | 1 - src/models/WidgetParam.ts | 1 - src/models/WidgetType.ts | 1 - src/models/WidgetTypeList.ts | 1 - src/models/index.ts | 2 - src/runtime.ts | 1 - 55 files changed, 201 insertions(+), 65 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 6c20ca7..62e0021 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -6,9 +6,13 @@ export default tseslint.config( { ignores: ['dist/', 'node_modules/', '**/*.js', '**/*.d.ts'], }, + // Base ESLint recommended rules eslint.configs.recommended, + // TypeScript ESLint recommended rules ...tseslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, + ...tseslint.configs.strict, + ...tseslint.configs.stylistic, { languageOptions: { parserOptions: { @@ -17,17 +21,207 @@ export default tseslint.config( }, }, rules: { + // =========================== + // TypeScript-Specific Rules + // =========================== + + // Enforce explicit types where beneficial + '@typescript-eslint/explicit-function-return-type': [ + 'warn', + { + allowExpressions: true, + allowTypedFunctionExpressions: true, + allowHigherOrderFunctions: true, + allowDirectConstAssertionInArrowFunctions: true, + }, + ], + '@typescript-eslint/explicit-module-boundary-types': [ + 'warn', + { + allowArgumentsExplicitlyTypedAsAny: false, + allowDirectConstAssertionInArrowFunctions: true, + allowHigherOrderFunctions: true, + allowTypedFunctionExpressions: true, + }, + ], + '@typescript-eslint/typedef': [ + 'warn', + { + arrayDestructuring: false, + arrowParameter: false, + memberVariableDeclaration: true, + objectDestructuring: false, + parameter: true, + propertyDeclaration: true, + variableDeclaration: false, + variableDeclarationIgnoreFunction: true, + }, + ], + + // Type safety + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', + '@typescript-eslint/no-unsafe-assignment': 'error', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-member-access': 'error', + '@typescript-eslint/no-unsafe-return': 'error', + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowNumber: true, + allowBoolean: true, + allowAny: false, + allowNullish: false, + allowRegExp: false, + }, + ], + '@typescript-eslint/strict-boolean-expressions': [ + 'warn', + { + allowString: false, + allowNumber: false, + allowNullableObject: false, + allowNullableBoolean: true, + allowNullableString: false, + allowNullableNumber: false, + allowAny: false, + }, + ], + + // Array and type preferences + '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], + '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], + '@typescript-eslint/consistent-type-imports': [ + 'error', + { + prefer: 'type-imports', + fixStyle: 'separate-type-imports', + }, + ], + '@typescript-eslint/consistent-type-exports': [ + 'error', + { + fixMixedExportsWithInlineTypeSpecifier: true, + }, + ], + + // Async/Promise handling + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-misused-promises': 'error', + '@typescript-eslint/promise-function-async': 'error', + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/no-confusing-void-expression': [ + 'error', + { + ignoreArrowShorthand: true, + }, + ], + + // Function and method rules + '@typescript-eslint/prefer-readonly': 'error', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/no-unnecessary-condition': 'warn', + '@typescript-eslint/prefer-nullish-coalescing': 'warn', + '@typescript-eslint/prefer-optional-chain': 'error', + '@typescript-eslint/prefer-reduce-type-parameter': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + + // Code quality + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + '@typescript-eslint/no-redundant-type-constituents': 'warn', + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + '@typescript-eslint/prefer-as-const': 'error', + + // Naming conventions + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: 'default', + format: ['camelCase'], + leadingUnderscore: 'allow', + trailingUnderscore: 'forbid', + }, + { + selector: 'variable', + format: ['camelCase', 'UPPER_CASE'], + leadingUnderscore: 'allow', + }, + { + selector: 'typeLike', + format: ['PascalCase'], + }, + { + selector: 'enumMember', + format: ['PascalCase', 'UPPER_CASE'], + }, + { + selector: 'property', + format: null, // Allow any format for properties (for API compatibility) + }, + { + selector: 'method', + format: ['camelCase'], + }, + ], + + // =========================== + // General ESLint Rules + // =========================== + + // Best practices + 'no-console': ['warn', { allow: ['warn', 'error'] }], + 'no-debugger': 'error', + 'no-alert': 'error', + 'no-var': 'error', + 'prefer-const': 'error', + 'prefer-arrow-callback': 'error', + 'prefer-template': 'error', + 'prefer-rest-params': 'error', + 'prefer-spread': 'error', + 'no-duplicate-imports': 'error', + eqeqeq: ['error', 'always', { null: 'ignore' }], + curly: ['error', 'all'], + 'no-eval': 'error', + 'no-implied-eval': 'error', + 'no-new-func': 'error', + 'no-return-await': 'off', // Disabled in favor of @typescript-eslint/return-await + '@typescript-eslint/return-await': ['error', 'in-try-catch'], + + // Code style (enforced by Prettier, but good to have as backup) + 'object-shorthand': ['error', 'always'], + 'quote-props': ['error', 'as-needed'], + }, + }, + // Special rules for auto-generated code + { + files: ['src/apis/**/*.ts', 'src/models/**/*.ts', 'src/runtime.ts'], + rules: { + // Relax some strict rules for auto-generated OpenAPI code '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], - '@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/restrict-template-expressions': 'off', - '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/strict-boolean-expressions': 'off', + '@typescript-eslint/no-unnecessary-condition': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/typedef': 'off', + '@typescript-eslint/naming-convention': 'off', + '@typescript-eslint/prefer-nullish-coalescing': 'off', + '@typescript-eslint/prefer-optional-chain': 'off', }, }, + // Prettier must be last to override any conflicting formatting rules eslintConfigPrettier ); diff --git a/src/apis/AdminProjectManagementApi.ts b/src/apis/AdminProjectManagementApi.ts index 0c733c1..cd932f5 100644 --- a/src/apis/AdminProjectManagementApi.ts +++ b/src/apis/AdminProjectManagementApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/AdminUserManagementApi.ts b/src/apis/AdminUserManagementApi.ts index 1531f02..7bd3823 100644 --- a/src/apis/AdminUserManagementApi.ts +++ b/src/apis/AdminUserManagementApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/ArtifactApi.ts b/src/apis/ArtifactApi.ts index 82a5502..a56d443 100644 --- a/src/apis/ArtifactApi.ts +++ b/src/apis/ArtifactApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/DashboardApi.ts b/src/apis/DashboardApi.ts index d0728aa..47528e5 100644 --- a/src/apis/DashboardApi.ts +++ b/src/apis/DashboardApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/GroupApi.ts b/src/apis/GroupApi.ts index 92b7104..04e8cca 100644 --- a/src/apis/GroupApi.ts +++ b/src/apis/GroupApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/HealthApi.ts b/src/apis/HealthApi.ts index 0583641..87c33e5 100644 --- a/src/apis/HealthApi.ts +++ b/src/apis/HealthApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/ImportApi.ts b/src/apis/ImportApi.ts index 17db31c..1cfcc1b 100644 --- a/src/apis/ImportApi.ts +++ b/src/apis/ImportApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/LoginApi.ts b/src/apis/LoginApi.ts index 7194c43..12f001b 100644 --- a/src/apis/LoginApi.ts +++ b/src/apis/LoginApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/ProjectApi.ts b/src/apis/ProjectApi.ts index 2d14363..7dc23bd 100644 --- a/src/apis/ProjectApi.ts +++ b/src/apis/ProjectApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/ResultApi.ts b/src/apis/ResultApi.ts index 5ea2892..aa18402 100644 --- a/src/apis/ResultApi.ts +++ b/src/apis/ResultApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/RunApi.ts b/src/apis/RunApi.ts index ee34703..6fb925b 100644 --- a/src/apis/RunApi.ts +++ b/src/apis/RunApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/TaskApi.ts b/src/apis/TaskApi.ts index 88669ad..05982d4 100644 --- a/src/apis/TaskApi.ts +++ b/src/apis/TaskApi.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ - /** * Ibutsu API * A system to store and query test results @@ -69,7 +67,7 @@ export class TaskApi extends runtime.BaseAPI implements TaskApiInterface { const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { + if (this.configuration?.accessToken) { const token = this.configuration.accessToken; const tokenString = await token('jwt', []); @@ -102,6 +100,6 @@ export class TaskApi extends runtime.BaseAPI implements TaskApiInterface { initOverrides?: RequestInit | runtime.InitOverrideFunction ): Promise { const response = await this.getTaskRaw(requestParameters, initOverrides); - return await response.value(); + return response.value(); } } diff --git a/src/apis/UserApi.ts b/src/apis/UserApi.ts index 4aada00..17bd46d 100644 --- a/src/apis/UserApi.ts +++ b/src/apis/UserApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/WidgetApi.ts b/src/apis/WidgetApi.ts index f59bf4a..c12a40b 100644 --- a/src/apis/WidgetApi.ts +++ b/src/apis/WidgetApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/WidgetConfigApi.ts b/src/apis/WidgetConfigApi.ts index 830b5eb..2bf77a4 100644 --- a/src/apis/WidgetConfigApi.ts +++ b/src/apis/WidgetConfigApi.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/apis/index.ts b/src/apis/index.ts index c4935a9..b2bde58 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ - export * from './AdminProjectManagementApi'; export * from './AdminUserManagementApi'; export * from './ArtifactApi'; diff --git a/src/index.ts b/src/index.ts index bebe8bb..f6e3226 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ -/* eslint-disable */ export * from './runtime'; export * from './apis/index'; export * from './models/index'; diff --git a/src/models/AccountRecovery.ts b/src/models/AccountRecovery.ts index 6dc3934..a02c035 100644 --- a/src/models/AccountRecovery.ts +++ b/src/models/AccountRecovery.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/AccountRegistration.ts b/src/models/AccountRegistration.ts index 27400ac..a315a6c 100644 --- a/src/models/AccountRegistration.ts +++ b/src/models/AccountRegistration.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/AccountReset.ts b/src/models/AccountReset.ts index d2d4a09..92758a3 100644 --- a/src/models/AccountReset.ts +++ b/src/models/AccountReset.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Artifact.ts b/src/models/Artifact.ts index 339b6df..cdf5c85 100644 --- a/src/models/Artifact.ts +++ b/src/models/Artifact.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/ArtifactList.ts b/src/models/ArtifactList.ts index 424e01b..be23ccf 100644 --- a/src/models/ArtifactList.ts +++ b/src/models/ArtifactList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/CreateToken.ts b/src/models/CreateToken.ts index 443a2b9..774b9c3 100644 --- a/src/models/CreateToken.ts +++ b/src/models/CreateToken.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Credentials.ts b/src/models/Credentials.ts index e675605..0a2ee13 100644 --- a/src/models/Credentials.ts +++ b/src/models/Credentials.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Dashboard.ts b/src/models/Dashboard.ts index 437e3f8..c2f855e 100644 --- a/src/models/Dashboard.ts +++ b/src/models/Dashboard.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/DashboardList.ts b/src/models/DashboardList.ts index 5838cf0..016cbfc 100644 --- a/src/models/DashboardList.ts +++ b/src/models/DashboardList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Group.ts b/src/models/Group.ts index 56e4b7a..aa9caa8 100644 --- a/src/models/Group.ts +++ b/src/models/Group.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/GroupList.ts b/src/models/GroupList.ts index 4f35b8b..ebcc5ee 100644 --- a/src/models/GroupList.ts +++ b/src/models/GroupList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Health.ts b/src/models/Health.ts index 78ffd2a..d84bbcc 100644 --- a/src/models/Health.ts +++ b/src/models/Health.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/HealthInfo.ts b/src/models/HealthInfo.ts index ba596e3..90d6e9f 100644 --- a/src/models/HealthInfo.ts +++ b/src/models/HealthInfo.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Import.ts b/src/models/Import.ts index 3329011..482c061 100644 --- a/src/models/Import.ts +++ b/src/models/Import.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/LoginConfig.ts b/src/models/LoginConfig.ts index b2a6ccf..0780be3 100644 --- a/src/models/LoginConfig.ts +++ b/src/models/LoginConfig.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/LoginError.ts b/src/models/LoginError.ts index d51bf91..e1eb394 100644 --- a/src/models/LoginError.ts +++ b/src/models/LoginError.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/LoginSupport.ts b/src/models/LoginSupport.ts index b4e09d1..cd2556b 100644 --- a/src/models/LoginSupport.ts +++ b/src/models/LoginSupport.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/LoginToken.ts b/src/models/LoginToken.ts index 92fd3a9..729e21c 100644 --- a/src/models/LoginToken.ts +++ b/src/models/LoginToken.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Pagination.ts b/src/models/Pagination.ts index 03a25da..3d233ca 100644 --- a/src/models/Pagination.ts +++ b/src/models/Pagination.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Project.ts b/src/models/Project.ts index ff5cc52..e5298b1 100644 --- a/src/models/Project.ts +++ b/src/models/Project.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/ProjectList.ts b/src/models/ProjectList.ts index 57b0af5..d11579d 100644 --- a/src/models/ProjectList.ts +++ b/src/models/ProjectList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Result.ts b/src/models/Result.ts index 5a13b97..a29a85e 100644 --- a/src/models/Result.ts +++ b/src/models/Result.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/ResultList.ts b/src/models/ResultList.ts index f98b46c..7aa30c8 100644 --- a/src/models/ResultList.ts +++ b/src/models/ResultList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Run.ts b/src/models/Run.ts index e0b3835..1bbb9e2 100644 --- a/src/models/Run.ts +++ b/src/models/Run.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/RunList.ts b/src/models/RunList.ts index 9cb5621..1fbd858 100644 --- a/src/models/RunList.ts +++ b/src/models/RunList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/Token.ts b/src/models/Token.ts index d35728c..5e27cb2 100644 --- a/src/models/Token.ts +++ b/src/models/Token.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/TokenList.ts b/src/models/TokenList.ts index b4ca826..2c1d05e 100644 --- a/src/models/TokenList.ts +++ b/src/models/TokenList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/UpdateRun.ts b/src/models/UpdateRun.ts index d105cad..3ed1467 100644 --- a/src/models/UpdateRun.ts +++ b/src/models/UpdateRun.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/User.ts b/src/models/User.ts index 691991c..7131dd2 100644 --- a/src/models/User.ts +++ b/src/models/User.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/UserList.ts b/src/models/UserList.ts index 9c254b5..6082bee 100644 --- a/src/models/UserList.ts +++ b/src/models/UserList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/WidgetConfig.ts b/src/models/WidgetConfig.ts index 33fcd7a..e05c1de 100644 --- a/src/models/WidgetConfig.ts +++ b/src/models/WidgetConfig.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/WidgetConfigList.ts b/src/models/WidgetConfigList.ts index b39100d..33d3db1 100644 --- a/src/models/WidgetConfigList.ts +++ b/src/models/WidgetConfigList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/WidgetParam.ts b/src/models/WidgetParam.ts index bb4e1f9..ad627b8 100644 --- a/src/models/WidgetParam.ts +++ b/src/models/WidgetParam.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/WidgetType.ts b/src/models/WidgetType.ts index 29a3a2f..02ad192 100644 --- a/src/models/WidgetType.ts +++ b/src/models/WidgetType.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/WidgetTypeList.ts b/src/models/WidgetTypeList.ts index 7d9c12d..7ded0a7 100644 --- a/src/models/WidgetTypeList.ts +++ b/src/models/WidgetTypeList.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API diff --git a/src/models/index.ts b/src/models/index.ts index 866b674..9d75958 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ - export * from './AccountRecovery'; export * from './AccountRegistration'; export * from './AccountReset'; diff --git a/src/runtime.ts b/src/runtime.ts index 343dc8b..f501d9a 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -1,4 +1,3 @@ -/* tslint:disable */ /* eslint-disable */ /** * Ibutsu API From b24ef57e127cc6b8d4ee037311d197d86c6385fa Mon Sep 17 00:00:00 2001 From: mshriver Date: Wed, 5 Nov 2025 11:02:02 +0100 Subject: [PATCH 11/13] Update tsconfig for cjs and esm outputs --- package.json | 20 ++++++++++++++------ tsconfig.esm.json | 6 +++--- tsconfig.json | 8 ++++---- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index c114d8c..e712365 100644 --- a/package.json +++ b/package.json @@ -3,20 +3,28 @@ "version": "1.0.1", "description": "A TypeScript client for the Ibutsu API", "license": "MIT", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", + "main": "dist/cjs/index.js", + "module": "dist/esm/index.js", + "types": "dist/cjs/index.d.ts", "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/cjs/index.d.ts", + "default": "./dist/cjs/index.js" + } } }, "scripts": { "build": "tsc && tsc -p tsconfig.esm.json", "prepack": "yarn build", "test": "jest", + "integration:build": "tsc -p tsconfig.integration.json", + "integration:run": "node dist/integration/integration-test.js", + "integration": "yarn build && yarn integration:build && yarn integration:run", "lint": "yarn lint:eslint && yarn format:check", "lint:eslint": "eslint src/**/*.ts", "lint:fix": "eslint --fix src/**/*.ts && yarn format", diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 837bcaa..ff6b16b 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -2,9 +2,9 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "esnext", - "outDir": "./dist", - "declaration": false, - "declarationMap": false + "outDir": "./dist/esm", + "declaration": true, + "declarationMap": true }, "exclude": [ "node_modules", diff --git a/tsconfig.json b/tsconfig.json index 0868e05..d25805c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,11 +2,11 @@ "compilerOptions": { "target": "ES2020", "module": "commonjs", - "lib": ["ES2020"], + "lib": ["ES2020", "DOM"], "declaration": true, "declarationMap": true, "sourceMap": true, - "outDir": "./dist", + "outDir": "./dist/cjs", "rootDir": "./src", "removeComments": true, "strict": true, @@ -17,8 +17,8 @@ "strictPropertyInitialization": true, "noImplicitThis": true, "alwaysStrict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, + "noUnusedLocals": false, + "noUnusedParameters": false, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "esModuleInterop": true, From 46d171efa7295eba908d055964e2bba0b812397c Mon Sep 17 00:00:00 2001 From: mshriver Date: Wed, 5 Nov 2025 14:00:36 +0100 Subject: [PATCH 12/13] Add integration test to run against real server --- .gitignore | 3 + .nvmrc | 1 + README.md | 219 ++++++++++++++---------- integration-test.ts | 346 ++++++++++++++++++++++++++++++++++++++ integration.env.example | 14 ++ package.json | 6 +- src/apis/ArtifactApi.ts | 1 + src/apis/ImportApi.ts | 1 + src/runtime.ts | 9 + tsconfig.integration.json | 16 ++ 10 files changed, 521 insertions(+), 95 deletions(-) create mode 100644 .nvmrc create mode 100644 integration-test.ts create mode 100644 integration.env.example create mode 100644 tsconfig.integration.json diff --git a/.gitignore b/.gitignore index 045231f..34f9f14 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ dist/ *.js.map *.d.ts.map +# Integration test compiled output +integration-test.js + # Logs *.log npm-debug.log* diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 diff --git a/README.md b/README.md index f3911ff..ceba5c6 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,13 @@ then install it via: The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following the above steps with Node.js and installing browserify with `npm install -g browserify`, -perform the following (assuming *main.js* is your entry file): +perform the following (assuming _main.js_ is your entry file): ```shell browserify main.js > bundle.js ``` -Then include *bundle.js* in the HTML pages. +Then include _bundle.js_ in the HTML pages. ### Webpack Configuration @@ -86,116 +86,153 @@ module: { rules: [ { parser: { - amd: false - } - } - ] + amd: false, + }, + }, + ]; } ``` -## Getting Started +## Integration Tests -Please follow the [installation](#installation) instruction and execute the following JS code: +This project includes integration tests that validate the client against a real, running Ibutsu server. -```javascript -var ibutsu = require('@ibutsu/client'); +**Features:** +- Uses native Node.js fetch (no external dependencies) +- Tests health, result, run, and project endpoints +- Handles SSL certificate issues in corporate environments +- Reports HTTP status codes for all errors +- Color-coded output for easy debugging + +Quick start: +```bash +# Set Node version +nvm use 22 -var api = new ibutsu.ArtifactApi() -var id = "id_example"; // {String} ID of artifact to delete -api.deleteArtifact(id).then(function() { - console.log('API called successfully.'); -}, function(error) { - console.error(error); -}); +# Set environment variables +export IBUTSU_API="https://your-ibutsu-server.com/api" +export IBUTSU_TOKEN="your-authentication-token" +# For corporate environments with SSL issues: +export NODE_TLS_REJECT_UNAUTHORIZED=0 +# Run integration tests +yarn integration ``` -## Documentation for API Endpoints +Alternatively, you can copy and edit the environment file to manage your credentials: -All URIs are relative to *http://localhost/api* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ibutsu.ArtifactApi* | [**deleteArtifact**](docs/ArtifactApi.md#deleteArtifact) | **DELETE** /artifact/{id} | Delete an artifact -*ibutsu.ArtifactApi* | [**downloadArtifact**](docs/ArtifactApi.md#downloadArtifact) | **GET** /artifact/{id}/download | Download an artifact -*ibutsu.ArtifactApi* | [**getArtifact**](docs/ArtifactApi.md#getArtifact) | **GET** /artifact/{id} | Get a single artifact -*ibutsu.ArtifactApi* | [**getArtifactList**](docs/ArtifactApi.md#getArtifactList) | **GET** /artifact | Get a (filtered) list of artifacts -*ibutsu.ArtifactApi* | [**uploadArtifact**](docs/ArtifactApi.md#uploadArtifact) | **POST** /artifact | Uploads a test run artifact -*ibutsu.ArtifactApi* | [**viewArtifact**](docs/ArtifactApi.md#viewArtifact) | **GET** /artifact/{id}/view | Stream an artifact directly to the client/browser -*ibutsu.GroupApi* | [**addGroup**](docs/GroupApi.md#addGroup) | **POST** /group | Create a new group -*ibutsu.GroupApi* | [**getGroup**](docs/GroupApi.md#getGroup) | **GET** /group/{id} | Get a group -*ibutsu.GroupApi* | [**getGroupList**](docs/GroupApi.md#getGroupList) | **GET** /group | Get a list of groups -*ibutsu.GroupApi* | [**updateGroup**](docs/GroupApi.md#updateGroup) | **PUT** /group/{id} | Update a group -*ibutsu.HealthApi* | [**getDatabaseHealth**](docs/HealthApi.md#getDatabaseHealth) | **GET** /health/database | Get a health report for the database -*ibutsu.HealthApi* | [**getHealth**](docs/HealthApi.md#getHealth) | **GET** /health | Get a general health report -*ibutsu.HealthApi* | [**getHealthInfo**](docs/HealthApi.md#getHealthInfo) | **GET** /health/info | Get information about the server -*ibutsu.ImportApi* | [**addImport**](docs/ImportApi.md#addImport) | **POST** /import | Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive -*ibutsu.ImportApi* | [**getImport**](docs/ImportApi.md#getImport) | **GET** /import/{id} | Get the status of an import -*ibutsu.ProjectApi* | [**addProject**](docs/ProjectApi.md#addProject) | **POST** /project | Create a project -*ibutsu.ProjectApi* | [**getProject**](docs/ProjectApi.md#getProject) | **GET** /project/{id} | Get a single project by ID -*ibutsu.ProjectApi* | [**getProjectList**](docs/ProjectApi.md#getProjectList) | **GET** /project | Get a list of projects -*ibutsu.ProjectApi* | [**updateProject**](docs/ProjectApi.md#updateProject) | **PUT** /project/{id} | Update a project -*ibutsu.ReportApi* | [**addReport**](docs/ReportApi.md#addReport) | **POST** /report | Create a new report -*ibutsu.ReportApi* | [**deleteReport**](docs/ReportApi.md#deleteReport) | **DELETE** /report/{id} | Delete a report -*ibutsu.ReportApi* | [**downloadReport**](docs/ReportApi.md#downloadReport) | **GET** /report/{id}/download/{filename} | Download a report -*ibutsu.ReportApi* | [**getReport**](docs/ReportApi.md#getReport) | **GET** /report/{id} | Get a report -*ibutsu.ReportApi* | [**getReportList**](docs/ReportApi.md#getReportList) | **GET** /report | Get a list of reports -*ibutsu.ReportApi* | [**getReportTypes**](docs/ReportApi.md#getReportTypes) | **GET** /report/types | Get a list of report types -*ibutsu.ReportApi* | [**viewReport**](docs/ReportApi.md#viewReport) | **GET** /report/{id}/view/{filename} | View a report -*ibutsu.ResultApi* | [**addResult**](docs/ResultApi.md#addResult) | **POST** /result | Create a test result -*ibutsu.ResultApi* | [**getResult**](docs/ResultApi.md#getResult) | **GET** /result/{id} | Get a single result -*ibutsu.ResultApi* | [**getResultList**](docs/ResultApi.md#getResultList) | **GET** /result | Get the list of results. -*ibutsu.ResultApi* | [**updateResult**](docs/ResultApi.md#updateResult) | **PUT** /result/{id} | Updates a single result -*ibutsu.RunApi* | [**addRun**](docs/RunApi.md#addRun) | **POST** /run | Create a run -*ibutsu.RunApi* | [**getRun**](docs/RunApi.md#getRun) | **GET** /run/{id} | Get a single run by ID -*ibutsu.RunApi* | [**getRunList**](docs/RunApi.md#getRunList) | **GET** /run | Get a list of the test runs -*ibutsu.RunApi* | [**updateRun**](docs/RunApi.md#updateRun) | **PUT** /run/{id} | Update a single run -*ibutsu.WidgetApi* | [**getWidget**](docs/WidgetApi.md#getWidget) | **GET** /widget/{id} | Generate data for a dashboard widget -*ibutsu.WidgetApi* | [**getWidgetTypes**](docs/WidgetApi.md#getWidgetTypes) | **GET** /widget/types | Get a list of widget types -*ibutsu.WidgetConfigApi* | [**addWidgetConfig**](docs/WidgetConfigApi.md#addWidgetConfig) | **POST** /widget-config | Create a widget configuration -*ibutsu.WidgetConfigApi* | [**deleteWidgetConfig**](docs/WidgetConfigApi.md#deleteWidgetConfig) | **DELETE** /widget-config/{id} | Delete a widget configuration -*ibutsu.WidgetConfigApi* | [**getWidgetConfig**](docs/WidgetConfigApi.md#getWidgetConfig) | **GET** /widget-config/{id} | Get a single widget configuration -*ibutsu.WidgetConfigApi* | [**getWidgetConfigList**](docs/WidgetConfigApi.md#getWidgetConfigList) | **GET** /widget-config | Get the list of widget configurations -*ibutsu.WidgetConfigApi* | [**updateWidgetConfig**](docs/WidgetConfigApi.md#updateWidgetConfig) | **PUT** /widget-config/{id} | Updates a single widget configuration +```bash +# Copy and edit the environment file +cp integration.env.example integration.env +nano integration.env +# Source the environment +source integration.env -## Documentation for Models +# Run tests +yarn integration +``` - - [ibutsu.Artifact](docs/Artifact.md) - - [ibutsu.ArtifactList](docs/ArtifactList.md) - - [ibutsu.Group](docs/Group.md) - - [ibutsu.GroupList](docs/GroupList.md) - - [ibutsu.Health](docs/Health.md) - - [ibutsu.HealthInfo](docs/HealthInfo.md) - - [ibutsu.InlineObject](docs/InlineObject.md) - - [ibutsu.InlineObject1](docs/InlineObject1.md) - - [ibutsu.InlineResponse200](docs/InlineResponse200.md) - - [ibutsu.ModelImport](docs/ModelImport.md) - - [ibutsu.Pagination](docs/Pagination.md) - - [ibutsu.Project](docs/Project.md) - - [ibutsu.ProjectList](docs/ProjectList.md) - - [ibutsu.Report](docs/Report.md) - - [ibutsu.ReportList](docs/ReportList.md) - - [ibutsu.ReportParameters](docs/ReportParameters.md) - - [ibutsu.Result](docs/Result.md) - - [ibutsu.ResultList](docs/ResultList.md) - - [ibutsu.Run](docs/Run.md) - - [ibutsu.RunList](docs/RunList.md) - - [ibutsu.WidgetConfig](docs/WidgetConfig.md) - - [ibutsu.WidgetConfigList](docs/WidgetConfigList.md) - - [ibutsu.WidgetParam](docs/WidgetParam.md) - - [ibutsu.WidgetType](docs/WidgetType.md) - - [ibutsu.WidgetTypeList](docs/WidgetTypeList.md) +## Getting Started +Please follow the [installation](#installation) instruction and execute the following JS code: -## Documentation for Authorization +```javascript +var ibutsu = require('@ibutsu/client'); +var api = new ibutsu.ArtifactApi(); +var id = 'id_example'; // {String} ID of artifact to delete +api.deleteArtifact(id).then( + function () { + console.log('API called successfully.'); + }, + function (error) { + console.error(error); + } +); +``` +## Documentation for API Endpoints -### api_key +All URIs are relative to _http://localhost/api_ + +| Class | Method | HTTP request | Description | +| ------------------------ | ---------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------ | +| _ibutsu.ArtifactApi_ | [**deleteArtifact**](docs/ArtifactApi.md#deleteArtifact) | **DELETE** /artifact/{id} | Delete an artifact | +| _ibutsu.ArtifactApi_ | [**downloadArtifact**](docs/ArtifactApi.md#downloadArtifact) | **GET** /artifact/{id}/download | Download an artifact | +| _ibutsu.ArtifactApi_ | [**getArtifact**](docs/ArtifactApi.md#getArtifact) | **GET** /artifact/{id} | Get a single artifact | +| _ibutsu.ArtifactApi_ | [**getArtifactList**](docs/ArtifactApi.md#getArtifactList) | **GET** /artifact | Get a (filtered) list of artifacts | +| _ibutsu.ArtifactApi_ | [**uploadArtifact**](docs/ArtifactApi.md#uploadArtifact) | **POST** /artifact | Uploads a test run artifact | +| _ibutsu.ArtifactApi_ | [**viewArtifact**](docs/ArtifactApi.md#viewArtifact) | **GET** /artifact/{id}/view | Stream an artifact directly to the client/browser | +| _ibutsu.GroupApi_ | [**addGroup**](docs/GroupApi.md#addGroup) | **POST** /group | Create a new group | +| _ibutsu.GroupApi_ | [**getGroup**](docs/GroupApi.md#getGroup) | **GET** /group/{id} | Get a group | +| _ibutsu.GroupApi_ | [**getGroupList**](docs/GroupApi.md#getGroupList) | **GET** /group | Get a list of groups | +| _ibutsu.GroupApi_ | [**updateGroup**](docs/GroupApi.md#updateGroup) | **PUT** /group/{id} | Update a group | +| _ibutsu.HealthApi_ | [**getDatabaseHealth**](docs/HealthApi.md#getDatabaseHealth) | **GET** /health/database | Get a health report for the database | +| _ibutsu.HealthApi_ | [**getHealth**](docs/HealthApi.md#getHealth) | **GET** /health | Get a general health report | +| _ibutsu.HealthApi_ | [**getHealthInfo**](docs/HealthApi.md#getHealthInfo) | **GET** /health/info | Get information about the server | +| _ibutsu.ImportApi_ | [**addImport**](docs/ImportApi.md#addImport) | **POST** /import | Import a file into Ibutsu. This can be either a JUnit XML file, or an Ibutsu archive | +| _ibutsu.ImportApi_ | [**getImport**](docs/ImportApi.md#getImport) | **GET** /import/{id} | Get the status of an import | +| _ibutsu.ProjectApi_ | [**addProject**](docs/ProjectApi.md#addProject) | **POST** /project | Create a project | +| _ibutsu.ProjectApi_ | [**getProject**](docs/ProjectApi.md#getProject) | **GET** /project/{id} | Get a single project by ID | +| _ibutsu.ProjectApi_ | [**getProjectList**](docs/ProjectApi.md#getProjectList) | **GET** /project | Get a list of projects | +| _ibutsu.ProjectApi_ | [**updateProject**](docs/ProjectApi.md#updateProject) | **PUT** /project/{id} | Update a project | +| _ibutsu.ReportApi_ | [**addReport**](docs/ReportApi.md#addReport) | **POST** /report | Create a new report | +| _ibutsu.ReportApi_ | [**deleteReport**](docs/ReportApi.md#deleteReport) | **DELETE** /report/{id} | Delete a report | +| _ibutsu.ReportApi_ | [**downloadReport**](docs/ReportApi.md#downloadReport) | **GET** /report/{id}/download/{filename} | Download a report | +| _ibutsu.ReportApi_ | [**getReport**](docs/ReportApi.md#getReport) | **GET** /report/{id} | Get a report | +| _ibutsu.ReportApi_ | [**getReportList**](docs/ReportApi.md#getReportList) | **GET** /report | Get a list of reports | +| _ibutsu.ReportApi_ | [**getReportTypes**](docs/ReportApi.md#getReportTypes) | **GET** /report/types | Get a list of report types | +| _ibutsu.ReportApi_ | [**viewReport**](docs/ReportApi.md#viewReport) | **GET** /report/{id}/view/{filename} | View a report | +| _ibutsu.ResultApi_ | [**addResult**](docs/ResultApi.md#addResult) | **POST** /result | Create a test result | +| _ibutsu.ResultApi_ | [**getResult**](docs/ResultApi.md#getResult) | **GET** /result/{id} | Get a single result | +| _ibutsu.ResultApi_ | [**getResultList**](docs/ResultApi.md#getResultList) | **GET** /result | Get the list of results. | +| _ibutsu.ResultApi_ | [**updateResult**](docs/ResultApi.md#updateResult) | **PUT** /result/{id} | Updates a single result | +| _ibutsu.RunApi_ | [**addRun**](docs/RunApi.md#addRun) | **POST** /run | Create a run | +| _ibutsu.RunApi_ | [**getRun**](docs/RunApi.md#getRun) | **GET** /run/{id} | Get a single run by ID | +| _ibutsu.RunApi_ | [**getRunList**](docs/RunApi.md#getRunList) | **GET** /run | Get a list of the test runs | +| _ibutsu.RunApi_ | [**updateRun**](docs/RunApi.md#updateRun) | **PUT** /run/{id} | Update a single run | +| _ibutsu.WidgetApi_ | [**getWidget**](docs/WidgetApi.md#getWidget) | **GET** /widget/{id} | Generate data for a dashboard widget | +| _ibutsu.WidgetApi_ | [**getWidgetTypes**](docs/WidgetApi.md#getWidgetTypes) | **GET** /widget/types | Get a list of widget types | +| _ibutsu.WidgetConfigApi_ | [**addWidgetConfig**](docs/WidgetConfigApi.md#addWidgetConfig) | **POST** /widget-config | Create a widget configuration | +| _ibutsu.WidgetConfigApi_ | [**deleteWidgetConfig**](docs/WidgetConfigApi.md#deleteWidgetConfig) | **DELETE** /widget-config/{id} | Delete a widget configuration | +| _ibutsu.WidgetConfigApi_ | [**getWidgetConfig**](docs/WidgetConfigApi.md#getWidgetConfig) | **GET** /widget-config/{id} | Get a single widget configuration | +| _ibutsu.WidgetConfigApi_ | [**getWidgetConfigList**](docs/WidgetConfigApi.md#getWidgetConfigList) | **GET** /widget-config | Get the list of widget configurations | +| _ibutsu.WidgetConfigApi_ | [**updateWidgetConfig**](docs/WidgetConfigApi.md#updateWidgetConfig) | **PUT** /widget-config/{id} | Updates a single widget configuration | +## Documentation for Models + +- [ibutsu.Artifact](docs/Artifact.md) +- [ibutsu.ArtifactList](docs/ArtifactList.md) +- [ibutsu.Group](docs/Group.md) +- [ibutsu.GroupList](docs/GroupList.md) +- [ibutsu.Health](docs/Health.md) +- [ibutsu.HealthInfo](docs/HealthInfo.md) +- [ibutsu.InlineObject](docs/InlineObject.md) +- [ibutsu.InlineObject1](docs/InlineObject1.md) +- [ibutsu.InlineResponse200](docs/InlineResponse200.md) +- [ibutsu.ModelImport](docs/ModelImport.md) +- [ibutsu.Pagination](docs/Pagination.md) +- [ibutsu.Project](docs/Project.md) +- [ibutsu.ProjectList](docs/ProjectList.md) +- [ibutsu.Report](docs/Report.md) +- [ibutsu.ReportList](docs/ReportList.md) +- [ibutsu.ReportParameters](docs/ReportParameters.md) +- [ibutsu.Result](docs/Result.md) +- [ibutsu.ResultList](docs/ResultList.md) +- [ibutsu.Run](docs/Run.md) +- [ibutsu.RunList](docs/RunList.md) +- [ibutsu.WidgetConfig](docs/WidgetConfig.md) +- [ibutsu.WidgetConfigList](docs/WidgetConfigList.md) +- [ibutsu.WidgetParam](docs/WidgetParam.md) +- [ibutsu.WidgetType](docs/WidgetType.md) +- [ibutsu.WidgetTypeList](docs/WidgetTypeList.md) + +## Documentation for Authorization + +### api_key - **Type**: API key - **API key parameter name**: api_key diff --git a/integration-test.ts b/integration-test.ts new file mode 100644 index 0000000..b288040 --- /dev/null +++ b/integration-test.ts @@ -0,0 +1,346 @@ +#!/usr/bin/env node +/** + * Integration Test Script for ibutsu-client-javascript + * + * This script tests the built TypeScript client against a real, running Ibutsu server. + * + * Environment Variables: + * - IBUTSU_API: The base URL for the Ibutsu API endpoint (e.g., https://ibutsu.example.com/api) + * - IBUTSU_TOKEN: A valid authentication token for the Ibutsu server + * - NODE_TLS_REJECT_UNAUTHORIZED: Set to '0' to disable SSL certificate validation (for corporate/testing environments) + */ + +import { Configuration, HealthApi, ResultApi, RunApi, ProjectApi } from './dist/cjs/index.js'; + +// ANSI color codes for output +const colors = { + reset: '\x1b[0m', + green: '\x1b[32m', + red: '\x1b[31m', + yellow: '\x1b[33m', + blue: '\x1b[34m', + cyan: '\x1b[36m', +}; + +function log(message: string, color: string = colors.reset): void { + console.log(`${color}${message}${colors.reset}`); +} + +function logSuccess(message: string): void { + log(`✓ ${message}`, colors.green); +} + +function logError(message: string): void { + log(`✗ ${message}`, colors.red); +} + +function logInfo(message: string): void { + log(`ℹ ${message}`, colors.blue); +} + +function logWarning(message: string): void { + log(`⚠ ${message}`, colors.yellow); +} + +function logSection(title: string): void { + log(`\n${'='.repeat(60)}`, colors.cyan); + log(` ${title}`, colors.cyan); + log(`${'='.repeat(60)}`, colors.cyan); +} + +// Validate environment variables +function validateEnvironment(): { apiUrl: string; token: string } { + logSection('Environment Validation'); + + const apiUrl = process.env.IBUTSU_API; + const token = process.env.IBUTSU_TOKEN; + + if (!apiUrl) { + logError('IBUTSU_API environment variable is not set'); + log( + 'Please set IBUTSU_API to your Ibutsu server API endpoint (e.g., https://ibutsu.example.com/api)' + ); + process.exit(1); + } + + if (!token) { + logError('IBUTSU_TOKEN environment variable is not set'); + log('Please set IBUTSU_TOKEN to a valid authentication token'); + process.exit(1); + } + + logSuccess(`IBUTSU_API: ${apiUrl}`); + logSuccess('IBUTSU_TOKEN: [REDACTED]'); + + return { apiUrl, token }; +} + +// Test health endpoints +async function testHealthEndpoints(healthApi: HealthApi): Promise { + logSection('Health Endpoint Tests'); + let allPassed = true; + + try { + logInfo('Testing GET /health...'); + const health = await healthApi.getHealth(); + const healthStatus = health.status?.toLowerCase(); + if (healthStatus === 'ok') { + logSuccess('General health check passed'); + log(` Status: ${health.status}`); + } else { + logWarning('General health check returned non-ok status'); + log(` Status: ${health.status}`); + allPassed = false; + } + } catch (error) { + logError(`General health check failed: ${error}`); + if (error instanceof Error) { + log(` Error name: ${error.name}`); + log(` Error message: ${error.message}`); + if ('cause' in error && error.cause instanceof Error) { + log(` Cause: ${error.cause.message}`); + } + } + allPassed = false; + } + + try { + logInfo('Testing GET /health/info...'); + const healthInfo = await healthApi.getHealthInfo(); + logSuccess('Health info retrieved'); + log(` Frontend: ${healthInfo.frontend || 'unknown'}`); + log(` Backend: ${healthInfo.backend || 'unknown'}`); + log(` API UI: ${healthInfo.apiUi || 'unknown'}`); + } catch (error) { + logError(`Health info request failed: ${error}`); + allPassed = false; + } + + return allPassed; +} + +// Test result endpoints +async function testResultEndpoints( + resultApi: ResultApi, + projectId: string +): Promise { + logSection('Result Endpoint Tests'); + let allPassed = true; + + try { + logInfo('Testing GET /result (list results)...'); + const filters = [`project_id=${projectId}`]; + const resultList = await resultApi.getResultList({ + filter: filters, + page: 1, + pageSize: 5, + }); + logSuccess('Result list retrieved'); + log(` Total results: ${resultList.pagination?.totalItems || 'unknown'}`); + log(` Results returned: ${resultList.results?.length || 0}`); + log(` Filtered by project: ${projectId}`); + + if (resultList.results && resultList.results.length > 0) { + const firstResult = resultList.results[0]; + log(` First result ID: ${firstResult.id || 'N/A'}`); + log(` First result testId: ${firstResult.testId || 'N/A'}`); + log(` First result status: ${firstResult.result || 'N/A'}`); + } + } catch (error) { + logError(`Failed to retrieve result list: ${error}`); + if (error instanceof Error && 'response' in error) { + const response = (error as any).response; + log(` HTTP Status: ${response?.status} ${response?.statusText || ''}`); + } + allPassed = false; + } + + try { + logInfo('Testing GET /result with filters...'); + const filters = [`project_id=${projectId}`, 'result=passed']; + const filteredResults = await resultApi.getResultList({ + filter: filters, + page: 1, + pageSize: 3, + }); + logSuccess('Filtered result list retrieved'); + log(` Results with "passed" status: ${filteredResults.results?.length || 0}`); + } catch (error) { + logError(`Failed to retrieve filtered results: ${error}`); + if (error instanceof Error && 'response' in error) { + const response = (error as any).response; + log(` HTTP Status: ${response?.status} ${response?.statusText || ''}`); + } + allPassed = false; + } + + return allPassed; +} + +// Test run endpoints +async function testRunEndpoints(runApi: RunApi, projectId: string): Promise { + logSection('Run Endpoint Tests'); + let allPassed = true; + + try { + logInfo('Testing GET /run (list runs)...'); + const filters = [`project_id=${projectId}`]; + const runList = await runApi.getRunList({ + filter: filters, + page: 1, + pageSize: 5, + }); + logSuccess('Run list retrieved'); + log(` Total runs: ${runList.pagination?.totalItems || 'unknown'}`); + log(` Runs returned: ${runList.runs?.length || 0}`); + log(` Filtered by project: ${projectId}`); + + if (runList.runs && runList.runs.length > 0) { + const firstRun = runList.runs[0]; + log(` First run ID: ${firstRun.id || 'N/A'}`); + log(` First run metadata: ${JSON.stringify(firstRun.metadata || {})}`); + } + } catch (error) { + logError(`Failed to retrieve run list: ${error}`); + if (error instanceof Error && 'response' in error) { + const response = (error as any).response; + log(` HTTP Status: ${response?.status} ${response?.statusText || ''}`); + } + allPassed = false; + } + + return allPassed; +} + +// Test project endpoints +async function testProjectEndpoints(projectApi: ProjectApi): Promise { + logSection('Project Endpoint Tests'); + let allPassed = true; + + try { + logInfo('Testing GET /project (list projects)...'); + const projectList = await projectApi.getProjectList({ + page: 1, + pageSize: 10, + }); + logSuccess('Project list retrieved'); + log(` Total projects: ${projectList.pagination?.totalItems || 'unknown'}`); + log(` Projects returned: ${projectList.projects?.length || 0}`); + + if (projectList.projects && projectList.projects.length > 0) { + const firstProject = projectList.projects[0]; + log(` First project ID: ${firstProject.id || 'N/A'}`); + log(` First project name: ${firstProject.name || 'N/A'}`); + } + } catch (error) { + logError(`Failed to retrieve project list: ${error}`); + if (error instanceof Error && 'response' in error) { + const response = (error as any).response; + log(` HTTP Status: ${response?.status} ${response?.statusText || ''}`); + } + allPassed = false; + } + + return allPassed; +} + +// Main test runner +async function runIntegrationTests(): Promise { + log('\n'); + logSection('Ibutsu Client Integration Test'); + log('Testing against a live Ibutsu server\n'); + + // Validate environment + const { apiUrl, token } = validateEnvironment(); + + // Configure the client + logSection('Client Configuration'); + const config = new Configuration({ + basePath: apiUrl, + accessToken: token, + }); + logSuccess('Client configured successfully'); + + // Initialize API instances + const healthApi = new HealthApi(config); + const resultApi = new ResultApi(config); + const runApi = new RunApi(config); + const projectApi = new ProjectApi(config); + + // Track test results + const testResults: { [key: string]: boolean } = {}; + + // Run health tests first + testResults['Health Endpoints'] = await testHealthEndpoints(healthApi); + + // Get a project to use for filtering + // REQUIRED: Run and Result queries must include project_id to prevent backend timeouts + logSection('Project Selection'); + logInfo('Querying projects - a project is required for run/result queries...'); + + let selectedProjectId: string; + try { + const projectList = await projectApi.getProjectList({ + page: 1, + pageSize: 10, + }); + + if (projectList.projects && projectList.projects.length > 0) { + const firstProject = projectList.projects[0]; + selectedProjectId = firstProject.id!; + logSuccess('Selected project for filtered queries'); + log(` Project ID: ${selectedProjectId}`); + log(` Project Name: ${firstProject.name || 'N/A'}`); + } else { + logError('No projects found in the system'); + logError('Cannot continue - run and result queries require a project_id filter'); + log('\nExiting without running run/result endpoint tests...'); + process.exit(1); + } + } catch (error) { + logError('Failed to query projects'); + if (error instanceof Error && 'response' in error) { + const response = (error as any).response; + log(` HTTP Status: ${response?.status} ${response?.statusText || ''}`); + } + logError('Cannot continue - a project is required for run/result queries'); + log('\nExiting without running run/result endpoint tests...'); + process.exit(1); + } + + // Run project tests + testResults['Project Endpoints'] = await testProjectEndpoints(projectApi); + + // Run tests with project filter + testResults['Result Endpoints'] = await testResultEndpoints(resultApi, selectedProjectId); + testResults['Run Endpoints'] = await testRunEndpoints(runApi, selectedProjectId); + + // Summary + logSection('Test Summary'); + let allTestsPassed = true; + + for (const [testName, passed] of Object.entries(testResults)) { + if (passed) { + logSuccess(`${testName}: PASSED`); + } else { + logError(`${testName}: FAILED`); + allTestsPassed = false; + } + } + + log('\n'); + if (allTestsPassed) { + logSuccess('All integration tests passed!'); + process.exit(0); + } else { + logError('Some integration tests failed!'); + process.exit(1); + } +} + +// Run the tests +runIntegrationTests().catch((error) => { + logError(`Unexpected error during test execution: ${error}`); + console.error(error); + process.exit(1); +}); diff --git a/integration.env.example b/integration.env.example new file mode 100644 index 0000000..0d0b943 --- /dev/null +++ b/integration.env.example @@ -0,0 +1,14 @@ +# Example environment configuration for integration tests +# Copy this file to integration.env and fill in your values +# Then source it before running tests: source integration.env + +# The base URL for your Ibutsu API endpoint +export IBUTSU_API="https://your-ibutsu-server.com/api" + +# A valid authentication token for the Ibutsu server +# This should be a JWT token or API token with read access +export IBUTSU_TOKEN="your-authentication-token-here" + +# Disable SSL certificate validation (only for testing/corporate environments) +# Uncomment the line below if you encounter SSL certificate errors +# export NODE_TLS_REJECT_UNAUTHORIZED=0 diff --git a/package.json b/package.json index e712365..38f13a9 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "prepack": "yarn build", "test": "jest", "integration:build": "tsc -p tsconfig.integration.json", - "integration:run": "node dist/integration/integration-test.js", + "integration:run": "node integration-test.js", "integration": "yarn build && yarn integration:build && yarn integration:run", "lint": "yarn lint:eslint && yarn format:check", "lint:eslint": "eslint src/**/*.ts", @@ -42,9 +42,7 @@ "api-client", "typescript" ], - "dependencies": { - "portable-fetch": "^3.0.0" - }, + "dependencies": {}, "devDependencies": { "@eslint/js": "^9.16.0", "@types/node": "^24.10.0", diff --git a/src/apis/ArtifactApi.ts b/src/apis/ArtifactApi.ts index a56d443..ccc28f5 100644 --- a/src/apis/ArtifactApi.ts +++ b/src/apis/ArtifactApi.ts @@ -12,6 +12,7 @@ */ import * as runtime from '../runtime'; +import { objectToJSON } from '../runtime'; import type { Artifact, ArtifactList } from '../models/index'; import { ArtifactFromJSON, diff --git a/src/apis/ImportApi.ts b/src/apis/ImportApi.ts index 1cfcc1b..5732257 100644 --- a/src/apis/ImportApi.ts +++ b/src/apis/ImportApi.ts @@ -12,6 +12,7 @@ */ import * as runtime from '../runtime'; +import { objectToJSON } from '../runtime'; import type { Import } from '../models/index'; import { ImportFromJSON, ImportToJSON } from '../models/index'; diff --git a/src/runtime.ts b/src/runtime.ts index f501d9a..539ec95 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -487,3 +487,12 @@ export class TextApiResponse { return await this.raw.text(); } } + +/** + * Converts an object to JSON format + * @param value - The value to convert + * @returns The JSON representation of the value + */ +export function objectToJSON(value: any): any { + return value; +} diff --git a/tsconfig.integration.json b/tsconfig.integration.json new file mode 100644 index 0000000..3a63a23 --- /dev/null +++ b/tsconfig.integration.json @@ -0,0 +1,16 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "target": "ES2020", + "moduleResolution": "node", + "outDir": ".", + "rootDir": ".", + "declaration": false, + "declarationMap": false, + "sourceMap": false, + "esModuleInterop": true + }, + "include": ["integration-test.ts"], + "exclude": ["node_modules", "dist", "test", "src"] +} From 47e4c4f28923b26f1d2a373a71218093858dbf31 Mon Sep 17 00:00:00 2001 From: mshriver Date: Wed, 5 Nov 2025 14:51:58 +0100 Subject: [PATCH 13/13] Update package to v2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 38f13a9..89e2461 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ibutsu-client-ts", - "version": "1.0.1", + "version": "2.0.0", "description": "A TypeScript client for the Ibutsu API", "license": "MIT", "main": "dist/cjs/index.js",