mirror of
https://github.com/clearml/clearml-web
synced 2025-06-26 18:27:02 +00:00
Merge branch 'v0.15'
This commit is contained in:
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
||||
# Editor configuration, see http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
8
.eslintignore
Normal file
8
.eslintignore
Normal file
@@ -0,0 +1,8 @@
|
||||
# don't ever lint node_modules
|
||||
node_modules
|
||||
# don't lint build output (make sure it's set to your correct build folder name)
|
||||
build
|
||||
node-sass
|
||||
stories
|
||||
e2e
|
||||
electron
|
||||
136
.eslintrc.json
Normal file
136
.eslintrc.json
Normal file
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/class-name-casing": "error",
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"off",
|
||||
{
|
||||
"accessibility": "explicit"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/indent": ["warn", 2],
|
||||
"@typescript-eslint/member-delimiter-style": [
|
||||
"error",
|
||||
{
|
||||
"multiline": {
|
||||
"delimiter": "semi",
|
||||
"requireLast": true
|
||||
},
|
||||
"singleline": {
|
||||
"delimiter": "semi",
|
||||
"requireLast": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-inferrable-types": "off",
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-use-before-define": "error",
|
||||
"@typescript-eslint/prefer-function-type": "error",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"@typescript-eslint/semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
"@typescript-eslint/unified-signatures": "error",
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"arrow-body-style": "error",
|
||||
"@typescript-eslint/camelcase": "off",
|
||||
"camelcase": "off",
|
||||
"constructor-super": "error",
|
||||
"curly": "error",
|
||||
"dot-notation": "off",
|
||||
"eol-last": "error",
|
||||
"eqeqeq": [
|
||||
"off",
|
||||
"smart"
|
||||
],
|
||||
"guard-for-in": "error",
|
||||
"id-blacklist": "off",
|
||||
"id-match": "off",
|
||||
"max-len": [
|
||||
"error",
|
||||
{
|
||||
"code": 2000
|
||||
}
|
||||
],
|
||||
"no-bitwise": "off",
|
||||
"no-caller": "error",
|
||||
"no-console": [
|
||||
"error",
|
||||
{
|
||||
"allow": [
|
||||
"log",
|
||||
"warn",
|
||||
"dir",
|
||||
"timeLog",
|
||||
"assert",
|
||||
"clear",
|
||||
"count",
|
||||
"countReset",
|
||||
"group",
|
||||
"groupEnd",
|
||||
"table",
|
||||
"dirxml",
|
||||
"error",
|
||||
"groupCollapsed",
|
||||
"Console",
|
||||
"profile",
|
||||
"profileEnd",
|
||||
"timeStamp",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-debugger": "error",
|
||||
"no-empty": "off",
|
||||
"no-eval": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-shadow": [
|
||||
"off",
|
||||
{
|
||||
"hoist": "all"
|
||||
}
|
||||
],
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unused-expressions": "off",
|
||||
"no-unused-labels": "error",
|
||||
"no-var": "error",
|
||||
"prefer-const": "error",
|
||||
"radix": "error",
|
||||
"spaced-comment": "error",
|
||||
"valid-typeof": "error"
|
||||
}
|
||||
}
|
||||
48
.gitignore
vendored
Normal file
48
.gitignore
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/build*
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
/gen-code
|
||||
/src/__ngcc_entry_points__.json
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
testem.log
|
||||
/typings
|
||||
yarn-error.log
|
||||
.npmrc
|
||||
gen-code
|
||||
|
||||
# e2e
|
||||
/e2e/*.js
|
||||
/e2e/*.map
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
53
README.md
53
README.md
@@ -1,7 +1,50 @@
|
||||
# TRAINS - Web Application
|
||||
## TRAINS - Automagical Version Control & Experiment Manager for AI
|
||||
# Trains Webapp
|
||||
|
||||
[](https://img.shields.io/github/license/allegroai/trains-web.svg)
|
||||
[](https://img.shields.io/github/release-pre/allegroai/trains-web.svg)
|
||||
## Building the UI from source
|
||||
### Prerequisite
|
||||
* a linux machine
|
||||
* Node 12 with latest npm
|
||||
* clone the project to your local machine
|
||||
|
||||
### Build
|
||||
* cd to the root of the project
|
||||
* run `npm ci` to install required node modules
|
||||
* (optionally) update src/environment/environment.prod.ts with the API server URL
|
||||
* run `npm run build`
|
||||
|
||||
### Serving the web application
|
||||
* the product of the build phase should be located in the build folder. it should be served with a web server (e.g. nginx, httpd)
|
||||
|
||||
## Application Structure
|
||||
|
||||
#### Business Logic module
|
||||
Contains Trains logic. api calls and trains objects (e.g tasks, models) and trains logic function (e.g isTaskHidden)
|
||||
|
||||
#### Core module
|
||||
Contains only logic. no declarations. no dependency with any other module beside ngrx.
|
||||
* **services** - utilities classes. file name: `<name>.service.ts`
|
||||
|
||||
#### Feature Modules
|
||||
Application feature modules. each module can contain declarations and providers **specific to the the feature**
|
||||
Depend only on shared module for ui components
|
||||
|
||||
#####each feature can contain the following:
|
||||
* **module** - the feature module: `<featureName>.module.ts`.
|
||||
* **component** - the feature main component js file, should contain the feature's containers components only: `<featureName>.component.ts`.
|
||||
* **component** html - the feature component html: `<featureName>.component.html`.
|
||||
* **component** style - the feature component style: `<featureName>.component.scss`.
|
||||
* **utils** - the feature utils, a page with list of pure functions for utils purposes: `<featureName>.utils.ts`.
|
||||
* **constants** - the feature constants values: `<featureName>.const.ts`.
|
||||
* **model** - the feature types, interfaces and objects declarations: `<featureName>.model.ts`.
|
||||
* **actions** - redux action classes - file name: `<name>.actions.ts`
|
||||
* **effects** - ngrx effects classes. manage data flow and side effects - file name: `<name>.effect.ts`
|
||||
* **reducers** - simple functions for state composition. file name: `<name>
|
||||
.reducer.ts`
|
||||
* **services** - utilities classes with the same responsibility under `services` folder : `<name>.service.ts`.
|
||||
* **container components** - components that will include dumb components and will pass data from the state to the dumb components and dispatch actions of the dumb components, the container components will be under `containers` folder.
|
||||
* **dumb components** - stateless view components that will communicate through inputs and outputs, the dumb components will be under `dumb` folder.
|
||||
|
||||
#### Shared Module
|
||||
Application shared UI components, directives and pipes. **contain only declarations**.
|
||||
All the components should be **reusable**.
|
||||
|
||||
See [Release Section](https://github.com/allegroai/trains-web/releases) for full sourcecode build
|
||||
|
||||
193
angular.json
Normal file
193
angular.json
Normal file
@@ -0,0 +1,193 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"trains-webapp": {
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "sm",
|
||||
"projectType": "application",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"aot": true,
|
||||
"preserveSymlinks": true,
|
||||
"outputPath": "build",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/favicon.ico",
|
||||
"src/app/webapp-common/assets"
|
||||
],
|
||||
"styles": [
|
||||
"node_modules/primeicons/primeicons.css",
|
||||
"node_modules/primeng/resources/components/table/table.css",
|
||||
"src/styles.scss",
|
||||
"src/fonts.scss"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
"appdev": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.dev.ts"
|
||||
}
|
||||
]
|
||||
},
|
||||
"demo": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.demo.ts"
|
||||
}
|
||||
]
|
||||
},
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "trains-webapp:build"
|
||||
},
|
||||
"configurations": {
|
||||
"appdev": {
|
||||
"browserTarget": "trains-webapp:build:appdev"
|
||||
},
|
||||
"staging": {
|
||||
"browserTarget": "trains-webapp:build:demo"
|
||||
},
|
||||
"production": {
|
||||
"browserTarget": "trains-webapp:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "trains-webapp:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"karmaConfig": "./karma.conf.js",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/favicon.ico",
|
||||
"src/app/webapp-common/assets"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"trains-webapp-e2e": {
|
||||
"root": "",
|
||||
"sourceRoot": "",
|
||||
"projectType": "application",
|
||||
"architect": {
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "./protractor.conf.js",
|
||||
"devServerTarget": "trains-webapp:serve"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"e2e/tsconfig.e2e.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "trains-webapp",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "sm",
|
||||
"style": "scss"
|
||||
}
|
||||
}
|
||||
}
|
||||
5
credentials.json
Normal file
5
credentials.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"userKey": "EYVQ385RW7Y2QQUH88CZ7DWIQ1WUHP",
|
||||
"userSecret": "yfc8KQo*GMXb*9p((qcYC7ByFIpF7I&4VH3BfUYXH%o9vX1ZUZQEEw1Inc)S",
|
||||
"companyID": "d1bd92a3b039400cbafc60a7a5b1e52b"
|
||||
}
|
||||
34
karma.conf.js
Normal file
34
karma.conf.js
Normal file
@@ -0,0 +1,34 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client:{
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
angularCli: {
|
||||
environment: 'dev'
|
||||
},
|
||||
exclude: ['node_modules/', 'src/app/business-logic/**'],
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false
|
||||
});
|
||||
};
|
||||
15389
package-lock.json
generated
Normal file
15389
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
94
package.json
Normal file
94
package.json
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"name": "trains-webapp",
|
||||
"version": "0.15.0",
|
||||
"license": "",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "npx ng serve --proxy-config proxy.config.json --live-reload false --port 4300",
|
||||
"aot": "node --max_old_space_size=3248 ./node_modules/.bin/ng serve --proxy-config proxy.config.json --aot",
|
||||
"build": "node --max_old_space_size=3248 ./node_modules/.bin/ng build --prod --source-map --extract-css=false --vendor-chunk --crossOrigin=use-credentials",
|
||||
"build-demo": "node --max_old_space_size=3248 ./node_modules/.bin/ng build --configuration demo --source-map --extract-css=false --crossOrigin=use-credentials",
|
||||
"build-dev": "node ./node_modules/.bin/ng build --extract-css=false --crossOrigin=use-credentials",
|
||||
"build-cloud": "./scripts/build-cloud.sh",
|
||||
"fetch": "./scripts/get-remote-build.sh",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e --port 4300",
|
||||
"bundle-report": "node --max_old_space_size=3248 ./node_modules/.bin/ng build --prod --vendor-chunk --aot --stats-json; webpack-bundle-analyzer build/stats.json",
|
||||
"submodule": "git submodule update --recursive --remote --init"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular-devkit/build-ng-packagr": "~0.901.1",
|
||||
"@angular/animations": "^9.1.1",
|
||||
"@angular/cdk": "^9.1.1",
|
||||
"@angular/common": "^9.1.1",
|
||||
"@angular/compiler": "^9.1.1",
|
||||
"@angular/core": "^9.1.1",
|
||||
"@angular/forms": "^9.1.1",
|
||||
"@angular/material": "^9.1.1",
|
||||
"@angular/platform-browser": "^9.1.1",
|
||||
"@angular/platform-browser-dynamic": "^9.1.1",
|
||||
"@angular/platform-server": "^9.1.1",
|
||||
"@angular/router": "^9.1.1",
|
||||
"@angular/service-worker": "^9.1.1",
|
||||
"@ng-select/ng-select": "^4.0.0",
|
||||
"@ngrx/effects": "^9.1.0",
|
||||
"@ngrx/entity": "^9.1.0",
|
||||
"@ngrx/router-store": "^9.1.0",
|
||||
"@ngrx/store": "^9.1.0",
|
||||
"@types/d3-selection": "^1.4.1",
|
||||
"@types/plotly.js": "^1.50.4",
|
||||
"amazon-s3-uri": "0.0.3",
|
||||
"angular-notifier": "https://github.com/shayh/angular-notifier/releases/download/v4.2.0/angular-notifier-4.2.0.tgz",
|
||||
"angular-split": "^3.0.3",
|
||||
"ansi-to-html": "^0.6.14",
|
||||
"aws-sdk": "^2.656.0",
|
||||
"bootstrap": "^4.4.1",
|
||||
"britecharts": "^2.16.0",
|
||||
"hocon-parser": "^1.0.1",
|
||||
"jwt-decode": "^2.2.0",
|
||||
"localforage": "^1.7.3",
|
||||
"lodash": "^4.17.15",
|
||||
"lucene": "^2.1.1",
|
||||
"ngx-clipboard": "^13.0.0",
|
||||
"ngx-color-picker": "^9.0.0",
|
||||
"ngx-filesize": "^2.0.13",
|
||||
"node-sass": "^4.13.1",
|
||||
"object-hash": "^2.0.3",
|
||||
"primeicons": "^2.0.0",
|
||||
"primeng": "^9.0.5",
|
||||
"process": "^0.11.10",
|
||||
"rxjs": "^6.5.5",
|
||||
"tslib": "^1.11.1",
|
||||
"uuid": "^7.0.3",
|
||||
"zone.js": "~0.10.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.901.1",
|
||||
"@angular-devkit/core": "^9.1.1",
|
||||
"@angular-devkit/schematics": "^9.1.1",
|
||||
"@angular-devkit/schematics-cli": "^0.901.1",
|
||||
"@angular/cli": "^9.1.1",
|
||||
"@angular/compiler-cli": "^9.1.1",
|
||||
"@angular/language-service": "^9.1.1",
|
||||
"@fortawesome/fontawesome-free": "^5.13.0",
|
||||
"@ngrx/schematics": "^9.1.0",
|
||||
"@ngrx/store-devtools": "^9.1.0",
|
||||
"@schematics/schematics": "^0.901.1",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/node": "^12.12.35",
|
||||
"@types/uuid": "^7.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^2.27.0",
|
||||
"@typescript-eslint/parser": "^2.27.0",
|
||||
"babel-loader": "^8.1.0",
|
||||
"codelyzer": "^5.2.2",
|
||||
"eslint": "^6.8.0",
|
||||
"markdown-loader": "^5.1.0",
|
||||
"marked": "^0.8.2",
|
||||
"ts-node": "^8.8.2",
|
||||
"typescript": "3.8.3",
|
||||
"webpack-bundle-analyzer": "^3.6.1",
|
||||
"webpack-cli": "^3.3.11"
|
||||
}
|
||||
}
|
||||
17
src/app/app.component.html
Normal file
17
src/app/app.component.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<sm-survey *ngIf="!demo && (showSurvey$ | async) && !showNotification" (dismiss)="dismissSurvey()"></sm-survey>
|
||||
<sm-update-notifier [availableUpdates]="(updatesAvailable$ | async)"
|
||||
[dismissedVersion]="serverUpdatesService.lastDismissedVersion"
|
||||
(versionDismissed)="versionDismissed($event)"
|
||||
(notifierActive)="notifierActive($event)">
|
||||
</sm-update-notifier>
|
||||
<div>
|
||||
<sm-color-picker-wrapper id="color-picker-outlet"></sm-color-picker-wrapper>
|
||||
<sm-server-notification-dialog-container></sm-server-notification-dialog-container>
|
||||
<sm-spinner></sm-spinner>
|
||||
<sm-side-nav></sm-side-nav>
|
||||
<div class="app-container" [class.notifier-open]="showNotification || (showSurvey$ | async)">
|
||||
<sm-header [isDashboard]="isDashboardContext"></sm-header>
|
||||
<router-outlet class="main-router"></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
<notifier-container></notifier-container>
|
||||
32
src/app/app.component.scss
Normal file
32
src/app/app.component.scss
Normal file
@@ -0,0 +1,32 @@
|
||||
@import "webapp-common/shared/ui-components/styles/variables";
|
||||
@import "webapp-common/layout/layout.scss";
|
||||
|
||||
$notifier-height: 30px;
|
||||
|
||||
.app-container {
|
||||
margin-left: $side-bar-close-width;
|
||||
}
|
||||
|
||||
.main-router + * {
|
||||
display: block;
|
||||
height: calc(100vh - #{$top-bar-height});
|
||||
}
|
||||
|
||||
.notifier-open {
|
||||
.main-router + * {
|
||||
height: calc(100vh - #{$top-bar-height + $notifier-height});
|
||||
}
|
||||
}
|
||||
|
||||
sm-side-nav {
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
#color-picker-outlet {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
205
src/app/app.component.ts
Normal file
205
src/app/app.component.ts
Normal file
@@ -0,0 +1,205 @@
|
||||
import {ApiUsersService} from './business-logic/api-services/users.service';
|
||||
import {selectCurrentUser} from './webapp-common/core/reducers/users-reducer';
|
||||
import {Component, OnDestroy, OnInit, ViewEncapsulation, HostListener} from '@angular/core';
|
||||
import {ActivatedRoute, NavigationEnd, Router, Params} from '@angular/router';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {selectLoggedOut} from './webapp-common/core/reducers/view-reducer';
|
||||
import {select, Store} from '@ngrx/store';
|
||||
import {get} from 'lodash/fp';
|
||||
import {selectRouterParams, selectRouterUrl} from './webapp-common/core/reducers/router-reducer';
|
||||
import {ApiProjectsService} from './business-logic/api-services/projects.service';
|
||||
import {Project} from './business-logic/model/projects/project';
|
||||
import {GetAllProjects, SetSelectedProjectId, UpdateProject} from './webapp-common/core/actions/projects.actions';
|
||||
import {selectSelectedProject} from './webapp-common/core/reducers/projects.reducer';
|
||||
import {selectS3BucketCredentialsBucketCredentials, selectS3PopUpDetails, selectShowLocalFilesPopUp, selectShowS3PopUp} from './webapp-common/core/reducers/common-auth-reducer';
|
||||
import {MatDialog, MatDialogRef} from '@angular/material/dialog';
|
||||
import {S3AccessResolverComponent} from './webapp-common/layout/s3-access-resolver/s3-access-resolver.component';
|
||||
import {cancelS3Credentials, getTutorialBucketCredentials} from './webapp-common/core/actions/common-auth.actions';
|
||||
import {FetchCurrentUser} from './webapp-common/core/actions/users.actions';
|
||||
import {filter, map, take, withLatestFrom} from 'rxjs/operators';
|
||||
import * as routerActions from './webapp-common/core/actions/router.actions';
|
||||
import {combineLatest, Observable, Subscription} from 'rxjs';
|
||||
import {selectBreadcrumbsStrings} from './webapp-common/layout/layout.reducer';
|
||||
import {prepareNames} from './layout/breadcrumbs/breadcrumbs.utils';
|
||||
import {formatStaticCrumb} from './webapp-common/layout/breadcrumbs/breadcrumbs-common.utils';
|
||||
import {ServerUpdatesService} from './webapp-common/shared/services/server-updates.service';
|
||||
import {selectAvailableUpdates, selectShowSurvey} from './core/reducers/view-reducer';
|
||||
import {UPDATE_SERVER_PATH} from './app.constants';
|
||||
import {VisibilityChanged} from './webapp-common/core/actions/layout.actions';
|
||||
import {UiUpdatesService} from './webapp-common/shared/services/ui-updates.service';
|
||||
import {UsageStatsService} from './core/Services/usage-stats.service';
|
||||
import {UiUpdateDialogComponent} from './webapp-common/layout/ui-update-dialog/ui-update-dialog.component';
|
||||
import {dismissSurvey} from './core/Actions/layout.actions';
|
||||
import {environment} from '../environments/environment';
|
||||
|
||||
@Component({
|
||||
selector : 'sm-root',
|
||||
templateUrl : 'app.component.html',
|
||||
styleUrls : ['app.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class AppComponent implements OnInit, OnDestroy {
|
||||
public loggedOut$: Observable<any>;
|
||||
public isDashboardContext: boolean;
|
||||
public activeFeature: string;
|
||||
private urlSubscription: Subscription;
|
||||
public selectedProject$: Observable<Project>;
|
||||
public projectId: string;
|
||||
public isWorkersContext: boolean;
|
||||
public updatesAvailable$: Observable<any>;
|
||||
private selectedProjectFromUrl$: Observable<string>;
|
||||
private showS3Popup$: Observable<any>;
|
||||
private s3Dialog: MatDialogRef<S3AccessResolverComponent, any>;
|
||||
private showLocalFilePopup$: Observable<any>;
|
||||
private breadcrumbsSubscription: Subscription;
|
||||
private breadcrumbsStrings;
|
||||
private selectedCurrentUser$: Observable<any>;
|
||||
public showNotification: boolean = true;
|
||||
public showSurvey$: Observable<boolean>;
|
||||
public demo = environment.demo;
|
||||
|
||||
@HostListener('document:visibilitychange') onVisibilityChange() {
|
||||
this.store.dispatch(new VisibilityChanged(!document.hidden));
|
||||
}
|
||||
|
||||
constructor (
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private titleService: Title,
|
||||
private store: Store<any>,
|
||||
private projectsApi: ApiProjectsService,
|
||||
private userService: ApiUsersService,
|
||||
public serverUpdatesService: ServerUpdatesService,
|
||||
private uiUpdatesService: UiUpdatesService,
|
||||
private matDialog: MatDialog,
|
||||
private userStats: UsageStatsService
|
||||
) {
|
||||
this.showS3Popup$ = this.store.select(selectShowS3PopUp);
|
||||
this.showLocalFilePopup$ = this.store.pipe(select(selectShowLocalFilesPopUp));
|
||||
this.loggedOut$ = store.select(selectLoggedOut);
|
||||
this.selectedProject$ = this.store.select(selectSelectedProject);
|
||||
this.updatesAvailable$ = this.store.select(selectAvailableUpdates);
|
||||
this.showSurvey$ = this.store.select(selectShowSurvey);
|
||||
this.selectedCurrentUser$ = this.store.select(selectCurrentUser);
|
||||
this.selectedProjectFromUrl$ = this.store.select(selectRouterParams)
|
||||
.pipe(
|
||||
filter((params: Params) => !!params),
|
||||
map(params => get('projectId', params) || null)
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.router.events
|
||||
.pipe(filter(event => event instanceof NavigationEnd))
|
||||
.subscribe(
|
||||
() => {
|
||||
this.store.dispatch(new routerActions.NavigationEnd());
|
||||
this.updateTitle();
|
||||
});
|
||||
|
||||
this.store.dispatch(new FetchCurrentUser());
|
||||
this.selectedCurrentUser$.pipe(
|
||||
filter( user => !!user),
|
||||
take(1))
|
||||
.subscribe(() => this.serverUpdatesService.checkForUpdates(UPDATE_SERVER_PATH));
|
||||
|
||||
this.selectedProjectFromUrl$.subscribe((projectId: string) => {
|
||||
this.store.dispatch(new SetSelectedProjectId(projectId));
|
||||
});
|
||||
|
||||
this.showS3Popup$.subscribe(showS3 => {
|
||||
if (showS3) {
|
||||
this.s3Dialog = this.matDialog.open(S3AccessResolverComponent);
|
||||
this.s3Dialog.afterClosed().pipe(
|
||||
withLatestFrom(
|
||||
this.store.pipe(select(selectS3BucketCredentialsBucketCredentials)), this.store.pipe(select(selectS3PopUpDetails)))
|
||||
)
|
||||
.subscribe(([data, bucketCredentials, popupDetails]) => {
|
||||
if (!(data && data.success)) {
|
||||
const emptyCredentials = bucketCredentials.find((cred => cred.Bucket === popupDetails.credentials.Bucket)) === undefined;
|
||||
const dontAskAgainForBucketName = emptyCredentials ? '' : popupDetails.credentials.Bucket + popupDetails.credentials.Endpoint;
|
||||
this.store.dispatch(cancelS3Credentials({dontAskAgainForBucketName}));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.urlSubscription = combineLatest([this.store.select(selectRouterUrl), this.store.select(selectRouterParams)])
|
||||
.subscribe(([url, params]) => {
|
||||
this.projectId = get('projectId', params);
|
||||
this.isDashboardContext = url && url.includes('dashboard');
|
||||
this.isWorkersContext = url && url.includes('workers-and-queues');
|
||||
if (this.projectId) {
|
||||
try { // TODO: refactor to a better solution after all navbar are declared...
|
||||
this.activeFeature = url.split(this.projectId)[1].split('/')[1];
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.breadcrumbsSubscription = this.store.pipe(
|
||||
select(selectBreadcrumbsStrings),
|
||||
filter(names => !!names)
|
||||
).subscribe(
|
||||
(names) => {
|
||||
this.breadcrumbsStrings = prepareNames(names);
|
||||
this.updateTitle();
|
||||
}
|
||||
);
|
||||
|
||||
// TODO: move to somewhere else...
|
||||
this.store.dispatch(new GetAllProjects());
|
||||
this.store.dispatch(getTutorialBucketCredentials());
|
||||
this.uiUpdatesService.checkForUiUpdate();
|
||||
}
|
||||
|
||||
nameChanged(name) {
|
||||
this.store.dispatch(new UpdateProject({id: this.projectId, changes: {name: name}}));
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.urlSubscription.unsubscribe();
|
||||
this.breadcrumbsSubscription.unsubscribe();
|
||||
}
|
||||
|
||||
changeRoute(feature) {
|
||||
this.router.navigateByUrl('projects/' + this.projectId + '/' + feature);
|
||||
}
|
||||
|
||||
backToProjects() {
|
||||
this.router.navigateByUrl('projects');
|
||||
}
|
||||
|
||||
updateTitle() {
|
||||
let route = this.route.snapshot.firstChild;
|
||||
let routeConfig = [];
|
||||
|
||||
while (route) {
|
||||
const path = route.routeConfig.path.split('/').filter((item) => !!item);
|
||||
routeConfig = routeConfig.concat(path);
|
||||
route = route.firstChild;
|
||||
}
|
||||
const crumbs = routeConfig
|
||||
.reduce((acc, config) => {
|
||||
const dynamicCrumb = this.breadcrumbsStrings[config];
|
||||
return acc.concat(dynamicCrumb ? dynamicCrumb.name : formatStaticCrumb(config).name);
|
||||
}, [''])
|
||||
.filter(name => !!name);
|
||||
this.titleService.setTitle(`trains - ${crumbs.join(' / ')}`);
|
||||
}
|
||||
|
||||
versionDismissed(version: string) {
|
||||
this.serverUpdatesService.setDismissedVersion(version);
|
||||
}
|
||||
|
||||
notifierActive(show: boolean) {
|
||||
this.showNotification = show;
|
||||
}
|
||||
|
||||
dismissSurvey() {
|
||||
this.store.dispatch(dismissSurvey());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
379
src/app/app.constants.ts
Normal file
379
src/app/app.constants.ts
Normal file
@@ -0,0 +1,379 @@
|
||||
import {environment} from '../environments/environment';
|
||||
import {Action} from '@ngrx/store';
|
||||
|
||||
export const NA = 'N/A';
|
||||
export const ALLEGRO_TUTORIAL_BUCKET = 'allegro-tutorials';
|
||||
export const UPDATE_SERVER_PATH = 'https://updates.trains.allegro.ai';
|
||||
|
||||
export const BASE_REGEX = {
|
||||
DOMAIN : '([A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+([A-Za-z]{2,6}\\.?|[A-Za-z0-9-]{1,}[A-Za-z0-9]\\.?)',
|
||||
PATH : '(\\/?|[\\/?]\\S+)',
|
||||
IPV4 : '\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}',
|
||||
IPV6 : '\\[?[A-F0-9]*:[A-F0-9:]+\\]?',
|
||||
FILE_PROTOCOL : '[fF][iI][lL][eE]:\\/\\/',
|
||||
S3_PROTOCOL : '[sS]3:\\/\\/',
|
||||
GS_PROTOCOL : '[gG][sS]:\\/\\/',
|
||||
AZURE_PROTOCOL : 'azure:\\/\\/',
|
||||
SCHEME : '^[hH][tT][tT][pP][sS]?:\\/\\/',
|
||||
FILE_SUFFIX : '\\/\\S*[^\\/ ]+$',
|
||||
FOLDER : '\\/\\S*[^\\/ ]',
|
||||
S3_BUCKET_NAME : '(\\w[A-Za-z0-9\\-]+\\w\\.)*\\w[A-Za-z0-9\\-]+\\w',
|
||||
GS_BUCKET_NAME : '(\\w[A-Za-z0-9\\-_]+\\w\\.)*\\w[A-Za-z0-9\\-_]+\\w',
|
||||
AZURE_BUCKET_NAME: '(\\w[A-Za-z0-9\\-_]+\\w\\.)*\\w[A-Za-z0-9\\-_]+\\w'
|
||||
};
|
||||
|
||||
export const URI_REGEX = {
|
||||
S3_WITH_BUCKET : BASE_REGEX.S3_PROTOCOL + BASE_REGEX.S3_BUCKET_NAME + BASE_REGEX.PATH,
|
||||
GS_WITH_BUCKET : BASE_REGEX.GS_PROTOCOL + BASE_REGEX.GS_BUCKET_NAME + BASE_REGEX.PATH,
|
||||
S3_WITH_BUCKET_AND_HOST : BASE_REGEX.S3_PROTOCOL + BASE_REGEX.S3_BUCKET_NAME + BASE_REGEX.DOMAIN + BASE_REGEX.PATH,
|
||||
GS_WITH_BUCKET_AND_HOST : BASE_REGEX.GS_PROTOCOL + BASE_REGEX.GS_BUCKET_NAME + BASE_REGEX.DOMAIN + BASE_REGEX.PATH,
|
||||
AZURE_WITH_BUCKET_AND_HOST: BASE_REGEX.AZURE_PROTOCOL + BASE_REGEX.AZURE_BUCKET_NAME + BASE_REGEX.DOMAIN + BASE_REGEX.PATH,
|
||||
NON_AWS_S3 : BASE_REGEX.S3_PROTOCOL + '(' + BASE_REGEX.DOMAIN + '|' +
|
||||
'(localhost|LOCALHOST)' +
|
||||
BASE_REGEX.IPV4 + '|' +
|
||||
BASE_REGEX.IPV6 + ')' +
|
||||
'(:\\d+)?\\/' + // optional port.
|
||||
BASE_REGEX.S3_BUCKET_NAME +
|
||||
BASE_REGEX.PATH,
|
||||
HTTP : BASE_REGEX.SCHEME + '(' + BASE_REGEX.DOMAIN + '|' +
|
||||
'(localhost|LOCALHOST)|' +
|
||||
BASE_REGEX.IPV4 + '|' +
|
||||
BASE_REGEX.IPV6 + ')' +
|
||||
'(:\\d+)?',
|
||||
FILE : BASE_REGEX.FILE_PROTOCOL + BASE_REGEX.FOLDER,
|
||||
FILE_WITH_FILE_NAME : BASE_REGEX.FILE_PROTOCOL + '(' + BASE_REGEX.FOLDER + ')?' + BASE_REGEX.FILE_SUFFIX
|
||||
};
|
||||
|
||||
|
||||
export const TASK_TYPES = {
|
||||
TRAINING : 'training',
|
||||
ANNOTATION : 'annotation',
|
||||
MANUAL_ANNOTATION: 'annotation_manual',
|
||||
TESTING : 'testing',
|
||||
};
|
||||
|
||||
|
||||
const formPrefix = 'FORM_';
|
||||
export const FORMS_ACTIONS = {
|
||||
SET_FORM_DATA : formPrefix + 'SET_FORM_DATA',
|
||||
SET_FORM_STATUS : formPrefix + 'SET_FORM_STATUS',
|
||||
SET_FORM_SUBMITTED: formPrefix + 'SET_FORM_SUBMITTED'
|
||||
};
|
||||
|
||||
const recentTasksPrefix = 'RECENT_TASKS';
|
||||
|
||||
export const RECENT_TASKS_ACTIONS = {
|
||||
GET_RECENT_TASKS: recentTasksPrefix + 'GET_RECENT_TASKS',
|
||||
SET_RECENT_TASKS: recentTasksPrefix + 'SET_RECENT_TASKS'
|
||||
};
|
||||
|
||||
|
||||
export const AUTH_PREFIX = 'AUTH_';
|
||||
export const AUTH_ACTIONS = {
|
||||
ADD_CREDENTIAL : AUTH_PREFIX + 'ADD_CREDENTIAL',
|
||||
CREATE_CREDENTIAL : AUTH_PREFIX + 'CREATE_CREDENTIAL (API)',
|
||||
CREATE_SUCCESS : AUTH_PREFIX + 'CREATE_SUCCESS',
|
||||
GET_SUCCESS : AUTH_PREFIX + 'GET_SUCCESS',
|
||||
REVOKE_SUCCESS : AUTH_PREFIX + 'REVOKE_SUCCESS',
|
||||
RESET_NEW_CREDENTIAL : AUTH_PREFIX + 'RESET_NEW_CREDENTIAL',
|
||||
GET_TASK_TOKEN_SUCCESS : AUTH_PREFIX + 'GET_TASK_TOKEN_SUCCESS',
|
||||
SET_TASK_TOKEN : AUTH_PREFIX + 'SET_TASK_TOKEN',
|
||||
GET_ALL_CREDENTIALS : AUTH_PREFIX + 'GET_ALL_CREDENTIALS (API)',
|
||||
UPDATE_ALL_CREDENTIALS : AUTH_PREFIX + 'UPDATE_ALL_CREDENTIALS',
|
||||
UPDATE_S3_BUCKET_CREDENTIALS: AUTH_PREFIX + 'UPDATE_S3_BUCKET_CREDENTIALS',
|
||||
REVOKE_CREDENTIAL : AUTH_PREFIX + 'REVOKE_CREDENTIAL (API)'
|
||||
};
|
||||
|
||||
export const S3_ACTIONS = {
|
||||
RESET_DONT_SHOW_AGAIN_FOR_BUCKET_ENDPOINT: AUTH_PREFIX + 'RESET_DONT_SHOW_AGAIN_FOR_BUCKET_ENDPOINT',
|
||||
CANCEL_BUCKET_CREDENTIALS : AUTH_PREFIX + 'CANCEL_BUCKET_CREDENTIALS',
|
||||
SHOW_S3_POPUP : AUTH_PREFIX + 'SHOW_S3_POPUP',
|
||||
RESET_SHOW_S3_POPUP : AUTH_PREFIX + 'RESET_SHOW_S3_POPUP',
|
||||
SHOW_LOCAL_FILE_POPUP : AUTH_PREFIX + 'SHOW_LOCAL_FILE_POPUP',
|
||||
SET_BUCKETS_CREDENTIALS : AUTH_PREFIX + 'SET_BUCKETS_CREDENTIALS',
|
||||
SET_BUCKET_CREDENTIALS : AUTH_PREFIX + 'SET_BUCKET_CREDENTIALS',
|
||||
GET_TUTORIAL_BUCKET_CREDENTIALS : AUTH_PREFIX + 'GET_TUTORIAL_BUCKET_CREDENTIALS'
|
||||
};
|
||||
|
||||
export const ICONS = {
|
||||
CREATED : 'fa-plus',
|
||||
MINUS : 'fa-minus',
|
||||
CHART : 'fa-chart-area',
|
||||
QUEUED : 'fa-hourglass',
|
||||
ENQUEUE : 'fa-hourglass',
|
||||
DEQUEUE : 'fa-undo',
|
||||
IN_PROGRESS : 'fa-hourglass-half',
|
||||
STOPPED : 'fa-square',
|
||||
RESUME : 'fa-hourglass-half',
|
||||
CLOSED : 'fa-circle-o',
|
||||
FAILED : 'fa-times',
|
||||
FALSE : 'fa-times',
|
||||
PUBLISHED : 'fa-check',
|
||||
PUBLISHING : 'fa-spinner',
|
||||
TRUE : 'fa-check',
|
||||
ANNOTATION : 'fa-puzzle-piece',
|
||||
TASK : 'fa-briefcase',
|
||||
MODEL : 'fa-cube',
|
||||
SHOW : 'fa-eye',
|
||||
HIDE : 'fa-eye-slash',
|
||||
COMPLETED : 'fa-circle',
|
||||
ABORTED : 'fa-circle',
|
||||
UNKNOWN : 'fa-question-circle',
|
||||
TESTING : 'fa-balance-scale',
|
||||
IMPORT : 'fa-download',
|
||||
TRAINING : 'fa-cube',
|
||||
ANNOTATION_MANUAL: 'fa-edit',
|
||||
ADMIN : 'fa-cogs',
|
||||
WARNING : 'fa-exclamation-triangle',
|
||||
OUTPUT : 'fa-folder-open',
|
||||
EXECUTION : 'fa-terminal',
|
||||
LIST : 'fa-list',
|
||||
REMOVE : 'fa-trash',
|
||||
ADD : 'fa-plus',
|
||||
TREE : 'fa-code-branch',
|
||||
TABLE : 'fa-table',
|
||||
SELECTED : 'fa-check-square-o',
|
||||
PROJECT : 'fa-list-alt',
|
||||
FOCUS : 'fa-crosshairs',
|
||||
LOG : 'fa-file-text-o',
|
||||
METRICS : 'fa-chart-area',
|
||||
TOKEN : 'fa-key',
|
||||
EDIT : 'fa-pencil-square-o',
|
||||
EDITABLE : 'fa-pencil-alt',
|
||||
RESET : 'fa-sync',
|
||||
CLONE : 'fa-clone',
|
||||
EXTEND : 'fa-code-branch',
|
||||
DOWNLOAD : 'fa-download',
|
||||
WORKER : 'fa-microchip',
|
||||
|
||||
};
|
||||
|
||||
|
||||
export const VIEW_PREFIX = 'VIEW_';
|
||||
export const VIEW_ACTIONS = {
|
||||
SET_SERVER_UPDATES_AVAILABLE: VIEW_PREFIX + 'SET_SERVER_UPDATES_AVAILABLE',
|
||||
SET_SERVER_ERROR : VIEW_PREFIX + 'SET_SERVER_ERROR',
|
||||
SET_RESULT_MESSAGE : VIEW_PREFIX + 'SET_RESULT_MESSAGE',
|
||||
DEACTIVE_LOADER : VIEW_PREFIX + 'DEACTIVE_LOADER',
|
||||
ACTIVE_LOADER : VIEW_PREFIX + 'ACTIVE_LOADER',
|
||||
VISIBILITY_CHANGED : VIEW_PREFIX + 'VISIBILITY_CHANGED',
|
||||
RESET_LOADER : VIEW_PREFIX + 'RESET_LOADER',
|
||||
SET_BACKDROP : VIEW_PREFIX + 'SET_BACKDROP',
|
||||
OPEN_DIALOG : VIEW_PREFIX + 'OPEN_DIALOG',
|
||||
CLOSE_DIALOG : VIEW_PREFIX + 'CLOSE_DIALOG',
|
||||
ADD_MESSAGE : VIEW_PREFIX + 'ADD_MESSAGE',
|
||||
REMOVE_MESSAGE : VIEW_PREFIX + 'REMOVE_MESSAGE',
|
||||
SET_SERVER_ERROR_STATE : VIEW_PREFIX + 'SET_SERVER_ERROR_STATE',
|
||||
SET_MORE_INFO : VIEW_PREFIX + 'SET_MORE_INFO',
|
||||
SET_AUTO_REFRESH : VIEW_PREFIX + 'SET_AUTO_REFRESH',
|
||||
SET_NOTIFICATION_DIALOG : VIEW_PREFIX + 'SET_NOTIFICATION_DIALOG',
|
||||
SET_COMPARE_AUTO_REFRESH : VIEW_PREFIX + 'SET_COMPARE_AUTO_REFRESH'
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
export type MediaContentTypeEnum = 'image/bmp' | 'image/jpeg' | 'image/png' | 'video/mp4' | 'image/jpeg';
|
||||
|
||||
export const MEDIA_VIDEO_EXTENSIONS = ['flv', 'avi', 'mp4', 'mov', 'mpg', 'wmv', '3gp', 'mkv'];
|
||||
|
||||
export type MessageSeverityEnum = 'success' | 'error' | 'info' | 'warn';
|
||||
|
||||
export const MESSAGES_SEVERITY = {
|
||||
SUCCESS: 'success' as MessageSeverityEnum,
|
||||
ERROR : 'error' as MessageSeverityEnum,
|
||||
INFO : 'info' as MessageSeverityEnum,
|
||||
WARN : 'warn' as MessageSeverityEnum
|
||||
};
|
||||
|
||||
const TASKS_PREFIX = 'TASKS_';
|
||||
|
||||
export const TASKS_ACTIONS = {
|
||||
SET_TASK_IN_TABLE : TASKS_PREFIX + 'SET_TASK_IN_TABLE',
|
||||
GET_TASK_BY_ID_AFTER_EFFECT: TASKS_PREFIX + 'GET_TASK_BY_ID_AFTER_EFFECT',
|
||||
DEQUEUE_TASK : TASKS_PREFIX + 'DEQUEUE_TASK',
|
||||
SET_TASK_FOR_METRICS : TASKS_PREFIX + 'SET_TASK_FOR_METRICS',
|
||||
GET_TASK_FOR_METRICS : TASKS_PREFIX + 'GET_TASK_FOR_METRICS',
|
||||
CLOSE_TASK : TASKS_PREFIX + 'CLOSE_TASK',
|
||||
FAIL_TASK : TASKS_PREFIX + 'FAIL_TASK',
|
||||
RESUM_TASK : TASKS_PREFIX + 'RESUM_TASK',
|
||||
PUBLISH_TASK : TASKS_PREFIX + 'PUBLISH_TASK',
|
||||
RESET_TASK : TASKS_PREFIX + 'RESET_TASK',
|
||||
GET_TASK_TOKEN : TASKS_PREFIX + ' GET_TASK_TOKEN',
|
||||
ADD_SELECTED_TASK : TASKS_PREFIX + 'ADD_SELECTED_TASK',
|
||||
AFTER_TASK_CHANGED : TASKS_PREFIX + 'AFTER_TASK_CHANGED',
|
||||
CLOSE_TASK_LOG : TASKS_PREFIX + 'CLOSE_TASK_LOG',
|
||||
CLEAR_TOKEN : TASKS_PREFIX + 'CLEAR_TOKEN',
|
||||
GET_ALL : TASKS_PREFIX + 'GET_ALL',
|
||||
GET_TASK_SUCCESS : TASKS_PREFIX + 'GET_TASK_SUCCESS',
|
||||
GET_PROTOTEXT_SUCCESS : TASKS_PREFIX + 'GET_PROTOTEXT_SUCCESS',
|
||||
GET_TASK_LOG_SUCCESS : TASKS_PREFIX + 'GET_TASK_LOG_SUCCESS',
|
||||
GLOBAL_FILTER_CHANGED : TASKS_PREFIX + 'GLOBAL_FILTER_CHANGED',
|
||||
VIEW_MODE_CHANGED : TASKS_PREFIX + 'VIEW_MODE_CHANGED',
|
||||
TASK_CREATED : TASKS_PREFIX + 'TASK_CREATED',
|
||||
TASK_CHECKED : TASKS_PREFIX + 'TASK_CHECKED',
|
||||
TASK_UNCHECKED : TASKS_PREFIX + 'TASK_UNCHECKED',
|
||||
TABLE_SORT_CHANGED : TASKS_PREFIX + 'TABLE_SORT_CHANGED',
|
||||
TABLE_FILTER_CHANGED : TASKS_PREFIX + 'TABLE_FILTER_CHANGED',
|
||||
TOGGLE_HIDDEN : TASKS_PREFIX + 'TOGGLE_HIDDEN',
|
||||
TASK_DELETED_SUCCESS : TASKS_PREFIX + 'TASK_DELETED_SUCCESS',
|
||||
TASK_ENQUEUE : TASKS_PREFIX + 'TASK_ENQUEUE',
|
||||
TASKS_SUCCESS : TASKS_PREFIX + 'GET_ALL_SUCCESS',
|
||||
TASKS_OPTIMISTIC : TASKS_PREFIX + 'OPTIMISTIC',
|
||||
TASKS_TRAINING_SUCCESS : TASKS_PREFIX + 'TRAINING_SUCCESS',
|
||||
TASKS_IMPORT_SUCCESS : TASKS_PREFIX + 'IMPORT_SUCCESS',
|
||||
TASKS_TESTING_SUCCESS : TASKS_PREFIX + 'TESTING_SUCCESS',
|
||||
RESET_SELECTED_TASK : TASKS_PREFIX + 'RESET_SELECTED_TASK',
|
||||
REMOVE_SELECTED_TASK : TASKS_PREFIX + 'REMOVE_SELECTED_TASK',
|
||||
RESET_SUCCESS : TASKS_PREFIX + 'RESET_SUCCESS',
|
||||
SET_FIRST : TASKS_PREFIX + 'SET_FIRST',
|
||||
SET_GLOBAL_FILTER : TASKS_PREFIX + 'SET_GLOBAL_FILTER',
|
||||
SET_SELECTED_TASK : TASKS_PREFIX + 'SET_SELECTED_TASK',
|
||||
SET_SHOW_CHECKED_TASKS : TASKS_PREFIX + 'SET_SHOW_CHECKED_TASKS',
|
||||
SET_TASKS_DATA : TASKS_PREFIX + 'SET_TASKS_DATA',
|
||||
SET_TABLE_COLUMNS : TASKS_PREFIX + 'SET_TABLE_COLUMNS',
|
||||
STOP_CHECKED_TASKS : TASKS_PREFIX + 'STOP_CHECKED_TASKS',
|
||||
STOP_TASK : TASKS_PREFIX + 'STOP_TASK',
|
||||
UPDATE_TASK : TASKS_PREFIX + 'UPDATE_TASK',
|
||||
};
|
||||
export const USERS_PREFIX = 'USERS_';
|
||||
export const USERS_ACTIONS = {
|
||||
FETCH_CURRENT_USER: USERS_PREFIX + 'FETCH_USER',
|
||||
SET_CURRENT_USER : USERS_PREFIX + 'SET_CURRENT_USER',
|
||||
LOGOUT_SUCCESS : USERS_PREFIX + 'LOGOUT_SUCCESS',
|
||||
LOGOUT : USERS_PREFIX + 'LOGOUT',
|
||||
SET_PREF : USERS_PREFIX + 'SET_PREF'
|
||||
};
|
||||
|
||||
export const NAVIGATION_PREFIX = 'NAVIGATION_';
|
||||
export const NAVIGATION_ACTIONS = {
|
||||
NAVIGATE_TO : NAVIGATION_PREFIX + 'NAVIGATE_TO',
|
||||
NAVIGATION_END : NAVIGATION_PREFIX + 'NAVIGATION_END',
|
||||
SET_ROUTER_SEGMENT : NAVIGATION_PREFIX + 'SET_ROUTER_SEGMENT',
|
||||
UPDATATE_CURRENT_URL_WITHOUT_NAVIGATING: NAVIGATION_PREFIX + 'UPDATATE_CURRENT_URL_WITHOUT_NAVIGATING',
|
||||
NAVIGATION_SKIPPED : NAVIGATION_PREFIX + 'NAVIGATION_SKIPPED',
|
||||
};
|
||||
|
||||
|
||||
|
||||
export const ENVIRONMENT = {API_VERSION: '/v2.8'};
|
||||
const url = window.location.origin;
|
||||
let apiBaseUrl: string;
|
||||
if (environment.apiBaseUrl) {
|
||||
apiBaseUrl = environment.apiBaseUrl;
|
||||
} else if (/https?:\/\/(demo|)app\./.test(url)) {
|
||||
apiBaseUrl = url.replace(/(https?):\/\/(demo|)app/, '$1://$2api');
|
||||
} else if (window.location.port === '30080') {
|
||||
apiBaseUrl = url.replace(/:\d+/, '') + ':30008';
|
||||
} else {
|
||||
apiBaseUrl = url.replace(/:\d+/, '') + ':8008';
|
||||
}
|
||||
const apiBaseUrlNoVersion = apiBaseUrl;
|
||||
|
||||
let fileBaseUrl;
|
||||
if (environment.fileBaseUrl) {
|
||||
fileBaseUrl = environment.fileBaseUrl;
|
||||
} else if (/https?:\/\/(demo|)app\./.test(url)) {
|
||||
fileBaseUrl = url.replace(/(https?):\/\/(demo|)app/, '$1://$2files');
|
||||
} else if (window.location.port === '30080') {
|
||||
fileBaseUrl = url.replace(/:\d+/, '') + ':30081';
|
||||
} else if (window.location.port === '8080') {
|
||||
fileBaseUrl = url.replace(/:\d+/, '') + ':8081';
|
||||
}
|
||||
|
||||
apiBaseUrl += ENVIRONMENT.API_VERSION;
|
||||
|
||||
const HTTP_PREFIX = 'HTTP_';
|
||||
export const HTTP_ACTIONS = {
|
||||
REQUEST_FAILED: HTTP_PREFIX + 'REQUEST_FAILED'
|
||||
};
|
||||
|
||||
export const HTTP = {
|
||||
API_REQUEST : 'HTTP_API_REQUEST',
|
||||
API_REQUEST_SUCCESS : 'API_REQUEST_SUCCESS',
|
||||
API_REQUEST_CANCELED : 'API_REQUEST_CANCELED',
|
||||
API_BASE_URL : apiBaseUrl, // <-- DIRECT CALL DOESN'T WORK
|
||||
API_BASE_URL_NO_VERSION: apiBaseUrlNoVersion,
|
||||
FILE_BASE_URL: fileBaseUrl,
|
||||
|
||||
API_METHODS: {
|
||||
GET : 'GET',
|
||||
POST: 'POST'
|
||||
},
|
||||
|
||||
AUTH: {
|
||||
CREATE : 'auth.create_credentials',
|
||||
GET_ALL : 'auth.get_credentials',
|
||||
REVOKE : 'auth.revoke_credentials',
|
||||
GET_TASK_TOKEN: 'auth.get_task_token'
|
||||
},
|
||||
|
||||
MODELS: {
|
||||
GET_ALL : 'models.get_all',
|
||||
GET_BY_ID : 'models.get_by_id',
|
||||
CREATE_MODEL: 'models.create',
|
||||
UPDATE : 'models.update'
|
||||
},
|
||||
|
||||
USERS: {
|
||||
GET_CURRENT_USER: 'users.get_current_user',
|
||||
GET_BY_ID : 'users.get_by_id',
|
||||
LOGOUT : '/logout'
|
||||
},
|
||||
|
||||
QUEUES: {
|
||||
GET_ALL: 'queues.get_all'
|
||||
},
|
||||
|
||||
PROJECTS: {
|
||||
GET_ALL: 'projects.get_all',
|
||||
CREATE : 'projects.create',
|
||||
DELETE : 'projects.delete'
|
||||
},
|
||||
|
||||
TASKS: {
|
||||
CLOSE : 'tasks.close',
|
||||
PUBLISH : 'tasks.publish',
|
||||
GET_ALL : 'tasks.get_all',
|
||||
GET_BY_ID : 'tasks.get_by_id',
|
||||
ENQUEUE : 'tasks.enqueue',
|
||||
DEQUEUE : 'tasks.dequeue',
|
||||
CREATE : 'tasks.create',
|
||||
UPDATE : 'tasks.update',
|
||||
EDIT : 'tasks.edit',
|
||||
RESET : 'tasks.reset',
|
||||
START : 'tasks.started',
|
||||
STOP : 'tasks.stop',
|
||||
STOPPED : 'tasks.stopped',
|
||||
COMPLETED : 'tasks.completed',
|
||||
TASK_LOG : 'events.get_task_log',
|
||||
RESUME : 'tasks.resume',
|
||||
FAILED : 'tasks.failed',
|
||||
DEBUG_IMAGES : 'events.debug_images',
|
||||
VECTOR_METRICS : 'events.get_vector_metrics_and_variants',
|
||||
VECTOR_METRICS_HISTOGRAM: 'events.vector_metrics_iter_histogram',
|
||||
SCALAR_METRICS : 'events.scalar_metrics_iter_histogram',
|
||||
PLOT : 'events.get_task_plots',
|
||||
DELETE : 'tasks.delete'
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
FRAMES: {
|
||||
GET_BATCH : 'frames.get_next',
|
||||
GET_BATCH_FOR_TASK: 'frames.get_next_for_task',
|
||||
SET_ROIS : 'frames.set_rois',
|
||||
COMMIT : 'frames.commit',
|
||||
},
|
||||
|
||||
SOURCES: {
|
||||
GET_ALL: 'storage.get_all',
|
||||
}
|
||||
};
|
||||
|
||||
export class EmptyAction implements Action {
|
||||
readonly type = 'EMPTY_ACTION';
|
||||
}
|
||||
|
||||
export const AUTO_REFRESH_INTERVAL = 10 * 1000;
|
||||
83
src/app/app.module.ts
Normal file
83
src/app/app.module.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
import {APP_INITIALIZER, NgModule} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||
import {PreloadAllModules, RouteReuseStrategy, RouterModule} from '@angular/router';
|
||||
import {BusinessLogicModule} from './business-logic/business-logic.module';
|
||||
import {AppComponent} from './app.component';
|
||||
import {routes} from './app.routes';
|
||||
import {SMCoreModule} from './core/core.module';
|
||||
import {SMSharedModule} from './webapp-common/shared/shared.module';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {CommonLayoutModule} from './webapp-common/layout/layout.module';
|
||||
import {HTTP_INTERCEPTORS} from '@angular/common/http';
|
||||
import {WebappIntercptor} from './webapp-common/core/interceptors/webapp-interceptor';
|
||||
import {CustomReuseStrategy} from './webapp-common/core/router-reuse-strategy';
|
||||
import {ApiUsersService} from './business-logic/api-services/users.service';
|
||||
import {loadUserAndPreferences} from './webapp-common/user-preferences';
|
||||
import {AdminModule} from './webapp-common/admin/admin.module';
|
||||
import {AngularSplitModule} from 'angular-split';
|
||||
import {NotifierModule} from 'angular-notifier';
|
||||
import {LayoutModule} from './layout/layout.module';
|
||||
import {ColorHashService} from './webapp-common/shared/services/color-hash/color-hash.service';
|
||||
import {LoginModule} from './webapp-common/login/login.module';
|
||||
import {LoginService} from './webapp-common/shared/services/login.service';
|
||||
import {Store} from '@ngrx/store';
|
||||
import {TitleCasePipe} from '@angular/common';
|
||||
|
||||
@NgModule({
|
||||
declarations : [AppComponent],
|
||||
imports : [
|
||||
FormsModule,
|
||||
BrowserAnimationsModule,
|
||||
BrowserModule,
|
||||
SMCoreModule,
|
||||
BusinessLogicModule,
|
||||
SMSharedModule,
|
||||
LoginModule,
|
||||
AngularSplitModule.forRoot(),
|
||||
RouterModule.forRoot(routes, {preloadingStrategy: PreloadAllModules, scrollPositionRestoration: 'top', onSameUrlNavigation: 'reload'}),
|
||||
AdminModule,
|
||||
NotifierModule.withConfig({
|
||||
theme : 'material',
|
||||
behaviour: {
|
||||
autoHide: {default: 5000, error: false}
|
||||
},
|
||||
position : {
|
||||
vertical : {position: 'top', distance: 12, gap: 10},
|
||||
horizontal: {position: 'right', distance: 12}
|
||||
}
|
||||
}),
|
||||
CommonLayoutModule,
|
||||
LayoutModule,
|
||||
],
|
||||
providers : [
|
||||
{
|
||||
provide : APP_INITIALIZER,
|
||||
useFactory: loadUserAndPreferences,
|
||||
multi : true,
|
||||
deps : [ApiUsersService, LoginService, Store]
|
||||
},
|
||||
ColorHashService,
|
||||
{provide: HTTP_INTERCEPTORS, useClass: WebappIntercptor, multi: true},
|
||||
{provide: RouteReuseStrategy, useClass: CustomReuseStrategy},
|
||||
],
|
||||
bootstrap : [AppComponent],
|
||||
exports : []
|
||||
})
|
||||
|
||||
export class AppModule {
|
||||
|
||||
constructor() {
|
||||
|
||||
// store.select(selectRouter)
|
||||
// // .filter(state => !state.skipNextNavigation)
|
||||
// .subscribe(state => {
|
||||
// this.store.dispatch(new ResetDontShowAgainForBucketEndpoint());
|
||||
// (!state.params || !state.url) ?
|
||||
// this.router.navigateByUrl(state.url, { queryParams: { unGuard: state.unGuard } }) :
|
||||
// this.router.navigate([state.url, state.params], { queryParams: { unGuard: state.unGuard } });
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
44
src/app/app.routes.ts
Normal file
44
src/app/app.routes.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import {Routes} from '@angular/router';
|
||||
import {AdminComponent} from './webapp-common/admin/admin.component';
|
||||
|
||||
|
||||
export const routes: Routes = [
|
||||
{path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
||||
{path: 'admin', redirectTo: 'profile', pathMatch: 'full'},
|
||||
{
|
||||
path : 'dashboard',
|
||||
loadChildren: () => import('./features/dashboard/dashboard.module').then(m => m.DashboardModule),
|
||||
data : {search: true},
|
||||
},
|
||||
{path: 'login', loadChildren: () => import('./webapp-common/login/login.module').then(m => m.LoginModule)},
|
||||
{
|
||||
path : 'projects',
|
||||
loadChildren: () => import('./features/projects/projects.module').then(m => m.ProjectsModule),
|
||||
data : {search: true},
|
||||
},
|
||||
{path: 'profile', component: AdminComponent},
|
||||
|
||||
{
|
||||
path: 'projects', children: [
|
||||
{path: '', redirectTo: '*', pathMatch: 'full'},
|
||||
{
|
||||
path : ':projectId',
|
||||
data : {search: true},
|
||||
children: [
|
||||
{path: '', redirectTo: 'experiments', pathMatch: 'full'},
|
||||
{path: 'experiments', loadChildren: () => import('./features/experiments/experiments.module').then(m => m.ExperimentsModule)},
|
||||
{path: 'models', loadChildren: () => import('./webapp-common/models/models.module').then(m => m.ModelsModule)},
|
||||
{
|
||||
path : 'compare-experiments',
|
||||
loadChildren: () => import('./webapp-common/experiments-compare/experiments-compare.module').then(m => m.ExperimentsCompareModule),
|
||||
data : {search: false}
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{path: 'workers-and-queues', loadChildren: () => import('./webapp-common/workers-and-queues/workers-and-queues.module').then(m => m.WorkersAndQueuesModule)},
|
||||
{path: '404', loadChildren: () => import('./features/not-found/not-found.module').then(m => m.NotFoundModule)},
|
||||
{path: '**', loadChildren: () => import('./features/not-found/not-found.module').then(m => m.NotFoundModule)},
|
||||
|
||||
];
|
||||
70
src/app/business-logic/api-services/api-requests.service.ts
Normal file
70
src/app/business-logic/api-services/api-requests.service.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {Observable} from 'rxjs';
|
||||
import {IApiRequest, SmHttpResponse} from '../model/api-request';
|
||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
||||
import {HttpHeaders} from '@angular/common/http';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable()
|
||||
export class SmApiRequestsService {
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
createRequest(request: IApiRequest): Observable<any> {
|
||||
|
||||
return this.http.request(
|
||||
request.meta.method,
|
||||
request.meta.endpoint[0] === '/' ? request.meta.endpoint : `${HTTP.API_BASE_URL}/${request.meta.endpoint}`,
|
||||
{
|
||||
params : this.getParams(request.params),
|
||||
body : request.payload,
|
||||
withCredentials: true
|
||||
});
|
||||
}
|
||||
|
||||
post<T>(url: string, body: any | null, options?: {
|
||||
headers?: HttpHeaders | {
|
||||
[header: string]: string | string[];
|
||||
};
|
||||
observe?: 'body';
|
||||
params?: HttpParams | {
|
||||
[param: string]: string | string[];
|
||||
};
|
||||
reportProgress?: boolean;
|
||||
responseType?: 'json';
|
||||
withCredentials?: boolean;
|
||||
}): Observable<T> {
|
||||
options.withCredentials = true;
|
||||
return this.http.post<SmHttpResponse>(url, body, options).pipe(map(res => res.data));
|
||||
}
|
||||
|
||||
posti(url: string, body: any | null, options?: {
|
||||
headers?: HttpHeaders | {
|
||||
[header: string]: string | string[];
|
||||
};
|
||||
observe?: 'body';
|
||||
params?: HttpParams | {
|
||||
[param: string]: string | string[];
|
||||
};
|
||||
reportProgress?: boolean;
|
||||
responseType?: 'json';
|
||||
withCredentials?: boolean;
|
||||
}): Observable<SmHttpResponse> {
|
||||
options.withCredentials = true;
|
||||
return this.http.post<SmHttpResponse>(url, body, options);
|
||||
}
|
||||
|
||||
private getParams(actionParams) {
|
||||
let params: HttpParams = new HttpParams();
|
||||
|
||||
if (actionParams) {
|
||||
Object.keys(actionParams)
|
||||
.forEach(key => params = params.append(key, actionParams[key]));
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
}
|
||||
3
src/app/business-logic/api-services/api.ts
Normal file
3
src/app/business-logic/api-services/api.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './events.service';
|
||||
import { ApiEventsService } from './events.service';
|
||||
export const APIS = [ApiEventsService];
|
||||
527
src/app/business-logic/api-services/auth.service.ts
Normal file
527
src/app/business-logic/api-services/auth.service.ts
Normal file
@@ -0,0 +1,527 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { AuthCreateCredentialsResponse } from '../model/auth/authCreateCredentialsResponse';
|
||||
import { AuthCreateUserRequest } from '../model/auth/authCreateUserRequest';
|
||||
import { AuthCreateUserResponse } from '../model/auth/authCreateUserResponse';
|
||||
import { AuthEditUserRequest } from '../model/auth/authEditUserRequest';
|
||||
import { AuthEditUserResponse } from '../model/auth/authEditUserResponse';
|
||||
import { AuthFixedUsersModeResponse } from '../model/auth/authFixedUsersModeResponse';
|
||||
import { AuthGetCredentialsResponse } from '../model/auth/authGetCredentialsResponse';
|
||||
import { AuthGetTokenForUserRequest } from '../model/auth/authGetTokenForUserRequest';
|
||||
import { AuthGetTokenForUserResponse } from '../model/auth/authGetTokenForUserResponse';
|
||||
import { AuthLoginRequest } from '../model/auth/authLoginRequest';
|
||||
import { AuthLoginResponse } from '../model/auth/authLoginResponse';
|
||||
import { AuthRevokeCredentialsRequest } from '../model/auth/authRevokeCredentialsRequest';
|
||||
import { AuthRevokeCredentialsResponse } from '../model/auth/authRevokeCredentialsResponse';
|
||||
import { AuthValidateTokenRequest } from '../model/auth/authValidateTokenRequest';
|
||||
import { AuthValidateTokenResponse } from '../model/auth/authValidateTokenResponse';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiAuthService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Creates a new set of credentials for the authenticated user. New key/secret is returned. Note: Secret will never be returned in any other API call. If a secret is lost or compromised, the key should be revoked and a new set of credentials can be created.
|
||||
* @param request request body
|
||||
* @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 authCreateCredentials(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authCreateCredentials.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthCreateCredentialsResponse>(`${this.basePath}/auth.create_credentials`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Creates a new user auth entry. Intended for internal use.
|
||||
* @param request request body
|
||||
* @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 authCreateUser(request: AuthCreateUserRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authCreateUser.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthCreateUserResponse>(`${this.basePath}/auth.create_user`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Edit a users\' auth data properties
|
||||
* @param request request body
|
||||
* @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 authEditUser(request: AuthEditUserRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authEditUser.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthEditUserResponse>(`${this.basePath}/auth.edit_user`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Return fixed users mode status
|
||||
* @param request request body
|
||||
* @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 authFixedUsersMode(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authFixedUsersMode.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthFixedUsersModeResponse>(`${this.basePath}/auth.fixed_users_mode`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Returns all existing credential keys for the authenticated user. Note: Only credential keys are returned.
|
||||
* @param request request body
|
||||
* @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 authGetCredentials(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authGetCredentials.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthGetCredentialsResponse>(`${this.basePath}/auth.get_credentials`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get a token for the specified user. Intended for internal use.
|
||||
* @param request request body
|
||||
* @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 authGetTokenForUser(request: AuthGetTokenForUserRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authGetTokenForUser.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthGetTokenForUserResponse>(`${this.basePath}/auth.get_token_for_user`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get a token based on supplied credentials (key/secret). Intended for use by users with key/secret credentials that wish to obtain a token for use with other services.
|
||||
* @param request request body
|
||||
* @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 authLogin(request: AuthLoginRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authLogin.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthLoginResponse>(`${this.basePath}/auth.login`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Removes the authentication cookie from the current session
|
||||
* @param request request body
|
||||
* @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 authLogout(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authLogout.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/auth.logout`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Revokes (and deletes) a set (key, secret) of credentials for the authenticated user.
|
||||
* @param request request body
|
||||
* @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 authRevokeCredentials(request: AuthRevokeCredentialsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authRevokeCredentials.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthRevokeCredentialsResponse>(`${this.basePath}/auth.revoke_credentials`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Validate a token and return user identity if valid. Intended for internal use.
|
||||
* @param request request body
|
||||
* @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 authValidateToken(request: AuthValidateTokenRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling authValidateToken.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<AuthValidateTokenResponse>(`${this.basePath}/auth.validate_token`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
98
src/app/business-logic/api-services/default.service.ts
Normal file
98
src/app/business-logic/api-services/default.service.ts
Normal file
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* tasks
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiDefaultService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @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 tasksAddOrUpdateArtifacts(options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
|
||||
return this.apiRequest.post<any>(`${this.basePath}/tasks.add_or_update_artifacts`,
|
||||
null,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
856
src/app/business-logic/api-services/events.service.ts
Normal file
856
src/app/business-logic/api-services/events.service.ts
Normal file
@@ -0,0 +1,856 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { EventsAddBatchResponse } from '../model/events/eventsAddBatchResponse';
|
||||
import { EventsDebugImagesRequest } from '../model/events/eventsDebugImagesRequest';
|
||||
import { EventsDebugImagesResponse } from '../model/events/eventsDebugImagesResponse';
|
||||
import { EventsDeleteForTaskRequest } from '../model/events/eventsDeleteForTaskRequest';
|
||||
import { EventsDeleteForTaskResponse } from '../model/events/eventsDeleteForTaskResponse';
|
||||
import { EventsDownloadTaskLogRequest } from '../model/events/eventsDownloadTaskLogRequest';
|
||||
import { EventsGetMultiTaskPlotsRequest } from '../model/events/eventsGetMultiTaskPlotsRequest';
|
||||
import { EventsGetMultiTaskPlotsResponse } from '../model/events/eventsGetMultiTaskPlotsResponse';
|
||||
import { EventsGetScalarMetricDataRequest } from '../model/events/eventsGetScalarMetricDataRequest';
|
||||
import { EventsGetScalarMetricDataResponse } from '../model/events/eventsGetScalarMetricDataResponse';
|
||||
import { EventsGetScalarMetricsAndVariantsRequest } from '../model/events/eventsGetScalarMetricsAndVariantsRequest';
|
||||
import { EventsGetScalarMetricsAndVariantsResponse } from '../model/events/eventsGetScalarMetricsAndVariantsResponse';
|
||||
import { EventsGetTaskEventsRequest } from '../model/events/eventsGetTaskEventsRequest';
|
||||
import { EventsGetTaskEventsResponse } from '../model/events/eventsGetTaskEventsResponse';
|
||||
import { EventsGetTaskLatestScalarValuesRequest } from '../model/events/eventsGetTaskLatestScalarValuesRequest';
|
||||
import { EventsGetTaskLatestScalarValuesResponse } from '../model/events/eventsGetTaskLatestScalarValuesResponse';
|
||||
import { EventsGetTaskLogRequest } from '../model/events/eventsGetTaskLogRequest';
|
||||
import { EventsGetTaskLogResponse } from '../model/events/eventsGetTaskLogResponse';
|
||||
import { EventsGetTaskMetricsRequest } from '../model/events/eventsGetTaskMetricsRequest';
|
||||
import { EventsGetTaskMetricsResponse } from '../model/events/eventsGetTaskMetricsResponse';
|
||||
import { EventsGetTaskPlotsRequest } from '../model/events/eventsGetTaskPlotsRequest';
|
||||
import { EventsGetTaskPlotsResponse } from '../model/events/eventsGetTaskPlotsResponse';
|
||||
import { EventsGetVectorMetricsAndVariantsRequest } from '../model/events/eventsGetVectorMetricsAndVariantsRequest';
|
||||
import { EventsGetVectorMetricsAndVariantsResponse } from '../model/events/eventsGetVectorMetricsAndVariantsResponse';
|
||||
import { EventsMultiTaskScalarMetricsIterHistogramRequest } from '../model/events/eventsMultiTaskScalarMetricsIterHistogramRequest';
|
||||
import { EventsScalarMetricsIterHistogramRequest } from '../model/events/eventsScalarMetricsIterHistogramRequest';
|
||||
import { EventsScalarMetricsIterHistogramResponse } from '../model/events/eventsScalarMetricsIterHistogramResponse';
|
||||
import { EventsVectorMetricsIterHistogramRequest } from '../model/events/eventsVectorMetricsIterHistogramRequest';
|
||||
import { EventsVectorMetricsIterHistogramResponse } from '../model/events/eventsVectorMetricsIterHistogramResponse';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiEventsService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Adds a single event
|
||||
* @param request request body
|
||||
* @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 eventsAdd(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsAdd.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/events.add`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Adds a batch of events in a single call (json-lines format, stream-friendly)
|
||||
* @param requests Json encoded newline-terminated lines, each representing an event in the batch and uses the same parameters used for events.add
|
||||
* @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 eventsAddBatch(requests: Array<object>, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (requests === null || requests === undefined) {
|
||||
throw new Error('Required parameter requests was null or undefined when calling eventsAddBatch.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsAddBatchResponse>(`${this.basePath}/events.add_batch`,
|
||||
requests,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get the debug image events for the requested amount of iterations per each task\'s metric
|
||||
* @param request request body
|
||||
* @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 eventsDebugImages(request: EventsDebugImagesRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsDebugImages.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsDebugImagesResponse>(`${this.basePath}/events.debug_images`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Delete all task event. *This cannot be undone!*
|
||||
* @param request request body
|
||||
* @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 eventsDeleteForTask(request: EventsDeleteForTaskRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsDeleteForTask.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsDeleteForTaskResponse>(`${this.basePath}/events.delete_for_task`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get an attachment containing the task\'s log
|
||||
* @param request request body
|
||||
* @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 eventsDownloadTaskLog(request: EventsDownloadTaskLogRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsDownloadTaskLog.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<string>(`${this.basePath}/events.download_task_log`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get \'plot\' events for the given tasks
|
||||
* @param request request body
|
||||
* @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 eventsGetMultiTaskPlots(request: EventsGetMultiTaskPlotsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetMultiTaskPlots.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetMultiTaskPlotsResponse>(`${this.basePath}/events.get_multi_task_plots`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* get scalar metric data for task
|
||||
* @param request request body
|
||||
* @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 eventsGetScalarMetricData(request: EventsGetScalarMetricDataRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetScalarMetricData.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetScalarMetricDataResponse>(`${this.basePath}/events.get_scalar_metric_data`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* get task scalar metrics and variants
|
||||
* @param request request body
|
||||
* @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 eventsGetScalarMetricsAndVariants(request: EventsGetScalarMetricsAndVariantsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetScalarMetricsAndVariants.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetScalarMetricsAndVariantsResponse>(`${this.basePath}/events.get_scalar_metrics_and_variants`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Scroll through task events, sorted by timestamp
|
||||
* @param request request body
|
||||
* @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 eventsGetTaskEvents(request: EventsGetTaskEventsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetTaskEvents.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetTaskEventsResponse>(`${this.basePath}/events.get_task_events`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get the tasks\'s latest scalar values
|
||||
* @param request request body
|
||||
* @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 eventsGetTaskLatestScalarValues(request: EventsGetTaskLatestScalarValuesRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetTaskLatestScalarValues.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetTaskLatestScalarValuesResponse>(`${this.basePath}/events.get_task_latest_scalar_values`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all \'log\' events for this task
|
||||
* @param request request body
|
||||
* @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 eventsGetTaskLog(request: EventsGetTaskLogRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetTaskLog.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetTaskLogResponse>(`${this.basePath}/events.get_task_log`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* For each task, get a list of metrics for which the requested event type was reported
|
||||
* @param request request body
|
||||
* @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 eventsGetTaskMetrics(request: EventsGetTaskMetricsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetTaskMetrics.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetTaskMetricsResponse>(`${this.basePath}/events.get_task_metrics`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all \'plot\' events for this task
|
||||
* @param request request body
|
||||
* @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 eventsGetTaskPlots(request: EventsGetTaskPlotsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetTaskPlots.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetTaskPlotsResponse>(`${this.basePath}/events.get_task_plots`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param request request body
|
||||
* @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 eventsGetVectorMetricsAndVariants(request: EventsGetVectorMetricsAndVariantsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsGetVectorMetricsAndVariants.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsGetVectorMetricsAndVariantsResponse>(`${this.basePath}/events.get_vector_metrics_and_variants`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Used to compare scalar stats histogram of multiple tasks
|
||||
* @param request request body
|
||||
* @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 eventsMultiTaskScalarMetricsIterHistogram(request: EventsMultiTaskScalarMetricsIterHistogramRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsMultiTaskScalarMetricsIterHistogram.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/events.multi_task_scalar_metrics_iter_histogram`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get histogram data of all the vector metrics and variants in the task
|
||||
* @param request request body
|
||||
* @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 eventsScalarMetricsIterHistogram(request: EventsScalarMetricsIterHistogramRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsScalarMetricsIterHistogram.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsScalarMetricsIterHistogramResponse>(`${this.basePath}/events.scalar_metrics_iter_histogram`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get histogram data of all the scalar metrics and variants in the task
|
||||
* @param request request body
|
||||
* @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 eventsVectorMetricsIterHistogram(request: EventsVectorMetricsIterHistogramRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling eventsVectorMetricsIterHistogram.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<EventsVectorMetricsIterHistogramResponse>(`${this.basePath}/events.vector_metrics_iter_histogram`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
532
src/app/business-logic/api-services/models.service.ts
Normal file
532
src/app/business-logic/api-services/models.service.ts
Normal file
@@ -0,0 +1,532 @@
|
||||
/**
|
||||
* models
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { ModelsCreateRequest } from '../model/models/modelsCreateRequest';
|
||||
import { ModelsCreateResponse } from '../model/models/modelsCreateResponse';
|
||||
import { ModelsDeleteRequest } from '../model/models/modelsDeleteRequest';
|
||||
import { ModelsDeleteResponse } from '../model/models/modelsDeleteResponse';
|
||||
import { ModelsEditRequest } from '../model/models/modelsEditRequest';
|
||||
import { ModelsEditResponse } from '../model/models/modelsEditResponse';
|
||||
import { ModelsGetAllExRequest } from '../model/models/modelsGetAllExRequest';
|
||||
import { ModelsGetAllExResponse } from '../model/models/modelsGetAllExResponse';
|
||||
import { ModelsGetAllRequest } from '../model/models/modelsGetAllRequest';
|
||||
import { ModelsGetAllResponse } from '../model/models/modelsGetAllResponse';
|
||||
import { ModelsGetByIdRequest } from '../model/models/modelsGetByIdRequest';
|
||||
import { ModelsGetByIdResponse } from '../model/models/modelsGetByIdResponse';
|
||||
import { ModelsGetByTaskIdRequest } from '../model/models/modelsGetByTaskIdRequest';
|
||||
import { ModelsGetByTaskIdResponse } from '../model/models/modelsGetByTaskIdResponse';
|
||||
import { ModelsSetReadyRequest } from '../model/models/modelsSetReadyRequest';
|
||||
import { ModelsSetReadyResponse } from '../model/models/modelsSetReadyResponse';
|
||||
import { ModelsUpdateForTaskRequest } from '../model/models/modelsUpdateForTaskRequest';
|
||||
import { ModelsUpdateForTaskResponse } from '../model/models/modelsUpdateForTaskResponse';
|
||||
import { ModelsUpdateRequest } from '../model/models/modelsUpdateRequest';
|
||||
import { ModelsUpdateResponse } from '../model/models/modelsUpdateResponse';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiModelsService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Create a new model not associated with a task
|
||||
* @param request request body
|
||||
* @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 modelsCreate(request: ModelsCreateRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsCreate.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsCreateResponse>(`${this.basePath}/models.create`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Delete a model.
|
||||
* @param request request body
|
||||
* @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 modelsDelete(request: ModelsDeleteRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsDelete.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsDeleteResponse>(`${this.basePath}/models.delete`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Edit an existing model
|
||||
* @param request request body
|
||||
* @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 modelsEdit(request: ModelsEditRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsEdit.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsEditResponse>(`${this.basePath}/models.edit`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all models
|
||||
* @param request request body
|
||||
* @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 modelsGetAll(request: ModelsGetAllRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsGetAll.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsGetAllResponse>(`${this.basePath}/models.get_all`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all models
|
||||
* @param request request body
|
||||
* @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 modelsGetAllEx(request: ModelsGetAllExRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsGetAllEx.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsGetAllExResponse>(`${this.basePath}/models.get_all_ex`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets model information
|
||||
* @param request request body
|
||||
* @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 modelsGetById(request: ModelsGetByIdRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsGetById.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsGetByIdResponse>(`${this.basePath}/models.get_by_id`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets model information
|
||||
* @param request request body
|
||||
* @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 modelsGetByTaskId(request: ModelsGetByTaskIdRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsGetByTaskId.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsGetByTaskIdResponse>(`${this.basePath}/models.get_by_task_id`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Set the model ready flag to True. If the model is an output model of a task then try to publish the task.
|
||||
* @param request request body
|
||||
* @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 modelsSetReady(request: ModelsSetReadyRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsSetReady.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsSetReadyResponse>(`${this.basePath}/models.set_ready`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Update a model
|
||||
* @param request request body
|
||||
* @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 modelsUpdate(request: ModelsUpdateRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsUpdate.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsUpdateResponse>(`${this.basePath}/models.update`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Create or update a new model for a task
|
||||
* @param request request body
|
||||
* @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 modelsUpdateForTask(request: ModelsUpdateForTaskRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling modelsUpdateForTask.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ModelsUpdateForTaskResponse>(`${this.basePath}/models.update_for_task`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
109
src/app/business-logic/api-services/organization.service.ts
Normal file
109
src/app/business-logic/api-services/organization.service.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* organization
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.8
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { OrganizationGetTagsRequest } from '../model/organization/organizationGetTagsRequest';
|
||||
import { OrganizationGetTagsResponse } from '../model/organization/organizationGetTagsResponse';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiOrganizationService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all the user and system tags used for the company tasks and models
|
||||
* @param request request body
|
||||
* @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 organizationGetTags(request: OrganizationGetTagsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling organizationGetTags.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<OrganizationGetTagsResponse>(`${this.basePath}/organization.get_tags`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
438
src/app/business-logic/api-services/projects.service.ts
Normal file
438
src/app/business-logic/api-services/projects.service.ts
Normal file
@@ -0,0 +1,438 @@
|
||||
/**
|
||||
* projects
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { ProjectsCreateRequest } from '../model/projects/projectsCreateRequest';
|
||||
import { ProjectsCreateResponse } from '../model/projects/projectsCreateResponse';
|
||||
import { ProjectsDeleteRequest } from '../model/projects/projectsDeleteRequest';
|
||||
import { ProjectsDeleteResponse } from '../model/projects/projectsDeleteResponse';
|
||||
import { ProjectsGetAllExRequest } from '../model/projects/projectsGetAllExRequest';
|
||||
import { ProjectsGetAllExResponse } from '../model/projects/projectsGetAllExResponse';
|
||||
import { ProjectsGetAllRequest } from '../model/projects/projectsGetAllRequest';
|
||||
import { ProjectsGetAllResponse } from '../model/projects/projectsGetAllResponse';
|
||||
import { ProjectsGetByIdRequest } from '../model/projects/projectsGetByIdRequest';
|
||||
import { ProjectsGetByIdResponse } from '../model/projects/projectsGetByIdResponse';
|
||||
import { ProjectsGetHyperParametersRequest } from '../model/projects/projectsGetHyperParametersRequest';
|
||||
import { ProjectsGetHyperParametersResponse } from '../model/projects/projectsGetHyperParametersResponse';
|
||||
import { ProjectsGetUniqueMetricVariantsRequest } from '../model/projects/projectsGetUniqueMetricVariantsRequest';
|
||||
import { ProjectsGetUniqueMetricVariantsResponse } from '../model/projects/projectsGetUniqueMetricVariantsResponse';
|
||||
import { ProjectsUpdateRequest } from '../model/projects/projectsUpdateRequest';
|
||||
import { ProjectsUpdateResponse } from '../model/projects/projectsUpdateResponse';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiProjectsService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Create a new project
|
||||
* @param request request body
|
||||
* @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 projectsCreate(request: ProjectsCreateRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling projectsCreate.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ProjectsCreateResponse>(`${this.basePath}/projects.create`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Deletes a project
|
||||
* @param request request body
|
||||
* @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 projectsDelete(request: ProjectsDeleteRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling projectsDelete.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ProjectsDeleteResponse>(`${this.basePath}/projects.delete`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all the company\'s projects and all public projects
|
||||
* @param request request body
|
||||
* @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 projectsGetAll(request: ProjectsGetAllRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling projectsGetAll.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ProjectsGetAllResponse>(`${this.basePath}/projects.get_all`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all the company\'s projects and all public projects
|
||||
* @param request request body
|
||||
* @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 projectsGetAllEx(request: ProjectsGetAllExRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling projectsGetAllEx.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ProjectsGetAllExResponse>(`${this.basePath}/projects.get_all_ex`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param request request body
|
||||
* @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 projectsGetById(request: ProjectsGetByIdRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling projectsGetById.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ProjectsGetByIdResponse>(`${this.basePath}/projects.get_by_id`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get a list of all hyper parameter names used in tasks within the given project.
|
||||
* @param request request body
|
||||
* @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 projectsGetHyperParameters(request: ProjectsGetHyperParametersRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling projectsGetHyperParameters.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ProjectsGetHyperParametersResponse>(`${this.basePath}/projects.get_hyper_parameters`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all metric/variant pairs reported for tasks in a specific project. If no project is specified, metrics/variant paris reported for all tasks will be returned. If the project does not exist, an empty list will be returned.
|
||||
* @param request request body
|
||||
* @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 projectsGetUniqueMetricVariants(request: ProjectsGetUniqueMetricVariantsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling projectsGetUniqueMetricVariants.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ProjectsGetUniqueMetricVariantsResponse>(`${this.basePath}/projects.get_unique_metric_variants`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Update project information
|
||||
* @param request request body
|
||||
* @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 projectsUpdate(request: ProjectsUpdateRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling projectsUpdate.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ProjectsUpdateResponse>(`${this.basePath}/projects.update`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
766
src/app/business-logic/api-services/queues.service.ts
Normal file
766
src/app/business-logic/api-services/queues.service.ts
Normal file
@@ -0,0 +1,766 @@
|
||||
/**
|
||||
* queues
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { QueuesAddTaskRequest } from '../model/queues/queuesAddTaskRequest';
|
||||
import { QueuesAddTaskResponse } from '../model/queues/queuesAddTaskResponse';
|
||||
import { QueuesCreateRequest } from '../model/queues/queuesCreateRequest';
|
||||
import { QueuesCreateResponse } from '../model/queues/queuesCreateResponse';
|
||||
import { QueuesDeleteRequest } from '../model/queues/queuesDeleteRequest';
|
||||
import { QueuesDeleteResponse } from '../model/queues/queuesDeleteResponse';
|
||||
import { QueuesGetAllExRequest } from '../model/queues/queuesGetAllExRequest';
|
||||
import { QueuesGetAllExResponse } from '../model/queues/queuesGetAllExResponse';
|
||||
import { QueuesGetAllRequest } from '../model/queues/queuesGetAllRequest';
|
||||
import { QueuesGetAllResponse } from '../model/queues/queuesGetAllResponse';
|
||||
import { QueuesGetByIdRequest } from '../model/queues/queuesGetByIdRequest';
|
||||
import { QueuesGetByIdResponse } from '../model/queues/queuesGetByIdResponse';
|
||||
import { QueuesGetDefaultResponse } from '../model/queues/queuesGetDefaultResponse';
|
||||
import { QueuesGetNextTaskRequest } from '../model/queues/queuesGetNextTaskRequest';
|
||||
import { QueuesGetNextTaskResponse } from '../model/queues/queuesGetNextTaskResponse';
|
||||
import { QueuesGetQueueMetricsRequest } from '../model/queues/queuesGetQueueMetricsRequest';
|
||||
import { QueuesGetQueueMetricsResponse } from '../model/queues/queuesGetQueueMetricsResponse';
|
||||
import { QueuesMoveTaskBackwardRequest } from '../model/queues/queuesMoveTaskBackwardRequest';
|
||||
import { QueuesMoveTaskBackwardResponse } from '../model/queues/queuesMoveTaskBackwardResponse';
|
||||
import { QueuesMoveTaskForwardRequest } from '../model/queues/queuesMoveTaskForwardRequest';
|
||||
import { QueuesMoveTaskForwardResponse } from '../model/queues/queuesMoveTaskForwardResponse';
|
||||
import { QueuesMoveTaskToBackRequest } from '../model/queues/queuesMoveTaskToBackRequest';
|
||||
import { QueuesMoveTaskToBackResponse } from '../model/queues/queuesMoveTaskToBackResponse';
|
||||
import { QueuesMoveTaskToFrontRequest } from '../model/queues/queuesMoveTaskToFrontRequest';
|
||||
import { QueuesMoveTaskToFrontResponse } from '../model/queues/queuesMoveTaskToFrontResponse';
|
||||
import { QueuesRemoveTaskRequest } from '../model/queues/queuesRemoveTaskRequest';
|
||||
import { QueuesRemoveTaskResponse } from '../model/queues/queuesRemoveTaskResponse';
|
||||
import { QueuesUpdateRequest } from '../model/queues/queuesUpdateRequest';
|
||||
import { QueuesUpdateResponse } from '../model/queues/queuesUpdateResponse';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiQueuesService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Adds a task entry to the queue.
|
||||
* @param request request body
|
||||
* @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 queuesAddTask(request: QueuesAddTaskRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesAddTask.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesAddTaskResponse>(`${this.basePath}/queues.add_task`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Create a new queue
|
||||
* @param request request body
|
||||
* @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 queuesCreate(request: QueuesCreateRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesCreate.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesCreateResponse>(`${this.basePath}/queues.create`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Deletes a queue. If the queue is not empty and force is not set to true, queue will not be deleted.
|
||||
* @param request request body
|
||||
* @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 queuesDelete(request: QueuesDeleteRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesDelete.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesDeleteResponse>(`${this.basePath}/queues.delete`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all queues
|
||||
* @param request request body
|
||||
* @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 queuesGetAll(request: QueuesGetAllRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesGetAll.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesGetAllResponse>(`${this.basePath}/queues.get_all`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all queues
|
||||
* @param request request body
|
||||
* @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 queuesGetAllEx(request: QueuesGetAllExRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesGetAllEx.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesGetAllExResponse>(`${this.basePath}/queues.get_all_ex`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets queue information
|
||||
* @param request request body
|
||||
* @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 queuesGetById(request: QueuesGetByIdRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesGetById.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesGetByIdResponse>(`${this.basePath}/queues.get_by_id`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param request request body
|
||||
* @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 queuesGetDefault(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesGetDefault.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesGetDefaultResponse>(`${this.basePath}/queues.get_default`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the next task from the top of the queue (FIFO). The task entry is removed from the queue.
|
||||
* @param request request body
|
||||
* @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 queuesGetNextTask(request: QueuesGetNextTaskRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesGetNextTask.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesGetNextTaskResponse>(`${this.basePath}/queues.get_next_task`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns metrics of the company queues. The metrics are avaraged in the specified interval.
|
||||
* @param request request body
|
||||
* @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 queuesGetQueueMetrics(request: QueuesGetQueueMetricsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesGetQueueMetrics.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesGetQueueMetricsResponse>(`${this.basePath}/queues.get_queue_metrics`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param request request body
|
||||
* @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 queuesMoveTaskBackward(request: QueuesMoveTaskBackwardRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesMoveTaskBackward.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesMoveTaskBackwardResponse>(`${this.basePath}/queues.move_task_backward`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Moves a task entry one step forward towards the top of the queue.
|
||||
* @param request request body
|
||||
* @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 queuesMoveTaskForward(request: QueuesMoveTaskForwardRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesMoveTaskForward.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesMoveTaskForwardResponse>(`${this.basePath}/queues.move_task_forward`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param request request body
|
||||
* @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 queuesMoveTaskToBack(request: QueuesMoveTaskToBackRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesMoveTaskToBack.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesMoveTaskToBackResponse>(`${this.basePath}/queues.move_task_to_back`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param request request body
|
||||
* @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 queuesMoveTaskToFront(request: QueuesMoveTaskToFrontRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesMoveTaskToFront.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesMoveTaskToFrontResponse>(`${this.basePath}/queues.move_task_to_front`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Removes a task entry from the queue.
|
||||
* @param request request body
|
||||
* @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 queuesRemoveTask(request: QueuesRemoveTaskRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesRemoveTask.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesRemoveTaskResponse>(`${this.basePath}/queues.remove_task`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Update queue information
|
||||
* @param request request body
|
||||
* @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 queuesUpdate(request: QueuesUpdateRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling queuesUpdate.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<QueuesUpdateResponse>(`${this.basePath}/queues.update`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
291
src/app/business-logic/api-services/server.service.ts
Normal file
291
src/app/business-logic/api-services/server.service.ts
Normal file
@@ -0,0 +1,291 @@
|
||||
/**
|
||||
* server
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { ServerConfigRequest } from '../model/server/serverConfigRequest';
|
||||
import { ServerInfoResponse } from '../model/server/serverInfoResponse';
|
||||
import { ServerReportStatsOptionRequest } from '../model/server/serverReportStatsOptionRequest';
|
||||
import { ServerReportStatsOptionResponse } from '../model/server/serverReportStatsOptionResponse';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiServerService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get server configuration. Secure section is not returned.
|
||||
* @param request request body
|
||||
* @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 serverConfig(request: ServerConfigRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling serverConfig.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/server.config`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Show available endpoints
|
||||
* @param request request body
|
||||
* @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 serverEndpoints(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling serverEndpoints.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/server.endpoints`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get the server collected statistics.
|
||||
* @param request request body
|
||||
* @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 serverGetStats(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling serverGetStats.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/server.get_stats`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get server information, including version and build number
|
||||
* @param request request body
|
||||
* @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 serverInfo(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling serverInfo.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ServerInfoResponse>(`${this.basePath}/server.info`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get or set the report statistics option per-company
|
||||
* @param request request body
|
||||
* @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 serverReportStatsOption(request: ServerReportStatsOptionRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling serverReportStatsOption.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<ServerReportStatsOptionResponse>(`${this.basePath}/server.report_stats_option`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
1187
src/app/business-logic/api-services/tasks.service.ts
Normal file
1187
src/app/business-logic/api-services/tasks.service.ts
Normal file
File diff suppressed because it is too large
Load Diff
481
src/app/business-logic/api-services/users.service.ts
Normal file
481
src/app/business-logic/api-services/users.service.ts
Normal file
@@ -0,0 +1,481 @@
|
||||
/**
|
||||
* users
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.8
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { UsersCreateRequest } from '../model/users/usersCreateRequest';
|
||||
import { UsersDeleteRequest } from '../model/users/usersDeleteRequest';
|
||||
import { UsersGetAllExRequest } from '../model/users/usersGetAllExRequest';
|
||||
import { UsersGetAllExResponse } from '../model/users/usersGetAllExResponse';
|
||||
import { UsersGetAllRequest } from '../model/users/usersGetAllRequest';
|
||||
import { UsersGetAllResponse } from '../model/users/usersGetAllResponse';
|
||||
import { UsersGetByIdRequest } from '../model/users/usersGetByIdRequest';
|
||||
import { UsersGetByIdResponse } from '../model/users/usersGetByIdResponse';
|
||||
import { UsersGetCurrentUserResponse } from '../model/users/usersGetCurrentUserResponse';
|
||||
import { UsersGetPreferencesResponse } from '../model/users/usersGetPreferencesResponse';
|
||||
import { UsersSetPreferencesRequest } from '../model/users/usersSetPreferencesRequest';
|
||||
import { UsersSetPreferencesResponse } from '../model/users/usersSetPreferencesResponse';
|
||||
import { UsersUpdateRequest } from '../model/users/usersUpdateRequest';
|
||||
import { UsersUpdateResponse } from '../model/users/usersUpdateResponse';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiUsersService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Create a new user object. Reserved for internal use.
|
||||
* @param request request body
|
||||
* @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 usersCreate(request: UsersCreateRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersCreate.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/users.create`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Delete a user
|
||||
* @param request request body
|
||||
* @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 usersDelete(request: UsersDeleteRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersDelete.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/users.delete`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get all user objects
|
||||
* @param request request body
|
||||
* @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 usersGetAll(request: UsersGetAllRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersGetAll.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<UsersGetAllResponse>(`${this.basePath}/users.get_all`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get all user objects
|
||||
* @param request request body
|
||||
* @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 usersGetAllEx(request: UsersGetAllExRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersGetAllEx.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<UsersGetAllExResponse>(`${this.basePath}/users.get_all_ex`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Gets user information
|
||||
* @param request request body
|
||||
* @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 usersGetById(request: UsersGetByIdRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersGetById.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<UsersGetByIdResponse>(`${this.basePath}/users.get_by_id`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Gets current user information, based on the authenticated user making the call.
|
||||
* @param request request body
|
||||
* @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 usersGetCurrentUser(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersGetCurrentUser.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<UsersGetCurrentUserResponse>(`${this.basePath}/users.get_current_user`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Get user preferences
|
||||
* @param request request body
|
||||
* @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 usersGetPreferences(request: object, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersGetPreferences.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<UsersGetPreferencesResponse>(`${this.basePath}/users.get_preferences`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Set user preferences
|
||||
* @param request request body
|
||||
* @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 usersSetPreferences(request: UsersSetPreferencesRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersSetPreferences.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<UsersSetPreferencesResponse>(`${this.basePath}/users.set_preferences`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal. Update a user object
|
||||
* @param request request body
|
||||
* @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 usersUpdate(request: UsersUpdateRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling usersUpdate.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<UsersUpdateResponse>(`${this.basePath}/users.update`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
388
src/app/business-logic/api-services/workers.service.ts
Normal file
388
src/app/business-logic/api-services/workers.service.ts
Normal file
@@ -0,0 +1,388 @@
|
||||
/**
|
||||
* workers
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import {HTTP} from '../../app.constants';
|
||||
import {SmApiRequestsService} from "./api-requests.service";
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { WorkersGetActivityReportRequest } from '../model/workers/workersGetActivityReportRequest';
|
||||
import { WorkersGetActivityReportResponse } from '../model/workers/workersGetActivityReportResponse';
|
||||
import { WorkersGetAllRequest } from '../model/workers/workersGetAllRequest';
|
||||
import { WorkersGetAllResponse } from '../model/workers/workersGetAllResponse';
|
||||
import { WorkersGetMetricKeysRequest } from '../model/workers/workersGetMetricKeysRequest';
|
||||
import { WorkersGetMetricKeysResponse } from '../model/workers/workersGetMetricKeysResponse';
|
||||
import { WorkersGetStatsRequest } from '../model/workers/workersGetStatsRequest';
|
||||
import { WorkersGetStatsResponse } from '../model/workers/workersGetStatsResponse';
|
||||
import { WorkersRegisterRequest } from '../model/workers/workersRegisterRequest';
|
||||
import { WorkersStatusReportRequest } from '../model/workers/workersStatusReportRequest';
|
||||
import { WorkersUnregisterRequest } from '../model/workers/workersUnregisterRequest';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ApiWorkersService {
|
||||
|
||||
protected basePath = HTTP.API_BASE_URL;
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
|
||||
constructor(protected apiRequest: SmApiRequestsService, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns count of active company workers in the selected time range.
|
||||
* @param request request body
|
||||
* @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 workersGetActivityReport(request: WorkersGetActivityReportRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling workersGetActivityReport.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<WorkersGetActivityReportResponse>(`${this.basePath}/workers.get_activity_report`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns information on all registered workers.
|
||||
* @param request request body
|
||||
* @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 workersGetAll(request: WorkersGetAllRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling workersGetAll.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<WorkersGetAllResponse>(`${this.basePath}/workers.get_all`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns worker statistics metric keys grouped by categories.
|
||||
* @param request request body
|
||||
* @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 workersGetMetricKeys(request: WorkersGetMetricKeysRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling workersGetMetricKeys.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<WorkersGetMetricKeysResponse>(`${this.basePath}/workers.get_metric_keys`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns statistics for the selected workers and time range aggregated by date intervals.
|
||||
* @param request request body
|
||||
* @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 workersGetStats(request: WorkersGetStatsRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling workersGetStats.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<WorkersGetStatsResponse>(`${this.basePath}/workers.get_stats`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Register a worker in the system. Called by the Worker Daemon.
|
||||
* @param request request body
|
||||
* @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 workersRegister(request: WorkersRegisterRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling workersRegister.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/workers.register`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Called periodically by the worker daemon to report machine status
|
||||
* @param request request body
|
||||
* @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 workersStatusReport(request: WorkersStatusReportRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling workersStatusReport.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/workers.status_report`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Unregister a worker in the system. Called by the Worker Daemon.
|
||||
* @param request request body
|
||||
* @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 workersUnregister(request: WorkersUnregisterRequest, options?: any, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
|
||||
if (request === null || request === undefined) {
|
||||
throw new Error('Required parameter request was null or undefined when calling workersUnregister.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
if (options && options.async_enable) {
|
||||
headers = headers.set(this.configuration.asyncHeader, '1');
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected != undefined) {
|
||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
];
|
||||
const httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected != undefined) {
|
||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.apiRequest.post<object>(`${this.basePath}/workers.unregister`,
|
||||
request,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
39
src/app/business-logic/business-logic.module.ts
Normal file
39
src/app/business-logic/business-logic.module.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {ApiTasksService} from './api-services/tasks.service';
|
||||
import {ApiModelsService} from './api-services/models.service';
|
||||
import {ApiAuthService} from './api-services/auth.service';
|
||||
import {ApiEventsService} from './api-services/events.service';
|
||||
import {ApiProjectsService} from './api-services/projects.service';
|
||||
import {ApiUsersService} from './api-services/users.service';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {SmApiRequestsService} from './api-services/api-requests.service';
|
||||
import {BlTasksService} from './services/tasks.service';
|
||||
import {BlModelsService} from './services/models.service';
|
||||
import {ApiQueuesService} from './api-services/queues.service';
|
||||
import {ApiWorkersService} from './api-services/workers.service';
|
||||
import {ApiServerService} from './api-services/server.service';
|
||||
import {ApiOrganizationService} from './api-services/organization.service';
|
||||
|
||||
@NgModule({
|
||||
imports : [CommonModule, HttpClientModule],
|
||||
declarations: [],
|
||||
exports : [],
|
||||
providers : [
|
||||
SmApiRequestsService,
|
||||
BlTasksService,
|
||||
BlModelsService,
|
||||
ApiTasksService,
|
||||
ApiQueuesService,
|
||||
ApiWorkersService,
|
||||
ApiAuthService,
|
||||
ApiModelsService,
|
||||
ApiEventsService,
|
||||
ApiProjectsService,
|
||||
ApiUsersService,
|
||||
ApiServerService,
|
||||
ApiOrganizationService
|
||||
]
|
||||
})
|
||||
export class BusinessLogicModule {
|
||||
}
|
||||
82
src/app/business-logic/configuration.ts
Normal file
82
src/app/business-logic/configuration.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
export interface ConfigurationParameters {
|
||||
apiKeys?: {[ key: string ]: string};
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | (() => string);
|
||||
basePath?: string;
|
||||
withCredentials?: boolean;
|
||||
asyncHeader?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
apiKeys?: {[ key: string ]: string};
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | (() => string);
|
||||
basePath?: string;
|
||||
withCredentials?: boolean;
|
||||
asyncHeader?: string;
|
||||
|
||||
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 = true; //configurationParameters.withCredentials;
|
||||
this.asyncHeader = 'X-Trains-Async'; //configurationParameters.asyncHeader;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {string[]} contentTypes - the array of content types that are available for selection
|
||||
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length == 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let type = contentTypes.find(x => 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 {string[]} accepts - the array of content types that are available for selection.
|
||||
* @returns {string} the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length == 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let type = accepts.find(x => 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 {string} mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return {boolean} 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');
|
||||
}
|
||||
}
|
||||
8
src/app/business-logic/constants.ts
Normal file
8
src/app/business-logic/constants.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export type EntitiesEnum = 'models' | 'tasks' | 'projects';
|
||||
|
||||
export const ENTITIES = {
|
||||
MODELS: 'models' as EntitiesEnum,
|
||||
TASKS : 'tasks' as EntitiesEnum,
|
||||
PROJECTS: 'projects' as EntitiesEnum,
|
||||
};
|
||||
|
||||
18
src/app/business-logic/encoder.ts
Normal file
18
src/app/business-logic/encoder.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { HttpUrlEncodingCodec } from '@angular/common/http';
|
||||
|
||||
/**
|
||||
* CustomHttpUrlEncodingCodec
|
||||
* Fix plus sign (+) not encoding, so sent as blank space
|
||||
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
|
||||
*/
|
||||
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
|
||||
encodeKey(k: string): string {
|
||||
k = super.encodeKey(k);
|
||||
return k.replace(/\+/gi, '%2B');
|
||||
}
|
||||
encodeValue(v: string): string {
|
||||
v = super.encodeValue(v);
|
||||
return v.replace(/\+/gi, '%2B');
|
||||
}
|
||||
}
|
||||
|
||||
110
src/app/business-logic/model/al-task.ts
Normal file
110
src/app/business-logic/model/al-task.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* tasks
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 1.6
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import {Output} from './tasks/output';
|
||||
import {Script} from './tasks/script';
|
||||
import {TaskStatusEnum} from './tasks/taskStatusEnum';
|
||||
import {TaskTypeEnum} from './tasks/taskTypeEnum';
|
||||
import {User} from './users/user';
|
||||
import {Project} from './projects/project';
|
||||
import {IExecution} from '../../webapp-common/core/models/model-data';
|
||||
|
||||
|
||||
export interface ITask {
|
||||
/**
|
||||
* Task id
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Task Name
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Associated user id
|
||||
*/
|
||||
user?: User;
|
||||
/**
|
||||
* Company ID
|
||||
*/
|
||||
company?: string;
|
||||
/**
|
||||
* Type of task. Values: 'dataset_import', 'annotation', 'training', 'testing'
|
||||
*/
|
||||
type?: TaskTypeEnum;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
status?: TaskStatusEnum;
|
||||
/**
|
||||
* Free text comment
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
* Task creation time (UTC)
|
||||
*/
|
||||
created?: Date;
|
||||
/**
|
||||
* Task start time (UTC)
|
||||
*/
|
||||
started?: Date;
|
||||
/**
|
||||
* Task end time (UTC)
|
||||
*/
|
||||
completed?: Date;
|
||||
/**
|
||||
* Parent task id
|
||||
*/
|
||||
parent?: string | ITask;
|
||||
/**
|
||||
* Project ID of the project to which this task is assigned
|
||||
*/
|
||||
project?: Project;
|
||||
/**
|
||||
* Task output params
|
||||
*/
|
||||
output?: Output;
|
||||
/**
|
||||
* Task execution params
|
||||
*/
|
||||
execution?: IExecution;
|
||||
/**
|
||||
* Script info
|
||||
*/
|
||||
script?: Script;
|
||||
/**
|
||||
* Tags list
|
||||
*/
|
||||
tags?: Array<string>;
|
||||
/**
|
||||
* Last status change time
|
||||
*/
|
||||
status_changed?: Date;
|
||||
/**
|
||||
* free text string representing info about the status
|
||||
*/
|
||||
status_message?: string;
|
||||
/**
|
||||
* Reason for last status change
|
||||
*/
|
||||
status_reason?: string;
|
||||
/**
|
||||
* Last status change time
|
||||
*/
|
||||
published?: Date;
|
||||
/**
|
||||
* ID of last worker that handled the task
|
||||
*/
|
||||
last_worker?: string;
|
||||
/**
|
||||
* Last time a worker reported while working on this task
|
||||
*/
|
||||
last_worker_report?: Date;
|
||||
}
|
||||
15
src/app/business-logic/model/api-request.ts
Normal file
15
src/app/business-logic/model/api-request.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export interface SmHttpResponse {
|
||||
data: any;
|
||||
meta: any;
|
||||
}
|
||||
|
||||
export interface IApiRequest {
|
||||
payload?: any;
|
||||
meta: IApiRequestMeta;
|
||||
params?: object;
|
||||
}
|
||||
|
||||
export interface IApiRequestMeta {
|
||||
method: string;
|
||||
endpoint: string;
|
||||
}
|
||||
56
src/app/business-logic/model/auth/authAddUserRequest.ts
Normal file
56
src/app/business-logic/model/auth/authAddUserRequest.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthAddUserRequest {
|
||||
/**
|
||||
* A secret key (used as the user\'s password)
|
||||
*/
|
||||
secret_key?: string;
|
||||
/**
|
||||
* User name (makes the auth entry more readable)
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Associated company ID. If not provided, the caller\'s company ID will be used
|
||||
*/
|
||||
company?: string;
|
||||
/**
|
||||
* Email address uniquely identifying the user
|
||||
*/
|
||||
email: string;
|
||||
/**
|
||||
* Provider ID indicating the external provider used to authenticate the user
|
||||
*/
|
||||
provider?: string;
|
||||
/**
|
||||
* Unique user ID assigned by the external provider
|
||||
*/
|
||||
provider_user_id?: string;
|
||||
/**
|
||||
* Provider-issued token for this user
|
||||
*/
|
||||
provider_token?: string;
|
||||
/**
|
||||
* Given name
|
||||
*/
|
||||
given_name?: string;
|
||||
/**
|
||||
* Family name
|
||||
*/
|
||||
family_name?: string;
|
||||
/**
|
||||
* Avatar URL
|
||||
*/
|
||||
avatar?: string;
|
||||
}
|
||||
24
src/app/business-logic/model/auth/authAddUserResponse.ts
Normal file
24
src/app/business-logic/model/auth/authAddUserResponse.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthAddUserResponse {
|
||||
/**
|
||||
* New user ID
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The secret key used as the user\'s password
|
||||
*/
|
||||
secret?: string;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface AuthCreateCredentialsRequest {
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Credentials } from './credentials';
|
||||
|
||||
|
||||
export interface AuthCreateCredentialsResponse {
|
||||
credentials?: Credentials;
|
||||
}
|
||||
42
src/app/business-logic/model/auth/authCreateUserRequest.ts
Normal file
42
src/app/business-logic/model/auth/authCreateUserRequest.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Role } from './role';
|
||||
|
||||
|
||||
export interface AuthCreateUserRequest {
|
||||
/**
|
||||
* User name (makes the auth entry more readable)
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Associated company ID
|
||||
*/
|
||||
company: string;
|
||||
/**
|
||||
* Email address uniquely identifying the user
|
||||
*/
|
||||
email: string;
|
||||
role?: Role;
|
||||
/**
|
||||
* Given name
|
||||
*/
|
||||
given_name?: string;
|
||||
/**
|
||||
* Family name
|
||||
*/
|
||||
family_name?: string;
|
||||
/**
|
||||
* Avatar URL
|
||||
*/
|
||||
avatar?: string;
|
||||
}
|
||||
20
src/app/business-logic/model/auth/authCreateUserResponse.ts
Normal file
20
src/app/business-logic/model/auth/authCreateUserResponse.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthCreateUserResponse {
|
||||
/**
|
||||
* New user ID
|
||||
*/
|
||||
id?: string;
|
||||
}
|
||||
20
src/app/business-logic/model/auth/authDeleteUserRequest.ts
Normal file
20
src/app/business-logic/model/auth/authDeleteUserRequest.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthDeleteUserRequest {
|
||||
/**
|
||||
* User ID
|
||||
*/
|
||||
user: string;
|
||||
}
|
||||
20
src/app/business-logic/model/auth/authDeleteUserResponse.ts
Normal file
20
src/app/business-logic/model/auth/authDeleteUserResponse.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthDeleteUserResponse {
|
||||
/**
|
||||
* True if user was successfully deleted, False otherwise
|
||||
*/
|
||||
deleted?: boolean;
|
||||
}
|
||||
33
src/app/business-logic/model/auth/authEditUserRequest.ts
Normal file
33
src/app/business-logic/model/auth/authEditUserRequest.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthEditUserRequest {
|
||||
/**
|
||||
* User ID
|
||||
*/
|
||||
user?: string;
|
||||
/**
|
||||
* The new user\'s role within the company
|
||||
*/
|
||||
role?: AuthEditUserRequest.RoleEnum;
|
||||
}
|
||||
export namespace AuthEditUserRequest {
|
||||
export type RoleEnum = 'admin' | 'superuser' | 'user' | 'annotator';
|
||||
export const RoleEnum = {
|
||||
Admin: 'admin' as RoleEnum,
|
||||
Superuser: 'superuser' as RoleEnum,
|
||||
User: 'user' as RoleEnum,
|
||||
Annotator: 'annotator' as RoleEnum
|
||||
}
|
||||
}
|
||||
24
src/app/business-logic/model/auth/authEditUserResponse.ts
Normal file
24
src/app/business-logic/model/auth/authEditUserResponse.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthEditUserResponse {
|
||||
/**
|
||||
* Number of users updated (0 or 1)
|
||||
*/
|
||||
updated?: number;
|
||||
/**
|
||||
* Updated fields names and values
|
||||
*/
|
||||
fields?: object;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface AuthFixedUsersModeRequest {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthFixedUsersModeResponse {
|
||||
/**
|
||||
* Fixed users mode enabled
|
||||
*/
|
||||
enabled?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface AuthGetCredentialsRequest {
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { CredentialKey } from './credentialKey';
|
||||
|
||||
|
||||
export interface AuthGetCredentialsResponse {
|
||||
/**
|
||||
* List of credentials, each with an empty secret field.
|
||||
*/
|
||||
credentials?: Array<CredentialKey>;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetTaskTokenForUserRequest {
|
||||
/**
|
||||
* User ID
|
||||
*/
|
||||
user: string;
|
||||
/**
|
||||
* Company ID
|
||||
*/
|
||||
company: string;
|
||||
/**
|
||||
* Requested token expiration time in seconds. Not guaranteed, might be overridden by the service
|
||||
*/
|
||||
expiration_sec?: number;
|
||||
/**
|
||||
* Task ID
|
||||
*/
|
||||
task: string;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetTaskTokenForUserResponse {
|
||||
/**
|
||||
* Token string
|
||||
*/
|
||||
token?: string;
|
||||
}
|
||||
24
src/app/business-logic/model/auth/authGetTaskTokenRequest.ts
Normal file
24
src/app/business-logic/model/auth/authGetTaskTokenRequest.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetTaskTokenRequest {
|
||||
/**
|
||||
* Task ID
|
||||
*/
|
||||
task: string;
|
||||
/**
|
||||
* Requested token expiration time in seconds. Not guaranteed, might be overridden by the service
|
||||
*/
|
||||
expiration_sec?: number;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetTaskTokenResponse {
|
||||
/**
|
||||
* Token string
|
||||
*/
|
||||
token?: string;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetTokenForUserRequest {
|
||||
/**
|
||||
* User ID
|
||||
*/
|
||||
user: string;
|
||||
/**
|
||||
* Company ID
|
||||
*/
|
||||
company?: string;
|
||||
/**
|
||||
* Requested token expiration time in seconds. Not guaranteed, might be overridden by the service
|
||||
*/
|
||||
expiration_sec?: number;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetTokenForUserResponse {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
token?: string;
|
||||
}
|
||||
24
src/app/business-logic/model/auth/authGetUsersInfoRequest.ts
Normal file
24
src/app/business-logic/model/auth/authGetUsersInfoRequest.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetUsersInfoRequest {
|
||||
/**
|
||||
* user IDs to retrieve information of
|
||||
*/
|
||||
users?: Array<string>;
|
||||
/**
|
||||
* user emails to retrieve information of
|
||||
*/
|
||||
emails?: Array<string>;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetUsersInfoResponse {
|
||||
users?: { [key: string]: object; };
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthGetUsersInfoResponseUsers {
|
||||
created?: Date;
|
||||
email?: string;
|
||||
}
|
||||
20
src/app/business-logic/model/auth/authLoginRequest.ts
Normal file
20
src/app/business-logic/model/auth/authLoginRequest.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthLoginRequest {
|
||||
/**
|
||||
* Requested token expiration time in seconds. Not guaranteed, might be overridden by the service
|
||||
*/
|
||||
expiration_sec?: number;
|
||||
}
|
||||
20
src/app/business-logic/model/auth/authLoginResponse.ts
Normal file
20
src/app/business-logic/model/auth/authLoginResponse.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthLoginResponse {
|
||||
/**
|
||||
* Token string
|
||||
*/
|
||||
token?: string;
|
||||
}
|
||||
15
src/app/business-logic/model/auth/authLogoutRequest.ts
Normal file
15
src/app/business-logic/model/auth/authLogoutRequest.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface AuthLogoutRequest {
|
||||
}
|
||||
15
src/app/business-logic/model/auth/authLogoutResponse.ts
Normal file
15
src/app/business-logic/model/auth/authLogoutResponse.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface AuthLogoutResponse {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthRevokeCredentialsRequest {
|
||||
/**
|
||||
* Credentials key
|
||||
*/
|
||||
access_key?: string;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthRevokeCredentialsResponse {
|
||||
/**
|
||||
* Number of credentials revoked
|
||||
*/
|
||||
revoked?: number;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthSetCredentialsRequest {
|
||||
/**
|
||||
* Credentials key. Must be identical to the user\'s ID (this is the only value supported in on-premises deployments)
|
||||
*/
|
||||
access_key: string;
|
||||
/**
|
||||
* New secret key
|
||||
*/
|
||||
secret_key: string;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthSetCredentialsResponse {
|
||||
/**
|
||||
* True if secret was successfully set, False otherwise
|
||||
*/
|
||||
set?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthValidateTokenRequest {
|
||||
/**
|
||||
* Token string
|
||||
*/
|
||||
token: string;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthValidateTokenResponse {
|
||||
/**
|
||||
* Boolean indicating if the token is valid
|
||||
*/
|
||||
valid?: boolean;
|
||||
/**
|
||||
* Associated user ID
|
||||
*/
|
||||
user?: string;
|
||||
/**
|
||||
* Associated company ID
|
||||
*/
|
||||
company?: string;
|
||||
}
|
||||
32
src/app/business-logic/model/auth/authValidateUserRequest.ts
Normal file
32
src/app/business-logic/model/auth/authValidateUserRequest.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthValidateUserRequest {
|
||||
/**
|
||||
* Email address uniquely identifying the user
|
||||
*/
|
||||
email: string;
|
||||
/**
|
||||
* Provider ID indicating the external provider used to authenticate the user
|
||||
*/
|
||||
provider: string;
|
||||
/**
|
||||
* Unique user ID assigned by the external provider
|
||||
*/
|
||||
provider_user_id: string;
|
||||
/**
|
||||
* Provider-issued token for this user
|
||||
*/
|
||||
provider_token?: string;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface AuthValidateUserResponse {
|
||||
/**
|
||||
* Boolean indicating if the user is valid
|
||||
*/
|
||||
valid?: boolean;
|
||||
/**
|
||||
* Associated user ID
|
||||
*/
|
||||
user?: string;
|
||||
/**
|
||||
* Associated company ID
|
||||
*/
|
||||
company?: string;
|
||||
/**
|
||||
* Validation message
|
||||
*/
|
||||
msg?: string;
|
||||
}
|
||||
24
src/app/business-logic/model/auth/credentialKey.ts
Normal file
24
src/app/business-logic/model/auth/credentialKey.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface CredentialKey {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
access_key?: string;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
last_used?: Date;
|
||||
}
|
||||
24
src/app/business-logic/model/auth/credentials.ts
Normal file
24
src/app/business-logic/model/auth/credentials.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface Credentials {
|
||||
/**
|
||||
* Credentials access key
|
||||
*/
|
||||
access_key?: string;
|
||||
/**
|
||||
* Credentials secret key
|
||||
*/
|
||||
secret_key?: string;
|
||||
}
|
||||
18
src/app/business-logic/model/auth/models.ts
Normal file
18
src/app/business-logic/model/auth/models.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export * from './authCreateCredentialsResponse';
|
||||
export * from './authCreateUserRequest';
|
||||
export * from './authCreateUserResponse';
|
||||
export * from './authEditUserRequest';
|
||||
export * from './authEditUserResponse';
|
||||
export * from './authFixedUsersModeResponse';
|
||||
export * from './authGetCredentialsResponse';
|
||||
export * from './authGetTokenForUserRequest';
|
||||
export * from './authGetTokenForUserResponse';
|
||||
export * from './authLoginRequest';
|
||||
export * from './authLoginResponse';
|
||||
export * from './authRevokeCredentialsRequest';
|
||||
export * from './authRevokeCredentialsResponse';
|
||||
export * from './authValidateTokenRequest';
|
||||
export * from './authValidateTokenResponse';
|
||||
export * from './credentialKey';
|
||||
export * from './credentials';
|
||||
export * from './role';
|
||||
22
src/app/business-logic/model/auth/role.ts
Normal file
22
src/app/business-logic/model/auth/role.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* auth
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export type Role = 'admin' | 'superuser' | 'user' | 'annotator';
|
||||
|
||||
export const Role = {
|
||||
Admin: 'admin' as Role,
|
||||
Superuser: 'superuser' as Role,
|
||||
User: 'user' as Role,
|
||||
Annotator: 'annotator' as Role
|
||||
}
|
||||
23
src/app/business-logic/model/events/eventTypeEnum.ts
Normal file
23
src/app/business-logic/model/events/eventTypeEnum.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export type EventTypeEnum = 'training_stats_scalar' | 'training_stats_vector' | 'training_debug_image' | 'plot' | 'log';
|
||||
|
||||
export const EventTypeEnum = {
|
||||
TrainingStatsScalar: 'training_stats_scalar' as EventTypeEnum,
|
||||
TrainingStatsVector: 'training_stats_vector' as EventTypeEnum,
|
||||
TrainingDebugImage: 'training_debug_image' as EventTypeEnum,
|
||||
Plot: 'plot' as EventTypeEnum,
|
||||
Log: 'log' as EventTypeEnum
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsAddBatchResponse {
|
||||
added?: number;
|
||||
errors?: number;
|
||||
}
|
||||
15
src/app/business-logic/model/events/eventsAddRequest.ts
Normal file
15
src/app/business-logic/model/events/eventsAddRequest.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface EventsAddRequest {
|
||||
}
|
||||
15
src/app/business-logic/model/events/eventsAddResponse.ts
Normal file
15
src/app/business-logic/model/events/eventsAddResponse.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface EventsAddResponse {
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { TaskMetric } from './taskMetric';
|
||||
|
||||
|
||||
export interface EventsDebugImagesRequest {
|
||||
/**
|
||||
* List metrics for which the envents will be retreived
|
||||
*/
|
||||
metrics: Array<TaskMetric>;
|
||||
/**
|
||||
* Max number of latest iterations for which to return debug images
|
||||
*/
|
||||
iters?: number;
|
||||
/**
|
||||
* If set then events are retreived from later iterations to earlier ones. Otherwise from earlier iterations to the later. The default is True
|
||||
*/
|
||||
navigate_earlier?: boolean;
|
||||
/**
|
||||
* If set then scroll will be moved to the latest iterations. The default is False
|
||||
*/
|
||||
refresh?: boolean;
|
||||
/**
|
||||
* Scroll ID of previous call (used for getting more results)
|
||||
*/
|
||||
scroll_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsDebugImagesResponse {
|
||||
/**
|
||||
* Debug image events grouped by task metrics and iterations
|
||||
*/
|
||||
metrics?: Array<object>;
|
||||
/**
|
||||
* Scroll ID for getting more results
|
||||
*/
|
||||
scroll_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsDeleteForTaskRequest {
|
||||
/**
|
||||
* Task ID
|
||||
*/
|
||||
task: string;
|
||||
/**
|
||||
* Allow deleting events even if the task is locked
|
||||
*/
|
||||
allow_locked?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsDeleteForTaskResponse {
|
||||
/**
|
||||
* Number of deleted events
|
||||
*/
|
||||
deleted?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsDownloadTaskLogRequest {
|
||||
/**
|
||||
* Task ID
|
||||
*/
|
||||
task: string;
|
||||
/**
|
||||
* Line format type
|
||||
*/
|
||||
line_type?: EventsDownloadTaskLogRequest.LineTypeEnum;
|
||||
/**
|
||||
* Line string format. Used if the line type is \'text\'
|
||||
*/
|
||||
line_format?: string;
|
||||
}
|
||||
export namespace EventsDownloadTaskLogRequest {
|
||||
export type LineTypeEnum = 'json' | 'text';
|
||||
export const LineTypeEnum = {
|
||||
Json: 'json' as LineTypeEnum,
|
||||
Text: 'text' as LineTypeEnum
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: 2.2
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface EventsDownloadTaskLogResponse {
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetMultiTaskPlotsRequest {
|
||||
/**
|
||||
* List of task IDs
|
||||
*/
|
||||
tasks: Array<string>;
|
||||
/**
|
||||
* Max number of latest iterations for which to return debug images
|
||||
*/
|
||||
iters?: number;
|
||||
/**
|
||||
* Scroll ID of previous call (used for getting more results)
|
||||
*/
|
||||
scroll_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetMultiTaskPlotsResponse {
|
||||
/**
|
||||
* Plots mapping (keyed by task name)
|
||||
*/
|
||||
plots?: object;
|
||||
/**
|
||||
* Number of results returned
|
||||
*/
|
||||
returned?: number;
|
||||
/**
|
||||
* Total number of results available for this query
|
||||
*/
|
||||
total?: number;
|
||||
/**
|
||||
* Scroll ID for getting more results
|
||||
*/
|
||||
scroll_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetScalarMetricDataRequest {
|
||||
/**
|
||||
* task ID
|
||||
*/
|
||||
task?: string;
|
||||
/**
|
||||
* type of metric
|
||||
*/
|
||||
metric?: string;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetScalarMetricDataResponse {
|
||||
/**
|
||||
* task scalar metric events
|
||||
*/
|
||||
events?: Array<object>;
|
||||
/**
|
||||
* amount of events returned
|
||||
*/
|
||||
returned?: number;
|
||||
/**
|
||||
* amount of events in task
|
||||
*/
|
||||
total?: number;
|
||||
/**
|
||||
* Scroll ID of previous call (used for getting more results)
|
||||
*/
|
||||
scroll_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetScalarMetricsAndVariantsRequest {
|
||||
/**
|
||||
* task ID
|
||||
*/
|
||||
task: string;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetScalarMetricsAndVariantsResponse {
|
||||
metrics?: object;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskEventsRequest {
|
||||
/**
|
||||
* Task ID
|
||||
*/
|
||||
task: string;
|
||||
/**
|
||||
* \'asc\' (default) or \'desc\'.
|
||||
*/
|
||||
order?: EventsGetTaskEventsRequest.OrderEnum;
|
||||
/**
|
||||
* Pass this value on next call to get next page
|
||||
*/
|
||||
scroll_id?: string;
|
||||
/**
|
||||
* Number of events to return each time (default 500)
|
||||
*/
|
||||
batch_size?: number;
|
||||
/**
|
||||
* Return only events of this type
|
||||
*/
|
||||
event_type?: string;
|
||||
}
|
||||
export namespace EventsGetTaskEventsRequest {
|
||||
export type OrderEnum = 'asc' | 'desc';
|
||||
export const OrderEnum = {
|
||||
Asc: 'asc' as OrderEnum,
|
||||
Desc: 'desc' as OrderEnum
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskEventsResponse {
|
||||
/**
|
||||
* Events list
|
||||
*/
|
||||
events?: Array<object>;
|
||||
/**
|
||||
* Number of results returned
|
||||
*/
|
||||
returned?: number;
|
||||
/**
|
||||
* Total number of results available for this query
|
||||
*/
|
||||
total?: number;
|
||||
/**
|
||||
* Scroll ID for getting more results
|
||||
*/
|
||||
scroll_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskLatestScalarValuesRequest {
|
||||
/**
|
||||
* Task ID
|
||||
*/
|
||||
task: string;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskLatestScalarValuesResponse {
|
||||
metrics?: Array<object>;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskLatestScalarValuesResponseMetrics {
|
||||
/**
|
||||
* Metric name
|
||||
*/
|
||||
name?: string;
|
||||
variants?: Array<object>;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskLatestScalarValuesResponseVariants {
|
||||
/**
|
||||
* Variant name
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Last reported value
|
||||
*/
|
||||
last_value?: number;
|
||||
/**
|
||||
* Average of 100 last reported values
|
||||
*/
|
||||
last_100_value?: number;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskLogRequest {
|
||||
/**
|
||||
* Task ID
|
||||
*/
|
||||
task: string;
|
||||
/**
|
||||
* Timestamp order in which log events will be returned (defaults to ascending)
|
||||
*/
|
||||
order?: EventsGetTaskLogRequest.OrderEnum;
|
||||
/**
|
||||
* Where will the log entries be taken from (default to the head of the log)
|
||||
*/
|
||||
from?: EventsGetTaskLogRequest.FromEnum;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
scroll_id?: string;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
batch_size?: number;
|
||||
}
|
||||
export namespace EventsGetTaskLogRequest {
|
||||
export type OrderEnum = 'asc' | 'desc';
|
||||
export const OrderEnum = {
|
||||
Asc: 'asc' as OrderEnum,
|
||||
Desc: 'desc' as OrderEnum
|
||||
}
|
||||
export type FromEnum = 'head' | 'tail';
|
||||
export const FromEnum = {
|
||||
Head: 'head' as FromEnum,
|
||||
Tail: 'tail' as FromEnum
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskLogResponse {
|
||||
/**
|
||||
* Log items list
|
||||
*/
|
||||
events?: Array<object>;
|
||||
/**
|
||||
* Number of results returned
|
||||
*/
|
||||
returned?: number;
|
||||
/**
|
||||
* Total number of results available for this query
|
||||
*/
|
||||
total?: number;
|
||||
/**
|
||||
* Scroll ID for getting more results
|
||||
*/
|
||||
scroll_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { EventTypeEnum } from './eventTypeEnum';
|
||||
|
||||
|
||||
export interface EventsGetTaskMetricsRequest {
|
||||
/**
|
||||
* Task IDs
|
||||
*/
|
||||
tasks: Array<string>;
|
||||
event_type?: EventTypeEnum;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* events
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 2.7
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface EventsGetTaskMetricsResponse {
|
||||
/**
|
||||
* List of task with their metrics
|
||||
*/
|
||||
metrics?: Array<object>;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user