From 22ab3fe37a93dedd458f3aa16d604870bb8f2700 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Thu, 20 Jul 2023 13:32:30 -0500 Subject: [PATCH 01/17] fix: merge conflicts --- package-lock.json | 1382 +++++++++++++++++++++++++++++++++++++++-- package.json | 12 +- src/app/app.module.ts | 6 +- 3 files changed, 1331 insertions(+), 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index cd992ef..a712a09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,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", @@ -2718,6 +2719,15 @@ "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/@mapbox/node-pre-gyp": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", @@ -2798,6 +2808,97 @@ "set-blocking": "^2.0.0" } }, + "node_modules/@nestjs/axios": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz", + "integrity": "sha512-b2TT2X6BFbnNoeteiaxCIiHaFcSbVW+S5yygYqiIq5i6H77yIU3IVuLdpQkHq8/EqOWFwMopLN8jdkUT71Am9w==", + "dev": true, + "dependencies": { + "axios": "0.27.2" + }, + "peerDependencies": { + "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0", + "reflect-metadata": "^0.1.12", + "rxjs": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/@nestjs/common": { + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", + "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", + "dev": true, + "dependencies": { + "iterare": "1.2.1", + "tslib": "2.5.0", + "uid": "2.0.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "cache-manager": "<=5", + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "cache-manager": { + "optional": true + }, + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/core": { + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz", + "integrity": "sha512-CI27a2JFd5rvvbgkalWqsiwQNhcP4EAG5BUK8usjp29wVp1kx30ghfBT8FLqIgmkRVo65A0IcEnWsxeXMntkxQ==", + "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.5.0", + "uid": "2.0.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^9.0.0", + "@nestjs/microservices": "^9.0.0", + "@nestjs/platform-express": "^9.0.0", + "@nestjs/websockets": "^9.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", @@ -3052,6 +3153,317 @@ "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.7.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.7.0.tgz", + "integrity": "sha512-ieEpHTA/KsDz7ANw03lLPYyjdedDEXYEyYoGBRWdduqXWSX65CJtttjqa8ZaB1mNmIjMtchUHwAYQmTLVQ8HYg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nestjs/axios": "0.1.0", + "@nestjs/common": "9.3.11", + "@nestjs/core": "9.3.11", + "@nuxtjs/opencollective": "0.3.2", + "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.1.6", + "inquirer": "8.2.5", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.0", + "tslib": "2.0.3" + }, + "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/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.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@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/inquirer": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", + "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": "^7.0.0" + }, + "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/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/tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "dev": true + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/@schematics/angular": { "version": "15.1.6", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.1.6.tgz", @@ -3713,6 +4125,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", @@ -3746,6 +4164,16 @@ "postcss": "^8.1.0" } }, + "node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "node_modules/babel-loader": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz", @@ -4320,6 +4748,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", @@ -4332,6 +4772,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", @@ -4398,6 +4844,169 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "devOptional": 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", @@ -4437,12 +5046,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==", "devOptional": 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", @@ -4776,24 +5403,52 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "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.22.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", + "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", "dev": true, - "bin": { - "cssesc": "bin/cssesc" + "dependencies": { + "regenerator-runtime": "^0.13.11" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, - "node_modules/custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true - }, "node_modules/date-format": { "version": "4.0.14", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", @@ -4865,6 +5520,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", @@ -5017,6 +5681,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", @@ -5057,6 +5730,7 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -5066,6 +5740,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -5514,6 +6189,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", @@ -5663,6 +6344,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", @@ -6745,6 +7440,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", @@ -8106,7 +8810,7 @@ "version": "2.6.11", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", - "optional": true, + "devOptional": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -9676,7 +10380,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "devOptional": true + "dev": true }, "node_modules/sass": { "version": "1.57.1", @@ -10235,6 +10939,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", @@ -10704,7 +11414,7 @@ "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "optional": true + "devOptional": true }, "node_modules/tree-kill": { "version": "1.2.2", @@ -10783,6 +11493,18 @@ "node": "*" } }, + "node_modules/uid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz", + "integrity": "sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A==", + "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", @@ -11007,7 +11729,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "optional": true + "devOptional": true }, "node_modules/webpack": { "version": "5.75.0", @@ -11276,7 +11998,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "optional": true, + "devOptional": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -13232,6 +13954,12 @@ "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 + }, "@mapbox/node-pre-gyp": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", @@ -13299,6 +14027,48 @@ } } }, + "@nestjs/axios": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.1.0.tgz", + "integrity": "sha512-b2TT2X6BFbnNoeteiaxCIiHaFcSbVW+S5yygYqiIq5i6H77yIU3IVuLdpQkHq8/EqOWFwMopLN8jdkUT71Am9w==", + "dev": true, + "requires": { + "axios": "0.27.2" + } + }, + "@nestjs/common": { + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", + "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", + "dev": true, + "requires": { + "iterare": "1.2.1", + "tslib": "2.5.0", + "uid": "2.0.1" + } + }, + "@nestjs/core": { + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz", + "integrity": "sha512-CI27a2JFd5rvvbgkalWqsiwQNhcP4EAG5BUK8usjp29wVp1kx30ghfBT8FLqIgmkRVo65A0IcEnWsxeXMntkxQ==", + "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.5.0", + "uid": "2.0.1" + }, + "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", @@ -13422,56 +14192,288 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true - } - } - }, - "@npmcli/node-gyp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", - "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", - "dev": true - }, - "@npmcli/promise-spawn": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", - "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", - "dev": true, - "requires": { - "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==", + } + } + }, + "@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", + "dev": true + }, + "@npmcli/promise-spawn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", + "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", + "dev": true, + "requires": { + "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" + } + } + } + }, + "@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.7.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.7.0.tgz", + "integrity": "sha512-ieEpHTA/KsDz7ANw03lLPYyjdedDEXYEyYoGBRWdduqXWSX65CJtttjqa8ZaB1mNmIjMtchUHwAYQmTLVQ8HYg==", + "dev": true, + "requires": { + "@nestjs/axios": "0.1.0", + "@nestjs/common": "9.3.11", + "@nestjs/core": "9.3.11", + "@nuxtjs/opencollective": "0.3.2", + "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.1.6", + "inquirer": "8.2.5", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.0", + "tslib": "2.0.3" + }, + "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" + } + }, + "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.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "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 + }, + "inquirer": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", "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": "^7.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==", + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "requires": { - "isexe": "^2.0.0" + "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" + } + }, + "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" } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true } } }, @@ -14061,6 +15063,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", @@ -14075,6 +15083,16 @@ "postcss-value-parser": "^4.2.0" } }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "babel-loader": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz", @@ -14494,6 +15512,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", @@ -14506,6 +15533,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", @@ -14565,6 +15598,131 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "devOptional": 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", @@ -14600,12 +15758,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==", "devOptional": 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", @@ -14859,6 +16032,26 @@ "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.22.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", + "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.11" + } + } + } + }, "date-format": { "version": "4.0.14", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", @@ -14907,6 +16100,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", @@ -15022,6 +16221,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", @@ -15056,6 +16264,7 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, "optional": true, "requires": { "iconv-lite": "^0.6.2" @@ -15065,6 +16274,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -15427,6 +16637,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", @@ -15537,6 +16753,17 @@ "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "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", @@ -16350,6 +17577,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", @@ -17407,7 +18640,7 @@ "version": "2.6.11", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", - "optional": true, + "devOptional": true, "requires": { "whatwg-url": "^5.0.0" } @@ -18550,7 +19783,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "devOptional": true + "dev": true }, "sass": { "version": "1.57.1", @@ -18973,6 +20206,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", @@ -19335,7 +20574,7 @@ "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "optional": true + "devOptional": true }, "tree-kill": { "version": "1.2.2", @@ -19382,6 +20621,15 @@ "integrity": "sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==", "dev": true }, + "uid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz", + "integrity": "sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A==", + "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", @@ -19545,7 +20793,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "optional": true + "devOptional": true }, "webpack": { "version": "5.75.0", @@ -19728,7 +20976,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "optional": true, + "devOptional": true, "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" diff --git a/package.json b/package.json index a4d8842..5e1b00e 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": { @@ -32,6 +41,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 e3987a0..14f2fd0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -38,12 +38,14 @@ import { FileDragNDropDirective } from './components/chemscraper/configuration/f import { PdfViewerComponent } from './components/chemscraper/pdf-viewer/pdf-viewer.component'; import { PdfViewerDialogServiceComponent } from './components/chemscraper/pdf-viewer-dialog-service/pdf-viewer-dialog-service.component'; import {EnvironmentService} from "./services/environment.service"; +import {ApiModule, Configuration} from "./api/mmli-backend/v1"; import {MenuModule} from "primeng/menu"; const initAppFn = (envService: EnvironmentService) => { return () => envService.loadEnvConfig('/assets/config/envvars.json'); }; + @NgModule({ declarations: [ AppComponent, @@ -88,7 +90,9 @@ const initAppFn = (envService: EnvironmentService) => { siteKey: '41c35ed8-6425-4764-b3d5-23c1b896f0dd', languageCode: 'en' // optional, will default to browser language }), - MenuModule + MenuModule, + + ApiModule.forRoot(() => new Configuration()), ], providers: [ ChemScraperService, From 22790c71df19b6928b58a85bb69c8f4ab4e2fb66 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Thu, 20 Jul 2023 13:33:02 -0500 Subject: [PATCH 02/17] feat: generated and wired up API client for ChemScraper -> mmli-backend --- 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 | 18 + .../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 | 3 + .../mmli-backend/v1/api/default.service.ts | 520 ++++++++++++++++++ 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 | 20 + .../v1/model/hTTPValidationError.ts | 18 + .../mmli-backend/v1/model/locationInner.ts | 16 + src/app/api/mmli-backend/v1/model/models.ts | 5 + src/app/api/mmli-backend/v1/model/molecule.ts | 34 ++ .../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 + src/app/chemscraper.service.ts | 40 +- src/app/services/environment.service.ts | 4 +- 24 files changed, 1297 insertions(+), 20 deletions(-) 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/default.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/hTTPValidationError.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/molecule.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..1e49ac5 --- /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":{"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"},"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"}}}}}}},"/chemscraper/analyze":{"post":{"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"}}}}}}},"/{bucket_name}/result-status/{job_id}":{"get":{"summary":"Get Result Status","operationId":"get_result_status__bucket_name__result_status__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}/results/{job_id}":{"get":{"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":{"title":"Response Get Results Bucket Name Results Job Id Get","type":"array","items":{"$ref":"#/components/schemas/Molecule"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{bucket_name}/inputs/{job_id}":{"get":{"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":{"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"}}}}}}}},"components":{"schemas":{"AnalyzeRequestBody":{"title":"AnalyzeRequestBody","required":["jobId","user_email","captcha_token","fileList"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"captcha_token":{"title":"Captcha Token","type":"string"},"fileList":{"title":"Filelist","type":"array","items":{"type":"string"}}}},"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"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Molecule":{"title":"Molecule","required":["id","doc_no","file_path","page_no","name","SMILE","structure","minX","minY","width","height","PubChemCID","molecularFormula","molecularWeight","chemicalSafety","Description","Location","OtherInstances"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"doc_no":{"title":"Doc No","type":"string"},"file_path":{"title":"File Path","type":"string"},"page_no":{"title":"Page No","type":"string"},"name":{"title":"Name","type":"string"},"SMILE":{"title":"Smile","type":"string"},"structure":{"title":"Structure","type":"string"},"minX":{"title":"Minx","type":"number"},"minY":{"title":"Miny","type":"number"},"width":{"title":"Width","type":"number"},"height":{"title":"Height","type":"number"},"PubChemCID":{"title":"Pubchemcid","type":"string"},"molecularFormula":{"title":"Molecularformula","type":"string"},"molecularWeight":{"title":"Molecularweight","type":"string"},"chemicalSafety":{"title":"Chemicalsafety","type":"array","items":{"type":"string"}},"Description":{"title":"Description","type":"string"},"Location":{"title":"Location","type":"string"},"OtherInstances":{"title":"Otherinstances","type":"array","items":{"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..cd53ff4 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "6.6.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..a430903 --- /dev/null +++ b/src/app/api/mmli-backend/v1/.openapi-generator/FILES @@ -0,0 +1,18 @@ +.gitignore +.openapi-generator-ignore +README.md +api.module.ts +api/api.ts +api/default.service.ts +configuration.ts +encoder.ts +git_push.sh +index.ts +model/analyzeRequestBody.ts +model/hTTPValidationError.ts +model/locationInner.ts +model/models.ts +model/molecule.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..cd802a1 --- /dev/null +++ b/src/app/api/mmli-backend/v1/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.6.0 \ No newline at end of file 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..8e76619 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/api.ts @@ -0,0 +1,3 @@ +export * from './default.service'; +import { DefaultService } from './default.service'; +export const APIS = [DefaultService]; 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..4ff43de --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/default.service.ts @@ -0,0 +1,520 @@ +/** + * 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 { HTTPValidationError } from '../model/hTTPValidationError'; +// @ts-ignore +import { Molecule } from '../model/molecule'; + +// @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(); + } + + /** + * @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().substr(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}): Observable; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + + // 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, + 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}): Observable; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + reportProgress: reportProgress + } + ); + } + + /** + * Get Result Status + * @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 getResultStatusBucketNameResultStatusJobIdGet(bucketName: string, jobId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public getResultStatusBucketNameResultStatusJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getResultStatusBucketNameResultStatusJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getResultStatusBucketNameResultStatusJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { + if (bucketName === null || bucketName === undefined) { + throw new Error('Required parameter bucketName was null or undefined when calling getResultStatusBucketNameResultStatusJobIdGet.'); + } + if (jobId === null || jobId === undefined) { + throw new Error('Required parameter jobId was null or undefined when calling getResultStatusBucketNameResultStatusJobIdGet.'); + } + + 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 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})}/result-status/${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, + 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}): Observable>; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + // 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, + 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..6c3c246 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/analyzeRequestBody.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 AnalyzeRequestBody { + jobId: string; + user_email: string; + captcha_token: string; + fileList: Array; +} + 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/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..7463e44 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/models.ts @@ -0,0 +1,5 @@ +export * from './analyzeRequestBody'; +export * from './hTTPValidationError'; +export * from './locationInner'; +export * from './molecule'; +export * from './validationError'; diff --git a/src/app/api/mmli-backend/v1/model/molecule.ts b/src/app/api/mmli-backend/v1/model/molecule.ts new file mode 100644 index 0000000..09926a7 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/molecule.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. + */ + + +export interface Molecule { + id: number; + doc_no: string; + file_path: string; + page_no: string; + name: string; + SMILE: string; + structure: string; + minX: number; + minY: number; + width: number; + height: number; + PubChemCID: string; + molecularFormula: string; + molecularWeight: string; + chemicalSafety: Array; + Description: string; + Location: string; + OtherInstances: Array; +} + 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': '|' +} diff --git a/src/app/chemscraper.service.ts b/src/app/chemscraper.service.ts index 3e71b00..75797b3 100644 --- a/src/app/chemscraper.service.ts +++ b/src/app/chemscraper.service.ts @@ -1,9 +1,10 @@ -import { HttpClient, HttpParams } from '@angular/common/http'; +import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { Observable, of, delay } from 'rxjs'; +import { Observable, of } from 'rxjs'; -import { PostResponse, ChemScraperAnalyzeRequestBody, ExampleData, FileUploadResponse, Molecule } from './models'; -import {EnvironmentService} from "./services/environment.service"; +import { PostResponse, FileUploadResponse } from './models'; +import { EnvironmentService } from "./services/environment.service"; +import { AnalyzeRequestBody, DefaultService, Molecule } from "./api/mmli-backend/v1"; @Injectable({ providedIn: 'root' @@ -15,13 +16,11 @@ export class ChemScraperService { submitted_at: "2020-01-01 10:10:10" }; - private SERVER_URL = this.env.hostname + this.env.basePath + '/chemscraper/'; - get env() { return this.envService.getEnvConfig(); } - constructor(private http: HttpClient, private envService: EnvironmentService) { } + constructor(private http: HttpClient, private envService: EnvironmentService, private apiService: DefaultService) { } getExampleResponse(dataLabel: string): Observable{ this.responseFromExample.jobId = dataLabel; @@ -29,34 +28,37 @@ export class ChemScraperService { return respond; } - analyzeDocument(requestBody: ChemScraperAnalyzeRequestBody): Observable{ - return this.http.post(this.SERVER_URL + 'analyze', requestBody); //should return a jobID + analyzeDocument(requestBody: AnalyzeRequestBody): Observable{ + return this.apiService.analyzeDocumentsChemscraperAnalyzePost(requestBody); } fileUpload(formData: FormData, jobID: string): Observable{ if(jobID && jobID == "") { - return this.http.post(this.SERVER_URL + 'upload', formData); //should return a jobID - } - else { - let params = new HttpParams(); - params = params.append('job_id', jobID); - return this.http.post(this.SERVER_URL + 'upload', formData, { params: params }); //should return a jobID + //return this.http.post(this.SERVER_URL + 'upload', formData); //should return a jobID + return this.apiService.uploadFileBucketNameUploadPost('chemscraper', formData.get('file') as Blob); + } else { + //return this.http.post(this.SERVER_URL + 'upload', formData, { params: params }); //should return a jobID + return this.apiService.uploadFileBucketNameUploadPost('chemscraper', formData.get('file') as Blob, jobID); } } getResultStatus(jobID: string): Observable{ - return this.http.get(this.SERVER_URL + 'result-status/' + jobID) + //return this.http.get(this.SERVER_URL + 'result-status/' + jobID) + return this.apiService.getResultStatusBucketNameResultStatusJobIdGet('chemscraper', jobID); } getResult(jobID: string): Observable{ - return this.http.get(this.SERVER_URL + 'results/' + jobID); + //return this.http.get(this.SERVER_URL + 'results/' + jobID); + return this.apiService.getResultsBucketNameResultsJobIdGet('chemscraper', jobID); } getError(jobID: string): Observable{ - return this.http.get(this.SERVER_URL + 'errors/' + jobID); + //return this.http.get(this.SERVER_URL + 'errors/' + jobID); + return this.apiService.getErrorsBucketNameErrorsJobIdGet('chemscraper', jobID); } getInputPDf(jobID: string): Observable{ - return this.http.get(this.SERVER_URL + 'inputs/' + jobID); + //return this.http.get(this.SERVER_URL + 'inputs/' + jobID); + return this.apiService.getInputFileBucketNameInputsJobIdGet('chemscraper', jobID); } } 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 { From 9dcb5a447ca3acf8507fc3f9a324f52850db2892 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Fri, 21 Jul 2023 14:33:41 -0500 Subject: [PATCH 03/17] fix: use generated models for display --- src/app/app.module.ts | 2 ++ src/app/chemscraper.service.ts | 10 +-------- .../results/results.component.html | 2 +- .../chemscraper/results/results.component.ts | 3 --- src/app/pipes/safe.pipe.ts | 21 +++++++++++++++++++ 5 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 src/app/pipes/safe.pipe.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 14f2fd0..b063bfa 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -40,6 +40,7 @@ import { PdfViewerDialogServiceComponent } from './components/chemscraper/pdf-vi import {EnvironmentService} from "./services/environment.service"; import {ApiModule, Configuration} from "./api/mmli-backend/v1"; import {MenuModule} from "primeng/menu"; +import {SafePipe} from "./pipes/safe.pipe"; const initAppFn = (envService: EnvironmentService) => { return () => envService.loadEnvConfig('/assets/config/envvars.json'); @@ -49,6 +50,7 @@ const initAppFn = (envService: EnvironmentService) => { @NgModule({ declarations: [ AppComponent, + SafePipe, LandingPageComponent, FileDragNDropDirective, diff --git a/src/app/chemscraper.service.ts b/src/app/chemscraper.service.ts index 75797b3..0d248e4 100644 --- a/src/app/chemscraper.service.ts +++ b/src/app/chemscraper.service.ts @@ -16,11 +16,7 @@ export class ChemScraperService { submitted_at: "2020-01-01 10:10:10" }; - get env() { - return this.envService.getEnvConfig(); - } - - constructor(private http: HttpClient, private envService: EnvironmentService, private apiService: DefaultService) { } + constructor(private http: HttpClient, private apiService: DefaultService) { } getExampleResponse(dataLabel: string): Observable{ this.responseFromExample.jobId = dataLabel; @@ -43,22 +39,18 @@ export class ChemScraperService { } getResultStatus(jobID: string): Observable{ - //return this.http.get(this.SERVER_URL + 'result-status/' + jobID) return this.apiService.getResultStatusBucketNameResultStatusJobIdGet('chemscraper', jobID); } getResult(jobID: string): Observable{ - //return this.http.get(this.SERVER_URL + 'results/' + jobID); return this.apiService.getResultsBucketNameResultsJobIdGet('chemscraper', jobID); } getError(jobID: string): Observable{ - //return this.http.get(this.SERVER_URL + 'errors/' + jobID); return this.apiService.getErrorsBucketNameErrorsJobIdGet('chemscraper', jobID); } getInputPDf(jobID: string): Observable{ - //return this.http.get(this.SERVER_URL + 'inputs/' + jobID); return this.apiService.getInputFileBucketNameInputsJobIdGet('chemscraper', jobID); } } diff --git a/src/app/components/chemscraper/results/results.component.html b/src/app/components/chemscraper/results/results.component.html index 7056c95..f52c49e 100644 --- a/src/app/components/chemscraper/results/results.component.html +++ b/src/app/components/chemscraper/results/results.component.html @@ -130,7 +130,7 @@

{{ molecule.name }} - + {{ molecule.SMILE }} {{ molecule.page_no }} diff --git a/src/app/components/chemscraper/results/results.component.ts b/src/app/components/chemscraper/results/results.component.ts index 2872a70..12bcd03 100644 --- a/src/app/components/chemscraper/results/results.component.ts +++ b/src/app/components/chemscraper/results/results.component.ts @@ -293,9 +293,6 @@ export class ResultsComponent { if(jobID) this._chemScraperService.getResult(jobID).subscribe( (data) => { - data.forEach(molecule => { - molecule.structure = this.sanitizer.bypassSecurityTrustHtml(molecule.structure.toString()); - }) this.molecules = data; this.updateStatusStage(2); diff --git a/src/app/pipes/safe.pipe.ts b/src/app/pipes/safe.pipe.ts new file mode 100644 index 0000000..de45346 --- /dev/null +++ b/src/app/pipes/safe.pipe.ts @@ -0,0 +1,21 @@ +import { Pipe, PipeTransform } from '@angular/core'; +import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser'; + +@Pipe({ + name: 'safe' +}) +export class SafePipe implements PipeTransform { + + constructor(protected sanitizer: DomSanitizer) {} + + public transform(value: any, type: string): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl { + switch (type) { + case 'html': return this.sanitizer.bypassSecurityTrustHtml(value); + case 'style': return this.sanitizer.bypassSecurityTrustStyle(value); + case 'script': return this.sanitizer.bypassSecurityTrustScript(value); + case 'url': return this.sanitizer.bypassSecurityTrustUrl(value); + case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value); + default: throw new Error(`Invalid safe type specified: ${type}`); + } + } +} From 2c126172c49fea5de524bcafe8fbf8a89d3d78cf Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Fri, 21 Jul 2023 14:35:15 -0500 Subject: [PATCH 04/17] fix: cleanup unused imports --- src/app/chemscraper.service.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/chemscraper.service.ts b/src/app/chemscraper.service.ts index 0d248e4..887a7ba 100644 --- a/src/app/chemscraper.service.ts +++ b/src/app/chemscraper.service.ts @@ -1,9 +1,7 @@ -import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable, of } from 'rxjs'; import { PostResponse, FileUploadResponse } from './models'; -import { EnvironmentService } from "./services/environment.service"; import { AnalyzeRequestBody, DefaultService, Molecule } from "./api/mmli-backend/v1"; @Injectable({ @@ -16,7 +14,7 @@ export class ChemScraperService { submitted_at: "2020-01-01 10:10:10" }; - constructor(private http: HttpClient, private apiService: DefaultService) { } + constructor(private apiService: DefaultService) { } getExampleResponse(dataLabel: string): Observable{ this.responseFromExample.jobId = dataLabel; From 2930d246365125678dcc77e76d1b9b2fd3e7e791 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Fri, 21 Jul 2023 14:41:03 -0500 Subject: [PATCH 05/17] fix: shrink fileUpload code --- src/app/chemscraper.service.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/app/chemscraper.service.ts b/src/app/chemscraper.service.ts index 887a7ba..cffbb93 100644 --- a/src/app/chemscraper.service.ts +++ b/src/app/chemscraper.service.ts @@ -26,14 +26,9 @@ export class ChemScraperService { return this.apiService.analyzeDocumentsChemscraperAnalyzePost(requestBody); } - fileUpload(formData: FormData, jobID: string): Observable{ - if(jobID && jobID == "") { - //return this.http.post(this.SERVER_URL + 'upload', formData); //should return a jobID - return this.apiService.uploadFileBucketNameUploadPost('chemscraper', formData.get('file') as Blob); - } else { - //return this.http.post(this.SERVER_URL + 'upload', formData, { params: params }); //should return a jobID - return this.apiService.uploadFileBucketNameUploadPost('chemscraper', formData.get('file') as Blob, jobID); - } + fileUpload(formData: FormData, jobID?: string): Observable{ + const fileData = formData.get('file') as Blob; + return this.apiService.uploadFileBucketNameUploadPost('chemscraper', fileData, jobID); } getResultStatus(jobID: string): Observable{ From fbcf88ca2124052c13d3886ec8b202077e1ba275 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Thu, 28 Sep 2023 13:13:57 -0500 Subject: [PATCH 06/17] fix: regenerate API client to add code to call /export-results endpoint --- openapi/mmli-backend.openapi.json | 2 +- package-lock.json | 4 +- .../mmli-backend/v1/.openapi-generator/FILES | 2 +- .../mmli-backend/v1/api/default.service.ts | 74 +++++++++++++++++++ .../v1/model/exportRequestBody.ts | 23 ++++++ src/app/api/mmli-backend/v1/model/models.ts | 1 + src/app/models/index.ts | 2 + 7 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 src/app/api/mmli-backend/v1/model/exportRequestBody.ts diff --git a/openapi/mmli-backend.openapi.json b/openapi/mmli-backend.openapi.json index 1e49ac5..5d2f64d 100644 --- a/openapi/mmli-backend.openapi.json +++ b/openapi/mmli-backend.openapi.json @@ -1 +1 @@ -{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/{bucket_name}/upload":{"post":{"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"},"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"}}}}}}},"/chemscraper/analyze":{"post":{"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"}}}}}}},"/{bucket_name}/result-status/{job_id}":{"get":{"summary":"Get Result Status","operationId":"get_result_status__bucket_name__result_status__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}/results/{job_id}":{"get":{"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":{"title":"Response Get Results Bucket Name Results Job Id Get","type":"array","items":{"$ref":"#/components/schemas/Molecule"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{bucket_name}/inputs/{job_id}":{"get":{"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":{"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"}}}}}}}},"components":{"schemas":{"AnalyzeRequestBody":{"title":"AnalyzeRequestBody","required":["jobId","user_email","captcha_token","fileList"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"captcha_token":{"title":"Captcha Token","type":"string"},"fileList":{"title":"Filelist","type":"array","items":{"type":"string"}}}},"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"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Molecule":{"title":"Molecule","required":["id","doc_no","file_path","page_no","name","SMILE","structure","minX","minY","width","height","PubChemCID","molecularFormula","molecularWeight","chemicalSafety","Description","Location","OtherInstances"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"doc_no":{"title":"Doc No","type":"string"},"file_path":{"title":"File Path","type":"string"},"page_no":{"title":"Page No","type":"string"},"name":{"title":"Name","type":"string"},"SMILE":{"title":"Smile","type":"string"},"structure":{"title":"Structure","type":"string"},"minX":{"title":"Minx","type":"number"},"minY":{"title":"Miny","type":"number"},"width":{"title":"Width","type":"number"},"height":{"title":"Height","type":"number"},"PubChemCID":{"title":"Pubchemcid","type":"string"},"molecularFormula":{"title":"Molecularformula","type":"string"},"molecularWeight":{"title":"Molecularweight","type":"string"},"chemicalSafety":{"title":"Chemicalsafety","type":"array","items":{"type":"string"}},"Description":{"title":"Description","type":"string"},"Location":{"title":"Location","type":"string"},"OtherInstances":{"title":"Otherinstances","type":"array","items":{"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 +{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/{bucket_name}/upload":{"post":{"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"}}}}}}},"/chemscraper/analyze":{"post":{"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"}}}}}}},"/{bucket_name}/result-status/{job_id}":{"get":{"summary":"Get Result Status","operationId":"get_result_status__bucket_name__result_status__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}/results/{job_id}":{"get":{"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":{"title":"Response Get Results Bucket Name Results Job Id Get","type":"array","items":{"$ref":"#/components/schemas/Molecule"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{bucket_name}/inputs/{job_id}":{"get":{"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":{"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":{"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"}}}}}}}},"components":{"schemas":{"AnalyzeRequestBody":{"title":"AnalyzeRequestBody","required":["jobId","user_email","captcha_token","fileList"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"captcha_token":{"title":"Captcha Token","type":"string"},"fileList":{"title":"Filelist","type":"array","items":{"type":"string"}}}},"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"}}},"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"}}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Molecule":{"title":"Molecule","required":["id","doc_no","file_path","page_no","name","SMILE","structure","minX","minY","width","height","PubChemCID","molecularFormula","molecularWeight","chemicalSafety","Description","Location","OtherInstances"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"doc_no":{"title":"Doc No","type":"string"},"file_path":{"title":"File Path","type":"string"},"page_no":{"title":"Page No","type":"string"},"name":{"title":"Name","type":"string"},"SMILE":{"title":"Smile","type":"string"},"structure":{"title":"Structure","type":"string"},"minX":{"title":"Minx","type":"number"},"minY":{"title":"Miny","type":"number"},"width":{"title":"Width","type":"number"},"height":{"title":"Height","type":"number"},"PubChemCID":{"title":"Pubchemcid","type":"string"},"molecularFormula":{"title":"Molecularformula","type":"string"},"molecularWeight":{"title":"Molecularweight","type":"string"},"chemicalSafety":{"title":"Chemicalsafety","type":"array","items":{"type":"string"}},"Description":{"title":"Description","type":"string"},"Location":{"title":"Location","type":"string"},"OtherInstances":{"title":"Otherinstances","type":"array","items":{"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/package-lock.json b/package-lock.json index a712a09..5599411 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "clean", + "name": "chemscraper", "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "clean", + "name": "chemscraper", "version": "0.0.0", "dependencies": { "@angular/animations": "^15.1.0", diff --git a/src/app/api/mmli-backend/v1/.openapi-generator/FILES b/src/app/api/mmli-backend/v1/.openapi-generator/FILES index a430903..4b72958 100644 --- a/src/app/api/mmli-backend/v1/.openapi-generator/FILES +++ b/src/app/api/mmli-backend/v1/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore README.md api.module.ts api/api.ts @@ -9,6 +8,7 @@ encoder.ts git_push.sh index.ts model/analyzeRequestBody.ts +model/exportRequestBody.ts model/hTTPValidationError.ts model/locationInner.ts model/models.ts 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 4ff43de..59deddb 100644 --- a/src/app/api/mmli-backend/v1/api/default.service.ts +++ b/src/app/api/mmli-backend/v1/api/default.service.ts @@ -21,6 +21,8 @@ import { Observable } from 'rxjs'; // @ts-ignore import { AnalyzeRequestBody } from '../model/analyzeRequestBody'; // @ts-ignore +import { ExportRequestBody } from '../model/exportRequestBody'; +// @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore import { Molecule } from '../model/molecule'; @@ -108,6 +110,78 @@ export class DefaultService { 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}): Observable; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + + // 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, + reportProgress: reportProgress + } + ); + } + /** * Analyze Documents * @param analyzeRequestBody 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/models.ts b/src/app/api/mmli-backend/v1/model/models.ts index 7463e44..ea98ab2 100644 --- a/src/app/api/mmli-backend/v1/model/models.ts +++ b/src/app/api/mmli-backend/v1/model/models.ts @@ -1,4 +1,5 @@ export * from './analyzeRequestBody'; +export * from './exportRequestBody'; export * from './hTTPValidationError'; export * from './locationInner'; export * from './molecule'; diff --git a/src/app/models/index.ts b/src/app/models/index.ts index 50853f3..67e7ee2 100644 --- a/src/app/models/index.ts +++ b/src/app/models/index.ts @@ -1,5 +1,7 @@ import { SafeHtml } from "@angular/platform-browser"; +/** Legacy models - prefer models from modules/api/v1/models */ + export interface PredictionRow { sequence: string; ecNumbers: string[]; From 092cdc621d711b26d78d1b822031b2d9abc079bd Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Thu, 28 Sep 2023 13:38:52 -0500 Subject: [PATCH 07/17] fix: use generated API client for export --- src/app/chemscraper.service.ts | 4 ++-- .../chemscraper/results/export-menu/export-menu.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/chemscraper.service.ts b/src/app/chemscraper.service.ts index dd1064e..b07e4e5 100644 --- a/src/app/chemscraper.service.ts +++ b/src/app/chemscraper.service.ts @@ -48,7 +48,7 @@ export class ChemScraperService { return this.apiService.getInputFileBucketNameInputsJobIdGet('chemscraper', jobID); } - exportFiles(requestBody: ExportRequestBody): Observable { - return this.apiService.analyzeDocumentsBucketNameExportResultsPost('chemscraper', requestBody); + exportFiles(requestBody: ExportRequestBody): Observable { + return this.apiService.analyzeDocumentsBucketNameExportResultsPost('chemscraper', requestBody, 'body', false, { httpHeaderAccept: 'application/zip' as any }); } } diff --git a/src/app/components/chemscraper/results/export-menu/export-menu.component.ts b/src/app/components/chemscraper/results/export-menu/export-menu.component.ts index 36c0de7..954c199 100644 --- a/src/app/components/chemscraper/results/export-menu/export-menu.component.ts +++ b/src/app/components/chemscraper/results/export-menu/export-menu.component.ts @@ -55,7 +55,7 @@ export class ExportMenuComponent implements OnInit{ const url = window.URL.createObjectURL(file); const link = document.createElement('a'); link.href = url; - link.setAttribute('download', 'ChemScraper-result.zip'); // replace with your filename + link.setAttribute('download', `chemscraper-${jobId}.zip`); // replace with your filename document.body.appendChild(link); link.click(); document.body.removeChild(link); From 4fe8b32621c5137616be6dd3a6066fff258f9c3b Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Mon, 6 Nov 2023 14:08:36 -0600 Subject: [PATCH 08/17] fix: remove stray merge conflict marker --- src/app/app.module.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a27a8ec..5540cb4 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -40,19 +40,14 @@ import { FileDragNDropDirective } from './components/chemscraper/configuration/f import { PdfViewerComponent } from './components/chemscraper/pdf-viewer/pdf-viewer.component'; import { PdfViewerDialogServiceComponent } from './components/chemscraper/pdf-viewer-dialog-service/pdf-viewer-dialog-service.component'; -import { EnvironmentService } from "./services/environment.service"; +import { EnvironmentService } from "@services/environment.service"; import { MenuModule } from "primeng/menu"; -//import {SafePipe} from "./pipes/safe.pipe"; import { MarvinJsModule } from "./components/chemscraper/marvinjs/marvinjs.module"; import { DialogModule } from "primeng/dialog"; import { ExportMenuComponent } from './components/chemscraper/results/export-menu/export-menu.component'; -<<<<<<< HEAD -import {EnvironmentService} from "./services/environment.service"; -import {ApiModule, Configuration} from "./api/mmli-backend/v1"; -import {MenuModule} from "primeng/menu"; -import {SafePipe} from "./pipes/safe.pipe"; -======= ->>>>>>> 09ff2161710905af26df4e3be75313ee2fdf14c5 + +import { ApiModule, Configuration } from "@api/mmli-backend/v1"; +import { SafePipe } from "./pipes/safe.pipe"; const initAppFn = (envService: EnvironmentService) => { return () => envService.loadEnvConfig('/assets/config/envvars.json'); From b27cfa7c0e40e84279d07dcc0a4b0741d05667b7 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Thu, 18 Jan 2024 16:38:21 -0600 Subject: [PATCH 09/17] fix: sync spec + regenerate client --- openapi/mmli-backend.openapi.json | 2 +- .../mmli-backend/v1/.openapi-generator/FILES | 10 + src/app/api/mmli-backend/v1/api/api.ts | 8 +- .../v1/api/chemScraper.service.ts | 304 +++++++++ .../mmli-backend/v1/api/default.service.ts | 457 +------------- .../api/mmli-backend/v1/api/files.service.ts | 462 ++++++++++++++ .../api/mmli-backend/v1/api/jobs.service.ts | 575 ++++++++++++++++++ .../v1/model/analyzeRequestBody.ts | 1 - .../mmli-backend/v1/model/flaggedMolecule.ts | 20 + .../v1/model/flaggedMoleculeDelete.ts | 18 + src/app/api/mmli-backend/v1/model/job.ts | 34 ++ .../api/mmli-backend/v1/model/jobCreate.ts | 20 + .../api/mmli-backend/v1/model/jobStatus.ts | 25 + src/app/api/mmli-backend/v1/model/jobType.ts | 24 + .../api/mmli-backend/v1/model/jobUpdate.ts | 29 + src/app/api/mmli-backend/v1/model/models.ts | 7 + src/app/api/mmli-backend/v1/model/molecule.ts | 13 +- 17 files changed, 1556 insertions(+), 453 deletions(-) create mode 100644 src/app/api/mmli-backend/v1/api/chemScraper.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/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/job.ts create mode 100644 src/app/api/mmli-backend/v1/model/jobCreate.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 diff --git a/openapi/mmli-backend.openapi.json b/openapi/mmli-backend.openapi.json index 5d2f64d..0cb4ef6 100644 --- a/openapi/mmli-backend.openapi.json +++ b/openapi/mmli-backend.openapi.json @@ -1 +1 @@ -{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/{bucket_name}/upload":{"post":{"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"}}}}}}},"/chemscraper/analyze":{"post":{"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"}}}}}}},"/{bucket_name}/result-status/{job_id}":{"get":{"summary":"Get Result Status","operationId":"get_result_status__bucket_name__result_status__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}/results/{job_id}":{"get":{"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":{"title":"Response Get Results Bucket Name Results Job Id Get","type":"array","items":{"$ref":"#/components/schemas/Molecule"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{bucket_name}/inputs/{job_id}":{"get":{"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":{"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":{"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"}}}}}}}},"components":{"schemas":{"AnalyzeRequestBody":{"title":"AnalyzeRequestBody","required":["jobId","user_email","captcha_token","fileList"],"type":"object","properties":{"jobId":{"title":"Jobid","type":"string"},"user_email":{"title":"User Email","type":"string"},"captcha_token":{"title":"Captcha Token","type":"string"},"fileList":{"title":"Filelist","type":"array","items":{"type":"string"}}}},"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"}}},"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"}}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Molecule":{"title":"Molecule","required":["id","doc_no","file_path","page_no","name","SMILE","structure","minX","minY","width","height","PubChemCID","molecularFormula","molecularWeight","chemicalSafety","Description","Location","OtherInstances"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"doc_no":{"title":"Doc No","type":"string"},"file_path":{"title":"File Path","type":"string"},"page_no":{"title":"Page No","type":"string"},"name":{"title":"Name","type":"string"},"SMILE":{"title":"Smile","type":"string"},"structure":{"title":"Structure","type":"string"},"minX":{"title":"Minx","type":"number"},"minY":{"title":"Miny","type":"number"},"width":{"title":"Width","type":"number"},"height":{"title":"Height","type":"number"},"PubChemCID":{"title":"Pubchemcid","type":"string"},"molecularFormula":{"title":"Molecularformula","type":"string"},"molecularWeight":{"title":"Molecularweight","type":"string"},"chemicalSafety":{"title":"Chemicalsafety","type":"array","items":{"type":"string"}},"Description":{"title":"Description","type":"string"},"Location":{"title":"Location","type":"string"},"OtherInstances":{"title":"Otherinstances","type":"array","items":{"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 +{"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":{"title":"Response Get Results Bucket Name Results Job Id Get","type":"array","items":{"$ref":"#/components/schemas/Molecule"}}}}},"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/JobCreate"}}},"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"}}}}}}},"/{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"}}}}}}}},"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_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"}}},"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":"integer","default":0},"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"}}},"JobCreate":{"title":"JobCreate","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":"integer","default":0}}},"JobStatus":{"title":"JobStatus","enum":["queued","processing","completed","error"],"type":"string","description":"An enumeration."},"JobType":{"title":"JobType","enum":["clean","chemscraper","molli"],"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"}}},"Molecule":{"title":"Molecule","required":["id","doc_no","file_path","page_no","SMILE","structure","minX","minY","width","height","Location","OtherInstances","fingerprint"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"doc_no":{"title":"Doc No","type":"string"},"file_path":{"title":"File Path","type":"string"},"page_no":{"title":"Page No","type":"string"},"name":{"title":"Name","type":"string","default":"Unavailable"},"SMILE":{"title":"Smile","type":"string"},"structure":{"title":"Structure","type":"string"},"minX":{"title":"Minx","type":"number"},"minY":{"title":"Miny","type":"number"},"width":{"title":"Width","type":"number"},"height":{"title":"Height","type":"number"},"PubChemCID":{"title":"Pubchemcid","type":"string","default":"Unavailable"},"molecularFormula":{"title":"Molecularformula","type":"string","default":"Unavailable"},"molecularWeight":{"title":"Molecularweight","type":"string","default":"Unavailable"},"chemicalSafety":{"title":"Chemicalsafety","type":"array","items":{"type":"string"},"default":[]},"Description":{"title":"Description","type":"string","default":"Unavailable"},"Location":{"title":"Location","type":"string"},"OtherInstances":{"title":"Otherinstances","type":"array","items":{"type":"string"}},"fingerprint":{"title":"Fingerprint","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/src/app/api/mmli-backend/v1/.openapi-generator/FILES b/src/app/api/mmli-backend/v1/.openapi-generator/FILES index 4b72958..e5922bc 100644 --- a/src/app/api/mmli-backend/v1/.openapi-generator/FILES +++ b/src/app/api/mmli-backend/v1/.openapi-generator/FILES @@ -2,14 +2,24 @@ README.md api.module.ts api/api.ts +api/chemScraper.service.ts api/default.service.ts +api/files.service.ts +api/jobs.service.ts configuration.ts encoder.ts git_push.sh index.ts model/analyzeRequestBody.ts model/exportRequestBody.ts +model/flaggedMolecule.ts +model/flaggedMoleculeDelete.ts model/hTTPValidationError.ts +model/job.ts +model/jobCreate.ts +model/jobStatus.ts +model/jobType.ts +model/jobUpdate.ts model/locationInner.ts model/models.ts model/molecule.ts diff --git a/src/app/api/mmli-backend/v1/api/api.ts b/src/app/api/mmli-backend/v1/api/api.ts index 8e76619..611d859 100644 --- a/src/app/api/mmli-backend/v1/api/api.ts +++ b/src/app/api/mmli-backend/v1/api/api.ts @@ -1,3 +1,9 @@ +export * from './chemScraper.service'; +import { ChemScraperService } from './chemScraper.service'; export * from './default.service'; import { DefaultService } from './default.service'; -export const APIS = [DefaultService]; +export * from './files.service'; +import { FilesService } from './files.service'; +export * from './jobs.service'; +import { JobsService } from './jobs.service'; +export const APIS = [ChemScraperService, DefaultService, FilesService, JobsService]; 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..aa58025 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/chemScraper.service.ts @@ -0,0 +1,304 @@ +/** + * 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().substr(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}): Observable; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + + // 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, + 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}): Observable; + public deleteFlaggedMoleculeChemscraperFlagDelete(flaggedMoleculeDelete: FlaggedMoleculeDelete, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public deleteFlaggedMoleculeChemscraperFlagDelete(flaggedMoleculeDelete: FlaggedMoleculeDelete, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public deleteFlaggedMoleculeChemscraperFlagDelete(flaggedMoleculeDelete: FlaggedMoleculeDelete, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + + // 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, + 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}): Observable; + public flagMoleculeChemscraperFlagPost(flaggedMolecule: FlaggedMolecule, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public flagMoleculeChemscraperFlagPost(flaggedMolecule: FlaggedMolecule, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public flagMoleculeChemscraperFlagPost(flaggedMolecule: FlaggedMolecule, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + + // 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, + 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 59deddb..03181e6 100644 --- a/src/app/api/mmli-backend/v1/api/default.service.ts +++ b/src/app/api/mmli-backend/v1/api/default.service.ts @@ -18,14 +18,8 @@ import { HttpClient, HttpHeaders, HttpParams, import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; -// @ts-ignore -import { AnalyzeRequestBody } from '../model/analyzeRequestBody'; -// @ts-ignore -import { ExportRequestBody } from '../model/exportRequestBody'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; -// @ts-ignore -import { Molecule } from '../model/molecule'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; @@ -60,19 +54,6 @@ export class DefaultService { 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 { @@ -111,416 +92,27 @@ export class DefaultService { } /** - * 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}): Observable; - public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); - } - - - // 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, - reportProgress: reportProgress - } - ); - } - - /** - * 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}): Observable; - public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public analyzeDocumentsChemscraperAnalyzePost(analyzeRequestBody: AnalyzeRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); - } - - - // 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, - 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}): Observable; - public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, - reportProgress: reportProgress - } - ); - } - - /** - * Get Input File - * @param bucketName + * 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 getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; - public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { - if (bucketName === null || bucketName === undefined) { - throw new Error('Required parameter bucketName was null or undefined when calling getInputFileBucketNameInputsJobIdGet.'); - } + public getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobId: string, smileString: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobId: string, smileString: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobId: string, smileString: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobId: string, smileString: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (jobId === null || jobId === undefined) { - throw new Error('Required parameter jobId was null or undefined when calling getInputFileBucketNameInputsJobIdGet.'); + throw new Error('Required parameter jobId was null or undefined when calling getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet.'); } - - 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 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, - reportProgress: reportProgress - } - ); - } - - /** - * Get Result Status - * @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 getResultStatusBucketNameResultStatusJobIdGet(bucketName: string, jobId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; - public getResultStatusBucketNameResultStatusJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getResultStatusBucketNameResultStatusJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getResultStatusBucketNameResultStatusJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { - if (bucketName === null || bucketName === undefined) { - throw new Error('Required parameter bucketName was null or undefined when calling getResultStatusBucketNameResultStatusJobIdGet.'); - } - if (jobId === null || jobId === undefined) { - throw new Error('Required parameter jobId was null or undefined when calling getResultStatusBucketNameResultStatusJobIdGet.'); - } - - 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 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})}/result-status/${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, - 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}): Observable>; - public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; - public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; - public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, - 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}): Observable; - public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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.'); + 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 (jobId !== undefined && jobId !== null) { + if (smileString !== undefined && smileString !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - jobId, 'job_id'); + smileString, 'smile_string'); } let localVarHeaders = this.defaultHeaders; @@ -542,28 +134,6 @@ export class DefaultService { localVarHttpContext = new HttpContext(); } - // 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) { @@ -576,11 +146,10 @@ export class DefaultService { } } - 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}`, + 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, - body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, 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..18c0962 --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/files.service.ts @@ -0,0 +1,462 @@ +/** + * 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 { Molecule } from '../model/molecule'; + +// @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().substr(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}): Observable; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public analyzeDocumentsBucketNameExportResultsPost(bucketName: string, exportRequestBody: ExportRequestBody, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + + // 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, + 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}): Observable; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getErrorsBucketNameErrorsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInputFileBucketNameInputsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable>; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; + public getResultsBucketNameResultsJobIdGet(bucketName: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFileBucketNameUploadPost(bucketName: string, file: Blob, jobId?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + // 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, + 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..739b78f --- /dev/null +++ b/src/app/api/mmli-backend/v1/api/jobs.service.ts @@ -0,0 +1,575 @@ +/** + * 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 { Job } from '../model/job'; +// @ts-ignore +import { JobCreate } from '../model/jobCreate'; +// @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().substr(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 jobCreate + * @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, jobCreate: JobCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public createJobJobTypeJobsPost(jobType: string, jobCreate: JobCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public createJobJobTypeJobsPost(jobType: string, jobCreate: JobCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public createJobJobTypeJobsPost(jobType: string, jobCreate: JobCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { + if (jobType === null || jobType === undefined) { + throw new Error('Required parameter jobType was null or undefined when calling createJobJobTypeJobsPost.'); + } + if (jobCreate === null || jobCreate === undefined) { + throw new Error('Required parameter jobCreate 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(); + } + + + // 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: jobCreate, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + 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}): Observable; + public deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete(jobType: string, jobId: string, runId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete(jobType: string, jobId: string, runId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public deleteJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdDelete(jobType: string, jobId: string, runId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable; + public getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet(jobType: string, jobId: string, runId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet(jobType: string, jobId: string, runId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getJobByTypeAndJobIdAndRunIdJobTypeJobsJobIdRunIdGet(jobType: string, jobId: string, runId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable; + public listJobsByTypeAndJobIdJobTypeJobsJobIdGet(jobType: string, jobId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public listJobsByTypeAndJobIdJobTypeJobsJobIdGet(jobType: string, jobId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public listJobsByTypeAndJobIdJobTypeJobsJobIdGet(jobType: string, jobId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable; + public listJobsByTypeJobTypeJobsGet(jobType: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public listJobsByTypeJobTypeJobsGet(jobType: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public listJobsByTypeJobTypeJobsGet(jobType: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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 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, + 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}): Observable; + public patchExistingJobJobTypeJobsJobIdRunIdPatch(jobType: string, jobUpdate: JobUpdate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public patchExistingJobJobTypeJobsJobIdRunIdPatch(jobType: string, jobUpdate: JobUpdate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public patchExistingJobJobTypeJobsJobIdRunIdPatch(jobType: string, jobUpdate: JobUpdate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + + // 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, + 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}): Observable; + public updateExistingJobJobTypeJobsJobIdRunIdPut(jobType: string, job: Job, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public updateExistingJobJobTypeJobsJobIdRunIdPut(jobType: string, job: Job, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public updateExistingJobJobTypeJobsJobIdRunIdPut(jobType: string, job: Job, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): 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(); + } + + + // 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, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/api/mmli-backend/v1/model/analyzeRequestBody.ts b/src/app/api/mmli-backend/v1/model/analyzeRequestBody.ts index 6c3c246..b3b348f 100644 --- a/src/app/api/mmli-backend/v1/model/analyzeRequestBody.ts +++ b/src/app/api/mmli-backend/v1/model/analyzeRequestBody.ts @@ -14,7 +14,6 @@ export interface AnalyzeRequestBody { jobId: string; user_email: string; - captcha_token: string; fileList: 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/job.ts b/src/app/api/mmli-backend/v1/model/job.ts new file mode 100644 index 0000000..3665f1d --- /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?: number; + 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/jobCreate.ts b/src/app/api/mmli-backend/v1/model/jobCreate.ts new file mode 100644 index 0000000..20eb0a2 --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/jobCreate.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 JobCreate { + job_info?: string; + email?: string; + job_id?: string; + run_id?: number; +} + 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..091f0cf --- /dev/null +++ b/src/app/api/mmli-backend/v1/model/jobType.ts @@ -0,0 +1,24 @@ +/** + * 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'; + +export const JobType = { + Clean: 'clean' as JobType, + Chemscraper: 'chemscraper' as JobType, + Molli: 'molli' 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/models.ts b/src/app/api/mmli-backend/v1/model/models.ts index ea98ab2..c5eac4b 100644 --- a/src/app/api/mmli-backend/v1/model/models.ts +++ b/src/app/api/mmli-backend/v1/model/models.ts @@ -1,6 +1,13 @@ export * from './analyzeRequestBody'; export * from './exportRequestBody'; +export * from './flaggedMolecule'; +export * from './flaggedMoleculeDelete'; export * from './hTTPValidationError'; +export * from './job'; +export * from './jobCreate'; +export * from './jobStatus'; +export * from './jobType'; +export * from './jobUpdate'; export * from './locationInner'; export * from './molecule'; export * from './validationError'; diff --git a/src/app/api/mmli-backend/v1/model/molecule.ts b/src/app/api/mmli-backend/v1/model/molecule.ts index 09926a7..77f8575 100644 --- a/src/app/api/mmli-backend/v1/model/molecule.ts +++ b/src/app/api/mmli-backend/v1/model/molecule.ts @@ -16,19 +16,20 @@ export interface Molecule { doc_no: string; file_path: string; page_no: string; - name: string; + name?: string; SMILE: string; structure: string; minX: number; minY: number; width: number; height: number; - PubChemCID: string; - molecularFormula: string; - molecularWeight: string; - chemicalSafety: Array; - Description: string; + PubChemCID?: string; + molecularFormula?: string; + molecularWeight?: string; + chemicalSafety?: Array; + Description?: string; Location: string; OtherInstances: Array; + fingerprint: string; } From 8cba67d2102ee1b1830a808895e7ca4ff1b2cb13 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Mon, 5 Feb 2024 23:07:31 -0600 Subject: [PATCH 10/17] fix: git/docker ignore the chart/ directory --- .dockerignore | 1 + .gitignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.dockerignore b/.dockerignore index dc7ff0b..6a24c59 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,7 @@ dist/* .angular/* node_modules/* +chart/charts/* .env Dockerfile docker-compose.* diff --git a/.gitignore b/.gitignore index 0711527..9fe4b42 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ testem.log # System files .DS_Store Thumbs.db +chart/charts/ From 2a1035962425f274cb34214e7adb0a859926b5cb Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Tue, 6 Feb 2024 11:06:12 -0600 Subject: [PATCH 11/17] feat: display flagged status (sortable), allow user to flag/unflag molecules, collapse after View Similar Structures, display confidence scores --- openapi/mmli-backend.openapi.json | 2 +- src/app/api/mmli-backend/v1/model/molecule.ts | 1 + src/app/chemscraper.service.ts | 15 +++++++++++++++ .../results/results.component.html | 19 ++++++++++++------- .../chemscraper/results/results.component.ts | 15 +++++++++++++++ 5 files changed, 44 insertions(+), 8 deletions(-) diff --git a/openapi/mmli-backend.openapi.json b/openapi/mmli-backend.openapi.json index 0cb4ef6..77cf81a 100644 --- a/openapi/mmli-backend.openapi.json +++ b/openapi/mmli-backend.openapi.json @@ -1 +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":{"title":"Response Get Results Bucket Name Results Job Id Get","type":"array","items":{"$ref":"#/components/schemas/Molecule"}}}}},"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/JobCreate"}}},"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"}}}}}}},"/{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"}}}}}}}},"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_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"}}},"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":"integer","default":0},"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"}}},"JobCreate":{"title":"JobCreate","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":"integer","default":0}}},"JobStatus":{"title":"JobStatus","enum":["queued","processing","completed","error"],"type":"string","description":"An enumeration."},"JobType":{"title":"JobType","enum":["clean","chemscraper","molli"],"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"}}},"Molecule":{"title":"Molecule","required":["id","doc_no","file_path","page_no","SMILE","structure","minX","minY","width","height","Location","OtherInstances","fingerprint"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"doc_no":{"title":"Doc No","type":"string"},"file_path":{"title":"File Path","type":"string"},"page_no":{"title":"Page No","type":"string"},"name":{"title":"Name","type":"string","default":"Unavailable"},"SMILE":{"title":"Smile","type":"string"},"structure":{"title":"Structure","type":"string"},"minX":{"title":"Minx","type":"number"},"minY":{"title":"Miny","type":"number"},"width":{"title":"Width","type":"number"},"height":{"title":"Height","type":"number"},"PubChemCID":{"title":"Pubchemcid","type":"string","default":"Unavailable"},"molecularFormula":{"title":"Molecularformula","type":"string","default":"Unavailable"},"molecularWeight":{"title":"Molecularweight","type":"string","default":"Unavailable"},"chemicalSafety":{"title":"Chemicalsafety","type":"array","items":{"type":"string"},"default":[]},"Description":{"title":"Description","type":"string","default":"Unavailable"},"Location":{"title":"Location","type":"string"},"OtherInstances":{"title":"Otherinstances","type":"array","items":{"type":"string"}},"fingerprint":{"title":"Fingerprint","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 +{"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":{"title":"Response Get Results Bucket Name Results Job Id Get","type":"array","items":{"$ref":"#/components/schemas/Molecule"}}}}},"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/JobCreate"}}},"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"}}}}}}},"/{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"}}}}}}}},"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_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"}}},"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":"integer","default":0},"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"}}},"JobCreate":{"title":"JobCreate","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":"integer","default":0}}},"JobStatus":{"title":"JobStatus","enum":["queued","processing","completed","error"],"type":"string","description":"An enumeration."},"JobType":{"title":"JobType","enum":["clean","chemscraper","molli"],"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"}}},"Molecule":{"title":"Molecule","required":["id","flagged","doc_no","file_path","page_no","SMILE","structure","minX","minY","width","height","Location","OtherInstances","fingerprint"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"flagged":{"title":"Flagged","type":"boolean"},"doc_no":{"title":"Doc No","type":"string"},"file_path":{"title":"File Path","type":"string"},"page_no":{"title":"Page No","type":"string"},"name":{"title":"Name","type":"string","default":"Unavailable"},"SMILE":{"title":"Smile","type":"string"},"structure":{"title":"Structure","type":"string"},"minX":{"title":"Minx","type":"number"},"minY":{"title":"Miny","type":"number"},"width":{"title":"Width","type":"number"},"height":{"title":"Height","type":"number"},"PubChemCID":{"title":"Pubchemcid","type":"string","default":"Unavailable"},"molecularFormula":{"title":"Molecularformula","type":"string","default":"Unavailable"},"molecularWeight":{"title":"Molecularweight","type":"string","default":"Unavailable"},"chemicalSafety":{"title":"Chemicalsafety","type":"array","items":{"type":"string"},"default":[]},"Description":{"title":"Description","type":"string","default":"Unavailable"},"Location":{"title":"Location","type":"string"},"OtherInstances":{"title":"Otherinstances","type":"array","items":{"type":"string"}},"fingerprint":{"title":"Fingerprint","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/src/app/api/mmli-backend/v1/model/molecule.ts b/src/app/api/mmli-backend/v1/model/molecule.ts index 77f8575..7071560 100644 --- a/src/app/api/mmli-backend/v1/model/molecule.ts +++ b/src/app/api/mmli-backend/v1/model/molecule.ts @@ -13,6 +13,7 @@ export interface Molecule { id: number; + flagged: boolean; doc_no: string; file_path: string; page_no: string; diff --git a/src/app/chemscraper.service.ts b/src/app/chemscraper.service.ts index 9c449b2..f163dae 100644 --- a/src/app/chemscraper.service.ts +++ b/src/app/chemscraper.service.ts @@ -74,4 +74,19 @@ export class ChemScraperService { return this.apiService.getSimilaritySortedOrderChemscraperSimilaritySortedOrderJobIdGet(jobID, smile) } + flagMolecule(jobID: string, molecule: Molecule) { + return this.chemscraperService.flagMoleculeChemscraperFlagPost({ + smile: molecule.SMILE, + doc_id: molecule.doc_no, + job_id: jobID + }); + } + + unflagMolecule(jobID: string, molecule: Molecule) { + return this.chemscraperService.deleteFlaggedMoleculeChemscraperFlagDelete({ + smile: molecule.SMILE, + // TODO: does this need doc_no? + job_id: jobID + }); + } } diff --git a/src/app/components/chemscraper/results/results.component.html b/src/app/components/chemscraper/results/results.component.html index 1d2a289..7eed4cd 100644 --- a/src/app/components/chemscraper/results/results.component.html +++ b/src/app/components/chemscraper/results/results.component.html @@ -114,7 +114,8 @@

Molecule Structure (Extracted) Structure (Original) - SMILES + SMILES + Flagged? Page PubChem CID @@ -137,6 +138,10 @@

{{ molecule.SMILE }} + + + + {{ molecule.page_no }} {{ molecule.PubChemCID }} {{ molecule.confidence }} @@ -151,7 +156,7 @@

- View Similar Structures + View Similar Structures
@@ -205,12 +210,12 @@

- +
diff --git a/src/app/components/chemscraper/results/results.component.ts b/src/app/components/chemscraper/results/results.component.ts index 9018eea..52a3904 100644 --- a/src/app/components/chemscraper/results/results.component.ts +++ b/src/app/components/chemscraper/results/results.component.ts @@ -151,6 +151,21 @@ export class ResultsComponent { } + flagMolecule(molecule: Molecule) { + this._chemScraperService.flagMolecule(this.jobID + '', molecule).subscribe(result => { + // finally, mark this as flagged + molecule.flagged = true; + }); + } + + unflagMolecule(molecule: Molecule) { + this._chemScraperService.unflagMolecule(this.jobID + '', molecule).subscribe(result => { + // finally, mark this as not flagged + molecule.flagged = false; + }); + + } + updateStatusStage(currentStage: number){ this.activeStage = currentStage; const listItems = Array.from(document.querySelectorAll('#LoadingStages ul li')); From ab11531a2ec3b3f5eea76033d96e344308c8e910 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Tue, 6 Feb 2024 11:13:15 -0600 Subject: [PATCH 12/17] fix: selectedMolecule can be set to undefined, fix method names for flag/unflag --- .../components/chemscraper/results/results.component.html | 6 +++--- src/app/components/chemscraper/results/results.component.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/components/chemscraper/results/results.component.html b/src/app/components/chemscraper/results/results.component.html index 7eed4cd..1099dc2 100644 --- a/src/app/components/chemscraper/results/results.component.html +++ b/src/app/components/chemscraper/results/results.component.html @@ -139,8 +139,8 @@

{{ molecule.SMILE }} - - + + {{ molecule.page_no }} {{ molecule.PubChemCID }} @@ -156,7 +156,7 @@

- View Similar Structures + View Similar Structures
diff --git a/src/app/components/chemscraper/results/results.component.ts b/src/app/components/chemscraper/results/results.component.ts index 52a3904..0b1e78c 100644 --- a/src/app/components/chemscraper/results/results.component.ts +++ b/src/app/components/chemscraper/results/results.component.ts @@ -66,7 +66,7 @@ export class ResultsComponent { tableFilterValue: string = 'off'; pollForResult: boolean = true; - selectedMolecule!: Molecule; + selectedMolecule?: Molecule; firstRowIndex: number = 0; @@ -428,6 +428,7 @@ export class ResultsComponent { return indexB - indexA; }); this.goToRow(0); + this.selectedMolecule = undefined; } ); } From 4479ba7722f1b71eccbe2317be6bcb0f1149687a Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Tue, 6 Feb 2024 11:21:45 -0600 Subject: [PATCH 13/17] fix: flag-fill icon for unflag button --- src/app/components/chemscraper/results/results.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/chemscraper/results/results.component.html b/src/app/components/chemscraper/results/results.component.html index 1099dc2..125d9cc 100644 --- a/src/app/components/chemscraper/results/results.component.html +++ b/src/app/components/chemscraper/results/results.component.html @@ -140,7 +140,7 @@

{{ molecule.SMILE }} - + {{ molecule.page_no }} {{ molecule.PubChemCID }} From 1b5852ffa8d853c0f33f2a1c3161e96891a1548c Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Tue, 6 Feb 2024 11:23:34 -0600 Subject: [PATCH 14/17] fix: back-out the confidence score display (data not yet avaialble) --- src/app/components/chemscraper/results/results.component.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/components/chemscraper/results/results.component.html b/src/app/components/chemscraper/results/results.component.html index 125d9cc..d63c0b5 100644 --- a/src/app/components/chemscraper/results/results.component.html +++ b/src/app/components/chemscraper/results/results.component.html @@ -211,11 +211,13 @@

+ +

From 730538ecafb8eb70030143256af41265824a7a80 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Tue, 6 Feb 2024 11:25:21 -0600 Subject: [PATCH 15/17] fix: try null instead of undefined for selectedMolecule --- src/app/components/chemscraper/results/results.component.html | 2 +- src/app/components/chemscraper/results/results.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/chemscraper/results/results.component.html b/src/app/components/chemscraper/results/results.component.html index d63c0b5..503cdc1 100644 --- a/src/app/components/chemscraper/results/results.component.html +++ b/src/app/components/chemscraper/results/results.component.html @@ -217,7 +217,7 @@

{{ molecule.confidence }}

--> - +
diff --git a/src/app/components/chemscraper/results/results.component.ts b/src/app/components/chemscraper/results/results.component.ts index 0b1e78c..289c6b3 100644 --- a/src/app/components/chemscraper/results/results.component.ts +++ b/src/app/components/chemscraper/results/results.component.ts @@ -66,7 +66,7 @@ export class ResultsComponent { tableFilterValue: string = 'off'; pollForResult: boolean = true; - selectedMolecule?: Molecule; + selectedMolecule: Molecule | null = null; firstRowIndex: number = 0; @@ -428,7 +428,7 @@ export class ResultsComponent { return indexB - indexA; }); this.goToRow(0); - this.selectedMolecule = undefined; + this.selectedMolecule = null; } ); } From a95fe79d8b2cb78f6cc9911706d28f61136f235f Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Tue, 6 Feb 2024 12:21:39 -0600 Subject: [PATCH 16/17] fix: collapse all rows when clicking View Similar Structure --- src/app/components/chemscraper/results/results.component.ts | 4 +++- src/assets/config/envvars.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/components/chemscraper/results/results.component.ts b/src/app/components/chemscraper/results/results.component.ts index 289c6b3..3d34986 100644 --- a/src/app/components/chemscraper/results/results.component.ts +++ b/src/app/components/chemscraper/results/results.component.ts @@ -428,7 +428,9 @@ export class ResultsComponent { return indexB - indexA; }); this.goToRow(0); - this.selectedMolecule = null; + + // Collapse all rows + this.resultsTable.expandedRowKeys = {}; } ); } diff --git a/src/assets/config/envvars.json b/src/assets/config/envvars.json index 02de195..deb5941 100644 --- a/src/assets/config/envvars.json +++ b/src/assets/config/envvars.json @@ -1,5 +1,5 @@ { - "hostname": "http://localhost:8080", + "hostname": "https://mmli.fastapi.staging.mmli1.ncsa.illinois.edu", "basePath": "", "signInUrl": "https://mmli1.ncsa.illinois.edu/oauth2/start?rd=http%3A%2F%2Flocalhost:4200%2Fconfiguration", From e4f23ad94d750c805e959ef747fc23e9ca535111 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Tue, 6 Feb 2024 13:27:01 -0600 Subject: [PATCH 17/17] fix: notify about ratelimit in relevant failed submissions --- .../configuration/configuration.component.ts | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/app/components/chemscraper/configuration/configuration.component.ts b/src/app/components/chemscraper/configuration/configuration.component.ts index 5ba749f..762af37 100644 --- a/src/app/components/chemscraper/configuration/configuration.component.ts +++ b/src/app/components/chemscraper/configuration/configuration.component.ts @@ -1,4 +1,4 @@ -import { HttpClient } from '@angular/common/http'; +import {HttpClient, HttpErrorResponse} from '@angular/common/http'; import { Component } from '@angular/core'; import { Router } from '@angular/router'; import { ChemScraperService } from 'src/app/chemscraper.service'; @@ -83,11 +83,21 @@ export class ConfigurationComponent { this.requestBody.jobId = this.jobID; const fileNames: string[] = this.uploaded_files.map(file => file.name); this.requestBody.fileList = fileNames; - this._chemScraperService.analyzeDocument(this.requestBody).subscribe( - (res) => { - this.router.navigate(['/results', this.jobID]); + this._chemScraperService.analyzeDocument(this.requestBody).subscribe({ + next: (res) => this.router.navigate(['/results', this.jobID]), + error: (err: HttpErrorResponse) => { + if (err.status === 429) { + const h = err.headers; + const retryAfter = h.get('Retry-After'); + const retryIn = h.get('X-Retry-In'); + + window.alert(`Too many requests.. try again in ${retryIn}`) + console.log(`Too many requests.. try again after ${retryAfter}:`, err); + } else { + console.log('Failed to submit new job request:', err); + } } - ); + }); } }