From 022dc7f9ef47260484ccc926dc7e9fd800d7dc48 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Thu, 16 May 2024 22:12:31 -0500 Subject: [PATCH 1/4] feat: generate API client, wire up client for mmli-backend --- package-lock.json | 1481 ++++++++++++++++++++++- package.json | 12 +- src/app/app.module.ts | 2 + src/app/services/environment.service.ts | 4 +- src/assets/config/envvars.json | 4 +- 5 files changed, 1465 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 589f907..8816cae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "@angular-devkit/build-angular": "^15.1.6", "@angular/cli": "~15.1.6", "@angular/compiler-cli": "^15.1.0", + "@openapitools/openapi-generator-cli": "^2.5.2", "@types/jasmine": "~4.3.0", "@types/node": "^18.15.3", "jasmine-core": "~4.5.0", @@ -2717,6 +2718,99 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nestjs/axios": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-3.0.2.tgz", + "integrity": "sha512-Z6GuOUdNQjP7FX+OuV2Ybyamse+/e0BFdTWBX5JxpBDKA+YkdLynDgG6HTF04zy6e9zPa19UX0WA2VDoehwhXQ==", + "dev": true, + "peerDependencies": { + "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0", + "axios": "^1.3.1", + "rxjs": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/@nestjs/common": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.3.0.tgz", + "integrity": "sha512-DGv34UHsZBxCM3H5QGE2XE/+oLJzz5+714JQjBhjD9VccFlQs3LRxo/epso4l7nJIiNlZkPyIUC8WzfU/5RTsQ==", + "dev": true, + "dependencies": { + "iterare": "1.2.1", + "tslib": "2.6.2", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/core": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.3.0.tgz", + "integrity": "sha512-N06P5ncknW/Pm8bj964WvLIZn2gNhHliCBoAO1LeBvNImYkecqKcrmLbY49Fa1rmMfEM3MuBHeDys3edeuYAOA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.2.0", + "tslib": "2.6.2", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/websockets": "^10.0.0", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + } + } + }, + "node_modules/@nestjs/core/node_modules/path-to-regexp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", + "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==", + "dev": true + }, "node_modules/@ngtools/webpack": { "version": "15.1.6", "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.1.6.tgz", @@ -2971,6 +3065,361 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@nuxtjs/opencollective/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@openapitools/openapi-generator-cli": { + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.13.4.tgz", + "integrity": "sha512-4JKyrk55ohQK2FcuZbPdNvxdyXD14jjOIvE8hYjJ+E1cHbRbfXQXbYnjTODFE52Gx8eAxz8C9icuhDYDLn7nww==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nestjs/axios": "3.0.2", + "@nestjs/common": "10.3.0", + "@nestjs/core": "10.3.0", + "@nuxtjs/opencollective": "0.3.2", + "axios": "1.6.8", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "4.1.4", + "concurrently": "6.5.1", + "console.table": "0.10.0", + "fs-extra": "10.1.0", + "glob": "7.2.3", + "https-proxy-agent": "7.0.4", + "inquirer": "8.2.6", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.1", + "tslib": "2.6.2" + }, + "bin": { + "openapi-generator-cli": "main.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/openapi_generator" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "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" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/https-proxy-agent": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@schematics/angular": { "version": "15.1.6", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.1.6.tgz", @@ -3632,6 +4081,12 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "node_modules/autoprefixer": { "version": "10.4.13", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.13.tgz", @@ -3665,6 +4120,17 @@ "postcss": "^8.1.0" } }, + "node_modules/axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/babel-loader": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz", @@ -4224,6 +4690,18 @@ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -4236,6 +4714,12 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, + "node_modules/compare-versions": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", + "dev": true + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -4302,6 +4786,169 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/concurrently": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", + "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/concurrently/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/concurrently/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/concurrently/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concurrently/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/concurrently/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/concurrently/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -4341,12 +4988,30 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true + }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, + "node_modules/console.table": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==", + "dev": true, + "dependencies": { + "easy-table": "1.1.0" + }, + "engines": { + "node": "> 0.10" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -4698,6 +5363,40 @@ "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", "dev": true }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, + "node_modules/date-fns/node_modules/@babel/runtime": { + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", + "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/date-fns/node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, "node_modules/date-format": { "version": "4.0.14", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", @@ -4757,6 +5456,15 @@ "node": ">=8" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -4900,6 +5608,15 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/easy-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==", + "dev": true, + "optionalDependencies": { + "wcwidth": ">=1.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -5399,6 +6116,12 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -5529,9 +6252,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -5548,6 +6271,20 @@ } } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -6630,6 +7367,15 @@ "node": ">=8" } }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/jasmine-core": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.5.0.tgz", @@ -7969,6 +8715,26 @@ "dev": true, "optional": true }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -9004,6 +9770,12 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -10028,6 +10800,12 @@ "node": ">=0.10.0" } }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, "node_modules/spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -10493,6 +11271,12 @@ "node": ">=0.6" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -10503,9 +11287,9 @@ } }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type-fest": { "version": "0.21.3", @@ -10570,6 +11354,18 @@ "node": "*" } }, + "node_modules/uid": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "dev": true, + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -10782,6 +11578,12 @@ "defaults": "^1.0.3" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, "node_modules/webpack": { "version": "5.75.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", @@ -11045,6 +11847,16 @@ "node": ">=0.8.0" } }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -12995,6 +13807,52 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true + }, + "@nestjs/axios": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-3.0.2.tgz", + "integrity": "sha512-Z6GuOUdNQjP7FX+OuV2Ybyamse+/e0BFdTWBX5JxpBDKA+YkdLynDgG6HTF04zy6e9zPa19UX0WA2VDoehwhXQ==", + "dev": true, + "requires": {} + }, + "@nestjs/common": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.3.0.tgz", + "integrity": "sha512-DGv34UHsZBxCM3H5QGE2XE/+oLJzz5+714JQjBhjD9VccFlQs3LRxo/epso4l7nJIiNlZkPyIUC8WzfU/5RTsQ==", + "dev": true, + "requires": { + "iterare": "1.2.1", + "tslib": "2.6.2", + "uid": "2.0.2" + } + }, + "@nestjs/core": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.3.0.tgz", + "integrity": "sha512-N06P5ncknW/Pm8bj964WvLIZn2gNhHliCBoAO1LeBvNImYkecqKcrmLbY49Fa1rmMfEM3MuBHeDys3edeuYAOA==", + "dev": true, + "requires": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.2.0", + "tslib": "2.6.2", + "uid": "2.0.2" + }, + "dependencies": { + "path-to-regexp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", + "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==", + "dev": true + } + } + }, "@ngtools/webpack": { "version": "15.1.6", "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.1.6.tgz", @@ -13142,31 +14000,298 @@ "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "^2.0.0" + } + } + } + }, + "@npmcli/run-script": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz", + "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==", + "dev": true, + "requires": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + }, + "dependencies": { + "which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@openapitools/openapi-generator-cli": { + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.13.4.tgz", + "integrity": "sha512-4JKyrk55ohQK2FcuZbPdNvxdyXD14jjOIvE8hYjJ+E1cHbRbfXQXbYnjTODFE52Gx8eAxz8C9icuhDYDLn7nww==", + "dev": true, + "requires": { + "@nestjs/axios": "3.0.2", + "@nestjs/common": "10.3.0", + "@nestjs/core": "10.3.0", + "@nuxtjs/opencollective": "0.3.2", + "axios": "1.6.8", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "4.1.4", + "concurrently": "6.5.1", + "console.table": "0.10.0", + "fs-extra": "10.1.0", + "glob": "7.2.3", + "https-proxy-agent": "7.0.4", + "inquirer": "8.2.6", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.1", + "tslib": "2.6.2" + }, + "dependencies": { + "agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "requires": { + "debug": "^4.3.4" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true + }, + "fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "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" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "https-proxy-agent": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "4" } - } - } - }, - "@npmcli/run-script": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz", - "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==", - "dev": true, - "requires": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/promise-spawn": "^6.0.0", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^3.0.0", - "which": "^3.0.0" - }, - "dependencies": { - "which": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", - "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + }, + "inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", "dev": true, "requires": { - "isexe": "^2.0.0" + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } } } @@ -13757,6 +14882,12 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "autoprefixer": { "version": "10.4.13", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.13.tgz", @@ -13771,6 +14902,17 @@ "postcss-value-parser": "^4.2.0" } }, + "axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dev": true, + "requires": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "babel-loader": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz", @@ -14179,6 +15321,15 @@ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -14191,6 +15342,12 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, + "compare-versions": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", + "dev": true + }, "compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -14250,6 +15407,131 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "concurrently": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", + "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + } + } + }, "connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -14285,12 +15567,27 @@ "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", "dev": true }, + "consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true + }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, + "console.table": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==", + "dev": true, + "requires": { + "easy-table": "1.1.0" + } + }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -14544,6 +15841,32 @@ "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", "dev": true }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.21.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", + "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + } + } + }, "date-format": { "version": "4.0.14", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", @@ -14583,6 +15906,12 @@ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", "dev": true }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -14692,6 +16021,15 @@ "domhandler": "^4.2.0" } }, + "easy-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==", + "dev": true, + "requires": { + "wcwidth": ">=1.0.1" + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -15099,6 +16437,12 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, + "fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true + }, "fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -15204,11 +16548,22 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -16022,6 +17377,12 @@ "istanbul-lib-report": "^3.0.0" } }, + "iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true + }, "jasmine-core": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.5.0.tgz", @@ -17063,6 +18424,15 @@ "dev": true, "optional": true }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + }, "node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -17822,6 +19192,12 @@ } } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -18592,6 +19968,12 @@ } } }, + "spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -18950,6 +20332,12 @@ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, "tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -18957,9 +20345,9 @@ "dev": true }, "tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "type-fest": { "version": "0.21.3", @@ -18995,6 +20383,15 @@ "integrity": "sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==", "dev": true }, + "uid": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "dev": true, + "requires": { + "@lukeed/csprng": "^1.0.0" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -19149,6 +20546,12 @@ "defaults": "^1.0.3" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, "webpack": { "version": "5.75.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", @@ -19326,6 +20729,16 @@ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/package.json b/package.json index 9b97348..6db368f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,16 @@ "start": "ng serve", "build": "ng build", "watch": "ng build --watch --configuration development", - "test": "ng test" + "test": "ng test", + + "openapi:clean": "rm -rf src/app/api/", + + "openapi": "openapi-generator-cli generate --skip-validate-spec -i openapi/mmli-backend.openapi.json -g typescript-angular -o src/app/api/mmli-backend/v1", + "openapi:sync": "curl https://mmli.fastapi.mmli1.ncsa.illinois.edu/openapi.json > openapi/mmli-backend.openapi.json && cat openapi/mmli-backend.openapi.json", + "openapi:live": "npm run openapi:sync && npm run openapi", + + "openapi:sync:local": "curl http://localhost:8080/openapi.json > openapi/mmli-backend.openapi.json && cat openapi/mmli-backend.openapi.json", + "openapi:live:local": "npm run openapi:sync:local && npm run openapi" }, "private": true, "dependencies": { @@ -31,6 +40,7 @@ "@angular-devkit/build-angular": "^15.1.6", "@angular/cli": "~15.1.6", "@angular/compiler-cli": "^15.1.0", + "@openapitools/openapi-generator-cli": "^2.5.2", "@types/jasmine": "~4.3.0", "@types/node": "^18.15.3", "jasmine-core": "~4.5.0", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1e977d3..b9aa985 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -33,6 +33,7 @@ import { NgxMatomoRouterModule } from '@ngx-matomo/router'; import { NgHcaptchaModule } from 'ng-hcaptcha'; import { EnvironmentService } from "./services/environment.service"; import { MenuModule } from "primeng/menu"; +import {ApiModule, Configuration} from "./api/mmli-backend/v1"; const initAppFn = (envService: EnvironmentService) => { return () => envService.loadEnvConfig('/assets/config/envvars.json'); @@ -72,6 +73,7 @@ const initAppFn = (envService: EnvironmentService) => { siteId: 3, trackerUrl: 'https://matomo.mmli1.ncsa.illinois.edu/' }), + ApiModule.forRoot(() => new Configuration()), NgxMatomoRouterModule, NgHcaptchaModule.forRoot({ siteKey: '0b1663cb-26b9-4e6f-bfa9-352bdd3aeb9f', diff --git a/src/app/services/environment.service.ts b/src/app/services/environment.service.ts index a386d56..18c2803 100644 --- a/src/app/services/environment.service.ts +++ b/src/app/services/environment.service.ts @@ -2,16 +2,18 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { lastValueFrom } from 'rxjs'; import { EnvVars } from "../models/envvars"; +import {Configuration} from "../api/mmli-backend/v1"; @Injectable() export class EnvironmentService { private envConfig: EnvVars; - constructor(private readonly http: HttpClient) {} + constructor(private readonly http: HttpClient, private apiConfig: Configuration) {} async loadEnvConfig(configPath: string): Promise { console.log('Loading environment config!'); this.envConfig = await lastValueFrom(this.http.get(configPath)); + this.apiConfig.basePath = this.envConfig.hostname + this.envConfig.basePath } getEnvConfig(): EnvVars { diff --git a/src/assets/config/envvars.json b/src/assets/config/envvars.json index 97c63c6..8a29b2f 100644 --- a/src/assets/config/envvars.json +++ b/src/assets/config/envvars.json @@ -1,6 +1,6 @@ { - "hostname": "http://jobmgr.proxy.localhost", - "basePath": "/api/v1", + "hostname": "http://mmli.fastapi.localhost", + "basePath": "", "signInUrl": "http://oauth2.proxy.localhost/oauth2/start?rd=http%3A%2F%2Fclean.frontend.proxy.localhost%2Fconfiguration", "signOutUrl": "http://oauth2.proxy.localhost/oauth2/sign_out?rd=http%3A%2F%2Fclean.frontend.proxy.localhost%2Fconfiguration", From c65b0bc54c988c04945a3c0aabfbaba2c78e6937 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Thu, 16 May 2024 22:13:06 -0500 Subject: [PATCH 2/4] fix: include generated API client --- openapi/mmli-backend.openapi.json | 1 + openapitools.json | 7 + src/app/api/mmli-backend/v1/.gitignore | 4 + .../mmli-backend/v1/.openapi-generator-ignore | 23 + .../mmli-backend/v1/.openapi-generator/FILES | 41 ++ .../v1/.openapi-generator/VERSION | 1 + src/app/api/mmli-backend/v1/README.md | 226 +++++++ src/app/api/mmli-backend/v1/api.module.ts | 30 + src/app/api/mmli-backend/v1/api/api.ts | 13 + .../v1/api/chemScraper.service.ts | 322 +++++++++ .../mmli-backend/v1/api/default.service.ts | 169 +++++ .../api/mmli-backend/v1/api/files.service.ts | 490 ++++++++++++++ .../api/mmli-backend/v1/api/jobs.service.ts | 614 ++++++++++++++++++ .../mmli-backend/v1/api/novostoic.service.ts | 543 ++++++++++++++++ .../api/mmli-backend/v1/api/somn.service.ts | 251 +++++++ src/app/api/mmli-backend/v1/configuration.ts | 166 +++++ src/app/api/mmli-backend/v1/encoder.ts | 20 + src/app/api/mmli-backend/v1/git_push.sh | 57 ++ src/app/api/mmli-backend/v1/index.ts | 6 + .../v1/model/analyzeRequestBody.ts | 19 + .../v1/model/bodyCreateJobJobTypeJobsPost.ts | 20 + .../v1/model/checkReactionSiteResponse.ts | 18 + .../v1/model/chemicalAutoCompleteResponse.ts | 23 + .../v1/model/dgPredictorRequestBody.ts | 22 + .../v1/model/enzRankRequestBody.ts | 20 + .../v1/model/exportRequestBody.ts | 23 + .../mmli-backend/v1/model/flaggedMolecule.ts | 20 + .../v1/model/flaggedMoleculeDelete.ts | 18 + .../v1/model/hTTPValidationError.ts | 18 + src/app/api/mmli-backend/v1/model/job.ts | 34 + .../api/mmli-backend/v1/model/jobStatus.ts | 25 + src/app/api/mmli-backend/v1/model/jobType.ts | 30 + .../api/mmli-backend/v1/model/jobUpdate.ts | 29 + .../mmli-backend/v1/model/locationInner.ts | 16 + src/app/api/mmli-backend/v1/model/models.ts | 23 + .../v1/model/moleculeWithAmount.ts | 18 + .../v1/model/novostoicRequestBody.ts | 29 + .../v1/model/optstoicRequestBody.ts | 20 + .../mmli-backend/v1/model/reactionKeggId.ts | 20 + .../mmli-backend/v1/model/reactionSmiles.ts | 18 + .../mmli-backend/v1/model/reactionsInner.ts | 23 + .../mmli-backend/v1/model/somnRequestBody.ts | 23 + .../mmli-backend/v1/model/validationError.ts | 20 + src/app/api/mmli-backend/v1/param.ts | 69 ++ src/app/api/mmli-backend/v1/variables.ts | 9 + 45 files changed, 3591 insertions(+) create mode 100644 openapi/mmli-backend.openapi.json create mode 100644 openapitools.json create mode 100644 src/app/api/mmli-backend/v1/.gitignore create mode 100644 src/app/api/mmli-backend/v1/.openapi-generator-ignore create mode 100644 src/app/api/mmli-backend/v1/.openapi-generator/FILES create mode 100644 src/app/api/mmli-backend/v1/.openapi-generator/VERSION create mode 100644 src/app/api/mmli-backend/v1/README.md create mode 100644 src/app/api/mmli-backend/v1/api.module.ts create mode 100644 src/app/api/mmli-backend/v1/api/api.ts create mode 100644 src/app/api/mmli-backend/v1/api/chemScraper.service.ts create mode 100644 src/app/api/mmli-backend/v1/api/default.service.ts create mode 100644 src/app/api/mmli-backend/v1/api/files.service.ts create mode 100644 src/app/api/mmli-backend/v1/api/jobs.service.ts create mode 100644 src/app/api/mmli-backend/v1/api/novostoic.service.ts create mode 100644 src/app/api/mmli-backend/v1/api/somn.service.ts create mode 100644 src/app/api/mmli-backend/v1/configuration.ts create mode 100644 src/app/api/mmli-backend/v1/encoder.ts create mode 100644 src/app/api/mmli-backend/v1/git_push.sh create mode 100644 src/app/api/mmli-backend/v1/index.ts create mode 100644 src/app/api/mmli-backend/v1/model/analyzeRequestBody.ts create mode 100644 src/app/api/mmli-backend/v1/model/bodyCreateJobJobTypeJobsPost.ts create mode 100644 src/app/api/mmli-backend/v1/model/checkReactionSiteResponse.ts create mode 100644 src/app/api/mmli-backend/v1/model/chemicalAutoCompleteResponse.ts create mode 100644 src/app/api/mmli-backend/v1/model/dgPredictorRequestBody.ts create mode 100644 src/app/api/mmli-backend/v1/model/enzRankRequestBody.ts create mode 100644 src/app/api/mmli-backend/v1/model/exportRequestBody.ts create mode 100644 src/app/api/mmli-backend/v1/model/flaggedMolecule.ts create mode 100644 src/app/api/mmli-backend/v1/model/flaggedMoleculeDelete.ts create mode 100644 src/app/api/mmli-backend/v1/model/hTTPValidationError.ts create mode 100644 src/app/api/mmli-backend/v1/model/job.ts create mode 100644 src/app/api/mmli-backend/v1/model/jobStatus.ts create mode 100644 src/app/api/mmli-backend/v1/model/jobType.ts create mode 100644 src/app/api/mmli-backend/v1/model/jobUpdate.ts create mode 100644 src/app/api/mmli-backend/v1/model/locationInner.ts create mode 100644 src/app/api/mmli-backend/v1/model/models.ts create mode 100644 src/app/api/mmli-backend/v1/model/moleculeWithAmount.ts create mode 100644 src/app/api/mmli-backend/v1/model/novostoicRequestBody.ts create mode 100644 src/app/api/mmli-backend/v1/model/optstoicRequestBody.ts create mode 100644 src/app/api/mmli-backend/v1/model/reactionKeggId.ts create mode 100644 src/app/api/mmli-backend/v1/model/reactionSmiles.ts create mode 100644 src/app/api/mmli-backend/v1/model/reactionsInner.ts create mode 100644 src/app/api/mmli-backend/v1/model/somnRequestBody.ts create mode 100644 src/app/api/mmli-backend/v1/model/validationError.ts create mode 100644 src/app/api/mmli-backend/v1/param.ts create mode 100644 src/app/api/mmli-backend/v1/variables.ts diff --git a/openapi/mmli-backend.openapi.json b/openapi/mmli-backend.openapi.json new file mode 100644 index 0000000..c9d1354 --- /dev/null +++ b/openapi/mmli-backend.openapi.json @@ -0,0 +1 @@ +{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/{bucket_name}/upload":{"post":{"tags":["Files"],"summary":"Upload File","operationId":"upload_file__bucket_name__upload_post","parameters":[{"required":true,"schema":{"title":"Bucket Name","type":"string"},"name":"bucket_name","in":"path"},{"required":false,"schema":{"title":"Job Id","type":"string","default":""},"name":"job_id","in":"query"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file__bucket_name__upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{bucket_name}/results/{job_id}":{"get":{"tags":["Files"],"summary":"Get Results","operationId":"get_results__bucket_name__results__job_id__get","parameters":[{"required":true,"schema":{"title":"Bucket Name","type":"string"},"name":"bucket_name","in":"path"},{"required":true,"schema":{"title":"Job Id","type":"string"},"name":"job_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{bucket_name}/inputs/{job_id}":{"get":{"tags":["Files"],"summary":"Get Input File","operationId":"get_input_file__bucket_name__inputs__job_id__get","parameters":[{"required":true,"schema":{"title":"Bucket Name","type":"string"},"name":"bucket_name","in":"path"},{"required":true,"schema":{"title":"Job Id","type":"string"},"name":"job_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{bucket_name}/errors/{job_id}":{"get":{"tags":["Files"],"summary":"Get Errors","operationId":"get_errors__bucket_name__errors__job_id__get","parameters":[{"required":true,"schema":{"title":"Bucket Name","type":"string"},"name":"bucket_name","in":"path"},{"required":true,"schema":{"title":"Job Id","type":"string"},"name":"job_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{bucket_name}/export-results":{"post":{"tags":["Files"],"summary":"Analyze Documents","operationId":"analyze_documents__bucket_name__export_results_post","parameters":[{"required":true,"schema":{"title":"Bucket Name","type":"string"},"name":"bucket_name","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{job_type}/jobs":{"get":{"tags":["Jobs"],"summary":"List Jobs By Type","description":"Get a list of all job runs by type","operationId":"list_jobs_by_type__job_type__jobs_get","parameters":[{"required":true,"schema":{"title":"Job Type","type":"string"},"name":"job_type","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Jobs"],"summary":"Create Job","description":"Create a new run for a new or existing Job","operationId":"create_job__job_type__jobs_post","parameters":[{"required":true,"schema":{"title":"Job Type","type":"string"},"name":"job_type","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_job__job_type__jobs_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{job_type}/jobs/{job_id}":{"get":{"tags":["Jobs"],"summary":"List Jobs By Type And Job Id","description":"Get a list of all job runs by type and job_id","operationId":"list_jobs_by_type_and_job_id__job_type__jobs__job_id__get","parameters":[{"required":true,"schema":{"title":"Job Type","type":"string"},"name":"job_type","in":"path"},{"required":true,"schema":{"title":"Job Id","type":"string"},"name":"job_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{job_type}/jobs/{job_id}/{run_id}":{"get":{"tags":["Jobs"],"summary":"Get Job By Type And Job Id And Run Id","description":"Get a single job by type, job_id, and run_id","operationId":"get_job_by_type_and_job_id_and_run_id__job_type__jobs__job_id___run_id__get","parameters":[{"required":true,"schema":{"title":"Job Type","type":"string"},"name":"job_type","in":"path"},{"required":true,"schema":{"title":"Job Id","type":"string"},"name":"job_id","in":"path"},{"required":true,"schema":{"title":"Run Id","type":"string"},"name":"run_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Jobs"],"summary":"Update Existing Job","description":"Overwrite all writeable fields of an existing Job","operationId":"update_existing_job__job_type__jobs__job_id___run_id__put","parameters":[{"required":true,"schema":{"title":"Job Type","type":"string"},"name":"job_type","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Jobs"],"summary":"Delete Job By Type And Job Id And Run Id","description":"Delete a single Job by type, job_id, and run_id","operationId":"delete_job_by_type_and_job_id_and_run_id__job_type__jobs__job_id___run_id__delete","parameters":[{"required":true,"schema":{"title":"Job Type","type":"string"},"name":"job_type","in":"path"},{"required":true,"schema":{"title":"Job Id","type":"string"},"name":"job_id","in":"path"},{"required":true,"schema":{"title":"Run Id","type":"string"},"name":"run_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Jobs"],"summary":"Patch Existing Job","description":"Update one or more fields of an existing Job","operationId":"patch_existing_job__job_type__jobs__job_id___run_id__patch","parameters":[{"required":true,"schema":{"title":"Job Type","type":"string"},"name":"job_type","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chemscraper/analyze":{"post":{"tags":["ChemScraper"],"summary":"Analyze Documents","operationId":"analyze_documents_chemscraper_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chemscraper/similarity-sorted-order/{job_id}":{"get":{"summary":"Get Similarity Sorted Order","operationId":"get_similarity_sorted_order_chemscraper_similarity_sorted_order__job_id__get","parameters":[{"required":true,"schema":{"title":"Job Id","type":"string"},"name":"job_id","in":"path"},{"required":true,"schema":{"title":"Smile String","type":"string"},"name":"smile_string","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chemscraper/flag":{"post":{"tags":["ChemScraper"],"summary":"Flag Molecule","operationId":"flag_molecule_chemscraper_flag_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlaggedMolecule"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ChemScraper"],"summary":"Delete Flagged Molecule","operationId":"delete_flagged_molecule_chemscraper_flag_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlaggedMoleculeDelete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/novostoic-optstoic/run":{"post":{"tags":["Novostoic"],"summary":"Start Optstoic","operationId":"start_optstoic_novostoic_optstoic_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptstoicRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chemical/auto-complete":{"get":{"tags":["Novostoic"],"summary":"Get Chemical Auto Complete","description":"Returns a list of chemicals that match the search string limited to 20 results.","operationId":"get_chemical_auto_complete_chemical_auto_complete_get","parameters":[{"required":true,"schema":{"title":"Search","type":"string"},"name":"search","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Chemical Auto Complete Chemical Auto Complete Get","type":"array","items":{"$ref":"#/components/schemas/ChemicalAutoCompleteResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chemical/validate":{"get":{"tags":["Novostoic"],"summary":"Validate Chemical","operationId":"validate_chemical_chemical_validate_get","parameters":[{"required":true,"schema":{"title":"Search","type":"string"},"name":"search","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChemicalAutoCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/novostoic-novostoic/run":{"post":{"tags":["Novostoic"],"summary":"Start Novostoic","operationId":"start_novostoic_novostoic_novostoic_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NovostoicRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/novostoic-enzrank/run":{"post":{"tags":["Novostoic"],"summary":"Start Enzrank","operationId":"start_enzrank_novostoic_enzrank_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnzRankRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/novostoic-dgpredictor/run":{"post":{"tags":["Novostoic"],"summary":"Start Dgpredictor","operationId":"start_dgpredictor_novostoic_dgpredictor_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DgPredictorRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/somn/run":{"post":{"tags":["Somn"],"summary":"Start Somn","operationId":"start_somn_somn_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SomnRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/somn/all-reaction-sites":{"get":{"tags":["Somn"],"summary":"Check Reaction Sites","operationId":"check_reaction_sites_somn_all_reaction_sites_get","parameters":[{"required":true,"schema":{"title":"Smiles","type":"string"},"name":"smiles","in":"query"},{"required":true,"schema":{"title":"Role","type":"string"},"name":"role","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckReactionSiteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AnalyzeRequestBody":{"title":"AnalyzeRequestBody","required":["jobId","user_email","fileList"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"fileList":{"title":"Filelist","type":"array","items":{"type":"string"}}}},"Body_create_job__job_type__jobs_post":{"title":"Body_create_job__job_type__jobs_post","type":"object","properties":{"job_id":{"title":"Job Id","type":"string"},"run_id":{"title":"Run Id","type":"string"},"email":{"title":"Email","type":"string"},"job_info":{"title":"Job Info","type":"string","default":"{}"}}},"Body_upload_file__bucket_name__upload_post":{"title":"Body_upload_file__bucket_name__upload_post","required":["file"],"type":"object","properties":{"file":{"title":"File","type":"string","format":"binary"}}},"CheckReactionSiteResponse":{"title":"CheckReactionSiteResponse","required":["reaction_site_idxes","svg"],"type":"object","properties":{"reaction_site_idxes":{"title":"Reaction Site Idxes","type":"array","items":{"type":"integer"}},"svg":{"title":"Svg","type":"string"}}},"ChemicalAutoCompleteResponse":{"title":"ChemicalAutoCompleteResponse","required":["name","smiles","inchi","inchi_key","metanetx_id","kegg_id"],"type":"object","properties":{"name":{"title":"Name","type":"string"},"smiles":{"title":"Smiles","type":"string"},"inchi":{"title":"Inchi","type":"string"},"inchi_key":{"title":"Inchi Key","type":"string"},"metanetx_id":{"title":"Metanetx Id","type":"string"},"kegg_id":{"title":"Kegg Id","type":"string"},"structure":{"title":"Structure","type":"string"}}},"DgPredictorRequestBody":{"title":"DgPredictorRequestBody","required":["jobId","user_email","ph","ionic_strength","reactions"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"ph":{"title":"Ph","type":"number"},"ionic_strength":{"title":"Ionic Strength","type":"number"},"reactions":{"title":"Reactions","type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/ReactionSmiles"},{"$ref":"#/components/schemas/ReactionKeggId"}]}}}},"EnzRankRequestBody":{"title":"EnzRankRequestBody","required":["jobId","user_email","primary_precursor","enzyme_sequence"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"primary_precursor":{"title":"Primary Precursor","type":"string"},"enzyme_sequence":{"title":"Enzyme Sequence","type":"string"}}},"ExportRequestBody":{"title":"ExportRequestBody","required":["jobId","cdxml","cdxml_filter","cdxml_selected_pages","csv","csv_filter","csv_molecules"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"cdxml":{"title":"Cdxml","type":"boolean"},"cdxml_filter":{"title":"Cdxml Filter","type":"string"},"cdxml_selected_pages":{"title":"Cdxml Selected Pages","type":"array","items":{"type":"integer"}},"csv":{"title":"Csv","type":"boolean"},"csv_filter":{"title":"Csv Filter","type":"string"},"csv_molecules":{"title":"Csv Molecules","type":"array","items":{"type":"integer"}}}},"FlaggedMolecule":{"title":"FlaggedMolecule","type":"object","properties":{"smile":{"title":"Smile","type":"string"},"job_id":{"title":"Job Id","type":"string"},"doc_id":{"title":"Doc Id","type":"string"},"time_created":{"title":"Time Created","type":"integer"}}},"FlaggedMoleculeDelete":{"title":"FlaggedMoleculeDelete","required":["smile","job_id"],"type":"object","properties":{"smile":{"title":"Smile","type":"string"},"job_id":{"title":"Job Id","type":"string"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Job":{"title":"Job","type":"object","properties":{"job_info":{"title":"Job Info","type":"string"},"email":{"title":"Email","type":"string"},"job_id":{"title":"Job Id","type":"string"},"run_id":{"title":"Run Id","type":"string"},"phase":{"allOf":[{"$ref":"#/components/schemas/JobStatus"}],"default":"queued"},"type":{"$ref":"#/components/schemas/JobType"},"image":{"title":"Image","type":"string"},"command":{"title":"Command","type":"string"},"time_created":{"title":"Time Created","type":"integer"},"time_start":{"title":"Time Start","type":"integer","default":0},"time_end":{"title":"Time End","type":"integer","default":0},"deleted":{"title":"Deleted","type":"integer","default":0},"user_agent":{"title":"User Agent","type":"string"}}},"JobStatus":{"title":"JobStatus","enum":["queued","processing","completed","error"],"type":"string","description":"An enumeration."},"JobType":{"title":"JobType","enum":["clean","chemscraper","molli","novostoic-optstoic","novostoic-novostoic","novostoic-enzrank","novostoic-dgpredictor","somn","defaults"],"type":"string","description":"An enumeration."},"JobUpdate":{"title":"JobUpdate","required":["job_id","run_id"],"type":"object","properties":{"job_id":{"title":"Job Id","type":"string"},"run_id":{"title":"Run Id","type":"integer"},"time_start":{"title":"Time Start","type":"integer"},"time_end":{"title":"Time End","type":"integer"},"job_info":{"title":"Job Info","type":"string"},"email":{"title":"Email","type":"string"},"image":{"title":"Image","type":"string"},"command":{"title":"Command","type":"string"},"phase":{"$ref":"#/components/schemas/JobStatus"}}},"MoleculeWithAmount":{"title":"MoleculeWithAmount","required":["molecule","amount"],"type":"object","properties":{"molecule":{"title":"Molecule","type":"string"},"amount":{"title":"Amount","type":"number"}}},"NovostoicRequestBody":{"title":"NovostoicRequestBody","required":["jobId","user_email","primary_precursor","target_molecule","co_reactants","co_products","max_steps","max_pathways","is_thermodynamic_feasible","thermodynamical_feasible_reaction_only","use_enzyme_selection","num_enzyme_candidates"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"primary_precursor":{"$ref":"#/components/schemas/MoleculeWithAmount"},"target_molecule":{"$ref":"#/components/schemas/MoleculeWithAmount"},"co_reactants":{"title":"Co Reactants","type":"array","items":{"$ref":"#/components/schemas/MoleculeWithAmount"}},"co_products":{"title":"Co Products","type":"array","items":{"$ref":"#/components/schemas/MoleculeWithAmount"}},"max_steps":{"title":"Max Steps","type":"integer"},"max_pathways":{"title":"Max Pathways","type":"integer"},"is_thermodynamic_feasible":{"title":"Is Thermodynamic Feasible","type":"boolean"},"thermodynamical_feasible_reaction_only":{"title":"Thermodynamical Feasible Reaction Only","type":"boolean"},"use_enzyme_selection":{"title":"Use Enzyme Selection","type":"boolean"},"num_enzyme_candidates":{"title":"Num Enzyme Candidates","type":"integer"}}},"OptstoicRequestBody":{"title":"OptstoicRequestBody","required":["jobId","user_email","primary_precursor","target_molecule"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"primary_precursor":{"title":"Primary Precursor","type":"string"},"target_molecule":{"title":"Target Molecule","type":"string"}}},"ReactionKeggId":{"title":"ReactionKeggId","required":["type","molecule_number","molecule_inchi_or_smiles","reaction_keggid"],"type":"object","properties":{"type":{"title":"Type","type":"string"},"molecule_number":{"title":"Molecule Number","type":"string"},"molecule_inchi_or_smiles":{"title":"Molecule Inchi Or Smiles","type":"string"},"reaction_keggid":{"title":"Reaction Keggid","type":"string"}}},"ReactionSmiles":{"title":"ReactionSmiles","required":["type","smiles"],"type":"object","properties":{"type":{"title":"Type","type":"string"},"smiles":{"title":"Smiles","type":"string"}}},"SomnRequestBody":{"title":"SomnRequestBody","required":["jobId","user_email","reactant_pair_name","el","el_name","nuc","nuc_name"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"reactant_pair_name":{"title":"Reactant Pair Name","type":"string"},"el":{"title":"El","type":"string"},"el_name":{"title":"El Name","type":"string"},"nuc":{"title":"Nuc","type":"string"},"nuc_name":{"title":"Nuc Name","type":"string"}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}} \ No newline at end of file diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 0000000..cfe74d5 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.5.0" + } +} diff --git a/src/app/api/mmli-backend/v1/.gitignore b/src/app/api/mmli-backend/v1/.gitignore new file mode 100644 index 0000000..149b576 --- /dev/null +++ b/src/app/api/mmli-backend/v1/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/app/api/mmli-backend/v1/.openapi-generator-ignore b/src/app/api/mmli-backend/v1/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/src/app/api/mmli-backend/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/app/api/mmli-backend/v1/.openapi-generator/FILES b/src/app/api/mmli-backend/v1/.openapi-generator/FILES new file mode 100644 index 0000000..b4e9790 --- /dev/null +++ b/src/app/api/mmli-backend/v1/.openapi-generator/FILES @@ -0,0 +1,41 @@ +.gitignore +.openapi-generator-ignore +README.md +api.module.ts +api/api.ts +api/chemScraper.service.ts +api/default.service.ts +api/files.service.ts +api/jobs.service.ts +api/novostoic.service.ts +api/somn.service.ts +configuration.ts +encoder.ts +git_push.sh +index.ts +model/analyzeRequestBody.ts +model/bodyCreateJobJobTypeJobsPost.ts +model/checkReactionSiteResponse.ts +model/chemicalAutoCompleteResponse.ts +model/dgPredictorRequestBody.ts +model/enzRankRequestBody.ts +model/exportRequestBody.ts +model/flaggedMolecule.ts +model/flaggedMoleculeDelete.ts +model/hTTPValidationError.ts +model/job.ts +model/jobStatus.ts +model/jobType.ts +model/jobUpdate.ts +model/locationInner.ts +model/models.ts +model/moleculeWithAmount.ts +model/novostoicRequestBody.ts +model/optstoicRequestBody.ts +model/reactionKeggId.ts +model/reactionSmiles.ts +model/reactionsInner.ts +model/somnRequestBody.ts +model/validationError.ts +param.ts +variables.ts diff --git a/src/app/api/mmli-backend/v1/.openapi-generator/VERSION b/src/app/api/mmli-backend/v1/.openapi-generator/VERSION new file mode 100644 index 0000000..18bb418 --- /dev/null +++ b/src/app/api/mmli-backend/v1/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/src/app/api/mmli-backend/v1/README.md b/src/app/api/mmli-backend/v1/README.md new file mode 100644 index 0000000..de16f95 --- /dev/null +++ b/src/app/api/mmli-backend/v1/README.md @@ -0,0 +1,226 @@ +## @ + +### Building + +To install the required dependencies and to build the typescript sources run: +``` +npm install +npm run build +``` + +### publishing + +First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) + +### consuming + +Navigate to the folder of your consuming project and run one of next commands. + +_published:_ + +``` +npm install @ --save +``` + +_without publishing (not recommended):_ + +``` +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save +``` + +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + +_using `npm link`:_ + +In PATH_TO_GENERATED_PACKAGE/dist: +``` +npm link +``` + +In your project: +``` +npm link +``` + +__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. +Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround. +Published packages are not effected by this issue. + + +#### General usage + +In your Angular project: + + +``` +// without configuring providers +import { ApiModule } from ''; +import { HttpClientModule } from '@angular/common/http'; + +@NgModule({ + imports: [ + ApiModule, + // make sure to import the HttpClientModule in the AppModule only, + // see https://github.com/angular/angular/issues/20575 + HttpClientModule + ], + declarations: [ AppComponent ], + providers: [], + bootstrap: [ AppComponent ] +}) +export class AppModule {} +``` + +``` +// configuring providers +import { ApiModule, Configuration, ConfigurationParameters } from ''; + +export function apiConfigFactory (): Configuration { + const params: ConfigurationParameters = { + // set configuration parameters here. + } + return new Configuration(params); +} + +@NgModule({ + imports: [ ApiModule.forRoot(apiConfigFactory) ], + declarations: [ AppComponent ], + providers: [], + bootstrap: [ AppComponent ] +}) +export class AppModule {} +``` + +``` +// configuring providers with an authentication service that manages your access tokens +import { ApiModule, Configuration } from ''; + +@NgModule({ + imports: [ ApiModule ], + declarations: [ AppComponent ], + providers: [ + { + provide: Configuration, + useFactory: (authService: AuthService) => new Configuration( + { + basePath: environment.apiUrl, + accessToken: authService.getAccessToken.bind(authService) + } + ), + deps: [AuthService], + multi: false + } + ], + bootstrap: [ AppComponent ] +}) +export class AppModule {} +``` + +``` +import { DefaultApi } from ''; + +export class AppComponent { + constructor(private apiGateway: DefaultApi) { } +} +``` + +Note: The ApiModule is restricted to being instantiated once app wide. +This is to ensure that all services are treated as singletons. + +#### Using multiple OpenAPI files / APIs / ApiModules +In order to use multiple `ApiModules` generated from different OpenAPI files, +you can create an alias name when importing the modules +in order to avoid naming conflicts: +``` +import { ApiModule } from 'my-api-path'; +import { ApiModule as OtherApiModule } from 'my-other-api-path'; +import { HttpClientModule } from '@angular/common/http'; + +@NgModule({ + imports: [ + ApiModule, + OtherApiModule, + // make sure to import the HttpClientModule in the AppModule only, + // see https://github.com/angular/angular/issues/20575 + HttpClientModule + ] +}) +export class AppModule { + +} +``` + + +### Set service base path +If different than the generated base path, during app bootstrap, you can provide the base path to your service. + +``` +import { BASE_PATH } from ''; + +bootstrap(AppComponent, [ + { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, +]); +``` +or + +``` +import { BASE_PATH } from ''; + +@NgModule({ + imports: [], + declarations: [ AppComponent ], + providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ], + bootstrap: [ AppComponent ] +}) +export class AppModule {} +``` + + +#### Using @angular/cli +First extend your `src/environments/*.ts` files by adding the corresponding base path: + +``` +export const environment = { + production: false, + API_BASE_PATH: 'http://127.0.0.1:8080' +}; +``` + +In the src/app/app.module.ts: +``` +import { BASE_PATH } from ''; +import { environment } from '../environments/environment'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ ], + providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }], + bootstrap: [ AppComponent ] +}) +export class AppModule { } +``` + +### Customizing path parameter encoding + +Without further customization, only [path-parameters][parameter-locations-url] of [style][style-values-url] 'simple' +and Dates for format 'date-time' are encoded correctly. + +Other styles (e.g. "matrix") are not that easy to encode +and thus are best delegated to other libraries (e.g.: [@honoluluhenk/http-param-expander]). + +To implement your own parameter encoding (or call another library), +pass an arrow-function or method-reference to the `encodeParam` property of the Configuration-object +(see [General Usage](#general-usage) above). + +Example value for use in your Configuration-Provider: +```typescript +new Configuration({ + encodeParam: (param: Param) => myFancyParamEncoder(param), +}) +``` + +[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations +[style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values +[@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander diff --git a/src/app/api/mmli-backend/v1/api.module.ts b/src/app/api/mmli-backend/v1/api.module.ts new file mode 100644 index 0000000..58d341f --- /dev/null +++ b/src/app/api/mmli-backend/v1/api.module.ts @@ -0,0 +1,30 @@ +import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; +import { Configuration } from './configuration'; +import { HttpClient } from '@angular/common/http'; + + +@NgModule({ + imports: [], + declarations: [], + exports: [], + providers: [] +}) +export class ApiModule { + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ { provide: Configuration, useFactory: configurationFactory } ] + }; + } + + constructor( @Optional() @SkipSelf() parentModule: ApiModule, + @Optional() http: HttpClient) { + if (parentModule) { + throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + } + if (!http) { + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575'); + } + } +} diff --git a/src/app/api/mmli-backend/v1/api/api.ts b/src/app/api/mmli-backend/v1/api/api.ts new file mode 100644 index 0000000..11af8c3 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/api.ts @@ -0,0 +1,13 @@ +export * from './chemScraper.service'; +import { ChemScraperService } from './chemScraper.service'; +export * from './default.service'; +import { DefaultService } from './default.service'; +export * from './files.service'; +import { FilesService } from './files.service'; +export * from './jobs.service'; +import { JobsService } from './jobs.service'; +export * from './novostoic.service'; +import { NovostoicService } from './novostoic.service'; +export * from './somn.service'; +import { SomnService } from './somn.service'; +export const APIS = [ChemScraperService, DefaultService, FilesService, JobsService, NovostoicService, SomnService]; diff --git a/src/app/api/mmli-backend/v1/api/chemScraper.service.ts b/src/app/api/mmli-backend/v1/api/chemScraper.service.ts new file mode 100644 index 0000000..1935526 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/chemScraper.service.ts @@ -0,0 +1,322 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { AnalyzeRequestBody } from '../model/analyzeRequestBody'; +// @ts-ignore +import { FlaggedMolecule } from '../model/flaggedMolecule'; +// @ts-ignore +import { FlaggedMoleculeDelete } from '../model/flaggedMoleculeDelete'; +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class ChemScraperService { + + protected basePath = 'http://localhost'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Analyze Documents + * @param analyzeRequestBody + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (analyzeRequestBody === null || analyzeRequestBody === undefined) { + throw new Error('Required parameter analyzeRequestBody was null or undefined when calling analyzeDocumentsChemscraperAnalyzePost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/chemscraper/analyze`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: analyzeRequestBody, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Delete Flagged Molecule + * @param flaggedMoleculeDelete + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteFlaggedMoleculeChemscraperFlagDelete(flaggedMoleculeDelete: FlaggedMoleculeDelete, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteFlaggedMoleculeChemscraperFlagDelete(flaggedMoleculeDelete: FlaggedMoleculeDelete, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteFlaggedMoleculeChemscraperFlagDelete(flaggedMoleculeDelete: FlaggedMoleculeDelete, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteFlaggedMoleculeChemscraperFlagDelete(flaggedMoleculeDelete: FlaggedMoleculeDelete, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (flaggedMoleculeDelete === null || flaggedMoleculeDelete === undefined) { + throw new Error('Required parameter flaggedMoleculeDelete was null or undefined when calling deleteFlaggedMoleculeChemscraperFlagDelete.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/chemscraper/flag`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: flaggedMoleculeDelete, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Flag Molecule + * @param flaggedMolecule + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public flagMoleculeChemscraperFlagPost(flaggedMolecule: FlaggedMolecule, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public flagMoleculeChemscraperFlagPost(flaggedMolecule: FlaggedMolecule, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public flagMoleculeChemscraperFlagPost(flaggedMolecule: FlaggedMolecule, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public flagMoleculeChemscraperFlagPost(flaggedMolecule: FlaggedMolecule, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (flaggedMolecule === null || flaggedMolecule === undefined) { + throw new Error('Required parameter flaggedMolecule was null or undefined when calling flagMoleculeChemscraperFlagPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/chemscraper/flag`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: flaggedMolecule, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/api/mmli-backend/v1/api/default.service.ts b/src/app/api/mmli-backend/v1/api/default.service.ts new file mode 100644 index 0000000..e7fe814 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/default.service.ts @@ -0,0 +1,169 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class DefaultService { + + protected basePath = 'http://localhost'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Get Similarity Sorted Order + * @param jobId + * @param smileString + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobId: string, smileString: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobId: string, smileString: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobId: string, smileString: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobId: string, smileString: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobId === null || jobId === undefined) { + throw new Error('Required parameter jobId was null or undefined when calling getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet.'); + } + if (smileString === null || smileString === undefined) { + throw new Error('Required parameter smileString was null or undefined when calling getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (smileString !== undefined && smileString !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + smileString, 'smile_string'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/chemscraper/similarity-sorted-order/${this.configuration.encodeParam({name: "jobId", value: jobId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/api/mmli-backend/v1/api/files.service.ts b/src/app/api/mmli-backend/v1/api/files.service.ts new file mode 100644 index 0000000..58f2b06 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/files.service.ts @@ -0,0 +1,490 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { ExportRequestBody } from '../model/exportRequestBody'; +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class FilesService { + + protected basePath = 'http://localhost'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * @param consumes string[] mime-types + * @return true: consumes contains 'multipart/form-data', false: otherwise + */ + private canConsumeForm(consumes: string[]): boolean { + const form = 'multipart/form-data'; + for (const consume of consumes) { + if (form === consume) { + return true; + } + } + return false; + } + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Analyze Documents + * @param bucketName + * @param exportRequestBody + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bucketName === null || bucketName === undefined) { + throw new Error('Required parameter bucketName was null or undefined when calling analyzeDocumentsBucketNameExportResultsPost.'); + } + if (exportRequestBody === null || exportRequestBody === undefined) { + throw new Error('Required parameter exportRequestBody was null or undefined when calling analyzeDocumentsBucketNameExportResultsPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "bucketName", value: bucketName, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/export-results`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: exportRequestBody, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Get Errors + * @param bucketName + * @param jobId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bucketName === null || bucketName === undefined) { + throw new Error('Required parameter bucketName was null or undefined when calling getErrorsBucketNameErrorsJobIdGet.'); + } + if (jobId === null || jobId === undefined) { + throw new Error('Required parameter jobId was null or undefined when calling getErrorsBucketNameErrorsJobIdGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "bucketName", value: bucketName, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/errors/${this.configuration.encodeParam({name: "jobId", value: jobId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Get Input File + * @param bucketName + * @param jobId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bucketName === null || bucketName === undefined) { + throw new Error('Required parameter bucketName was null or undefined when calling getInputFileBucketNameInputsJobIdGet.'); + } + if (jobId === null || jobId === undefined) { + throw new Error('Required parameter jobId was null or undefined when calling getInputFileBucketNameInputsJobIdGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "bucketName", value: bucketName, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/inputs/${this.configuration.encodeParam({name: "jobId", value: jobId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Get Results + * @param bucketName + * @param jobId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bucketName === null || bucketName === undefined) { + throw new Error('Required parameter bucketName was null or undefined when calling getResultsBucketNameResultsJobIdGet.'); + } + if (jobId === null || jobId === undefined) { + throw new Error('Required parameter jobId was null or undefined when calling getResultsBucketNameResultsJobIdGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "bucketName", value: bucketName, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/results/${this.configuration.encodeParam({name: "jobId", value: jobId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Upload File + * @param bucketName + * @param file + * @param jobId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bucketName === null || bucketName === undefined) { + throw new Error('Required parameter bucketName was null or undefined when calling uploadFileBucketNameUploadPost.'); + } + if (file === null || file === undefined) { + throw new Error('Required parameter file was null or undefined when calling uploadFileBucketNameUploadPost.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (jobId !== undefined && jobId !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + jobId, 'job_id'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + // to determine the Content-Type header + const consumes: string[] = [ + 'multipart/form-data' + ]; + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + // use FormData to transmit files using content-type "multipart/form-data" + // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data + localVarUseForm = canConsumeForm; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (file !== undefined) { + localVarFormParams = localVarFormParams.append('file', file) as any || localVarFormParams; + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "bucketName", value: bucketName, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/upload`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/api/mmli-backend/v1/api/jobs.service.ts b/src/app/api/mmli-backend/v1/api/jobs.service.ts new file mode 100644 index 0000000..1c943ce --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/jobs.service.ts @@ -0,0 +1,614 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { BodyCreateJobJobTypeJobsPost } from '../model/bodyCreateJobJobTypeJobsPost'; +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; +// @ts-ignore +import { Job } from '../model/job'; +// @ts-ignore +import { JobUpdate } from '../model/jobUpdate'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class JobsService { + + protected basePath = 'http://localhost'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Create Job + * Create a new run for a new or existing Job + * @param jobType + * @param bodyCreateJobJobTypeJobsPost + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createJobJobTypeJobsPost(jobType: string, bodyCreateJobJobTypeJobsPost?: BodyCreateJobJobTypeJobsPost, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public createJobJobTypeJobsPost(jobType: string, bodyCreateJobJobTypeJobsPost?: BodyCreateJobJobTypeJobsPost, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createJobJobTypeJobsPost(jobType: string, bodyCreateJobJobTypeJobsPost?: BodyCreateJobJobTypeJobsPost, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createJobJobTypeJobsPost(jobType: string, bodyCreateJobJobTypeJobsPost?: BodyCreateJobJobTypeJobsPost, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobType === null || jobType === undefined) { + throw new Error('Required parameter jobType was null or undefined when calling createJobJobTypeJobsPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "jobType", value: jobType, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/jobs`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyCreateJobJobTypeJobsPost, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Delete Job By Type And Job Id And Run Id + * Delete a single Job by type, job_id, and run_id + * @param jobType + * @param jobId + * @param runId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete(jobType: string, jobId: string, runId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete(jobType: string, jobId: string, runId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete(jobType: string, jobId: string, runId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete(jobType: string, jobId: string, runId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobType === null || jobType === undefined) { + throw new Error('Required parameter jobType was null or undefined when calling deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete.'); + } + if (jobId === null || jobId === undefined) { + throw new Error('Required parameter jobId was null or undefined when calling deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete.'); + } + if (runId === null || runId === undefined) { + throw new Error('Required parameter runId was null or undefined when calling deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "jobType", value: jobType, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/jobs/${this.configuration.encodeParam({name: "jobId", value: jobId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/${this.configuration.encodeParam({name: "runId", value: runId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Get Job By Type And Job Id And Run Id + * Get a single job by type, job_id, and run_id + * @param jobType + * @param jobId + * @param runId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet(jobType: string, jobId: string, runId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet(jobType: string, jobId: string, runId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet(jobType: string, jobId: string, runId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet(jobType: string, jobId: string, runId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobType === null || jobType === undefined) { + throw new Error('Required parameter jobType was null or undefined when calling getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet.'); + } + if (jobId === null || jobId === undefined) { + throw new Error('Required parameter jobId was null or undefined when calling getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet.'); + } + if (runId === null || runId === undefined) { + throw new Error('Required parameter runId was null or undefined when calling getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "jobType", value: jobType, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/jobs/${this.configuration.encodeParam({name: "jobId", value: jobId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/${this.configuration.encodeParam({name: "runId", value: runId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * List Jobs By Type And Job Id + * Get a list of all job runs by type and job_id + * @param jobType + * @param jobId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listJobsByTypeAndJobIdJobTypeJobsJobIdGet(jobType: string, jobId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listJobsByTypeAndJobIdJobTypeJobsJobIdGet(jobType: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listJobsByTypeAndJobIdJobTypeJobsJobIdGet(jobType: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listJobsByTypeAndJobIdJobTypeJobsJobIdGet(jobType: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobType === null || jobType === undefined) { + throw new Error('Required parameter jobType was null or undefined when calling listJobsByTypeAndJobIdJobTypeJobsJobIdGet.'); + } + if (jobId === null || jobId === undefined) { + throw new Error('Required parameter jobId was null or undefined when calling listJobsByTypeAndJobIdJobTypeJobsJobIdGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "jobType", value: jobType, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/jobs/${this.configuration.encodeParam({name: "jobId", value: jobId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * List Jobs By Type + * Get a list of all job runs by type + * @param jobType + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listJobsByTypeJobTypeJobsGet(jobType: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listJobsByTypeJobTypeJobsGet(jobType: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listJobsByTypeJobTypeJobsGet(jobType: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listJobsByTypeJobTypeJobsGet(jobType: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobType === null || jobType === undefined) { + throw new Error('Required parameter jobType was null or undefined when calling listJobsByTypeJobTypeJobsGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "jobType", value: jobType, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/jobs`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Patch Existing Job + * Update one or more fields of an existing Job + * @param jobType + * @param jobUpdate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public patchExistingJobJobTypeJobsJobIdRunIdPatch(jobType: string, jobUpdate: JobUpdate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public patchExistingJobJobTypeJobsJobIdRunIdPatch(jobType: string, jobUpdate: JobUpdate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public patchExistingJobJobTypeJobsJobIdRunIdPatch(jobType: string, jobUpdate: JobUpdate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public patchExistingJobJobTypeJobsJobIdRunIdPatch(jobType: string, jobUpdate: JobUpdate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobType === null || jobType === undefined) { + throw new Error('Required parameter jobType was null or undefined when calling patchExistingJobJobTypeJobsJobIdRunIdPatch.'); + } + if (jobUpdate === null || jobUpdate === undefined) { + throw new Error('Required parameter jobUpdate was null or undefined when calling patchExistingJobJobTypeJobsJobIdRunIdPatch.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "jobType", value: jobType, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/jobs//`; + return this.httpClient.request('patch', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: jobUpdate, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Update Existing Job + * Overwrite all writeable fields of an existing Job + * @param jobType + * @param job + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateExistingJobJobTypeJobsJobIdRunIdPut(jobType: string, job: Job, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateExistingJobJobTypeJobsJobIdRunIdPut(jobType: string, job: Job, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateExistingJobJobTypeJobsJobIdRunIdPut(jobType: string, job: Job, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateExistingJobJobTypeJobsJobIdRunIdPut(jobType: string, job: Job, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobType === null || jobType === undefined) { + throw new Error('Required parameter jobType was null or undefined when calling updateExistingJobJobTypeJobsJobIdRunIdPut.'); + } + if (job === null || job === undefined) { + throw new Error('Required parameter job was null or undefined when calling updateExistingJobJobTypeJobsJobIdRunIdPut.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/${this.configuration.encodeParam({name: "jobType", value: jobType, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/jobs//`; + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: job, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/api/mmli-backend/v1/api/novostoic.service.ts b/src/app/api/mmli-backend/v1/api/novostoic.service.ts new file mode 100644 index 0000000..1d29509 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/novostoic.service.ts @@ -0,0 +1,543 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { ChemicalAutoCompleteResponse } from '../model/chemicalAutoCompleteResponse'; +// @ts-ignore +import { DgPredictorRequestBody } from '../model/dgPredictorRequestBody'; +// @ts-ignore +import { EnzRankRequestBody } from '../model/enzRankRequestBody'; +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; +// @ts-ignore +import { NovostoicRequestBody } from '../model/novostoicRequestBody'; +// @ts-ignore +import { OptstoicRequestBody } from '../model/optstoicRequestBody'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class NovostoicService { + + protected basePath = 'http://localhost'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Get Chemical Auto Complete + * Returns a list of chemicals that match the search string limited to 20 results. + * @param search + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getChemicalAutoCompleteChemicalAutoCompleteGet(search: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getChemicalAutoCompleteChemicalAutoCompleteGet(search: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getChemicalAutoCompleteChemicalAutoCompleteGet(search: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getChemicalAutoCompleteChemicalAutoCompleteGet(search: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (search === null || search === undefined) { + throw new Error('Required parameter search was null or undefined when calling getChemicalAutoCompleteChemicalAutoCompleteGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (search !== undefined && search !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + search, 'search'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/chemical/auto-complete`; + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Start Dgpredictor + * @param dgPredictorRequestBody + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public startDgpredictorNovostoicDgpredictorRunPost(dgPredictorRequestBody: DgPredictorRequestBody, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public startDgpredictorNovostoicDgpredictorRunPost(dgPredictorRequestBody: DgPredictorRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startDgpredictorNovostoicDgpredictorRunPost(dgPredictorRequestBody: DgPredictorRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startDgpredictorNovostoicDgpredictorRunPost(dgPredictorRequestBody: DgPredictorRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (dgPredictorRequestBody === null || dgPredictorRequestBody === undefined) { + throw new Error('Required parameter dgPredictorRequestBody was null or undefined when calling startDgpredictorNovostoicDgpredictorRunPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/novostoic-dgpredictor/run`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: dgPredictorRequestBody, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Start Enzrank + * @param enzRankRequestBody + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public startEnzrankNovostoicEnzrankRunPost(enzRankRequestBody: EnzRankRequestBody, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public startEnzrankNovostoicEnzrankRunPost(enzRankRequestBody: EnzRankRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startEnzrankNovostoicEnzrankRunPost(enzRankRequestBody: EnzRankRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startEnzrankNovostoicEnzrankRunPost(enzRankRequestBody: EnzRankRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (enzRankRequestBody === null || enzRankRequestBody === undefined) { + throw new Error('Required parameter enzRankRequestBody was null or undefined when calling startEnzrankNovostoicEnzrankRunPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/novostoic-enzrank/run`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: enzRankRequestBody, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Start Novostoic + * @param novostoicRequestBody + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public startNovostoicNovostoicNovostoicRunPost(novostoicRequestBody: NovostoicRequestBody, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public startNovostoicNovostoicNovostoicRunPost(novostoicRequestBody: NovostoicRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startNovostoicNovostoicNovostoicRunPost(novostoicRequestBody: NovostoicRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startNovostoicNovostoicNovostoicRunPost(novostoicRequestBody: NovostoicRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (novostoicRequestBody === null || novostoicRequestBody === undefined) { + throw new Error('Required parameter novostoicRequestBody was null or undefined when calling startNovostoicNovostoicNovostoicRunPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/novostoic-novostoic/run`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: novostoicRequestBody, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Start Optstoic + * @param optstoicRequestBody + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public startOptstoicNovostoicOptstoicRunPost(optstoicRequestBody: OptstoicRequestBody, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public startOptstoicNovostoicOptstoicRunPost(optstoicRequestBody: OptstoicRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startOptstoicNovostoicOptstoicRunPost(optstoicRequestBody: OptstoicRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startOptstoicNovostoicOptstoicRunPost(optstoicRequestBody: OptstoicRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (optstoicRequestBody === null || optstoicRequestBody === undefined) { + throw new Error('Required parameter optstoicRequestBody was null or undefined when calling startOptstoicNovostoicOptstoicRunPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/novostoic-optstoic/run`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: optstoicRequestBody, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Validate Chemical + * @param search + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validateChemicalChemicalValidateGet(search: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public validateChemicalChemicalValidateGet(search: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public validateChemicalChemicalValidateGet(search: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public validateChemicalChemicalValidateGet(search: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (search === null || search === undefined) { + throw new Error('Required parameter search was null or undefined when calling validateChemicalChemicalValidateGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (search !== undefined && search !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + search, 'search'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/chemical/validate`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/api/mmli-backend/v1/api/somn.service.ts b/src/app/api/mmli-backend/v1/api/somn.service.ts new file mode 100644 index 0000000..c8c1047 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/somn.service.ts @@ -0,0 +1,251 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { CheckReactionSiteResponse } from '../model/checkReactionSiteResponse'; +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; +// @ts-ignore +import { SomnRequestBody } from '../model/somnRequestBody'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class SomnService { + + protected basePath = 'http://localhost'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Check Reaction Sites + * @param smiles + * @param role + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public checkReactionSitesSomnAllReactionSitesGet(smiles: string, role: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public checkReactionSitesSomnAllReactionSitesGet(smiles: string, role: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public checkReactionSitesSomnAllReactionSitesGet(smiles: string, role: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public checkReactionSitesSomnAllReactionSitesGet(smiles: string, role: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (smiles === null || smiles === undefined) { + throw new Error('Required parameter smiles was null or undefined when calling checkReactionSitesSomnAllReactionSitesGet.'); + } + if (role === null || role === undefined) { + throw new Error('Required parameter role was null or undefined when calling checkReactionSitesSomnAllReactionSitesGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (smiles !== undefined && smiles !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + smiles, 'smiles'); + } + if (role !== undefined && role !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + role, 'role'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/somn/all-reaction-sites`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Start Somn + * @param somnRequestBody + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public startSomnSomnRunPost(somnRequestBody: SomnRequestBody, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public startSomnSomnRunPost(somnRequestBody: SomnRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startSomnSomnRunPost(somnRequestBody: SomnRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startSomnSomnRunPost(somnRequestBody: SomnRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (somnRequestBody === null || somnRequestBody === undefined) { + throw new Error('Required parameter somnRequestBody was null or undefined when calling startSomnSomnRunPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/somn/run`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: somnRequestBody, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/api/mmli-backend/v1/configuration.ts b/src/app/api/mmli-backend/v1/configuration.ts new file mode 100644 index 0000000..526b454 --- /dev/null +++ b/src/app/api/mmli-backend/v1/configuration.ts @@ -0,0 +1,166 @@ +import { HttpParameterCodec } from '@angular/common/http'; +import { Param } from './param'; + +export interface ConfigurationParameters { + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Override the default method for encoding path parameters in various + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam?: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials?: {[ key: string ]: string | (() => string | undefined)}; +} + +export class Configuration { + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Encoding of various path parameter + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials: {[ key: string ]: string | (() => string | undefined)}; + + constructor(configurationParameters: ConfigurationParameters = {}) { + this.apiKeys = configurationParameters.apiKeys; + this.username = configurationParameters.username; + this.password = configurationParameters.password; + this.accessToken = configurationParameters.accessToken; + this.basePath = configurationParameters.basePath; + this.withCredentials = configurationParameters.withCredentials; + this.encoder = configurationParameters.encoder; + if (configurationParameters.encodeParam) { + this.encodeParam = configurationParameters.encodeParam; + } + else { + this.encodeParam = param => this.defaultEncodeParam(param); + } + if (configurationParameters.credentials) { + this.credentials = configurationParameters.credentials; + } + else { + this.credentials = {}; + } + } + + /** + * Select the correct content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param contentTypes - the array of content types that are available for selection + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderContentType (contentTypes: string[]): string | undefined { + if (contentTypes.length === 0) { + return undefined; + } + + const type = contentTypes.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return contentTypes[0]; + } + return type; + } + + /** + * Select the correct accept content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param accepts - the array of content types that are available for selection. + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderAccept(accepts: string[]): string | undefined { + if (accepts.length === 0) { + return undefined; + } + + const type = accepts.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return accepts[0]; + } + return type; + } + + /** + * 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. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } + + public lookupCredential(key: string): string | undefined { + const value = this.credentials[key]; + return typeof value === 'function' + ? value() + : value; + } + + private defaultEncodeParam(param: Param): string { + // This implementation exists as fallback for missing configuration + // and for backwards compatibility to older typescript-angular generator versions. + // It only works for the 'simple' parameter style. + // Date-handling only works for the 'date-time' format. + // All other styles and Date-formats are probably handled incorrectly. + // + // But: if that's all you need (i.e.: the most common use-case): no need for customization! + + const value = param.dataFormat === 'date-time' && param.value instanceof Date + ? (param.value as Date).toISOString() + : param.value; + + return encodeURIComponent(String(value)); + } +} diff --git a/src/app/api/mmli-backend/v1/encoder.ts b/src/app/api/mmli-backend/v1/encoder.ts new file mode 100644 index 0000000..138c4d5 --- /dev/null +++ b/src/app/api/mmli-backend/v1/encoder.ts @@ -0,0 +1,20 @@ +import { HttpParameterCodec } from '@angular/common/http'; + +/** + * Custom HttpParameterCodec + * Workaround for https://github.com/angular/angular/issues/18261 + */ +export class CustomHttpParameterCodec implements HttpParameterCodec { + encodeKey(k: string): string { + return encodeURIComponent(k); + } + encodeValue(v: string): string { + return encodeURIComponent(v); + } + decodeKey(k: string): string { + return decodeURIComponent(k); + } + decodeValue(v: string): string { + return decodeURIComponent(v); + } +} diff --git a/src/app/api/mmli-backend/v1/git_push.sh b/src/app/api/mmli-backend/v1/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/src/app/api/mmli-backend/v1/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/src/app/api/mmli-backend/v1/index.ts b/src/app/api/mmli-backend/v1/index.ts new file mode 100644 index 0000000..104dd3d --- /dev/null +++ b/src/app/api/mmli-backend/v1/index.ts @@ -0,0 +1,6 @@ +export * from './api/api'; +export * from './model/models'; +export * from './variables'; +export * from './configuration'; +export * from './api.module'; +export * from './param'; diff --git a/src/app/api/mmli-backend/v1/model/analyzeRequestBody.ts b/src/app/api/mmli-backend/v1/model/analyzeRequestBody.ts new file mode 100644 index 0000000..b3b348f --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/analyzeRequestBody.ts @@ -0,0 +1,19 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AnalyzeRequestBody { + jobId: string; + user_email: string; + fileList: Array; +} + diff --git a/src/app/api/mmli-backend/v1/model/bodyCreateJobJobTypeJobsPost.ts b/src/app/api/mmli-backend/v1/model/bodyCreateJobJobTypeJobsPost.ts new file mode 100644 index 0000000..cd52a80 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/bodyCreateJobJobTypeJobsPost.ts @@ -0,0 +1,20 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface BodyCreateJobJobTypeJobsPost { + job_id?: string; + run_id?: string; + email?: string; + job_info?: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/checkReactionSiteResponse.ts b/src/app/api/mmli-backend/v1/model/checkReactionSiteResponse.ts new file mode 100644 index 0000000..18d422b --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/checkReactionSiteResponse.ts @@ -0,0 +1,18 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface CheckReactionSiteResponse { + reaction_site_idxes: Array; + svg: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/chemicalAutoCompleteResponse.ts b/src/app/api/mmli-backend/v1/model/chemicalAutoCompleteResponse.ts new file mode 100644 index 0000000..9584391 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/chemicalAutoCompleteResponse.ts @@ -0,0 +1,23 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ChemicalAutoCompleteResponse { + name: string; + smiles: string; + inchi: string; + inchi_key: string; + metanetx_id: string; + kegg_id: string; + structure?: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/dgPredictorRequestBody.ts b/src/app/api/mmli-backend/v1/model/dgPredictorRequestBody.ts new file mode 100644 index 0000000..e0af0e7 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/dgPredictorRequestBody.ts @@ -0,0 +1,22 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.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 { ReactionsInner } from './reactionsInner'; + + +export interface DgPredictorRequestBody { + jobId: string; + user_email: string; + ph: number; + ionic_strength: number; + reactions: Array; +} + diff --git a/src/app/api/mmli-backend/v1/model/enzRankRequestBody.ts b/src/app/api/mmli-backend/v1/model/enzRankRequestBody.ts new file mode 100644 index 0000000..ecd4d70 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/enzRankRequestBody.ts @@ -0,0 +1,20 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface EnzRankRequestBody { + jobId: string; + user_email: string; + primary_precursor: string; + enzyme_sequence: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/exportRequestBody.ts b/src/app/api/mmli-backend/v1/model/exportRequestBody.ts new file mode 100644 index 0000000..6212010 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/exportRequestBody.ts @@ -0,0 +1,23 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ExportRequestBody { + jobId: string; + cdxml: boolean; + cdxml_filter: string; + cdxml_selected_pages: Array; + csv: boolean; + csv_filter: string; + csv_molecules: Array; +} + diff --git a/src/app/api/mmli-backend/v1/model/flaggedMolecule.ts b/src/app/api/mmli-backend/v1/model/flaggedMolecule.ts new file mode 100644 index 0000000..ef89d4f --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/flaggedMolecule.ts @@ -0,0 +1,20 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface FlaggedMolecule { + smile?: string; + job_id?: string; + doc_id?: string; + time_created?: number; +} + diff --git a/src/app/api/mmli-backend/v1/model/flaggedMoleculeDelete.ts b/src/app/api/mmli-backend/v1/model/flaggedMoleculeDelete.ts new file mode 100644 index 0000000..b75c0ba --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/flaggedMoleculeDelete.ts @@ -0,0 +1,18 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface FlaggedMoleculeDelete { + smile: string; + job_id: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/hTTPValidationError.ts b/src/app/api/mmli-backend/v1/model/hTTPValidationError.ts new file mode 100644 index 0000000..024a920 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/hTTPValidationError.ts @@ -0,0 +1,18 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.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 { ValidationError } from './validationError'; + + +export interface HTTPValidationError { + detail?: Array; +} + diff --git a/src/app/api/mmli-backend/v1/model/job.ts b/src/app/api/mmli-backend/v1/model/job.ts new file mode 100644 index 0000000..6eb365c --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/job.ts @@ -0,0 +1,34 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.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 { JobStatus } from './jobStatus'; +import { JobType } from './jobType'; + + +export interface Job { + job_info?: string; + email?: string; + job_id?: string; + run_id?: string; + phase?: JobStatus; + type?: JobType; + image?: string; + command?: string; + time_created?: number; + time_start?: number; + time_end?: number; + deleted?: number; + user_agent?: string; +} +export namespace Job { +} + + diff --git a/src/app/api/mmli-backend/v1/model/jobStatus.ts b/src/app/api/mmli-backend/v1/model/jobStatus.ts new file mode 100644 index 0000000..6c814c9 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/jobStatus.ts @@ -0,0 +1,25 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * An enumeration. + */ +export type JobStatus = 'queued' | 'processing' | 'completed' | 'error'; + +export const JobStatus = { + Queued: 'queued' as JobStatus, + Processing: 'processing' as JobStatus, + Completed: 'completed' as JobStatus, + Error: 'error' as JobStatus +}; + diff --git a/src/app/api/mmli-backend/v1/model/jobType.ts b/src/app/api/mmli-backend/v1/model/jobType.ts new file mode 100644 index 0000000..3cc9c26 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/jobType.ts @@ -0,0 +1,30 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * An enumeration. + */ +export type JobType = 'clean' | 'chemscraper' | 'molli' | 'novostoic-optstoic' | 'novostoic-novostoic' | 'novostoic-enzrank' | 'novostoic-dgpredictor' | 'somn' | 'defaults'; + +export const JobType = { + Clean: 'clean' as JobType, + Chemscraper: 'chemscraper' as JobType, + Molli: 'molli' as JobType, + NovostoicOptstoic: 'novostoic-optstoic' as JobType, + NovostoicNovostoic: 'novostoic-novostoic' as JobType, + NovostoicEnzrank: 'novostoic-enzrank' as JobType, + NovostoicDgpredictor: 'novostoic-dgpredictor' as JobType, + Somn: 'somn' as JobType, + Defaults: 'defaults' as JobType +}; + diff --git a/src/app/api/mmli-backend/v1/model/jobUpdate.ts b/src/app/api/mmli-backend/v1/model/jobUpdate.ts new file mode 100644 index 0000000..2d99274 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/jobUpdate.ts @@ -0,0 +1,29 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.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 { JobStatus } from './jobStatus'; + + +export interface JobUpdate { + job_id: string; + run_id: number; + time_start?: number; + time_end?: number; + job_info?: string; + email?: string; + image?: string; + command?: string; + phase?: JobStatus; +} +export namespace JobUpdate { +} + + diff --git a/src/app/api/mmli-backend/v1/model/locationInner.ts b/src/app/api/mmli-backend/v1/model/locationInner.ts new file mode 100644 index 0000000..7b14eb0 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/locationInner.ts @@ -0,0 +1,16 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface LocationInner { +} + diff --git a/src/app/api/mmli-backend/v1/model/models.ts b/src/app/api/mmli-backend/v1/model/models.ts new file mode 100644 index 0000000..fa06bcf --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/models.ts @@ -0,0 +1,23 @@ +export * from './analyzeRequestBody'; +export * from './bodyCreateJobJobTypeJobsPost'; +export * from './checkReactionSiteResponse'; +export * from './chemicalAutoCompleteResponse'; +export * from './dgPredictorRequestBody'; +export * from './enzRankRequestBody'; +export * from './exportRequestBody'; +export * from './flaggedMolecule'; +export * from './flaggedMoleculeDelete'; +export * from './hTTPValidationError'; +export * from './job'; +export * from './jobStatus'; +export * from './jobType'; +export * from './jobUpdate'; +export * from './locationInner'; +export * from './moleculeWithAmount'; +export * from './novostoicRequestBody'; +export * from './optstoicRequestBody'; +export * from './reactionKeggId'; +export * from './reactionSmiles'; +export * from './reactionsInner'; +export * from './somnRequestBody'; +export * from './validationError'; diff --git a/src/app/api/mmli-backend/v1/model/moleculeWithAmount.ts b/src/app/api/mmli-backend/v1/model/moleculeWithAmount.ts new file mode 100644 index 0000000..407e471 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/moleculeWithAmount.ts @@ -0,0 +1,18 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface MoleculeWithAmount { + molecule: string; + amount: number; +} + diff --git a/src/app/api/mmli-backend/v1/model/novostoicRequestBody.ts b/src/app/api/mmli-backend/v1/model/novostoicRequestBody.ts new file mode 100644 index 0000000..6ec2936 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/novostoicRequestBody.ts @@ -0,0 +1,29 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.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 { MoleculeWithAmount } from './moleculeWithAmount'; + + +export interface NovostoicRequestBody { + jobId: string; + user_email: string; + primary_precursor: MoleculeWithAmount; + target_molecule: MoleculeWithAmount; + co_reactants: Array; + co_products: Array; + max_steps: number; + max_pathways: number; + is_thermodynamic_feasible: boolean; + thermodynamical_feasible_reaction_only: boolean; + use_enzyme_selection: boolean; + num_enzyme_candidates: number; +} + diff --git a/src/app/api/mmli-backend/v1/model/optstoicRequestBody.ts b/src/app/api/mmli-backend/v1/model/optstoicRequestBody.ts new file mode 100644 index 0000000..6d1e7bb --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/optstoicRequestBody.ts @@ -0,0 +1,20 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface OptstoicRequestBody { + jobId: string; + user_email: string; + primary_precursor: string; + target_molecule: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/reactionKeggId.ts b/src/app/api/mmli-backend/v1/model/reactionKeggId.ts new file mode 100644 index 0000000..a968e04 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/reactionKeggId.ts @@ -0,0 +1,20 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ReactionKeggId { + type: string; + molecule_number: string; + molecule_inchi_or_smiles: string; + reaction_keggid: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/reactionSmiles.ts b/src/app/api/mmli-backend/v1/model/reactionSmiles.ts new file mode 100644 index 0000000..cf0175c --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/reactionSmiles.ts @@ -0,0 +1,18 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ReactionSmiles { + type: string; + smiles: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/reactionsInner.ts b/src/app/api/mmli-backend/v1/model/reactionsInner.ts new file mode 100644 index 0000000..41e81d6 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/reactionsInner.ts @@ -0,0 +1,23 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.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 { ReactionSmiles } from './reactionSmiles'; +import { ReactionKeggId } from './reactionKeggId'; + + +export interface ReactionsInner { + type: string; + smiles: string; + molecule_number: string; + molecule_inchi_or_smiles: string; + reaction_keggid: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/somnRequestBody.ts b/src/app/api/mmli-backend/v1/model/somnRequestBody.ts new file mode 100644 index 0000000..cc17f6d --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/somnRequestBody.ts @@ -0,0 +1,23 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface SomnRequestBody { + jobId: string; + user_email: string; + reactant_pair_name: string; + el: string; + el_name: string; + nuc: string; + nuc_name: string; +} + diff --git a/src/app/api/mmli-backend/v1/model/validationError.ts b/src/app/api/mmli-backend/v1/model/validationError.ts new file mode 100644 index 0000000..bd85903 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/validationError.ts @@ -0,0 +1,20 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.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 { LocationInner } from './locationInner'; + + +export interface ValidationError { + loc: Array; + msg: string; + type: string; +} + diff --git a/src/app/api/mmli-backend/v1/param.ts b/src/app/api/mmli-backend/v1/param.ts new file mode 100644 index 0000000..78a2d20 --- /dev/null +++ b/src/app/api/mmli-backend/v1/param.ts @@ -0,0 +1,69 @@ +/** + * Standard parameter styles defined by OpenAPI spec + */ +export type StandardParamStyle = + | 'matrix' + | 'label' + | 'form' + | 'simple' + | 'spaceDelimited' + | 'pipeDelimited' + | 'deepObject' + ; + +/** + * The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user. + */ +export type ParamStyle = StandardParamStyle | string; + +/** + * Standard parameter locations defined by OpenAPI spec + */ +export type ParamLocation = 'query' | 'header' | 'path' | 'cookie'; + +/** + * Standard types as defined in OpenAPI Specification: Data Types + */ +export type StandardDataType = + | "integer" + | "number" + | "boolean" + | "string" + | "object" + | "array" + ; + +/** + * Standard {@link DataType}s plus your own types/classes. + */ +export type DataType = StandardDataType | string; + +/** + * Standard formats as defined in OpenAPI Specification: Data Types + */ +export type StandardDataFormat = + | "int32" + | "int64" + | "float" + | "double" + | "byte" + | "binary" + | "date" + | "date-time" + | "password" + ; + +export type DataFormat = StandardDataFormat | string; + +/** + * The parameter to encode. + */ +export interface Param { + name: string; + value: unknown; + in: ParamLocation; + style: ParamStyle, + explode: boolean; + dataType: DataType; + dataFormat: DataFormat | undefined; +} diff --git a/src/app/api/mmli-backend/v1/variables.ts b/src/app/api/mmli-backend/v1/variables.ts new file mode 100644 index 0000000..6fe5854 --- /dev/null +++ b/src/app/api/mmli-backend/v1/variables.ts @@ -0,0 +1,9 @@ +import { InjectionToken } from '@angular/core'; + +export const BASE_PATH = new InjectionToken('basePath'); +export const COLLECTION_FORMATS = { + 'csv': ',', + 'tsv': ' ', + 'ssv': ' ', + 'pipes': '|' +} From 6dc5383048f087b092b92d5d5909171c5c1388ac Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Fri, 17 May 2024 13:30:08 -0500 Subject: [PATCH 3/4] fix: temporary hack to fix compile error with localVarTransferCache --- .../v1/api/chemScraper.service.ts | 16 +++---- .../mmli-backend/v1/api/default.service.ts | 10 ++-- .../api/mmli-backend/v1/api/files.service.ts | 36 +++++++------- .../api/mmli-backend/v1/api/jobs.service.ts | 48 +++++++++---------- .../mmli-backend/v1/api/novostoic.service.ts | 28 +++++------ .../api/mmli-backend/v1/api/somn.service.ts | 14 +++--- 6 files changed, 76 insertions(+), 76 deletions(-) diff --git a/src/app/api/mmli-backend/v1/api/chemScraper.service.ts b/src/app/api/mmli-backend/v1/api/chemScraper.service.ts index 1935526..b3cb176 100644 --- a/src/app/api/mmli-backend/v1/api/chemScraper.service.ts +++ b/src/app/api/mmli-backend/v1/api/chemScraper.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -99,7 +99,7 @@ export class ChemScraperService { /** * Analyze Documents - * @param analyzeRequestBody + * @param analyzeRequestBody * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -165,7 +165,7 @@ export class ChemScraperService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -173,7 +173,7 @@ export class ChemScraperService { /** * Delete Flagged Molecule - * @param flaggedMoleculeDelete + * @param flaggedMoleculeDelete * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -239,7 +239,7 @@ export class ChemScraperService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -247,7 +247,7 @@ export class ChemScraperService { /** * Flag Molecule - * @param flaggedMolecule + * @param flaggedMolecule * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -313,7 +313,7 @@ export class ChemScraperService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); diff --git a/src/app/api/mmli-backend/v1/api/default.service.ts b/src/app/api/mmli-backend/v1/api/default.service.ts index e7fe814..2d85e53 100644 --- a/src/app/api/mmli-backend/v1/api/default.service.ts +++ b/src/app/api/mmli-backend/v1/api/default.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -93,8 +93,8 @@ export class DefaultService { /** * Get Similarity Sorted Order - * @param jobId - * @param smileString + * @param jobId + * @param smileString * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -160,7 +160,7 @@ export class DefaultService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); diff --git a/src/app/api/mmli-backend/v1/api/files.service.ts b/src/app/api/mmli-backend/v1/api/files.service.ts index 58f2b06..ca0fe55 100644 --- a/src/app/api/mmli-backend/v1/api/files.service.ts +++ b/src/app/api/mmli-backend/v1/api/files.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -108,8 +108,8 @@ export class FilesService { /** * Analyze Documents - * @param bucketName - * @param exportRequestBody + * @param bucketName + * @param exportRequestBody * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -178,7 +178,7 @@ export class FilesService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -186,8 +186,8 @@ export class FilesService { /** * Get Errors - * @param bucketName - * @param jobId + * @param bucketName + * @param jobId * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -246,7 +246,7 @@ export class FilesService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -254,8 +254,8 @@ export class FilesService { /** * Get Input File - * @param bucketName - * @param jobId + * @param bucketName + * @param jobId * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -314,7 +314,7 @@ export class FilesService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -322,8 +322,8 @@ export class FilesService { /** * Get Results - * @param bucketName - * @param jobId + * @param bucketName + * @param jobId * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -382,7 +382,7 @@ export class FilesService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -390,9 +390,9 @@ export class FilesService { /** * Upload File - * @param bucketName - * @param file - * @param jobId + * @param bucketName + * @param file + * @param jobId * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -481,7 +481,7 @@ export class FilesService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); diff --git a/src/app/api/mmli-backend/v1/api/jobs.service.ts b/src/app/api/mmli-backend/v1/api/jobs.service.ts index 1c943ce..198251a 100644 --- a/src/app/api/mmli-backend/v1/api/jobs.service.ts +++ b/src/app/api/mmli-backend/v1/api/jobs.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -100,8 +100,8 @@ export class JobsService { /** * Create Job * Create a new run for a new or existing Job - * @param jobType - * @param bodyCreateJobJobTypeJobsPost + * @param jobType + * @param bodyCreateJobJobTypeJobsPost * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -167,7 +167,7 @@ export class JobsService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -176,9 +176,9 @@ export class JobsService { /** * Delete Job By Type And Job Id And Run Id * Delete a single Job by type, job_id, and run_id - * @param jobType - * @param jobId - * @param runId + * @param jobType + * @param jobId + * @param runId * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -240,7 +240,7 @@ export class JobsService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -249,9 +249,9 @@ export class JobsService { /** * Get Job By Type And Job Id And Run Id * Get a single job by type, job_id, and run_id - * @param jobType - * @param jobId - * @param runId + * @param jobType + * @param jobId + * @param runId * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -313,7 +313,7 @@ export class JobsService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -322,8 +322,8 @@ export class JobsService { /** * List Jobs By Type And Job Id * Get a list of all job runs by type and job_id - * @param jobType - * @param jobId + * @param jobType + * @param jobId * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -382,7 +382,7 @@ export class JobsService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -391,7 +391,7 @@ export class JobsService { /** * List Jobs By Type * Get a list of all job runs by type - * @param jobType + * @param jobType * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -447,7 +447,7 @@ export class JobsService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -456,8 +456,8 @@ export class JobsService { /** * Patch Existing Job * Update one or more fields of an existing Job - * @param jobType - * @param jobUpdate + * @param jobType + * @param jobUpdate * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -526,7 +526,7 @@ export class JobsService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -535,8 +535,8 @@ export class JobsService { /** * Update Existing Job * Overwrite all writeable fields of an existing Job - * @param jobType - * @param job + * @param jobType + * @param job * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -605,7 +605,7 @@ export class JobsService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); diff --git a/src/app/api/mmli-backend/v1/api/novostoic.service.ts b/src/app/api/mmli-backend/v1/api/novostoic.service.ts index 1d29509..d4a638f 100644 --- a/src/app/api/mmli-backend/v1/api/novostoic.service.ts +++ b/src/app/api/mmli-backend/v1/api/novostoic.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -104,7 +104,7 @@ export class NovostoicService { /** * Get Chemical Auto Complete * Returns a list of chemicals that match the search string limited to 20 results. - * @param search + * @param search * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -167,7 +167,7 @@ export class NovostoicService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -175,7 +175,7 @@ export class NovostoicService { /** * Start Dgpredictor - * @param dgPredictorRequestBody + * @param dgPredictorRequestBody * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -241,7 +241,7 @@ export class NovostoicService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -249,7 +249,7 @@ export class NovostoicService { /** * Start Enzrank - * @param enzRankRequestBody + * @param enzRankRequestBody * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -315,7 +315,7 @@ export class NovostoicService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -323,7 +323,7 @@ export class NovostoicService { /** * Start Novostoic - * @param novostoicRequestBody + * @param novostoicRequestBody * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -389,7 +389,7 @@ export class NovostoicService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -397,7 +397,7 @@ export class NovostoicService { /** * Start Optstoic - * @param optstoicRequestBody + * @param optstoicRequestBody * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -463,7 +463,7 @@ export class NovostoicService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -471,7 +471,7 @@ export class NovostoicService { /** * Validate Chemical - * @param search + * @param search * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -534,7 +534,7 @@ export class NovostoicService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); diff --git a/src/app/api/mmli-backend/v1/api/somn.service.ts b/src/app/api/mmli-backend/v1/api/somn.service.ts index c8c1047..74e071c 100644 --- a/src/app/api/mmli-backend/v1/api/somn.service.ts +++ b/src/app/api/mmli-backend/v1/api/somn.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -97,8 +97,8 @@ export class SomnService { /** * Check Reaction Sites - * @param smiles - * @param role + * @param smiles + * @param role * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -168,7 +168,7 @@ export class SomnService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -176,7 +176,7 @@ export class SomnService { /** * Start Somn - * @param somnRequestBody + * @param somnRequestBody * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -242,7 +242,7 @@ export class SomnService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + //transferCache: localVarTransferCache, reportProgress: reportProgress } ); From 9d1cab81fc449151f22ce7eb6e5ee7d16732218d Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Fri, 17 May 2024 13:30:54 -0500 Subject: [PATCH 4/4] feat: new API + result parsing working with new backend --- .../configuration/configuration.component.ts | 12 +++---- .../clean/results/results.component.ts | 32 ++++++++++++------- src/app/result.service.ts | 19 +++++++---- src/app/sequence.service.ts | 15 ++++++--- src/app/services/environment.service.ts | 3 +- 5 files changed, 51 insertions(+), 30 deletions(-) diff --git a/src/app/components/clean/configuration/configuration.component.ts b/src/app/components/clean/configuration/configuration.component.ts index c524624..57900a1 100644 --- a/src/app/components/clean/configuration/configuration.component.ts +++ b/src/app/components/clean/configuration/configuration.component.ts @@ -130,7 +130,7 @@ export class ConfigurationComponent { } else if (this.userInfoService.userInfo) { // User is logged in, send token cookie with request this._sequenceService.getResponse(this.realSendData).subscribe((data) => { - this.router.navigate(['/results', data.jobId, String(this.seqNum)]); + this.router.navigate(['/results', data.job_id, String(this.seqNum)]); }); } else { // User not logged in, send through hcaptcha @@ -139,11 +139,11 @@ export class ConfigurationComponent { this.realSendData.captcha_token = data; return this._sequenceService.getResponse(this.realSendData); }) - ).subscribe( - (data) => { - this.router.navigate(['/results', data.jobId, String(this.seqNum)]); + ).subscribe({ + next: (data) => { + this.router.navigate(['/results', data.job_id, String(this.seqNum)]); }, - (error) => { + error: (error) => { // TODO replace this with a call to the message service, and display the correct error message this.ngZone.run(() => { console.error('Error getting contacts via subscribe() method:', error.error.message); @@ -151,7 +151,7 @@ export class ConfigurationComponent { this.jobFailedMessage[0].detail = 'Job failed due to ' + error.error.message + '. Please try again, or click the feedback link at the bottom of the page to report a problem.' }); } - ); + }); } } diff --git a/src/app/components/clean/results/results.component.ts b/src/app/components/clean/results/results.component.ts index bdeeac3..cee3a88 100644 --- a/src/app/components/clean/results/results.component.ts +++ b/src/app/components/clean/results/results.component.ts @@ -21,7 +21,7 @@ export class ResultsComponent { timeInterval: Subscription; contentLoaded: boolean = false; rows: PredictionRow[] = []; - getResponse: PollingResponseResult; + getResponse: SeqResult[]; failedJob: boolean = false; jobID: string; sendJobID: string | undefined; @@ -68,9 +68,9 @@ export class ResultsComponent { } - parseResult(): void { + parseResult(results: SeqResult[]): void { // this.jobID = this.getResponse.jobId; - this.getResponse.results.forEach((seq: SeqResult) => { + results.forEach((seq: SeqResult) => { let temp: PredictionRow = { sequence: '', ecNumbers: [], @@ -131,11 +131,19 @@ export class ResultsComponent { getResult(): void { this.timeInterval = this._resultService.getResult(this.sendJobID) .subscribe( - data => { - console.log(data); - this.statusResponse = data; - if (this.statusResponse.status == 'completed' || this.statusResponse.status == 'failed') { - this._resultService.gotEndResult(); + jobs => { + const firstMatch = jobs.find(() => true); + console.log(firstMatch); + if (firstMatch) { + this.statusResponse = { + status: firstMatch?.phase!, + jobId: firstMatch?.job_id!, + created_at: new Date(firstMatch?.time_created!).toISOString(), + url: '' + } + if (this.statusResponse.status == 'completed' || this.statusResponse.status == 'failed') { + this._resultService.gotEndResult(); + } } }, error => { @@ -157,8 +165,8 @@ export class ResultsComponent { this._resultService.getResponse(this.sendJobID) .subscribe( data => { - this.getResponse = data; - this.parseResult(); + const results = JSON.parse(data) as SeqResult[]; + this.parseResult(results); this.contentLoaded = true; }, error => { @@ -257,7 +265,7 @@ export class ResultsComponent { // decending high -> low this.rows.forEach((element, index, array) => { let tempArray: any[] = []; - + element['score'].forEach((element2, index2) => { tempArray.push([element['ecNumbers'][index2], element['score'][index2], element['level'][index2]]); // console.log([element['ecNumbers'][index2], element['score'][index2], element['level'][index2]]); @@ -288,7 +296,7 @@ export class ResultsComponent { return event.order === -1 ? v2 - v1 : v1 - v2; }); } - + } copyAndPasteURL(): void { diff --git a/src/app/result.service.ts b/src/app/result.service.ts index a5525c7..250d29f 100644 --- a/src/app/result.service.ts +++ b/src/app/result.service.ts @@ -5,12 +5,13 @@ import { PollingResponseStatus, PollingResponseResult } from './models'; import { switchMap, tap, share, retry, takeUntil } from 'rxjs/operators'; import {EnvVars} from "./models/envvars"; import {EnvironmentService} from "./services/environment.service"; +import {FilesService, Job, JobsService} from "./api/mmli-backend/v1"; @Injectable({ providedIn: 'root' }) export class ResultService { - private resuts$: Observable; + private resuts$: Observable>; private stopPolling = new Subject(); private envs: EnvVars; @@ -76,11 +77,16 @@ export class ResultService { ] }; - constructor(private http: HttpClient, private envService: EnvironmentService) { + constructor(private http: HttpClient, + private envService: EnvironmentService, + private jobsApi: JobsService, + private filesApi: FilesService) { + this.envs = this.envService.getEnvConfig(); this.resuts$ = timer(1, 10000).pipe( switchMap((x) => - this.http.post(this._url_status, {'jobId' : this.jobID}, { withCredentials: true }) + this.jobsApi.listJobsByTypeAndJobIdJobTypeJobsJobIdGet('clean', this.jobID) + //this.http.post(this._url_status, {'jobId' : this.jobID}, { withCredentials: true }) // this.tempSelectResult() ), retry(), @@ -123,11 +129,12 @@ export class ResultService { this.stopPolling.next(1); } - getResponse(jobID: any): Observable{ + getResponse(jobID: any): Observable{ this.jobID = jobID; - return this.http.post(this._url_result, {'jobId' : jobID}, { withCredentials: true }) //should return a jobID + //return this.http.post(this._url_result, {'jobId' : jobID}, { withCredentials: true }) //should return a jobID + return this.filesApi.getResultsBucketNameResultsJobIdGet('clean', this.jobID) } - getResult(jobID: any): Observable{ + getResult(jobID: any): Observable>{ this.jobID = jobID; return this.resuts$; // return this.http.post(this._url_status, jobID); diff --git a/src/app/sequence.service.ts b/src/app/sequence.service.ts index 2b33049..e9e0998 100644 --- a/src/app/sequence.service.ts +++ b/src/app/sequence.service.ts @@ -5,6 +5,7 @@ import { Observable, of, delay } from 'rxjs'; import { PostResponse, PostSeqData, ExampleData, PostEmailResponse } from './models'; import { EnvironmentService } from "./services/environment.service"; import { EnvVars } from "./models/envvars"; +import {Job, JobsService} from "./api/mmli-backend/v1"; @Injectable({ providedIn: 'root' @@ -30,16 +31,16 @@ export class SequenceService { private envs: EnvVars; get hostname() { - return this.envs?.hostname || 'https://jobmgr.mmli1.ncsa.illinois.edu'; + return this.envs?.hostname || 'https://mmli.fastapi.mmli1.ncsa.illinois.edu'; } get apiBasePath() { - return this.envs?.basePath || 'api/v1'; + return this.envs?.basePath || ''; } get _url(): string { return `${this.hostname}/${this.apiBasePath}`; } - constructor(private http: HttpClient, private envService: EnvironmentService) { + constructor(private http: HttpClient, private envService: EnvironmentService, private jobsApi: JobsService) { this.envs = this.envService.getEnvConfig(); } @@ -56,8 +57,12 @@ export class SequenceService { } - getResponse(sequenceData: PostSeqData): Observable{ - return this.http.post(this._url + '/job/submit', sequenceData, { withCredentials: true }); //should return a jobID + getResponse(sequenceData: PostSeqData): Observable{ + return this.jobsApi.createJobJobTypeJobsPost('clean', { + email: sequenceData.user_email, + job_info: JSON.stringify({ 'input_fasta': sequenceData.input_fasta }) + }); + //return this.http.post(this._url + '/job/submit', sequenceData, { withCredentials: true }); //should return a jobID } addEmail(userEmail: string): Observable{ diff --git a/src/app/services/environment.service.ts b/src/app/services/environment.service.ts index 18c2803..6fd3fd3 100644 --- a/src/app/services/environment.service.ts +++ b/src/app/services/environment.service.ts @@ -13,7 +13,8 @@ export class EnvironmentService { async loadEnvConfig(configPath: string): Promise { console.log('Loading environment config!'); this.envConfig = await lastValueFrom(this.http.get(configPath)); - this.apiConfig.basePath = this.envConfig.hostname + this.envConfig.basePath + this.apiConfig.basePath = this.envConfig.hostname + this.envConfig.basePath; + this.apiConfig.withCredentials = true; } getEnvConfig(): EnvVars {